Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-12188

Density of duplications is calculated with number of lines of test files

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 7.5
    • Fix Version/s: 7.8
    • Component/s: None
    • Labels:
      None
    • Edition:
      Community
    • Production Notes:
      Announcement on Community should be given about this change of behaviour since duplication density will increase once the bug fix is pushed to production.

      Description

      Duplicated lines are detected for main sources only. 

      The density of duplications is a percentage calculated as:

      • "number of duplicated lines"/"total number of lines of code" 

      Due to a regression introduced in v7.7, for the total number of code we including lines in test files. As a result, the density of duplication shown is lower than it actually is.

       

      The scanner should log a warning if any analyzer attempts to report duplication in test files.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              duarte.meneses Duarte Meneses
              Reporter:
              duarte.meneses Duarte Meneses
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: