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

After adding custom warnings parser a bunch of NPE occurs in various classes

XMLWordPrintable

      After adding a custom parser for the clang compiler i keep getting a bunch of NPE (see attached stacktrace) in jenkins system log.
      The warnigs are not shown as expected in the build report.

      Here are the steps to reproduce:
      1. add custom parser to jenkins central configuration
      name: clang compiler warnings
      regex:

      ^\s*(.*):(\d+):(\d+):\s*(.*):\s*(.*)${code}
        convert script:
      {code:groovy}
      import hudson.plugins.warnings.parser.Warning
      
      String fileName = matcher.group(1)
      String lineNumber = matcher.group(2)
      // group 3 is column index
      String category = matcher.group(4)
      String message = matcher.group(5)
      
      return new Warning(fileName, Integer.parseInt(lineNumber), "Dynamic Parser", category, message);
      

      sample message:

      /home/jenkins/jobs/ug-build-clang/workspace/trunk/ugbase/bindings/lua/externals/lua/ltable.c:87:11: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] 

      The creation of the Warning instance works as expected.
      Please investigate the attaced stacktrace.
      If you need further information feel free to contact me!

      Thank you!

            drulli Ulli Hafner
            marscher Martin Scherer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: