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

Match an exclusion or warning rule when the entry is a partial match #46

Merged
merged 1 commit into from
Apr 26, 2022

Conversation

rgeyer
Copy link
Collaborator

@rgeyer rgeyer commented Apr 25, 2022

While working on an existing mixin, several dashboards have a similar reason for exclusion (shown below), but the linter was not excluding them.

Turns out that because the lint error contained a panel name and target idx, the match was not "exact" and was being skipped.

This PR resolves that, and allows partial matches for specific entries on a rule.

exclusions:
  target-instance-rule:    
    reason: These dashboards are cluster wide dashboards. As such 'cluster' takes the place of 'instance'
    entries:
    - dashboard: Kubernetes / Persistent Volumes
    - dashboard: Kubernetes / Compute Resources /  Multi-Cluster
    - dashboard: Kubernetes / Compute Resources / Node (Pods)

@rgeyer rgeyer requested a review from tomwilkie April 25, 2022 21:37
Copy link

@mem mem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rgeyer rgeyer merged commit 6e496ff into main Apr 26, 2022
@rgeyer rgeyer deleted the fix/exclude-multiple-entries branch April 26, 2022 19:53
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.

None yet

2 participants