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

Use changed lines in the Scanner report to calculate metrics concerning new code

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.4
    • Component/s: Compute Engine
    • Labels:
      None
    • Edition:
      Community
    • Production Notes:
      None

      Description

      The calculation of metrics regarding new code should depend on the new way of detecting "new lines".
      A "new line" is now defined in different ways depending on the context and on the available data:

      • If it's a long lived branch -> Use changed dates of each line (either coming from SCM or generated) and compare them with the start of the leak period;
      • If it's a SLB or P/R -> Try to load this information from the scanner report. If it's present, this info was provided by the SCM plugin, which detected which lines are new compared to the target branch. Otherwise, fallback to using the changed dates of each line, comparing with the time when the branch was created.

        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: