-
-
Notifications
You must be signed in to change notification settings - Fork 821
Rename IsPropertyNaming to NonBooleanPropertyPrefixedWithIs? #2819
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2819 +/- ##
============================================
+ Coverage 79.78% 79.81% +0.03%
- Complexity 2506 2507 +1
============================================
Files 427 427
Lines 7534 7537 +3
Branches 1420 1420
============================================
+ Hits 6011 6016 +5
+ Misses 767 766 -1
+ Partials 756 755 -1
Continue to review full report at Codecov.
|
|
Imho If possible I'd try to keep the |
But this rule will report the inverse of BooleanPropertyNameing -> all properties which are not of type boolean and start with an |
|
I like your proposal more that the current one. But the problem with the name make me think... Should this be part of the |
Piggybacking on this. Imho we should have a |
|
A lot of people look at detekt as a guideline. If we add something like that they will think that name all your boolean properties with |
yup, agree on this, it's probably too strict and will lead to a lot of local |
|
I agree with @BraisGabin here. Detekt should have a controversial ruleset, which is disabled by default. This rule would be a perfect candidate for this new ruleset. |
|
🤔 I think that we mixed some ideas here. I think that this rule is good. Naming a property I mean, the rule, as it is right now is not controversial. If we force that ALL the boolean variables are prefixed with My point is: should we merge this rule with |
Yup that's probably the best place to go. So we will end up with a rule that has a flag that enables a more "advanced" naming analysis only if a BindingContext is provided. I don't know if we have already similar rules that offer "mixed" analysis and how we want to proceed on this front. |
|
Ok, I will leave this PR open for now, remove Edit: I'm not sure if a configuration property like |
6d7e4c7 to
e1e7c29
Compare
How do we feel about the
I also feel this rule could probably be moved there |
|
@cortinico @BraisGabin @schalkms Edit: well |
Agree here. For what concerns this specific rule, I'd +1 the new name
|
I'm not sure if this is a better name but I wanted to start a discussion if we should rename the rule.
Imo IsPropertyNaming could lead to confusion.