From: Evgeny Mandrikov Date: Thu, 30 Aug 2012 16:18:53 +0000 (+0600) Subject: SONAR-3729 Add Checkstyle rule TrailingComment to 'Sonar way' profile X-Git-Tag: 3.3~332 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c57df12fb120a6c9bdaa63285e7eb1758489fe6e;p=sonarqube.git SONAR-3729 Add Checkstyle rule TrailingComment to 'Sonar way' profile --- diff --git a/plugins/sonar-checkstyle-plugin/src/main/resources/org/sonar/plugins/checkstyle/profile-sonar-way.xml b/plugins/sonar-checkstyle-plugin/src/main/resources/org/sonar/plugins/checkstyle/profile-sonar-way.xml index f993268da83..3edfba5d493 100644 --- a/plugins/sonar-checkstyle-plugin/src/main/resources/org/sonar/plugins/checkstyle/profile-sonar-way.xml +++ b/plugins/sonar-checkstyle-plugin/src/main/resources/org/sonar/plugins/checkstyle/profile-sonar-way.xml @@ -154,5 +154,9 @@ checkstyle com.puppycrawl.tools.checkstyle.checks.naming.MethodTypeParameterNameCheck + + checkstyle + com.puppycrawl.tools.checkstyle.checks.TrailingCommentCheck + diff --git a/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/SonarWayProfileTest.java b/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/SonarWayProfileTest.java index 29c69ed9244..2631ba5db86 100644 --- a/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/SonarWayProfileTest.java +++ b/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/SonarWayProfileTest.java @@ -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(); }