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

Detect changed lines when running analysis in git submodules

    XMLWordPrintable

    Details

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

      Description

      Git submodules

      Git Submodules feature allows to aggregate several Git repositories in a single one:
      http://www.git-scm.com/book/en/v2/Git-Tools-Submodules

      /myproject
          .git
          .gitmodules
          src1/
              .git
              foo.php
          src2/
              .git
              foo2.php
      

       Problem

      The SonarQube scanner uses git to collect information: blame for each line, changed files/lines, merge bases, etc. Its current implementation, using JGit, doesn't support repositories using submodules. If the scanner runs in a project using git submodules, the behavior is undefined and it may result in wrong "new code" in pull requests or missing blame information.

      The scanner should support analyzing a submodule in the same way as it's currently done when a project without submodules is analyzed.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              lukasz.jarocki Łukasz Jarocki
              Reporter:
              duarte.meneses Duarte Meneses
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: