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

Don't round up 99.x% coverage to 100%

    Details

    • Similar Issues:

      Description

      I use the cobertura plugin to display the coverage results on some Python code. There are some critical parts of the code where I want to make sure we have 100% coverage. I deliberately don't want 99.7% to mean 100%, because bugs usually happen in those few lines that only execute under very special circumstances.

      Is it possible to render anything between 99% (or 99.5%) and 100% as 99+% (or similar) ? This should apply to all places where a percentage is shown (ie: at the top of the main graph on the job page, in the detailed coverage pages, ...)

       

        Attachments

          Activity

          Hide
          jeffpearce Jeff Pearce added a comment -

          Pieter-Jan Busschaert the easiest thing to do here is to round down everything > 90 and < 100 to 90. In that case you wouldn't be able to tell 90 vs 90+, but that seems OK to me. What do you think?

          Show
          jeffpearce Jeff Pearce added a comment - Pieter-Jan Busschaert the easiest thing to do here is to round down everything > 90 and < 100 to 90. In that case you wouldn't be able to tell 90 vs 90+, but that seems OK to me. What do you think?
          Hide
          pjaytycy Pieter-Jan Busschaert added a comment -

          Thanks for looking into this, but your proposal is worse than the current problem

          I think it would be OK if you round everything between 99% and 100% down to 99%, but certainly don't change 98, 97... to 90%

           

          Show
          pjaytycy Pieter-Jan Busschaert added a comment - Thanks for looking into this, but your proposal is worse than the current problem I think it would be OK if you round everything between 99% and 100% down to 99%, but certainly don't change 98, 97... to 90%  
          Hide
          jeffpearce Jeff Pearce added a comment - - edited

          Sorry - that was a typo. I did indeed mean to type round 99 < pct <= 100 to 99.

          Show
          jeffpearce Jeff Pearce added a comment - - edited Sorry - that was a typo. I did indeed mean to type round 99 < pct <= 100 to 99.
          Hide
          pjaytycy Pieter-Jan Busschaert added a comment -

          Probably should be 99 <= pct < 100 ?

          (100% should stay 100%)

          Show
          pjaytycy Pieter-Jan Busschaert added a comment - Probably should be 99 <= pct < 100 ? (100% should stay 100%)
          Hide
          jeffpearce Jeff Pearce added a comment -

          Show
          jeffpearce Jeff Pearce added a comment -
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: ShenYu Zheng
          Path:
          src/main/java/hudson/plugins/cobertura/Ratio.java
          src/test/java/hudson/plugins/cobertura/RatioTest.java
          http://jenkins-ci.org/commit/cobertura-plugin/c612ade943ca91ea43eb2d07d02607ece8666245
          Log:
          JENKINS-43866 Don't round up 99.x% coverage to 100% (#94)

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ShenYu Zheng Path: src/main/java/hudson/plugins/cobertura/Ratio.java src/test/java/hudson/plugins/cobertura/RatioTest.java http://jenkins-ci.org/commit/cobertura-plugin/c612ade943ca91ea43eb2d07d02607ece8666245 Log: JENKINS-43866 Don't round up 99.x% coverage to 100% (#94)
          Hide
          jeffpearce Jeff Pearce added a comment -

          Fixed in release 1.12.1

          Show
          jeffpearce Jeff Pearce added a comment - Fixed in release 1.12.1

            People

            • Assignee:
              cizezsy Shenyu Zheng
              Reporter:
              pjaytycy Pieter-Jan Busschaert
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: