-
Notifications
You must be signed in to change notification settings - Fork 503
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
Support for globally disabling a rule #208
Comments
As much as I would like to see this feature land in ktlint myself, I think the current option is to look into detekt and detekt/detekt#855 specifically, which allows more fine-grained disable/enable of ktlint rules. |
Just to let people know, detekt is not an option for maven projects so far, only available on gradle. 😞 |
Although a true statement, there are workarounds... |
@elenigen Detekt is not only available for Gradle. It provides a CLI tool that you can run anywhere. |
Actually, what I wanted to say is, there's no built-in feature for maven, although there's a workaround. |
Fixes pinterest#208 * Added support for .ktlintignore file - takes a list of rule Ids to disable (ignores comments) * Currently only supports globally disabling rules, but added some plumbing so that it's easier to support per-file/per-path disabling, or multiple .ktlintignore files * Re-enabled NoWildcardImports, PackageNameRule * Un-commented AnnotationRule, MultiLineIfElseRule, and NoItParamInMultilineLambdaRule, and moved disabling into .ktlintignore
… disabling rules Fixes pinterest#208 * Takes in a comma-separated list of rule ids, with namespaces (e.g. `experimental:indent`) * Re-enabled `NoWildcardImports`, `PackageNameRule` * Un-commented `AnnotationRule`, `MultiLineIfElseRule`, and `NoItParamInMultilineLambdaRule`, and moved disabling into default `.editorconfig` * Also cleaned up params passed to lint and format
… disabling rules Fixes pinterest#208 * Takes in a comma-separated list of rule ids, with namespaces (e.g. `experimental:indent`) * Re-enabled `NoWildcardImports`, `PackageNameRule` * Un-commented `AnnotationRule`, `MultiLineIfElseRule`, and `NoItParamInMultilineLambdaRule`, and moved disabling into default `.editorconfig` * Also cleaned up params passed to lint and format
… disabling rules (#503) * Add support for disabled_rules property to .editorconfig for globally disabling rules Fixes #208 * Takes in a comma-separated list of rule ids, with namespaces (e.g. `experimental:indent`) * Re-enabled `NoWildcardImports`, `PackageNameRule` * Un-commented `AnnotationRule`, `MultiLineIfElseRule`, and `NoItParamInMultilineLambdaRule`, and moved disabling into default `.editorconfig` * Also cleaned up params passed to lint and format
… disabling rules (pinterest#503) * Add support for disabled_rules property to .editorconfig for globally disabling rules Fixes pinterest#208 * Takes in a comma-separated list of rule ids, with namespaces (e.g. `experimental:indent`) * Re-enabled `NoWildcardImports`, `PackageNameRule` * Un-commented `AnnotationRule`, `MultiLineIfElseRule`, and `NoItParamInMultilineLambdaRule`, and moved disabling into default `.editorconfig` * Also cleaned up params passed to lint and format
I've seen that this issue of support for globally disabling a rule comes up multiple times. I'd like to propose simple support (not even for a given scope, just across the board) for disabling a comma separated list of rule names in the .editorconfig or some ktlint config file or via command line. This would be an opt-in advanced feature not put any burden on someone who does not want to make any config decisions.
The text was updated successfully, but these errors were encountered: