aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-ce-task-projectanalysis
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2018-09-21 19:05:15 +0200
committerSonarTech <sonartech@sonarsource.com>2018-09-24 20:20:58 +0200
commit04cc1592790ad76f86706ed36160f3e5ca480f7a (patch)
tree78687580cd4c433e67469cd69db76d5d414ce531 /server/sonar-ce-task-projectanalysis
parent04963a43f10710b0992c1ef708183f05723c7025 (diff)
downloadsonarqube-04cc1592790ad76f86706ed36160f3e5ca480f7a.tar.gz
sonarqube-04cc1592790ad76f86706ed36160f3e5ca480f7a.zip
SONAR-11209 remove space in ad hoc rule names
Diffstat (limited to 'server/sonar-ce-task-projectanalysis')
-rw-r--r--server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/AdHocRuleCreator.java2
-rw-r--r--server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/AdHocRuleCreatorTest.java6
-rw-r--r--server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/PersistAdHocRulesStepTest.java2
3 files changed, 5 insertions, 5 deletions
diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/AdHocRuleCreator.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/AdHocRuleCreator.java
index 432961896e1..948130d91bf 100644
--- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/AdHocRuleCreator.java
+++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/AdHocRuleCreator.java
@@ -63,7 +63,7 @@ public class AdHocRuleCreator {
.setRuleKey(adHoc.getKey())
.setIsExternal(true)
.setIsAdHoc(true)
- .setName(adHoc.getEngineId() + ": " + adHoc.getRuleId())
+ .setName(adHoc.getEngineId() + ":" + adHoc.getRuleId())
.setScope(ALL)
.setStatus(READY)
.setCreatedAt(now)
diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/AdHocRuleCreatorTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/AdHocRuleCreatorTest.java
index 295cf953716..7e302940086 100644
--- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/AdHocRuleCreatorTest.java
+++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/AdHocRuleCreatorTest.java
@@ -60,7 +60,7 @@ public class AdHocRuleCreatorTest {
assertThat(rule.isAdHoc()).isTrue();
assertThat(rule.getId()).isGreaterThan(0);
assertThat(rule.getKey()).isEqualTo(RuleKey.of("external_eslint", "no-cond-assign"));
- assertThat(rule.getName()).isEqualTo("eslint: no-cond-assign");
+ assertThat(rule.getName()).isEqualTo("eslint:no-cond-assign");
assertThat(rule.getDescription()).isNull();
assertThat(rule.getSeverity()).isNull();
assertThat(rule.getType()).isEqualTo(0);
@@ -89,7 +89,7 @@ public class AdHocRuleCreatorTest {
assertThat(rule.isAdHoc()).isTrue();
assertThat(rule.getId()).isGreaterThan(0);
assertThat(rule.getKey()).isEqualTo(RuleKey.of("external_eslint", "no-cond-assign"));
- assertThat(rule.getName()).isEqualTo("eslint: no-cond-assign");
+ assertThat(rule.getName()).isEqualTo("eslint:no-cond-assign");
assertThat(rule.getDescription()).isNull();
assertThat(rule.getSeverity()).isNull();
assertThat(rule.getType()).isEqualTo(0);
@@ -128,7 +128,7 @@ public class AdHocRuleCreatorTest {
assertThat(ruleUpdated.isAdHoc()).isTrue();
assertThat(ruleUpdated.getId()).isGreaterThan(0);
assertThat(ruleUpdated.getKey()).isEqualTo(RuleKey.of("external_eslint", "no-cond-assign"));
- assertThat(ruleUpdated.getName()).isEqualTo("eslint: no-cond-assign");
+ assertThat(ruleUpdated.getName()).isEqualTo("eslint:no-cond-assign");
assertThat(ruleUpdated.getDescription()).isNull();
assertThat(ruleUpdated.getSeverity()).isNull();
assertThat(ruleUpdated.getType()).isEqualTo(0);
diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/PersistAdHocRulesStepTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/PersistAdHocRulesStepTest.java
index 98ccf035b7a..921a48a1e95 100644
--- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/PersistAdHocRulesStepTest.java
+++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/PersistAdHocRulesStepTest.java
@@ -92,7 +92,7 @@ public class PersistAdHocRulesStepTest extends BaseStepTest {
assertThat(reloaded.isAdHoc()).isTrue();
assertThat(reloaded.getType()).isEqualTo(0);
assertThat(reloaded.getSeverity()).isNull();
- assertThat(reloaded.getName()).isEqualTo("eslint: no-cond-assign");
+ assertThat(reloaded.getName()).isEqualTo("eslint:no-cond-assign");
assertThat(es.countDocuments(RuleIndexDefinition.INDEX_TYPE_RULE)).isEqualTo(1l);
assertThat(es.getDocuments(RuleIndexDefinition.INDEX_TYPE_RULE).iterator().next().getId()).isEqualTo(Integer.toString(reloaded.getId()));