question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow enabling experimental and/or custom ruleset for ktlint

See original GitHub issue

kotlin and kotlinGradle (in Gradle plugin, haven’t looked at other usages or Spotless) don’t seem to allow using the experimental ruleset of Ktlint (enabling import ordering and indentation rules), and/or custom rulesets (e.g. to re-enable the “no wildcard import” rule that’s now disabled by default in Ktlint 0.33.0)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:11
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
aphexcxcommented, Dec 7, 2020

Hi there! Curious if there’s an update on this. I really want to use spotless with https://github.com/cqfn/diKTat (which is a custom ktlint ruleset along with its own config.)

If this isn’t usable yet, perhaps I could help. I’ve read a bunch of other issues to figure out how hard this would be to implement myself, possibly as a custom Step that calls the diKTat formatter?

0reactions
nedtwiggcommented, Apr 23, 2022

Support for experimental rules was added in plugin-gradle 6.5.0. If someone wants custom rulesets, please open a new issue describing the desired functionality.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Experimental rules - Ktlint
Experimental rules. New rules will be added into the experimental ruleset, which can be enabled by passing the --experimental flag to ktlint ....
Read more >
Add Ktlint to Android app - Andres Sandoval - Medium
Run Gradle task (./gradlew base:ktlint) now it ignored the rules. After configuring Ktlint in your project, you can add the Ktlint Gradle task...
Read more >
android - Real time rules with ktlint - Stack Overflow
Perhaps the following advice does not directly solve your requirement. But, what about making the auto format process part of the build ...
Read more >
How to Automatically Fix Your Code Style With Ktlint - YouTube
In this video you'll learn how you can use ktlint to automatically check and format your code to follow all your coding guidelines....
Read more >
Fetch all tags from https://dev.to using the API - Popular Blocks
#javascript #webdev #beginners #programming #tutorial #react #archlinux #python #news #android #productivity #css #discuss #devops #career ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found