-
Notifications
You must be signed in to change notification settings - Fork 510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configure custom rulesets in .editorconfig #2939
Comments
What do you mean with this? How do you invoke ktlint? What build system are you using? |
Ideally I'd just invoke
#!/bin/bash
ktlint -R ktlint-custom-rules/ktlint-custom-rules.jar "$@" This is all just from the terminal. We do also have a gradle task set up, but the start up time of gradle tasks is long enough to make it not ideal to use. |
Ok clear. Adding a configuration for this to the Do you use different custom rulesets per project? If not, it might be simpler to provide your ktlint wrapper at a shared location. Also, you might want to consider to use the ktlint-intellij-plugin (requires usage of an JetBrains IDEA, or Android Studion), as it provides instant formatting of your rules. It allows you to configure custom rulesets per project. But it has the same downside that you have to configure that per project. |
Expected Behavior
It would be useful if you could specify the path/s to custom rulesets in the .editorconfig. Currently to get my project to use custom rulesets I've had to make a custom wrapper that the team uses to invoke
ktlint
. Although this works it's not as integrated and it's easy for someone to invokektlint
directly without loading the custom rulesets, often resulting in a failure being raised at some point later in the CI pipeline.Additional information
The text was updated successfully, but these errors were encountered: