Skip to content

Log when non-base suppressions rules are unused#4687

Closed
jeremylong wants to merge 1 commit intomainfrom
logUnusedRules
Closed

Log when non-base suppressions rules are unused#4687
jeremylong wants to merge 1 commit intomainfrom
logUnusedRules

Conversation

@jeremylong
Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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
Copy Markdown
Collaborator 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
Copy Markdown
Collaborator Author

superseded by #4709

@jeremylong jeremylong closed this Jul 27, 2022
@jeremylong jeremylong deleted the logUnusedRules branch August 20, 2022 11:29
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Dec 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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