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

No output on v1.2 with findbugs #1

Closed
sjudd opened this issue Dec 25, 2017 · 7 comments
Closed

No output on v1.2 with findbugs #1

sjudd opened this issue Dec 25, 2017 · 7 comments

Comments

@sjudd
Copy link
Contributor

sjudd commented Dec 25, 2017

I've attempted to add this to Glide here so that it's possible to see violations in travis-ci directly. There's a pending commit here: sjudd/glide@5e21322.

I've added a findbugs failure which I see in the gradle output (./gradlew :library:check) but I don't see any output or failure from this plugin.

@tomasbjerre
Copy link
Owner

You need to specify the pattern to let the plugin identify the findbugs report-file. Also to make that task run after check has been completed.

Here is my script:
https://github.com/tomasbjerre/gradle-scripts/blob/master/src/main/resources/java.gradle

I use it in git-changelog-lib, if you do ./gradlew build -i it will output some comments.

@sjudd
Copy link
Contributor Author

sjudd commented Dec 25, 2017

Wups, added the violations task to that commit: sjudd/glide@8bcafac.

./gradlew :library:check still produces no output, but adding -i does, thanks! It might be worth adding that to the readme if that's expected. I also see that you've mentioned that the plugin can "Optionally fail the build depending on violations found." in the readme, but I don't see the option to do that (though I'll probably find it by looking).

@tomasbjerre
Copy link
Owner

Ok. Yes it will fail if the maxViolations property is lower then number of found violations.

@sjudd
Copy link
Contributor Author

sjudd commented Dec 25, 2017

Setting maxViolations to 0 does fail the build, but it doesn't produce the report without -i, would you mind changing it so that it logs the report without a failure only with -i but always logs the report if maxViolations is exceeded?

@tomasbjerre
Copy link
Owner

tomasbjerre commented Dec 25, 2017 via email

@sjudd
Copy link
Contributor Author

sjudd commented Dec 25, 2017

Yeah I was thinking I'd try that. I'm happy to try to figure it out and send you a pull request, it may take me a few days because I'll have to get approval for the patch before I send it, but perhaps there's no rush.

Thanks for doing this, neat library!

@tomasbjerre
Copy link
Owner

Ok yes, sure!

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

No branches or pull requests

2 participants