Erroneous calculation of threshold crossing

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor
    • Component/s: 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.

            Assignee:
            Gregory Boissinot
            Reporter:
            Alexandr Penzai
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: