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

Custom compiler warning for error parsing is not detecting the errors

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • warnings-plugin
    • Ubuntu Linux

      Regular expression is unable to figure out error pattern.
      This bug is in follow up of thread : https://groups.google.com/forum/#!topic/jenkinsci-users/uWI6SU9GVQg

      Global configuration

      Name: Puppet-Error-Parser
      Link name: Puppet-Error-Parser
      Tredn report name : Puppet Error Trend
      Regular Expression: ^.*(err:) (.*)at(.*\.pp):(\d+)$
      

      Mapping script:

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

      Example Log Message:

      19:35:11 err: Could not parse for environment production: Syntax error at '{'; expected '}' at /home/build/jenkins/workspace/puppet-parser-try/modules/profile/manifests/mongodb/abc/shard/master.pp:5
      

      output of regular expression matching
      One warning found
      file name: /home/build/jenkin[...]ongodb/abc/shard/master.pp
      line number: 5
      priority: Normal Priority
      category: err:
      type: Dynamic Parser
      message: Could not parse for [...]apos;; expected '}'

        1. hudson.plugins.warnings.WarningsPublisher.xml
          3 kB
        2. aggregated-warnings.xml
          0.1 kB
        3. changelog.xml
          0.0 kB
        4. console-log.txt
          35 kB
        5. log
          260 kB
        6. puppet-parser-global-configuration.JPG
          puppet-parser-global-configuration.JPG
          119 kB
        7. regexp.txt
          0.0 kB
        8. PuppetErrorParser-warnings.xml
          0.1 kB
        9. aggregated-warnings.xml
          0.1 kB
        10. changelog.xml
          0.0 kB
        11. console-log.txt
          35 kB
        12. log
          260 kB

          [JENKINS-20277] Custom compiler warning for error parsing is not detecting the errors

          Maneesh M P created issue -
          Maneesh M P made changes -
          Attachment New: aggregated-warnings.xml [ 24586 ]
          Attachment New: changelog.xml [ 24587 ]
          Attachment New: console-log.txt [ 24588 ]
          Attachment New: log [ 24589 ]
          Attachment New: puppet-parser-global-configuration.JPG [ 24590 ]
          Attachment New: regexp.txt [ 24591 ]
          Ulli Hafner made changes -
          Description Original: Regular expression is unable to figure out error pattern.
          This bug is in follow up of thread : https://groups.google.com/forum/#!topic/jenkinsci-users/uWI6SU9GVQg

          Global configuration

          Name: Puppet-Error-Parser
          Link name: Puppet-Error-Parser
          Tredn report name : Puppet Error Trend
          Regular Expression: ^.*(err:) (.*)at(.*\.pp):(\d+)$
          Mapping script:
          import hudson.plugins.warnings.parser.Warning

          String category = matcher.group(1)
          String message = matcher.group(2)
          String fileName = matcher.group(3)
          String lineNumber = matcher.group(4)


          return new Warning(fileName, Integer.parseInt(lineNumber), "Dynamic Parser", category, message);

          Example Log Message:
          19:35:11 err: Could not parse for environment production: Syntax error at '{'; expected '}' at /home/build/jenkins/workspace/puppet-parser-try/modules/profile/manifests/mongodb/abc/shard/master.pp:5

          output of regular expression matching
          One warning found
          file name: /home/build/jenkin[...]ongodb/abc/shard/master.pp
          line number: 5
          priority: Normal Priority
          category: err:
          type: Dynamic Parser
          message: Could not parse for [...]apos;; expected '}'

          New: Regular expression is unable to figure out error pattern.
          This bug is in follow up of thread : https://groups.google.com/forum/#!topic/jenkinsci-users/uWI6SU9GVQg

          Global configuration

          {noformat}
          Name: Puppet-Error-Parser
          Link name: Puppet-Error-Parser
          Tredn report name : Puppet Error Trend
          Regular Expression: ^.*(err:) (.*)at(.*\.pp):(\d+)$
          {noformat}

          Mapping script:
          {code}
          import hudson.plugins.warnings.parser.Warning

          String category = matcher.group(1)
          String message = matcher.group(2)
          String fileName = matcher.group(3)
          String lineNumber = matcher.group(4)


          return new Warning(fileName, Integer.parseInt(lineNumber), "Dynamic Parser", category, message);
          {code}
          Example Log Message:
          {noformat}
          19:35:11 err: Could not parse for environment production: Syntax error at '{'; expected '}' at /home/build/jenkins/workspace/puppet-parser-try/modules/profile/manifests/mongodb/abc/shard/master.pp:5
          {noformat}

          output of regular expression matching
          One warning found
          file name: /home/build/jenkin[...]ongodb/abc/shard/master.pp
          line number: 5
          priority: Normal Priority
          category: err:
          type: Dynamic Parser
          message: Could not parse for [...]apos;; expected '}'

          Priority Original: Blocker [ 1 ] New: Minor [ 4 ]
          Ulli Hafner made changes -
          Ulli Hafner made changes -
          Resolution New: Not A Defect [ 7 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 151801 ] New: JNJira + In-Review [ 194103 ]

            drulli Ulli Hafner
            maneeshmp Maneesh M P
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: