-
-
Notifications
You must be signed in to change notification settings - Fork 779
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
Add ignoreOverridden support for BooleanPropertyNaming rule #4654
Add ignoreOverridden support for BooleanPropertyNaming rule #4654
Conversation
c794465
to
25b1ddb
Compare
25b1ddb
to
e7a5566
Compare
Great stuff 👍 |
@@ -35,6 +36,9 @@ class BooleanPropertyNaming(config: Config = Config.empty) : Rule(config) { | |||
@Configuration("naming pattern") | |||
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(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.
I would default this to true
. I know, this is to avoid behaviour change but for me this is more a bug fix than a "behaviour change".
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'd be happy to address and make that change. Would others care to weigh in what their thoughts are before I do so? Thank you 🙂
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.
Agree, this is reasonable to be defaulted to true. Is a "bug-fix on steroids"
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.
Done. Thank you so much. 🙂
Thanks for the PR it looks great :) |
* Add ignoreOverridden support for BooleanPropertyNaming * Default to true for ignoreOverridden * Fix tests * Update default-detekt-config.yml
This PR addresses #4652.