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

Still output to console when ignoreFailures=true #774

Open
ctoomey opened this issue Aug 23, 2022 · 1 comment
Open

Still output to console when ignoreFailures=true #774

ctoomey opened this issue Aug 23, 2022 · 1 comment
Labels

Comments

@ctoomey
Copy link

ctoomey commented Aug 23, 2022

First off, thanks for creating and maintaining this plugin. Now for the ask.

When I run with ignoreFailures=true, I'd still like to see what bugs it found via the console output and link to the generated report when applicable. I just don't want it to fail the task / build.

Currently it silences the console output, even though it still (silently) generates the report.

The PMD plugin minimally displays the count of bugs and a link to the report when ignoreFailures=true:

> Task :pmdMain
Removed misconfigured rule: LoosePackageCoupling  cause: No packages or classes specified
199 PMD rule violations were found. See the report at: file:///...i/build/reports/pmd/main.html

and has a boolean consoleOutput option that when true also reports the individual bugs to the console.

That'd be ideal from my perspective.

@KengoTODA
Copy link
Member

PMD and SpotBugs are different. In my opinion, it is not good to change what-to-be-printed by ignoreFailures option; it seems a kind of side-effect for ignoreFailures option and will make plugins non-intuitive and hard to control.

So if you have motivation to stop printing some in the console, I suggest you to set another report type like text, then the console output will be calm so you can focus on other parts when you read the log.

Note that ignoreFailures in SpotBugs makes stack traces not printed, see https://github.com/spotbugs/spotbugs-gradle-plugin/releases/tag/5.0.0 for reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants