Uploaded image for project: 'Product Roadmaps'
  1. Product Roadmaps
  2. MMF-1396

Duplication available on short living branches and PRs

    XMLWordPrintable

    Details

    • Type: MMF
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Labels:

      Description

      WHY

      With MMF-1118, developers should have a good idea of the coverage on their short-living branches and pull requests. Still, if we consider the criteria promoted with the SonarWay quality gate, developers miss the duplication information to make sure that they can safely merge.

      The present MMF will then focus on computing and displaying duplications info in the branch / PR.
      Later on, once we'll get this info, we could expect the status of the short-lived branch / PR to take into account coverage and duplication in order to show whether the code can be safely merged or not. But we'll keep that topic out of this MMF.

      WHAT

      As a developer, I principally want to see the number of new/updated duplicated lines.
      In other words, this can be seen as the number of new/updated lines that are part of duplicated blocks. This is also the way duplication is computed on long lived branches.

      As for the estimated overall coverage after merge, the estimated overall duplication is a valuable info that can give to the developer an idea of the impacts of the P/R on the target branch. But it doesn't correspond the "on new code" and it doesn't suit well with the QG criteria we are promoting. It can even be confusing if displayed as a primary information for the P/R. As a developer, I'd like to see this info as a secondary info, with a clear distinction so that I can't misinterpret it.

      HOW

      Project page header

      Close to the coverage on new code, the header will display: Duplication on new code

      We won't get anymore the estimated overall coverage there. Tooltips should help to better understand what coverage and duplication metrics are about:

      Coverage on code that is new in the PR/branch
      Duplication on code that is new in the PR/branch

      Measures

      Duplication metrics will be displayed in the Measures page:

      • Density on new code
      • Duplicated Lines on new code
      • Duplicated Blocks on new code

      Estimated overall coverage and duplications will be displayed there, only showing one number on an almost blank page. It might be a first step until we feel the need for a dashboard for PRs and Short-Lived Branches.

      Code

      The code page will now also show the duplication on new code %age.

      PR Decoration

      We'll remove estimated overall coverage but we'll add duplication info in the PR summary comment for:

      • GitHub
      • BitBucket
      • VSTS/TFS

      With issues:

      x Bugs, y Vulnerabilities, z Code Smells; n% Coverage, m% Duplication

      Without issues:

      No issues; n% Coverage, m% Duplication

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              christophe.levis Christophe Levis
              Reporter:
              christophe.levis Christophe Levis
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: