]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-3729 Add Checkstyle rule TrailingComment to 'Sonar way' profile
authorEvgeny Mandrikov <mandrikov@gmail.com>
Thu, 30 Aug 2012 16:18:53 +0000 (22:18 +0600)
committerEvgeny Mandrikov <mandrikov@gmail.com>
Thu, 30 Aug 2012 16:18:53 +0000 (22:18 +0600)
plugins/sonar-checkstyle-plugin/src/main/resources/org/sonar/plugins/checkstyle/profile-sonar-way.xml
plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/SonarWayProfileTest.java

index f993268da8339af6c416dce2de6c518d947963fb..3edfba5d493066bcd0e2fd88c9940f44b2a4080a 100644 (file)
       <repositoryKey>checkstyle</repositoryKey>
       <key>com.puppycrawl.tools.checkstyle.checks.naming.MethodTypeParameterNameCheck</key>
     </rule>
+    <rule>
+      <repositoryKey>checkstyle</repositoryKey>
+      <key>com.puppycrawl.tools.checkstyle.checks.TrailingCommentCheck</key>
+    </rule>
   </rules>
 </profile>
index 29c69ed9244495624ff7555e36dac1bc682d48e6..2631ba5db86a1fc737b5eb11384f555c2366e94f 100644 (file)
@@ -42,7 +42,7 @@ public class SonarWayProfileTest {
     ProfileDefinition sonarWay = new SonarWayProfile(new XMLProfileParser(newRuleFinder(), mock(MetricFinder.class)));
     ValidationMessages validation = ValidationMessages.create();
     RulesProfile profile = sonarWay.createProfile(validation);
-    assertThat(profile.getActiveRulesByRepository(CheckstyleConstants.REPOSITORY_KEY).size()).isEqualTo(32);
+    assertThat(profile.getActiveRulesByRepository(CheckstyleConstants.REPOSITORY_KEY).size()).isEqualTo(33);
     assertThat(validation.hasErrors()).isFalse();
   }