]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-16364 fix rule description titles
authorZipeng WU <zipeng.wu@sonarsource.com>
Tue, 10 May 2022 13:56:17 +0000 (15:56 +0200)
committersonartech <sonartech@sonarsource.com>
Tue, 10 May 2022 20:02:48 +0000 (20:02 +0000)
server/sonar-server-common/src/main/java/org/sonar/server/rule/RuleDescriptionFormatter.java
server/sonar-server-common/src/test/java/org/sonar/server/rule/RuleDescriptionFormatterTest.java
server/sonar-webserver-webapi/src/test/java/org/sonar/server/rule/ws/ShowActionTest.java

index 13db9a72a63b4f27c0bf2944c866c253e4b6ba34..0b78ff94321c3a4805c764a981b41a771aefe683 100644 (file)
@@ -50,14 +50,14 @@ public class RuleDescriptionFormatter {
     RESOURCES_SECTION_KEY);
 
   public static final Map<String, String> HOTSPOT_SECTION_TITLES = Map.of(
-    ROOT_CAUSE_SECTION_KEY, "What's the risk ?",
+    ROOT_CAUSE_SECTION_KEY, "What is the risk?",
     ASSESS_THE_PROBLEM_SECTION_KEY, "Assess the risk",
-    HOW_TO_FIX_SECTION_KEY, "How can you fix it ?"
+    HOW_TO_FIX_SECTION_KEY, "How can you fix it?"
   );
 
   public static final Map<String, String> RULE_SECTION_TITLES = Map.of(
-    ROOT_CAUSE_SECTION_KEY, "Why is this an issue ?",
-    HOW_TO_FIX_SECTION_KEY, "How to fix it ?",
+    ROOT_CAUSE_SECTION_KEY, "Why is this an issue?",
+    HOW_TO_FIX_SECTION_KEY, "How to fix it?",
     RESOURCES_SECTION_KEY, "Resources"
   );
 
index 260bb5ed4f69ecdfa2816f23a1fd946304e4ff47..ab79c311530df9388039462c14d3c83bbbd7da2a 100644 (file)
@@ -62,11 +62,11 @@ public class RuleDescriptionFormatterTest {
     String html = RuleDescriptionFormatter.getDescriptionAsHtml(rule);
     assertThat(html)
       .contains(
-        "<h2>What's the risk ?</h2>"
+        "<h2>What is the risk?</h2>"
           + "<div>Root is Root</div><br/>"
           + "<h2>Assess the risk</h2>"
           + "<div>This is not a problem</div><br/>"
-          + "<h2>How can you fix it ?</h2>"
+          + "<h2>How can you fix it?</h2>"
           + "<div>I don't want to fix</div><br/>"
       );
   }
index 00d6bb05a421da89ea1a83a3709144b1428ccab0..5d5949263aa496d5922236f7e871e55bdf7f4db5 100644 (file)
@@ -365,21 +365,21 @@ public class ShowActionTest {
     Rule resultRule = result.getRule();
     assertThat(resultRule.getHtmlDesc())
       .contains(
-        "<h2>What's the risk ?</h2>"
+        "<h2>What is the risk?</h2>"
           + "<div>Root is Root</div><br/>"
           + "<h2>Assess the risk</h2>"
           + "<div>This is not a problem</div><br/>"
-          + "<h2>How can you fix it ?</h2>"
+          + "<h2>How can you fix it?</h2>"
           + "<div>I don't want to fix</div><br/>"
       );
 
     assertThat(resultRule.getMdDesc())
       .contains(
-        "<h2>What's the risk ?</h2>"
+        "<h2>What is the risk?</h2>"
           + "<div>Root is Root</div><br/>"
           + "<h2>Assess the risk</h2>"
           + "<div>This is not a problem</div><br/>"
-          + "<h2>How can you fix it ?</h2>"
+          + "<h2>How can you fix it?</h2>"
           + "<div>I don't want to fix</div><br/>");
 
     assertThat(resultRule.getDescriptionSectionsList())