-
Notifications
You must be signed in to change notification settings - Fork 85
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
Fix for findbug xml output #614
Conversation
I'm rather cautious of this change for 2 reasons:
It should not be merged without further investigation. |
@bferdinandus Could you please provide some additional info on the error you are getting with the current implementation of Findbug in CFLint in Jenkins? |
I have tried parsing the FindBugs file with the Findbugs plugin (old style, depricated) for Jenkins, the Warnings NG plugin (followup for the Findbugs plugin) for Jenkins, and the Findbugs plugin for Intellij IDEA. All three give the same errors. I’ll first address the timestamp issue I found when parsing the Findbugs xml.
In the java file ProjectStats.java Line 162 you can see the timestamp is parsed with the java function ‘SimpleDateFormat’ with this string as the date format That’s why I added the format date function so the XSL transformation can print the right date format at that one specific location. Next problem I found was the signature attribute on the method node. According to the xsd bugcollection.xsd Line 127 the signature attribute is a required string. So, it cannot be empty. If it is empty the followin error occurs on parsing the Findbugs xml:
After searching throug the findbugs library and analyzing the file SignatureConverter.java It looks like the signature must at least contain parenthesis () and a letter after that determining the return type of the function. So |
76ab370
to
ed18285
Compare
@TheRealAgentK any news about the progress on this pullrequest? |
Any news on the progress of this pullrequest? |
@bferdinandus . Thanks for your detailed analysis, and contribution! I apologize for moving slowly on this one. I agree with all of your modifications -- even the timestamp one. Findbugs seems to choose odd formats for timestamps, and is not consistent even within its own xml format! I confirmed the latest version of spot bugs does use the format you propose on the FindBugsSummary tag. |
There where some problems with the findbugs xml. I was unable to have jenkins parse the xml file because the signature on the Method node was not valid.
Also the timestamp on the FindbugsSummary node was in the wrong format.