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

Make source/test inclusions/exclusions evaluated using project relative path

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.6
    • Component/s: Coverage & Tests, Scanner
    • Labels:
      None
    • Edition:
      Community
    • Production Notes:
      None

      Description

      Currently source/test inclusions/exclusions patterns are evaluated module per module, using module relative path. Since we are removing modules from the backend side, patterns defined at root-level should now be defined using root relative path. We should encourage users to update their patterns at root-level.

      To not break analysis without notice, we will:

      • start evaluating patterns first using project relative path
      • continue to evaluate patterns at module level
      • if a file is excluded at module level and was not excluded at project level, we will log a warning to ask the user to update its configuration
        • if configuration is inherited from root configuration:

          Specifying module-relative paths at project level in the property 'sonar.exclusions' is deprecated. To continue matching files like 'src/main/Foo.java', update this property so that patterns refer to project-relative paths.

        • if configuration is specific to the module:

          Defining exclusions at module level is deprecated. Move 'sonar.exclusions' from module 'Module A' to the root project and update patterns to refer to project relative paths

      One consequence of the rework of file indexing is that the property sonar.sourceEncoding will no more be evaluated at module level.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                julien.henry Julien Henry
                Reporter:
                julien.henry Julien Henry
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: