Remove ignoreOverridden config from BooleanPropertyNaming etc.#5718
Conversation
Codecov Report
@@ Coverage Diff @@
## main #5718 +/- ##
============================================
- Coverage 84.59% 84.59% -0.01%
+ Complexity 3790 3776 -14
============================================
Files 546 546
Lines 12918 12916 -2
Branches 2268 2268
============================================
- Hits 10928 10926 -2
Misses 861 861
Partials 1129 1129
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
schalkms
left a comment
There was a problem hiding this comment.
Looks good! Thanks for tidying up!
|
@BraisGabin do you want to review this, since you brought up this improvement? |
BraisGabin
left a comment
There was a problem hiding this comment.
Thanks for the PR! And sorry for the late review. If you could fix what I point out in my other comment we can merge this.
| private val allowedPattern: Regex by config("^(is|has|are)", String::toRegex) | ||
|
|
||
| @Configuration("ignores properties that have the override modifier") | ||
| private val ignoreOverridden: Boolean by config(true) |
There was a problem hiding this comment.
This is a "breaking change". It is not in the "normal way" but we treat the yaml configuration as part of our public API.
Instead of removing the property, just keep it and add it this annotation @Deprecated("This configuration is ignored") (I'm not inspired with my descriptions feel free to improve it).
Other option is to add the deprecation atio.gitlab.arturbosch.detekt.generator.printer.writeMigratedRules. This way we keep the code clean.
What bothe options does is to keep detekt-core/src/main/resources/deprecation.properties up to date with old the deprecations.
There was a problem hiding this comment.
Thanks, that's a clever way to manage deprecation. I have assumed that between the two ways of doing things you have stated, the first way is cleaner because the code is kept in sync with the deprecation.properties.
I just need to rebase this on the latest main before we review again. I will ping later today when it is ready 🙏
There was a problem hiding this comment.
Thanks @BraisGabin I think this is ready for you to have another look at now
ca36280 to
c6c00e6
Compare
There was a problem hiding this comment.
detekt found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.
Fixes #5600 where it was agreed to remove
ignoreOverriddenfrom 5 rules:BooleanPropertyNamingConstructorParameterNamingFunctionNamingVariableNamingFunctionParameterNaming