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

Log when non-base suppressions rules are unused #4687

Closed
wants to merge 1 commit into from

Conversation

jeremylong
Copy link
Owner

Fixes #4685

This might be useful to some - a log message has been added when a non-base suppression rule was not used.

@boring-cyborg boring-cyborg bot added the core changes to core label Jul 21, 2022
@jeremylong jeremylong added this to the 7.1.2 milestone Jul 21, 2022
rules.forEach((rule) -> rule.process(dependency));
rules.forEach((rule) -> {
rule.process(dependency);
if (!rule.isMatched() && !rule.isBase()) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Checking for non-usage should be a post-processing activity, as many rules used in a full analysis will not be hit for a specific dependency (as they apply to a different dependency).

Copy link
Owner Author

Choose a reason for hiding this comment

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

Thank you. I completely forgot that these could run several times. I'll update this shortly.

@jeremylong
Copy link
Owner Author

superseded by #4709

@jeremylong jeremylong closed this Jul 27, 2022
@jeremylong jeremylong deleted the logUnusedRules branch August 20, 2022 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core changes to core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Identify suppressions that are no longer needed.
2 participants