Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-20154

Warnings Plugin MSBuild parser fails to match Visual Studio Code Analysis warnings

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • warnings-plugin
    • 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".

            drulli Ulli Hafner
            mhambidge Mike Hambidge
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: