-
-
Notifications
You must be signed in to change notification settings - Fork 758
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
Run same rule multiple times with different configuration #7263
base: main
Are you sure you want to change the base?
Conversation
The output has rule ids like |
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 really like this :D
detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/Analyzer.kt
Outdated
Show resolved
Hide resolved
config/detekt/detekt.yml
Outdated
@@ -1,3 +1,6 @@ | |||
config: | |||
validation: false |
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.
Why this?
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.
The validation code doesn't know about this type of config keys yet. I need to implement that. I disabled it just to make it work for now. As I said this is still not ready to merge. I just wanted to share it to show that this is near to be done.
detekt-api/src/main/kotlin/io/gitlab/arturbosch/detekt/api/Rule.kt
Outdated
Show resolved
Hide resolved
Indeed. Copy&paste error. I fixed it now. |
fe4a059
to
b4e7660
Compare
ba4ad98
to
1667d70
Compare
detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/rules/SingleRuleProvider.kt
Fixed
Show fixed
Hide fixed
detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/rules/SingleRuleProvider.kt
Fixed
Show fixed
Hide fixed
detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/rules/SingleRuleProvider.kt
Fixed
Show fixed
Hide fixed
detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/rules/SingleRuleProvider.kt
Fixed
Show fixed
Hide fixed
detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/rules/SingleRuleProvider.kt
Fixed
Show fixed
Hide fixed
detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/rules/SingleRuleProvider.kt
Fixed
Show fixed
Hide fixed
detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/rules/SingleRuleProvider.kt
Fixed
Show fixed
Hide fixed
detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/rules/SingleRuleProvider.kt
Fixed
Show fixed
Hide fixed
detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/rules/SingleRuleProvider.kt
Fixed
Show fixed
Hide fixed
detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/rules/SingleRuleProvider.kt
Fixed
Show fixed
Hide fixed
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.
detekt found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
1667d70
to
d4db32d
Compare
d325745
to
d570d28
Compare
d570d28
to
ab77c23
Compare
ab77c23
to
e438dbc
Compare
Ok, this is a NOT FINISHED work. But I wanted to share with you that after all those PRs detekt is able to run multiple instances of the same rule with different configurations.
I have this configuration:
And it produces this output:
And you can see at the end that one rule reports the files inside
test
and the other insidemain
. 🎉There is still work to make this production ready but it is happening!