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

Erroneous calculation of threshold crossing

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • cppcheck-plugin
    • None

      There is a typo in

      https://github.com/jenkinsci/cppcheck-plugin/blob/master/src/main/java/org/jenkinsci/plugins/cppcheck/CppcheckResult.java#L211

      as result plugin incorrectly calculates total amount of errors

      - nbErrors = this.getReport().getWarningSeverityList().size();
      + nbErrors = nbErrors + this.getReport().getWarningSeverityList().size();
      

      and for previous errors

      https://github.com/jenkinsci/cppcheck-plugin/blob/master/src/main/java/org/jenkinsci/plugins/cppcheck/CppcheckResult.java#L213

      - nbPreviousError = previousResult.getReport().getWarningSeverityList().size();
      + nbPreviousError = nbPreviousError + previousResult.getReport().getWarningSeverityList().size();
      

      Please correct.

            gbois Gregory Boissinot
            jbmaster Alexandr Penzai
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: