• 5.0.0-beta2

      Please make the Warnings Plugin output on the build result page whether or not the threshold has been exceeded (and if so, how) similar to how Checkstyle, PMD, CPD etc. checks in Jenkins show that.

      Example 1: Task Scanner Plugin Output

      Here is a screenshot of what the Task Scanner plugin shows:

      Notice the explanatory details below the first line.

      Example 2: Warnings Plugin Output

      And then here is what the Warnings Plugin shows:

      Notice the lack of details below the first line. There are 5 High Priority issues that are blocking the build from being consider Stable, but you would not be able to tell from this.
       

      Steps to Reproduce

      1. Configure the Warnings Plugin in Manage Jenkins with the following Parser:
        • Name: Generic Log Analysis
        • Link name: Generic Log Analysis
        • Trend report name: Generic Log Analysis
        • Regular expression:
          .*(FATAL|fatal|SEVERE|severe|ERROR|error|WARN|warn|WARNING|warning|NOTICE|notice|FIXME|fixme|TODO|XXX)[:\]\s]+(.*)
        • Mapping script:
          import hudson.plugins.warnings.parser.Warning
          import hudson.plugins.analysis.util.model.Priority
          
          String fileName = ""
          String lineNumber = ""
          String category = ""
          String type = matcher.group(1)
          String message = type + ": " + matcher.group(2)
          
          Priority prio = Priority.HIGH 
          if (type == "WARN" || type == "warn" || type == "WARNING" || type == "warning" || type == "TODO") {
          prio = Priority.NORMAL;
          } else if (type == "NOTICE" || type == "XXX") {
          prio = Priority.NORMAL;
          }
          
          return new Warning(fileName, 0, "Generic Log Analysis Parser", category, message, prio);
        • Example log message:
          Bla [warn] There is something wrong
      2. Create a pipeline job with this invocation of the Warnings Plugin:
        warnings canComputeNew: false, defaultEncoding: 'UTF-8', shouldDetectModules: params.DETECT_MODULES, unstableTotalHigh: '0', includePattern: '', excludePattern: '', healthy: '', unHealthy: '', messagesPattern: '', canResolveRelativePaths: false, consoleParsers: [[parserName: 'Generic Log Analysis']]
      3. In the pipeline script, echo an error, e.g.:
        echo "ERROR: This should trigger the Warnings Plugin"
      4. Run the pipeline job.

      Expected Result

      1. Build finishes successfully.
      2. Build status is UNSTABLE.
      3. 1 high-priority issue is raised by the Warnings Plugin.
      4. On the build page, there is a section labeled “Generic Log Analysis” and it lists 1 warning.
      5. In that section there is an indication that a threshold has been exceeded, similar to Checkstyle, PMD, CPD etc. checks in Jenkins.

      Actual Result

      1.  Build finishes successfully.
      2.  Build status is UNSTABLE.
      3.  1 high-priority issue is raised by the Warnings Plugin.
      4.  On the build page, there is a section labeled “Generic Log Analysis” and it lists 1 warning.
      5.  In that section there is no indication that a threshold has been exceeded.

          [JENKINS-46758] Show violations on build page

          Ernst de Haan created issue -
          Ernst de Haan made changes -
          Description Original: Please make the Warnings Plugin output on the build result page whether or not the threshold has been exceeded (and if so, how) similar to how Checkstyle, PMD, CPD etc. checks in Jenkins show that.

          (/) Here is a screenshot of what the Task Scanner plugin shows:

          !Screenshot 2017-09-08 17.45.55.png|width=1108!

          Notice the details below the first line.

          (x) And then here is what the Warnings Plugin shows:

           !Screenshot 2017-09-08 17.49.05.png|width=289!

          Notice the lack of details below the first line. There are 5 High Priority issues that are blocking the build from being consider _Stable_, but you would not be able to tell from this.
           
          h2. Steps to Reproduce
           # Configure the Warnings Plugin in _Manage Jenkins_ with the following Parser:
           ** Name: *{{Generic Log Analysis}}*
           ** Link name: *{{Generic Log Analysis}}*
           ** Trend report name: *{{Generic Log Analysis}}*
           ** Regular expression:
          {code:java}
          .*(FATAL|fatal|SEVERE|severe|ERROR|error|WARN|warn|WARNING|warning|NOTICE|notice|FIXME|fixme|TODO|XXX)[:\]\s]+(.*){code}

           ** Mapping script:
          {code:java}
          import hudson.plugins.warnings.parser.Warning
          import hudson.plugins.analysis.util.model.Priority

          String fileName = ""
          String lineNumber = ""
          String category = ""
          String type = matcher.group(1)
          String message = type + ": " + matcher.group(2)

          Priority prio = Priority.HIGH
          if (type == "WARN" || type == "warn" || type == "WARNING" || type == "warning" || type == "TODO") {
          prio = Priority.NORMAL;
          } else if (type == "NOTICE" || type == "XXX") {
          prio = Priority.NORMAL;
          }

          return new Warning(fileName, 0, "Generic Log Analysis Parser", category, message, prio);{code}

           ** Example log message:
          {code:java}
          Bla [warn] There is something wrong{code}

           # Create a pipeline job with this invocation of the Warnings Plugin:
          {code:java}
          warnings canComputeNew: false, defaultEncoding: 'UTF-8', shouldDetectModules: params.DETECT_MODULES, unstableTotalHigh: '0', includePattern: '', excludePattern: '', healthy: '', unHealthy: '', messagesPattern: '', canResolveRelativePaths: false, consoleParsers: [[parserName: 'Generic Log Analysis']]{code}

           # In the pipeline script, echo an error, e.g.:
          {code:java}
          echo "ERROR: This should trigger the Warnings Plugin"{code}

           # Run the pipeline job.

          h2. Expected Result
           # Build finishes successfully.
           # Build status is *{{UNSTABLE}}*.
           # 1 high-priority issue is raised by the Warnings Plugin.
           # On the build page, there is a section labeled “Generic Log Analysis” and it lists 1 warning.
           # In that section there is an indication that a threshold has been exceeded, similar to Checkstyle, PMD, CPD etc. checks in Jenkins.

          h2. Actual Result
           # (/) Build finishes successfully.
           # (/) Build status is *{{UNSTABLE}}*.
           # (/) 1 high-priority issue is raised by the Warnings Plugin.
           # (/) On the build page, there is a section labeled “Generic Log Analysis” and it lists 1 warning.
           # (x) In that section there is no indication that a threshold has been exceeded.
          New: Please make the Warnings Plugin output on the build result page whether or not the threshold has been exceeded (and if so, how) similar to how Checkstyle, PMD, CPD etc. checks in Jenkins show that.

          (/) Here is a screenshot of what the Task Scanner plugin shows:

          !Screenshot 2017-09-08 17.45.55.png|width=554!

          Notice the details below the first line.

          (x) And then here is what the Warnings Plugin shows:

           !Screenshot 2017-09-08 17.49.05.png|width=289!

          Notice the lack of details below the first line. There are 5 High Priority issues that are blocking the build from being consider _Stable_, but you would not be able to tell from this.
           
          h2. Steps to Reproduce
           # Configure the Warnings Plugin in _Manage Jenkins_ with the following Parser:
           ** Name: *{{Generic Log Analysis}}*
           ** Link name: *{{Generic Log Analysis}}*
           ** Trend report name: *{{Generic Log Analysis}}*
           ** Regular expression:
          {code:java}
          .*(FATAL|fatal|SEVERE|severe|ERROR|error|WARN|warn|WARNING|warning|NOTICE|notice|FIXME|fixme|TODO|XXX)[:\]\s]+(.*){code}

           ** Mapping script:
          {code:java}
          import hudson.plugins.warnings.parser.Warning
          import hudson.plugins.analysis.util.model.Priority

          String fileName = ""
          String lineNumber = ""
          String category = ""
          String type = matcher.group(1)
          String message = type + ": " + matcher.group(2)

          Priority prio = Priority.HIGH
          if (type == "WARN" || type == "warn" || type == "WARNING" || type == "warning" || type == "TODO") {
          prio = Priority.NORMAL;
          } else if (type == "NOTICE" || type == "XXX") {
          prio = Priority.NORMAL;
          }

          return new Warning(fileName, 0, "Generic Log Analysis Parser", category, message, prio);{code}

           ** Example log message:
          {code:java}
          Bla [warn] There is something wrong{code}

           # Create a pipeline job with this invocation of the Warnings Plugin:
          {code:java}
          warnings canComputeNew: false, defaultEncoding: 'UTF-8', shouldDetectModules: params.DETECT_MODULES, unstableTotalHigh: '0', includePattern: '', excludePattern: '', healthy: '', unHealthy: '', messagesPattern: '', canResolveRelativePaths: false, consoleParsers: [[parserName: 'Generic Log Analysis']]{code}

           # In the pipeline script, echo an error, e.g.:
          {code:java}
          echo "ERROR: This should trigger the Warnings Plugin"{code}

           # Run the pipeline job.

          h2. Expected Result
           # Build finishes successfully.
           # Build status is *{{UNSTABLE}}*.
           # 1 high-priority issue is raised by the Warnings Plugin.
           # On the build page, there is a section labeled “Generic Log Analysis” and it lists 1 warning.
           # In that section there is an indication that a threshold has been exceeded, similar to Checkstyle, PMD, CPD etc. checks in Jenkins.

          h2. Actual Result
           # (/) Build finishes successfully.
           # (/) Build status is *{{UNSTABLE}}*.
           # (/) 1 high-priority issue is raised by the Warnings Plugin.
           # (/) On the build page, there is a section labeled “Generic Log Analysis” and it lists 1 warning.
           # (x) In that section there is no indication that a threshold has been exceeded.
          Ernst de Haan made changes -
          Description Original: Please make the Warnings Plugin output on the build result page whether or not the threshold has been exceeded (and if so, how) similar to how Checkstyle, PMD, CPD etc. checks in Jenkins show that.

          (/) Here is a screenshot of what the Task Scanner plugin shows:

          !Screenshot 2017-09-08 17.45.55.png|width=554!

          Notice the details below the first line.

          (x) And then here is what the Warnings Plugin shows:

           !Screenshot 2017-09-08 17.49.05.png|width=289!

          Notice the lack of details below the first line. There are 5 High Priority issues that are blocking the build from being consider _Stable_, but you would not be able to tell from this.
           
          h2. Steps to Reproduce
           # Configure the Warnings Plugin in _Manage Jenkins_ with the following Parser:
           ** Name: *{{Generic Log Analysis}}*
           ** Link name: *{{Generic Log Analysis}}*
           ** Trend report name: *{{Generic Log Analysis}}*
           ** Regular expression:
          {code:java}
          .*(FATAL|fatal|SEVERE|severe|ERROR|error|WARN|warn|WARNING|warning|NOTICE|notice|FIXME|fixme|TODO|XXX)[:\]\s]+(.*){code}

           ** Mapping script:
          {code:java}
          import hudson.plugins.warnings.parser.Warning
          import hudson.plugins.analysis.util.model.Priority

          String fileName = ""
          String lineNumber = ""
          String category = ""
          String type = matcher.group(1)
          String message = type + ": " + matcher.group(2)

          Priority prio = Priority.HIGH
          if (type == "WARN" || type == "warn" || type == "WARNING" || type == "warning" || type == "TODO") {
          prio = Priority.NORMAL;
          } else if (type == "NOTICE" || type == "XXX") {
          prio = Priority.NORMAL;
          }

          return new Warning(fileName, 0, "Generic Log Analysis Parser", category, message, prio);{code}

           ** Example log message:
          {code:java}
          Bla [warn] There is something wrong{code}

           # Create a pipeline job with this invocation of the Warnings Plugin:
          {code:java}
          warnings canComputeNew: false, defaultEncoding: 'UTF-8', shouldDetectModules: params.DETECT_MODULES, unstableTotalHigh: '0', includePattern: '', excludePattern: '', healthy: '', unHealthy: '', messagesPattern: '', canResolveRelativePaths: false, consoleParsers: [[parserName: 'Generic Log Analysis']]{code}

           # In the pipeline script, echo an error, e.g.:
          {code:java}
          echo "ERROR: This should trigger the Warnings Plugin"{code}

           # Run the pipeline job.

          h2. Expected Result
           # Build finishes successfully.
           # Build status is *{{UNSTABLE}}*.
           # 1 high-priority issue is raised by the Warnings Plugin.
           # On the build page, there is a section labeled “Generic Log Analysis” and it lists 1 warning.
           # In that section there is an indication that a threshold has been exceeded, similar to Checkstyle, PMD, CPD etc. checks in Jenkins.

          h2. Actual Result
           # (/) Build finishes successfully.
           # (/) Build status is *{{UNSTABLE}}*.
           # (/) 1 high-priority issue is raised by the Warnings Plugin.
           # (/) On the build page, there is a section labeled “Generic Log Analysis” and it lists 1 warning.
           # (x) In that section there is no indication that a threshold has been exceeded.
          New: Please make the Warnings Plugin output on the build result page whether or not the threshold has been exceeded (and if so, how) similar to how Checkstyle, PMD, CPD etc. checks in Jenkins show that.

          h2. Example 1: Task Scanner Plugin Output
          Here is a screenshot of what the Task Scanner plugin shows:

          !Screenshot 2017-09-08 17.45.55.png|width=554!

          (/) Notice the explanatory details below the first line.

          h2. Example 2: Warnings Plugin Output
          And then here is what the Warnings Plugin shows:

           !Screenshot 2017-09-08 17.49.05.png|width=289!

          (x) Notice the lack of details below the first line. There are 5 High Priority issues that are blocking the build from being consider _Stable_, but you would not be able to tell from this.
           
          h2. Steps to Reproduce
           # Configure the Warnings Plugin in _Manage Jenkins_ with the following Parser:
           ** Name: *{{Generic Log Analysis}}*
           ** Link name: *{{Generic Log Analysis}}*
           ** Trend report name: *{{Generic Log Analysis}}*
           ** Regular expression:
          {code:java}
          .*(FATAL|fatal|SEVERE|severe|ERROR|error|WARN|warn|WARNING|warning|NOTICE|notice|FIXME|fixme|TODO|XXX)[:\]\s]+(.*){code}

           ** Mapping script:
          {code:java}
          import hudson.plugins.warnings.parser.Warning
          import hudson.plugins.analysis.util.model.Priority

          String fileName = ""
          String lineNumber = ""
          String category = ""
          String type = matcher.group(1)
          String message = type + ": " + matcher.group(2)

          Priority prio = Priority.HIGH
          if (type == "WARN" || type == "warn" || type == "WARNING" || type == "warning" || type == "TODO") {
          prio = Priority.NORMAL;
          } else if (type == "NOTICE" || type == "XXX") {
          prio = Priority.NORMAL;
          }

          return new Warning(fileName, 0, "Generic Log Analysis Parser", category, message, prio);{code}

           ** Example log message:
          {code:java}
          Bla [warn] There is something wrong{code}

           # Create a pipeline job with this invocation of the Warnings Plugin:
          {code:java}
          warnings canComputeNew: false, defaultEncoding: 'UTF-8', shouldDetectModules: params.DETECT_MODULES, unstableTotalHigh: '0', includePattern: '', excludePattern: '', healthy: '', unHealthy: '', messagesPattern: '', canResolveRelativePaths: false, consoleParsers: [[parserName: 'Generic Log Analysis']]{code}

           # In the pipeline script, echo an error, e.g.:
          {code:java}
          echo "ERROR: This should trigger the Warnings Plugin"{code}

           # Run the pipeline job.

          h2. Expected Result
           # Build finishes successfully.
           # Build status is *{{UNSTABLE}}*.
           # 1 high-priority issue is raised by the Warnings Plugin.
           # On the build page, there is a section labeled “Generic Log Analysis” and it lists 1 warning.
           # In that section there is an indication that a threshold has been exceeded, similar to Checkstyle, PMD, CPD etc. checks in Jenkins.

          h2. Actual Result
           # (/) Build finishes successfully.
           # (/) Build status is *{{UNSTABLE}}*.
           # (/) 1 high-priority issue is raised by the Warnings Plugin.
           # (/) On the build page, there is a section labeled “Generic Log Analysis” and it lists 1 warning.
           # (x) In that section there is no indication that a threshold has been exceeded.
          Ernst de Haan made changes -
          Description Original: Please make the Warnings Plugin output on the build result page whether or not the threshold has been exceeded (and if so, how) similar to how Checkstyle, PMD, CPD etc. checks in Jenkins show that.

          h2. Example 1: Task Scanner Plugin Output
          Here is a screenshot of what the Task Scanner plugin shows:

          !Screenshot 2017-09-08 17.45.55.png|width=554!

          (/) Notice the explanatory details below the first line.

          h2. Example 2: Warnings Plugin Output
          And then here is what the Warnings Plugin shows:

           !Screenshot 2017-09-08 17.49.05.png|width=289!

          (x) Notice the lack of details below the first line. There are 5 High Priority issues that are blocking the build from being consider _Stable_, but you would not be able to tell from this.
           
          h2. Steps to Reproduce
           # Configure the Warnings Plugin in _Manage Jenkins_ with the following Parser:
           ** Name: *{{Generic Log Analysis}}*
           ** Link name: *{{Generic Log Analysis}}*
           ** Trend report name: *{{Generic Log Analysis}}*
           ** Regular expression:
          {code:java}
          .*(FATAL|fatal|SEVERE|severe|ERROR|error|WARN|warn|WARNING|warning|NOTICE|notice|FIXME|fixme|TODO|XXX)[:\]\s]+(.*){code}

           ** Mapping script:
          {code:java}
          import hudson.plugins.warnings.parser.Warning
          import hudson.plugins.analysis.util.model.Priority

          String fileName = ""
          String lineNumber = ""
          String category = ""
          String type = matcher.group(1)
          String message = type + ": " + matcher.group(2)

          Priority prio = Priority.HIGH
          if (type == "WARN" || type == "warn" || type == "WARNING" || type == "warning" || type == "TODO") {
          prio = Priority.NORMAL;
          } else if (type == "NOTICE" || type == "XXX") {
          prio = Priority.NORMAL;
          }

          return new Warning(fileName, 0, "Generic Log Analysis Parser", category, message, prio);{code}

           ** Example log message:
          {code:java}
          Bla [warn] There is something wrong{code}

           # Create a pipeline job with this invocation of the Warnings Plugin:
          {code:java}
          warnings canComputeNew: false, defaultEncoding: 'UTF-8', shouldDetectModules: params.DETECT_MODULES, unstableTotalHigh: '0', includePattern: '', excludePattern: '', healthy: '', unHealthy: '', messagesPattern: '', canResolveRelativePaths: false, consoleParsers: [[parserName: 'Generic Log Analysis']]{code}

           # In the pipeline script, echo an error, e.g.:
          {code:java}
          echo "ERROR: This should trigger the Warnings Plugin"{code}

           # Run the pipeline job.

          h2. Expected Result
           # Build finishes successfully.
           # Build status is *{{UNSTABLE}}*.
           # 1 high-priority issue is raised by the Warnings Plugin.
           # On the build page, there is a section labeled “Generic Log Analysis” and it lists 1 warning.
           # In that section there is an indication that a threshold has been exceeded, similar to Checkstyle, PMD, CPD etc. checks in Jenkins.

          h2. Actual Result
           # (/) Build finishes successfully.
           # (/) Build status is *{{UNSTABLE}}*.
           # (/) 1 high-priority issue is raised by the Warnings Plugin.
           # (/) On the build page, there is a section labeled “Generic Log Analysis” and it lists 1 warning.
           # (x) In that section there is no indication that a threshold has been exceeded.
          New: Please make the Warnings Plugin output on the build result page whether or not the threshold has been exceeded (and if so, how) similar to how Checkstyle, PMD, CPD etc. checks in Jenkins show that.

          h2. Example 1: Task Scanner Plugin Output
          Here is a screenshot of what the Task Scanner plugin shows:

          !Screenshot 2017-09-08 17.45.55.png|width=554!

          (/) Notice the explanatory details below the first line.

          h2. Example 2: Warnings Plugin Output
          And then here is what the Warnings Plugin shows:

           !Screenshot 2017-09-08 17.49.05.png|width=289!

          (x) Notice the lack of details below the first line. There are 5 High Priority issues that are blocking the build from being consider _Stable_, but you would not be able to tell from this.
           
          h2. Steps to Reproduce
           # Configure the Warnings Plugin in _Manage Jenkins_ with the following Parser:
           #* Name: *{{Generic Log Analysis}}*
           #* Link name: *{{Generic Log Analysis}}*
           #* Trend report name: *{{Generic Log Analysis}}*
           #* Regular expression:
          {code:java}
          .*(FATAL|fatal|SEVERE|severe|ERROR|error|WARN|warn|WARNING|warning|NOTICE|notice|FIXME|fixme|TODO|XXX)[:\]\s]+(.*){code}

           ** Mapping script:
          {code:java}
          import hudson.plugins.warnings.parser.Warning
          import hudson.plugins.analysis.util.model.Priority

          String fileName = ""
          String lineNumber = ""
          String category = ""
          String type = matcher.group(1)
          String message = type + ": " + matcher.group(2)

          Priority prio = Priority.HIGH
          if (type == "WARN" || type == "warn" || type == "WARNING" || type == "warning" || type == "TODO") {
          prio = Priority.NORMAL;
          } else if (type == "NOTICE" || type == "XXX") {
          prio = Priority.NORMAL;
          }

          return new Warning(fileName, 0, "Generic Log Analysis Parser", category, message, prio);{code}

          #* Example log message:
          {code:java}
          Bla [warn] There is something wrong{code}
          # Create a pipeline job with this invocation of the Warnings Plugin:
          {code:java}
          warnings canComputeNew: false, defaultEncoding: 'UTF-8', shouldDetectModules: params.DETECT_MODULES, unstableTotalHigh: '0', includePattern: '', excludePattern: '', healthy: '', unHealthy: '', messagesPattern: '', canResolveRelativePaths: false, consoleParsers: [[parserName: 'Generic Log Analysis']]{code}
          # In the pipeline script, echo an error, e.g.:
          {code:java}
          echo "ERROR: This should trigger the Warnings Plugin"{code}
          # Run the pipeline job.

          h2. Expected Result
          # Build finishes successfully.
          # Build status is *{{UNSTABLE}}*.
          # 1 high-priority issue is raised by the Warnings Plugin.
          # On the build page, there is a section labeled “Generic Log Analysis” and it lists 1 warning.
          # In that section there is an indication that a threshold has been exceeded, similar to Checkstyle, PMD, CPD etc. checks in Jenkins.

          h2. Actual Result
          # (/) Build finishes successfully.
          # (/) Build status is *{{UNSTABLE}}*.
          # (/) 1 high-priority issue is raised by the Warnings Plugin.
          # (/) On the build page, there is a section labeled “Generic Log Analysis” and it lists 1 warning.
          # (x) In that section there is no indication that a threshold has been exceeded.
          Ernst de Haan made changes -
          Description Original: Please make the Warnings Plugin output on the build result page whether or not the threshold has been exceeded (and if so, how) similar to how Checkstyle, PMD, CPD etc. checks in Jenkins show that.

          h2. Example 1: Task Scanner Plugin Output
          Here is a screenshot of what the Task Scanner plugin shows:

          !Screenshot 2017-09-08 17.45.55.png|width=554!

          (/) Notice the explanatory details below the first line.

          h2. Example 2: Warnings Plugin Output
          And then here is what the Warnings Plugin shows:

           !Screenshot 2017-09-08 17.49.05.png|width=289!

          (x) Notice the lack of details below the first line. There are 5 High Priority issues that are blocking the build from being consider _Stable_, but you would not be able to tell from this.
           
          h2. Steps to Reproduce
           # Configure the Warnings Plugin in _Manage Jenkins_ with the following Parser:
           #* Name: *{{Generic Log Analysis}}*
           #* Link name: *{{Generic Log Analysis}}*
           #* Trend report name: *{{Generic Log Analysis}}*
           #* Regular expression:
          {code:java}
          .*(FATAL|fatal|SEVERE|severe|ERROR|error|WARN|warn|WARNING|warning|NOTICE|notice|FIXME|fixme|TODO|XXX)[:\]\s]+(.*){code}

           ** Mapping script:
          {code:java}
          import hudson.plugins.warnings.parser.Warning
          import hudson.plugins.analysis.util.model.Priority

          String fileName = ""
          String lineNumber = ""
          String category = ""
          String type = matcher.group(1)
          String message = type + ": " + matcher.group(2)

          Priority prio = Priority.HIGH
          if (type == "WARN" || type == "warn" || type == "WARNING" || type == "warning" || type == "TODO") {
          prio = Priority.NORMAL;
          } else if (type == "NOTICE" || type == "XXX") {
          prio = Priority.NORMAL;
          }

          return new Warning(fileName, 0, "Generic Log Analysis Parser", category, message, prio);{code}

          #* Example log message:
          {code:java}
          Bla [warn] There is something wrong{code}
          # Create a pipeline job with this invocation of the Warnings Plugin:
          {code:java}
          warnings canComputeNew: false, defaultEncoding: 'UTF-8', shouldDetectModules: params.DETECT_MODULES, unstableTotalHigh: '0', includePattern: '', excludePattern: '', healthy: '', unHealthy: '', messagesPattern: '', canResolveRelativePaths: false, consoleParsers: [[parserName: 'Generic Log Analysis']]{code}
          # In the pipeline script, echo an error, e.g.:
          {code:java}
          echo "ERROR: This should trigger the Warnings Plugin"{code}
          # Run the pipeline job.

          h2. Expected Result
          # Build finishes successfully.
          # Build status is *{{UNSTABLE}}*.
          # 1 high-priority issue is raised by the Warnings Plugin.
          # On the build page, there is a section labeled “Generic Log Analysis” and it lists 1 warning.
          # In that section there is an indication that a threshold has been exceeded, similar to Checkstyle, PMD, CPD etc. checks in Jenkins.

          h2. Actual Result
          # (/) Build finishes successfully.
          # (/) Build status is *{{UNSTABLE}}*.
          # (/) 1 high-priority issue is raised by the Warnings Plugin.
          # (/) On the build page, there is a section labeled “Generic Log Analysis” and it lists 1 warning.
          # (x) In that section there is no indication that a threshold has been exceeded.
          New: Please make the Warnings Plugin output on the build result page whether or not the threshold has been exceeded (and if so, how) similar to how Checkstyle, PMD, CPD etc. checks in Jenkins show that.

          h2. Example 1: Task Scanner Plugin Output
          Here is a screenshot of what the Task Scanner plugin shows:

          !Screenshot 2017-09-08 17.45.55.png|width=554!

          (/) Notice the explanatory details below the first line.

          h2. Example 2: Warnings Plugin Output
          And then here is what the Warnings Plugin shows:

           !Screenshot 2017-09-08 17.49.05.png|width=289!

          (x) Notice the lack of details below the first line. There are 5 High Priority issues that are blocking the build from being consider _Stable_, but you would not be able to tell from this.
           
          h2. Steps to Reproduce
          # Configure the Warnings Plugin in _Manage Jenkins_ with the following Parser:
          #* Name: *{{Generic Log Analysis}}*
          #* Link name: *{{Generic Log Analysis}}*
          #* Trend report name: *{{Generic Log Analysis}}*
          #* Regular expression:
          {code:java}
          .*(FATAL|fatal|SEVERE|severe|ERROR|error|WARN|warn|WARNING|warning|NOTICE|notice|FIXME|fixme|TODO|XXX)[:\]\s]+(.*){code}
          #* Mapping script:
          {code:java}
          import hudson.plugins.warnings.parser.Warning
          import hudson.plugins.analysis.util.model.Priority

          String fileName = ""
          String lineNumber = ""
          String category = ""
          String type = matcher.group(1)
          String message = type + ": " + matcher.group(2)

          Priority prio = Priority.HIGH
          if (type == "WARN" || type == "warn" || type == "WARNING" || type == "warning" || type == "TODO") {
          prio = Priority.NORMAL;
          } else if (type == "NOTICE" || type == "XXX") {
          prio = Priority.NORMAL;
          }

          return new Warning(fileName, 0, "Generic Log Analysis Parser", category, message, prio);{code}
          #* Example log message:
          {code:java}
          Bla [warn] There is something wrong{code}
          # Create a pipeline job with this invocation of the Warnings Plugin:
          {code:java}
          warnings canComputeNew: false, defaultEncoding: 'UTF-8', shouldDetectModules: params.DETECT_MODULES, unstableTotalHigh: '0', includePattern: '', excludePattern: '', healthy: '', unHealthy: '', messagesPattern: '', canResolveRelativePaths: false, consoleParsers: [[parserName: 'Generic Log Analysis']]{code}
          # In the pipeline script, echo an error, e.g.:
          {code:java}
          echo "ERROR: This should trigger the Warnings Plugin"{code}
          # Run the pipeline job.

          h2. Expected Result
          # Build finishes successfully.
          # Build status is *{{UNSTABLE}}*.
          # 1 high-priority issue is raised by the Warnings Plugin.
          # On the build page, there is a section labeled “Generic Log Analysis” and it lists 1 warning.
          # In that section there is an indication that a threshold has been exceeded, similar to Checkstyle, PMD, CPD etc. checks in Jenkins.

          h2. Actual Result
          # (/) Build finishes successfully.
          # (/) Build status is *{{UNSTABLE}}*.
          # (/) 1 high-priority issue is raised by the Warnings Plugin.
          # (/) On the build page, there is a section labeled “Generic Log Analysis” and it lists 1 warning.
          # (x) In that section there is no indication that a threshold has been exceeded.
          Ulli Hafner made changes -
          Labels New: analysis-core-2.0
          Ulli Hafner made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Ulli Hafner made changes -
          Epic Link New: JENKINS-49911 [ 188901 ]
          Ulli Hafner made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Progress [ 3 ] New: Resolved [ 5 ]
          Ulli Hafner made changes -
          Status Original: Resolved [ 5 ] New: Fixed but Unreleased [ 10203 ]
          Ulli Hafner made changes -
          Released As New: 5.0.0-beta2
          Status Original: Fixed but Unreleased [ 10203 ] New: Resolved [ 5 ]

            drulli Ulli Hafner
            znerd Ernst de Haan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: