Skip to end of metadata
Go to start of metadata

Warning plugin expects PcLint warnings in the following format:

foo.h(5): Info 701: This is an info message from PcLint

Add these options to PcLint to produce the proper output:

+ffn // force full path names
-width(0) // don't insert line breaks (unlimited output width).
-hf1 // message height one
-"format=%f(%l): %t %n: %m"

These -format option will add hyperlinks to the "Details" - pane (damaged in 4.28):

-"format=%f(%l): %t %n: %m (%t <a href=\qhttp://<your-jenkins-server>/userContent/LintMsgRef.html#%n\q>%n</a>)"

LintMsgRef.html is a local copy of to relieve the gimpel-server; moreover the copy can be extended with own comments and advices.
Unfortunately the tooltips are not clickable.
Here is a workaround for versions >= 4.28:
Removing all & escapes from PCLint-warnings.xml. With plugin, sed and windows batch:
(The might work also)

sed -i "s|[&]amp;|\&|g" %WORKSPACE:workspace=jobs%\builds%BUILD_NUMBER%\PCLint-warnings.xml
rem (using braces with [&]: otherwise the Post+build+task plugin will not properly escape it.)

Here are two bash-sipplets that might also be helpful:

"'back to the sixties', Warnings+Plugin - format"
# ie 'Drill down' the collective message 960 MISRA X.Y to 30XY. (1960 MISRA X.Y.Z to 4XYZ)(961/1963 also)
sed -i \
-e 's|\(Note \)\(96[01]\)\(.* Rule \)\([0-9]*\)\.\([0-9]*\)|Warning 30_____0\4_____0\5\3\4\.\5|g' \
-e 's|\(Note \)\(196[03]\)\(.* Rule \)\([0-9]*\)\-\([0-9]*\)-\([0-9]*\)|Warning 4_____0\4_____0\5_____0\6\3\4-\5-\6|g' \
-e 's|_____[0-9]*\([0-9][0-9]\)|\1|g' \
# subst1: c     "…960 … Rule 2.10"  ->  "300210 … Rule 2.10"         (Preceding 30, notice leading zero, also for 961)
# subst2: cpp  "…1960 … Rule 1.20.3" -> "4012003 … Rule 1.20.3"  (Preceeding 4, …, also 1963)
#   c and cpp:
#      Add always a preceeding _____ and always a leading zero.
#      The "Note" is elevated to "Warning". If that is not desired, replace "Warning " by "\1".
# subst3: then remove again the _____ and the superfluous leading zeros
"'back to the sixties', env-xml.lnt - format"
# (eg for aloa, eg for excel-import.)
sed -i \
-e 's|<type>Note\(.*\)\(<code>96[01]\)\(</code>.* Rule \)\([0-9]*\)\.\([0-9]*\)| <type>Warning\1<code>30_____0\4_____0\5\3\4\.\5|g' \
-e 's|<type>Note\(.*\)\(<code>196[03]\)\(</code>.* Rule \)\([0-9]*\)\-\([0-9]*\)-\([0-9]*\)|<type>Warning\1<code>4_____0\4_____0\5_____0\6\3\4-\5-\6|g' \
-e 's|_____[0-9]*\([0-9][0-9]\)|\1|g' \

  • No labels