Rename IsPropertyNaming to NonBooleanPropertyPrefixedWithIs?#2819
Rename IsPropertyNaming to NonBooleanPropertyPrefixedWithIs?#2819arturbosch merged 1 commit intomasterfrom
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.