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

Include file url to html report in output message #284

Closed
cmuchinsky opened this issue Jun 18, 2020 · 4 comments · Fixed by #285
Closed

Include file url to html report in output message #284

cmuchinsky opened this issue Jun 18, 2020 · 4 comments · Fixed by #285

Comments

@cmuchinsky
Copy link

cmuchinsky commented Jun 18, 2020

The new stack trace suppression feature(see #275) is certainly an improvement, however when enabled the ability to get the location of the html report is lost. Ideally the short error message would contain the url to the report so it can be easily opened with a right click in intelligent terminal applications. This is especially helpful in multi-project builds where there might be lots of different reports generated. With stack traces enabled I see:

> Task :spotbugsMain
SpotBugs reported failures
org.gradle.api.GradleException: Verification failed: SpotBugs violation found: 1. SpotBugs report can be found in /Users/redacted/build/reports/findbugs/main.html
...

Which contains the raw information, but also an unsightly stack trace, but with stack traces disabled I only get:

> Task :spotbugsMain
SpotBugs reported failures

Which doesn't help me located the report. Ideally I would see something like what PMD reports, which contains all the relevant information and a clickable URL link:

> Task :pmdMain
1 PMD rule violations were found. See the report at: file:///Users/redacted/build/reports/pmd/main.html
@jscancella
Copy link
Contributor

Should be able to change this line

log.warn("SpotBugs reported failures", showStackTraces ? e : null);

to log.warn("SpotBugs reported failures", showStackTraces ? e : e.message()); or something like it to just show the message which contains the information about the report.

@cmuchinsky
Copy link
Author

@jscancella thanks for taking a look, it would be appreciated if the file name in the exception message was a URL as well so it can be opened easily using tools that support it.

@jscancella
Copy link
Contributor

@cmuchinsky I created a new ticket for you in regards to the report being a URL
#286

KengoTODA pushed a commit that referenced this issue Jun 19, 2020
* feat: this fixes #284 - when suppressing stack trace still print message about where report is

* feat: refs #284 - add unit test to prove report location is still printed even when suppressing stack trace

* feat: refs #284 - removing line that should have been moved to different test

* feat: refs #284 - fixing whitespace
@github-actions
Copy link

🎉 This issue has been resolved in version 4.4.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging a pull request may close this issue.

2 participants