diff options
author | Evgeny Mandrikov <mandrikov@gmail.com> | 2012-08-30 22:18:53 +0600 |
---|---|---|
committer | Evgeny Mandrikov <mandrikov@gmail.com> | 2012-08-30 22:18:53 +0600 |
commit | c57df12fb120a6c9bdaa63285e7eb1758489fe6e (patch) | |
tree | 4725f857ca16e1220619b08a22510dfc1e094df3 | |
parent | 7015d958aee6a342c2f9f7afec58b8211c925e21 (diff) | |
download | sonarqube-c57df12fb120a6c9bdaa63285e7eb1758489fe6e.tar.gz sonarqube-c57df12fb120a6c9bdaa63285e7eb1758489fe6e.zip |
SONAR-3729 Add Checkstyle rule TrailingComment to 'Sonar way' profile
2 files changed, 5 insertions, 1 deletions
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 @@ <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> 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(); } |