Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: disabling of rules using comments #1284

Merged
merged 5 commits into from
Sep 21, 2023
Merged

fix: disabling of rules using comments #1284

merged 5 commits into from
Sep 21, 2023

Conversation

didroe
Copy link
Contributor

@didroe didroe commented Sep 21, 2023

Description

Fixes disabling of rules with comments, which was broken by #1206.

The issue was that we weren't adding the disabled rules to the correct node, and we also weren't looking up using the correct node!

As part of the fix, we now store the transitive disabled rules for a node. ie. when a disabled rule is added, we add it to all of the node's descendants. This avoids looking at all of the ancestors for each node we visit during rule evaluation.

Also improves test coverage in this area.

Related

Checklist

  • I've added test coverage that shows my fix or feature works as expected.
  • I've updated or added documentation if required.
  • I've included usage information in the description if CLI behavior was updated or added.
  • PR title follows Conventional Commits format

@didroe didroe requested a review from cfabianski September 21, 2023 10:43
@didroe didroe merged commit a684dcc into main Sep 21, 2023
10 checks passed
@didroe didroe deleted the fix/disabled-rules branch September 21, 2023 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Magic comment stopped working
2 participants