SwiftLint icon indicating copy to clipboard operation
SwiftLint copied to clipboard

Parent config falsely reporting only_rules error when in child config

Open Tyler-Keith-Thompson opened this issue 2 years ago • 0 comments

New Issue Checklist

Describe the bug

So we've got a parent config that has only_rules. That parent config configured rules that they did not put in only_rules. The parent config is not one we can choose.

Our child config uses opt_in_rules to enable what the parent configured. However SwiftLint reports:

Found a configuration for 'class_delegate_protocol' rule, but it is not present on 'only_rules'.

Now this is a true statement but the rule is enabled AND the configuration is adhered to. So the warning is giving superfluous information and cluttering our Xcode warnings.

PARENT:

only_rules:
  - comma

colon:
  severity: error

CHILD:

parent_config: url-to-parent-config-over-https
opt_in_rules:
  - colon

Additional Context

  • I do not have easy access to merely change the parent config, as it's owned by a different team.

Tyler-Keith-Thompson avatar Jun 24 '22 18:06 Tyler-Keith-Thompson