Closed rsandell closed 9 years ago
This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation.
:bee:
:bee:
@reviewbybees done
This pull request has completed our internal processes and we now respectfully request the maintainers of this repository to consider our proposal contained within this pull request for merging.
I want to see how findbug works. Could you let me know how to do that?
I could not get bug reports with mvn findbugs:findbugs
even removing SuppressFBWarnings
.
@reviewbybees Please consider to make a guideline for your employees to create good pull requests. Some additional information in pull requests helps developers much.
I found that I had to generate class files first.
mvn package -Dmaven.test.skip=true
mvn findbugs:findbugs -Dfindbugs.jvmArgs="-Duser.language=en -Duser.country=US"
works well. Please let me know if there's an easier way.
And I found that findbug fails with following errors on Windows, Japanese locale:
[Fatal Error] findbugsXml.xml:2:21349: Invalid byte 1 of 1-byte UTF-8 sequence.
findbugsXml.xml looks generated with ShiftJIS (a Japanese character encoding).
It'll annoy me if findbug works even for releasing.
I may have to define outputEncoding
for findbugs.
This looks good to me. I found fingbugs really useful.
@ikedam the output encoding should default to project.reporting.outputEncoding. It looks like this is not set in the parent and is falling back to the platform default - and hence why you are getting Japanese encoding.
As we can't change old releases of the parent the following may work.
<properties>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
Note: - there presumably exists the same issue for the generated javadoc.
To view findbugs - you can do this in your IDE (eclipse, and intellij - I would guess that netbeans has something similar) or you can use mvn findbugs:gui
@jtnord Thanks for the comment! I'll try that.
Would someone enable findbugs feature on jenkins.ci.cloudbees.com for build-timeout-plugin?
I found that I had to ask that before merging this...I worked in a bad way, sorry.
@ikedam enabled and set threshold to zero bugs. build 88 has been kicked off to verify the changes.
@jtnord Thanks a lot! Some warnings look introduced in #40, and I'll work for that.
@ikedam ok. It also reports that the source encoding has not been set.
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
Sorry @ikedam , FindBugs is such a popular tool that I just assumed everyone knew about it and didn't need much explanation. I'll try to do better next time. Those 7 new warnings that showed up in build 88 didn't when I ran it locally on my machine, I thought that I had fixed them all.
findbugs-maven-plugin 3.0.1 looks contain a bug in encoding handling. gleclaire/findbugs-maven-plugin#18 That reproduced also in my environment.
Well its findbugs.xml
that is the interesting one, findbugsXml.xml
is IIUC of an older format that Jenkins can't use anyways.
Configured findbugs for xml output so Jenkins can pick them up. And updated the maven release plugin.
@reviewbybees