-
-
Notifications
You must be signed in to change notification settings - Fork 783
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
Clarify WildcardImport
rule configuration
#1888
Conversation
Add information about conflict between `formatting:``NoWildcardImports` and `style:``WildcardImport` rules.
docs/pages/documentation/style.md
Outdated
@@ -1410,6 +1410,11 @@ Library updates can introduce naming clashes with your own classes which might r | |||
Define a whitelist of package names that should be allowed to be imported | |||
with wildcard imports. | |||
|
|||
**NOTE:** This rule conflicts with `NoWildcardImports` formatting rule. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do believe that conflicts here is probably not the best term.
I would rephrase with something like:
**NOTE:** This rule conflicts with `NoWildcardImports` formatting rule. | |
**NOTE:** This rule is similar to the `NoWildcardImports` formatting rule (a wrapper of a KtLint rule). | |
If you need to specify a `excludeImports` configuration, please consider disabling the other rule. |
Or something like that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the wrapper clarification suggestion.
Regarding conflict/similarity: this pull request was born exactly because of the conflict between these two rules and confusion surrounding it. Yes they are indeed similar, but they are also in conflict and the most restrictive one wins.
I have adjusted the wording a bit based on @cortinico 's comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AlexCzar We are really thankful for this doc improvement. Can you please checkout the source file of the WildcardImportRule and add this to the documentation there?
We generate the Markdown documentation for our website based on these source files. This means you need to execute gradle build
once on your local machine.
A bit of a language adjustment for the rule clash description.
* Clarify `WildcardImport` rule configuration Add information about conflict between `formatting:``NoWildcardImports` and `style:``WildcardImport` rules. * NoWildcardImports/WildcardImport clash wording A bit of a language adjustment for the rule clash description. * Regenerate rules documentation (style.md)
* Clarify `WildcardImport` rule configuration Add information about conflict between `formatting:``NoWildcardImports` and `style:``WildcardImport` rules. * NoWildcardImports/WildcardImport clash wording A bit of a language adjustment for the rule clash description. * Regenerate rules documentation (style.md)
* Clarify `WildcardImport` rule configuration Add information about conflict between `formatting:``NoWildcardImports` and `style:``WildcardImport` rules. * NoWildcardImports/WildcardImport clash wording A bit of a language adjustment for the rule clash description. * Regenerate rules documentation (style.md)
* Clarify `WildcardImport` rule configuration Add information about conflict between `formatting:``NoWildcardImports` and `style:``WildcardImport` rules. * NoWildcardImports/WildcardImport clash wording A bit of a language adjustment for the rule clash description. * Regenerate rules documentation (style.md)
Add information about conflict between
formatting:
NoWildcardImports
andstyle:
WildcardImport
rules.There is a conflict between
formatting:
NoWildcardImports
andstyle:
WildcardImport
, effectively the latter and its configuration do not matter when former is enabled. This PR adds a note about the fact to the documentation.