Skip to content

Commit

Permalink
Update detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/A…
Browse files Browse the repository at this point in the history
…nalyzer.kt

Co-authored-by: marschwar <marschwar@users.noreply.github.com>
  • Loading branch information
BraisGabin and marschwar committed Aug 4, 2022
1 parent 975ea18 commit 7076dfc
Showing 1 changed file with 2 additions and 6 deletions.
Expand Up @@ -115,12 +115,8 @@ internal class Analyzer(

val (correctableRules, otherRules) = activeRuleSetsToRuleSetConfigs
.flatMap { (ruleSet, _) -> ruleSet.rules.asSequence() }
.let { sequence ->
if (bindingContext == BindingContext.EMPTY) {
sequence.filterNot { rule -> rule::class.hasAnnotation<RequiresTypeResolution>() }
} else {
sequence
}
.filter { rule ->
bindingContext != BindingContext.EMPTY || !rule::class.hasAnnotation<RequiresTypeResolution>()
}
.partition { isCorrectable(it) }

Expand Down

0 comments on commit 7076dfc

Please sign in to comment.