diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2018-12-10 12:47:58 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2019-01-16 09:43:07 +0100 |
commit | bed7c24f661cb73e3d79de636b72a731f07bed17 (patch) | |
tree | 2f65741d542824244076b812b348d0873541b95c /sonar-scanner-engine/src | |
parent | c2858bb2ddc16be6c94871693c26d9b1c2017ef0 (diff) | |
download | sonarqube-bed7c24f661cb73e3d79de636b72a731f07bed17.tar.gz sonarqube-bed7c24f661cb73e3d79de636b72a731f07bed17.zip |
SONAR-11480 Change warning message
Diffstat (limited to 'sonar-scanner-engine/src')
2 files changed, 4 insertions, 5 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/FileIndexer.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/FileIndexer.java index e9721a38add..c57fc4e9877 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/FileIndexer.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/FileIndexer.java @@ -160,8 +160,8 @@ public class FileIndexer { inputFile.setExcludedForCoverage(true); if (Arrays.equals(moduleCoverageExclusions.getCoverageExclusionConfig(), projectCoverageExclusions.getCoverageExclusionConfig())) { warnOnceDeprecatedCoverageExclusion( - "File '" + inputFile + "' was excluded from coverage because patterns are still evaluated using module relative paths but this is deprecated. " + - "Please update '" + CoreProperties.PROJECT_COVERAGE_EXCLUSIONS_PROPERTY + "' configuration so that patterns refer to project relative paths"); + "Specifying module-relative paths at project level in the property '" + CoreProperties.PROJECT_COVERAGE_EXCLUSIONS_PROPERTY + "' is deprecated. " + + "To continue excluding files like '" + inputFile + "' from coverage, update this property so that patterns refer to project-relative paths."); } LOG.debug("File {} excluded for coverage", inputFile); } diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/coverage/CoverageMediumTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/coverage/CoverageMediumTest.java index cd41f6998cd..93fa2a44fbb 100644 --- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/coverage/CoverageMediumTest.java +++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/coverage/CoverageMediumTest.java @@ -196,9 +196,8 @@ public class CoverageMediumTest { InputFile fileB = result.inputFile("moduleB/src/sample.xoo"); assertThat(result.coverageFor(fileB, 2)).isNull(); - assertThat(logTester.logs(LoggerLevel.WARN)).contains("File 'moduleA/src/sample.xoo' was excluded from coverage because patterns are still " + - "evaluated using module relative paths but this is deprecated. Please update 'sonar.coverage.exclusions' " + - "configuration so that patterns refer to project relative paths"); + assertThat(logTester.logs(LoggerLevel.WARN)).contains("Specifying module-relative paths at project level in the property 'sonar.coverage.exclusions' is deprecated. " + + "To continue excluding files like 'moduleA/src/sample.xoo' from coverage, update this property so that patterns refer to project-relative paths."); } @Test |