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

Make coverage 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 coverage 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 exclusions 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.coverage.exclusions’ is deprecated. To continue excluding files like ‘src/main/Foo.java’ from coverage, update this property so that patterns refer to project-relative paths.

        • if configuration is specific to the module:

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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: