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

docs(gradle): Hint to users as to how to see the unused rules with the current gradle implementation #7328

Merged
merged 1 commit into from
Jan 19, 2025

Conversation

chadlwilson
Copy link
Contributor

Description of Change

Currently due to the way the Gradle plugin is written when failBuildOnUnusedSuppressionRule (and some other analyzers) are used you just get Analysis Failed which is not much fun.

Short of improving the way exceptions are logged with the plugin, or better integrating logging with Gradle lifecycle - this at least tells folks how to see the unused rules, e.g

$ ./gradlew dependencyCheckAggregate --warn
Suppression Rule had zero matches: SuppressionRule{cpe={PropertyType{value=cpe:/a:json-c:json-c, regex=false, caseSensitive=false},}}
There are 1 unused suppression rule(s): check logs.
An error occurred while analyzing '/Users/chad/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/26.0.1/c7ce3cdeda3d18909368dfe5977332dfad326c6d/annotations-26.0.1.jar' (Unused Suppression Rule Analyzer).
Region [NODEAUDIT] : Not alive and dispose was called, filename: NODEAUDIT
Region [CENTRAL] : Not alive and dispose was called, filename: CENTRAL
Region [POM] : Not alive and dispose was called, filename: POM

[Incubating] Problems report is available at: file:///Users/chad/Projects/community/gocd/gocd/target/reports/problems/problems-report.html

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':dependencyCheckAggregate'.
> Analysis failed.

Have test cases been added to cover the new functionality?

N/A

@boring-cyborg boring-cyborg bot added the documentation site documentation label Jan 19, 2025
@chadlwilson chadlwilson changed the title core(docs): Hint to users as to how to see the unused rules with the current gradle implementation docs(gradle): Hint to users as to how to see the unused rules with the current gradle implementation Jan 19, 2025
@chadlwilson chadlwilson force-pushed the improve-unused-rule-docs branch from 64cec43 to 128b743 Compare January 19, 2025 14:53
@jeremylong jeremylong added this to the 12.0.2 milestone Jan 19, 2025
Copy link
Owner

@jeremylong jeremylong left a comment

Choose a reason for hiding this comment

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

LGTM

@jeremylong jeremylong merged commit b8f435f into jeremylong:main Jan 19, 2025
3 checks passed
@chadlwilson chadlwilson deleted the improve-unused-rule-docs branch January 19, 2025 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation site documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants