-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
Jenkins 1.529 on Windows 7 Enterprise SP 1 under Java 1.7.0_25 32-bit
Microsoft Visual Studio Premium 2012 Version 11.0.60610.01 Update 3
The Code Analysis functionality in Visual Studio (2012 at least, I haven't tested other versions) outputs warnings in a format that the warnings plugin fails to detect. As such Code Analysis warnings are not being reported.
Specifically, an example line of a code analysis warning is:
i:\devel\projects\SampleCodeAnalysis\SampleCodeAnalysis\Program.cs(12): warning : CA1801 : Microsoft.Usage : Parameter 'args' of 'Program.Main(string[])' is never used. Remove the parameter or use it in the method body. [I:\devel\projects\SampleCodeAnalysis\SampleCodeAnalysis\SampleCodeAnalysis.csproj]
Note that an extra space appears between the identifier "CA1801" and the subsequent colon. My testing seems to indicate that the regex pattern used in the MSBuild parser does not support this additional space character.
The MSBuild parser does correctly detect other msbuild warnings, including the very similar StyleCop warnings that do not include the additional space character.
I've attached a sample console output that contains some code analysis warnings as "RebuildOutput.log". I've also attached the sample Visual Studio project used to generate the console output as "SampleCodeAnalysis.zip".
Code changed in jenkins
User: Ulli Hafner
Path:
src/main/java/hudson/plugins/warnings/parser/MsBuildParser.java
src/test/java/hudson/plugins/warnings/parser/MsBuildParserTest.java
src/test/resources/hudson/plugins/warnings/parser/issue20154.txt
http://jenkins-ci.org/commit/warnings-plugin/0172694fad6ec6ffbe0ef977476c12d5f3cbf209
Log:
[FIXED JENKINS-20154] Improved regexp to catch Visual Studio messages.