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

All files are scanned in "issues" mode when analysing a branch

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.4
    • Component/s: Scanner
    • Labels:
      None

      Description

      By default in the issues mode, only changed files should be analyzed. For unchanged files, the existing issues in SonarQube should simply be copied.
      Due to a bug in handling keys with branches, the scanner fails to filter out unchanged files and all files are actually analyzed.
      Existing tests failed to catch this case because after sensors run, the issues from the server are still copied to those unchanged files, and those coming from the sensors are discarded.

      A new test which catches the problem uses the OneIssueOnDirPerFileSensor, so issues are created on the directory and therefore they are not overwritten by the copy of issues from the server.

      Note that this bug should have, for typical sensors, no impact apart of performance.

        Attachments

          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: