diff --git a/README.md b/README.md index 4e78bec773..6b267a6ab9 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ It's also [easy to create your own](#creating-a-reporter). - 4 spaces for indentation (unless a different `indent_size` value is set in .editorconfig (see [EditorConfig](#editorconfig) section for more)); - No semicolons (unless used to separate multiple statements on the same line); -- No wildcard / unused `import`s; +- No unused `import`s; - No consecutive blank lines; - No blank lines before `}`; - No trailing whitespaces; @@ -56,6 +56,13 @@ by passing the `--experimental` flag to `ktlint`. - Indentation formatting - Import ordering +## Disabled rules +- No wildcard `import`s; +- Annotation formatting; +- No underscores in package names; +- Braces required for if/else statements; +- Multi-line lambdas must name `it` param; + ## EditorConfig ktlint recognizes the following [.editorconfig](http://editorconfig.org/) properties (provided they are specified under `[*.{kt,kts}]`): diff --git a/ktlint-ruleset-standard/src/main/kotlin/com/pinterest/ktlint/ruleset/standard/StandardRuleSetProvider.kt b/ktlint-ruleset-standard/src/main/kotlin/com/pinterest/ktlint/ruleset/standard/StandardRuleSetProvider.kt index f158c73555..57fc025ee7 100644 --- a/ktlint-ruleset-standard/src/main/kotlin/com/pinterest/ktlint/ruleset/standard/StandardRuleSetProvider.kt +++ b/ktlint-ruleset-standard/src/main/kotlin/com/pinterest/ktlint/ruleset/standard/StandardRuleSetProvider.kt @@ -33,7 +33,11 @@ class StandardRuleSetProvider : RuleSetProvider { NoTrailingSpacesRule(), NoUnitReturnRule(), NoUnusedImportsRule(), - NoWildcardImportsRule(), + // Disabling because it is now allowed by the Jetbrains styleguide, although it is still disallowed by + // the Android styleguide. + // Re-enable when there is a way to globally disable rules + // See discussion here: https://github.com/pinterest/ktlint/issues/48 + // NoWildcardImportsRule(), ParameterListWrappingRule(), SpacingAroundColonRule(), SpacingAroundCommaRule(),