MultiRule should pass correctly the BindingContext#4071
MultiRule should pass correctly the BindingContext#4071picklebento merged 2 commits intodetekt:mainfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## main #4071 +/- ##
=========================================
Coverage 83.58% 83.58%
- Complexity 3186 3187 +1
=========================================
Files 459 459
Lines 9099 9101 +2
Branches 1772 1772
=========================================
+ Hits 7605 7607 +2
Misses 561 561
Partials 933 933
Continue to review full report at Codecov.
|
| private val stringClass = StandardNames.FqNames.string.toSafe() | ||
|
|
||
| private val isEmptyFunctions = collectionClasses.map { FqName("$it.isEmpty") } + | ||
| private val emptyCheckFunctions = collectionClasses.map { FqName("$it.isEmpty") } + |
There was a problem hiding this comment.
Is this a renaming that's not relevant? Just checking if we are accidentally cherry-picking other commits.
There was a problem hiding this comment.
It's relevant actually. BooleanPropertyNaming was not the only rule affected by this. The NonBooleanPropertyPrefixedWithIs was affected as well and now got triggered on the codebase.
There was a problem hiding this comment.
It is now catching issues. Got it!
* MultiRule should pass correctly the BindingContext * Fix violation of NonBooleanPropertyPrefixedWithIs
Fixes #4058
The rule
BooleanPropertyNamingthat was recently added relies on Type Resolution. That rule was plugged inside aMultiRuleinstead of a classicalRuleSetProvider.Given that rules rely on inheritance to access a
BindingContext, theMultiRuleshould pass over theBindingContextto the rules he's managing.The result was that
BooleanPropertyNamingwas effectively not running at all. This PR is fixing it.