Skip to content

Commit

Permalink
Disabled rules in child configs are no longer automatically ignored i…
Browse files Browse the repository at this point in the history
…f they are opt-in
  • Loading branch information
mildm8nnered committed Apr 4, 2023
1 parent 6d4bc78 commit c4c2571
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,7 @@ internal extension Configuration {

// Only use parent disabled / optIn if child config doesn't tell the opposite
return .default(
disabled: Set(childDisabled).union(Set(disabled.filter { !childOptIn.contains($0) }))
.filter {
!isOptInRule($0, allRulesWrapped: newAllRulesWrapped)
},
disabled: Set(childDisabled).union(Set(disabled.filter { !childOptIn.contains($0) })),
optIn: Set(childOptIn).union(Set(optIn.filter { !childDisabled.contains($0) }))
.filter {
isOptInRule($0, allRulesWrapped: newAllRulesWrapped)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ opt_in_rules:
- private_action

disabled_rules:
- empty_count
- force_cast
- private_outlet
- trailing_closure

line_length: 80

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ opt_in_rules:
- private_action

disabled_rules:
- empty_count
- force_cast
- private_outlet
- trailing_closure

line_length: 80

Expand Down

0 comments on commit c4c2571

Please sign in to comment.