Improved iar and MS Visual Studio message detection

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      The following error from MS Visual Studio is not found by the Warnings plugin

      ..\\..\\..\\xx_Source\\file.c(54): fatal error c1083: cannot open include file: 'Header.h': No such file or directory 
      

      I've made a reg ex that finds it, fell free to use/modify

      "^\\s*(.+)\\((\\d+)\\)\\s*:\\s*([\\w\\s]+\\d+)\\s*:\\s*(.+)$"
      

      The following linker error from IAR Embedded Workbench 3.60 is not found by the Warnings plugin

      Error[e46]: Undefined external "xxx" referred in Source ( c:\Projects\.....\Source.r85 )
      

      I've made a reg ex that finds it, fell free to use/modify

      "^\\s*(\\w+\\[\\w\\d+\\]):\\s*(.*)\\s*\\(\\s*(.*)\\)$"
      

      Also, I've made a new reg ex. for PC-lint. The PC_Lint and MS visual studio created the same output, so it was detected twice...
      I'm using PC-lint with this setup:
      -width(0) // don't insert line breaks (unlimited output width).
      +ffn
      -hf1 // message height one
      -"format=%f %l %t %n: %m"
      reg ex:

      ^\s*([a-zA-Z]:\\..+)\s+(\d+)\s+(.+):\s+(.*)
      

      and using this code:

      import hudson.plugins.warnings.parser.Warning
      import hudson.plugins.analysis.util.model.Priority;
      
      String fileName = matcher.group(1)
      String lineNumber = matcher.group(2)
      String category = matcher.group(3)
      String message = matcher.group(4)
      Priority priority = Priority.HIGH;
      
             if (category.startsWith("Info" )) {
                  priority = Priority.LOW;
              }
          
             if (category.startsWith("Warning")) {
                  priority = Priority.NORMAL;
              }
             if (category.startsWith("Error")) {
                  priority = Priority.HIGH;
              }
      
      return new Warning(fileName, Integer.parseInt(lineNumber), "PC-LINT", category, message, priority );
      

            Assignee:
            Ulli Hafner
            Reporter:
            Torben Pedersen
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: