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

Allow files and directories with same relative path from source/test dirs

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.11
    • Fix Version/s: 4.2
    • Component/s: Plugin API
    • Labels:
      None

      Description

      The current resource key for files and directories (and packages) is the relative path of the file/directory starting from source directories. This leads to the following files considered as duplicates with same key=Main.php:

      • /src/Main.php
      • /src2/Main.php
      • /test/Main.php
        (sonar.source=src,src2 && sonar.tests=test)

      Even if this situation is unlikely to occurs with Java projects, this is already a reported problem with PHP, and will be even more an issue with multi-language support.

      The proposed solution is to change key for files and directories to be the relative path starting from the root of the module.

      At the same time we should take the opportunity to make key of Java resources consistent with other languages.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              henryju OLD - Julien HENRY
              Reporter:
              fabemn OLD - Fabrice Bellingard
              Votes:
              3 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: