One of our partners has written a report plugin to integrate with Jenkins. They have asked us not to post the code online, but if you are interested and your maintenance is current, let us know and we can send you the plugin. – email@example.com
Here are some notes/details about the plugin from one of our customers:
The plugin gives you a GUI front end to pick some options
Path to source works for workspace relative
Path to configuration works for absolute (good if sharing a config across multiple jobs)
When the job runs, there are a few lines in console (so you know something happened):
[workspace] $ cmd.exe /C und create -db foo_cc.udb -languages c++
[workspace] $ cmd.exe /C und add src/ foo_cc.udb
Files added: 1
[workspace] $ cmd.exe /C und analyze foo_cc.udb
Files Added: 0
Files Removed: 0
Analyze Completed (Errors:0 Warnings:0)
[workspace] $ cmd.exe /C und codecheck -htmlsnippets Z:ToolsJenkinsUnderstandCodecheckConfiguration.ini build_2014-01-09_11-22-53/codecheckReport foo_cc.udb
Begin Analysis: Thursday, January 09, 2014 11:23:17 AM
End Analysis: Thursday, January 09, 2014 11:23:17 AM
Violations Found: 0
Violations Ignored: 0
Violations Remaining: 0
When its done, it creates a dir in the workspace:
URL : jenkins:/view/All/job/foo/build_2014-01-09_11-22-53/codecheckReport/
There may be no obvious strategy for priority banding the CodeCheck results. CodeCheck would have to support something for the plugin/parser to key off of.
In the past I’ve notionally mapped things like MISRA required/recommended/advisory to HIGH/NORMAL/LOW respectively. Its less obvious for other checker tree’s.
You basically need to write your own script (Jenkins -> Manage Jenkins -> Configure System -> Compiler Warnings)
that parses the .csv and make the data visible to the warnings plugin to get any kind of additional integration.
I named this “Understand.CodeCheck” since I have sometimes made another pattern to look for analysis log issues
(e.g. perl issues in Understand, or include path issues in .udb setup)
And then use that in the job config
you can use a $BUILD variable to get just the latest report in the pattern. This is why in my script I keep the latest in the workspace, and use the artifact mechanism to preserve per build results….
To be able to get a report for each build/job