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

Warnings Compiler Plugin for Visual Studio c++

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • warnings-plugin
    • None
    • warnings-plugin

      Visual Studio c++ compiler warnings are not detected by warnings plugin.

      I used Clang, Sun c+, TI code composer studio (c/c+), Wind river, Cpplinit. But nothing works out.

      E.g warning:
      "C:\Jenkins\val.vcxproj" (Rebuild target) (19) ->
      src\path\to\hello.cpp(310): warning C4244: '=' : conversion from 'double' to 'int', possible loss of data

      Am I missing something?

          [JENKINS-35100] Warnings Compiler Plugin for Visual Studio c++

          Ulli Hafner added a comment -

          Did you try MS Build parser?

          Ulli Hafner added a comment - Did you try MS Build parser?

          Tamil Selvan added a comment -

          MSBuild works out.
          Thanks a lot for the quick response.

          Nevertheless I made a parser to skip build target warning:

          Regex

          ^\s*(.*)\((\d+)\):\s*warning\s(.*?):\s(.*)(\[.*\])
          

          Groovy Script

          import hudson.plugins.warnings.parser.Warning
          
          String fileName = matcher.group(1)
          String lineNumber = matcher.group(2)
          String category = matcher.group(3)
          String message = matcher.group(4)
          
          return new Warning(fileName, Integer.parseInt(lineNumber), "VSc++", category, message);
          

          Tamil Selvan added a comment - MSBuild works out. Thanks a lot for the quick response. Nevertheless I made a parser to skip build target warning: Regex ^\s*(.*)\((\d+)\):\s*warning\s(.*?):\s(.*)(\[.*\]) Groovy Script import hudson.plugins.warnings.parser.Warning String fileName = matcher.group(1) String lineNumber = matcher.group(2) String category = matcher.group(3) String message = matcher.group(4) return new Warning(fileName, Integer .parseInt(lineNumber), "VSc++" , category, message);

          Tamil Selvan added a comment -

          MSBuild works out.

          Tamil Selvan added a comment - MSBuild works out.

            drulli Ulli Hafner
            tamsha Tamil Selvan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: