diff options
4 files changed, 5 insertions, 5 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/EnforceIssuesFilter.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/EnforceIssuesFilter.java index d29a993985b..9dbc75a0e58 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/EnforceIssuesFilter.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/EnforceIssuesFilter.java @@ -95,7 +95,7 @@ public class EnforceIssuesFilter implements IssueFilter { private boolean ruleMatches(IssuePattern pattern, RuleKey ruleKey) { if (activeRules.matchesDeprecatedKeys(ruleKey, pattern.getRulePattern())) { - String msg = String.format("The issue multicriteria pattern '%s' matches a rule key that has been changed. The pattern should be updated to '%s'", + String msg = String.format("A multicriteria issue enforce uses the rule key '%s' that has been changed. The pattern should be updated to '%s'", pattern.getRulePattern(), ruleKey); analysisWarnings.addUnique(msg); if (warnedDeprecatedRuleKeys.add(ruleKey)) { diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/IgnoreIssuesFilter.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/IgnoreIssuesFilter.java index 23aeea36e18..0b13833df8b 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/IgnoreIssuesFilter.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/IgnoreIssuesFilter.java @@ -91,7 +91,7 @@ public class IgnoreIssuesFilter implements IssueFilter { RuleKey ruleKey = issue.ruleKey(); if (activeRules.matchesDeprecatedKeys(ruleKey, pattern)) { - String msg = String.format("The issue multicriteria pattern '%s' matches a rule key that has been changed. The pattern should be updated to '%s'", pattern, ruleKey); + String msg = String.format("A multicriteria issue exclusion uses the rule key '%s' that has been changed. The pattern should be updated to '%s'", pattern, ruleKey); analysisWarnings.addUnique(msg); if (warnedDeprecatedRuleKeys.add(ruleKey)) { LOG.warn(msg); diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/EnforceIssuesFilterTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/EnforceIssuesFilterTest.java index c28628d5b51..6e0b5886fc1 100644 --- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/EnforceIssuesFilterTest.java +++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/EnforceIssuesFilterTest.java @@ -115,7 +115,7 @@ public class EnforceIssuesFilterTest { ignoreFilter = new EnforceIssuesFilter(exclusionPatternInitializer, analysisWarnings, activeRules); assertThat(ignoreFilter.accept(issue, chain)).isTrue(); verify(analysisWarnings) - .addUnique("The issue multicriteria pattern 'repo2:deprecated' matches a rule key that has been changed. The pattern should be updated to 'repo:rule'"); + .addUnique("A multicriteria issue enforce uses the rule key 'repo2:deprecated' that has been changed. The pattern should be updated to 'repo:rule'"); verifyNoInteractions(chain); } diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/IgnoreIssuesFilterTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/IgnoreIssuesFilterTest.java index 1db66e55f5d..fbc96e78478 100644 --- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/IgnoreIssuesFilterTest.java +++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/IgnoreIssuesFilterTest.java @@ -94,9 +94,9 @@ public class IgnoreIssuesFilterTest { underTest.addRuleExclusionPatternForComponent(component, pattern); assertThat(underTest.accept(issue, chain)).isFalse(); - verify(analysisWarnings).addUnique("The issue multicriteria pattern 'repo:rule' matches a rule key that has been changed. The pattern should be updated to 'foo:bar'"); + verify(analysisWarnings).addUnique("A multicriteria issue exclusion uses the rule key 'repo:rule' that has been changed. The pattern should be updated to 'foo:bar'"); assertThat(logTester.logs()) - .contains("The issue multicriteria pattern 'repo:rule' matches a rule key that has been changed. The pattern should be updated to 'foo:bar'"); + .contains("A multicriteria issue exclusion uses the rule key 'repo:rule' that has been changed. The pattern should be updated to 'foo:bar'"); } @Test |