From: Evgeny Mandrikov Date: Tue, 6 Nov 2012 10:02:28 +0000 (+0100) Subject: SONAR-3810 Upgrade to Checkstyle 5.6 X-Git-Tag: 3.4~394 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b80f9a00426d7337fa50e2258f3c833dbe045bbe;p=sonarqube.git SONAR-3810 Upgrade to Checkstyle 5.6 DoubleCheckedLockingCheck removed. --- diff --git a/plugins/sonar-checkstyle-plugin/pom.xml b/plugins/sonar-checkstyle-plugin/pom.xml index 37c1d24b598..2a87a0c35c3 100644 --- a/plugins/sonar-checkstyle-plugin/pom.xml +++ b/plugins/sonar-checkstyle-plugin/pom.xml @@ -15,7 +15,7 @@ - 5.5 + 5.6 diff --git a/plugins/sonar-checkstyle-plugin/src/main/resources/org/sonar/l10n/checkstyle.properties b/plugins/sonar-checkstyle-plugin/src/main/resources/org/sonar/l10n/checkstyle.properties index 1f14b18cdd7..1a4c4adcd37 100644 --- a/plugins/sonar-checkstyle-plugin/src/main/resources/org/sonar/l10n/checkstyle.properties +++ b/plugins/sonar-checkstyle-plugin/src/main/resources/org/sonar/l10n/checkstyle.properties @@ -148,7 +148,6 @@ rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.design.InterfaceIsTypeChe rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.metrics.NPathComplexityCheck.name=NPath Complexity rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.metrics.NPathComplexityCheck.param.max=the maximum threshold allowed. Default is 200. rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.coding.SimplifyBooleanReturnCheck.name=Simplify Boolean Return -rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.coding.DoubleCheckedLockingCheck.name=Double Checked Locking rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.metrics.CyclomaticComplexityCheck.name=Cyclomatic Complexity rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.metrics.CyclomaticComplexityCheck.param.max=the maximum threshold allowed. Default is 10. rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.annotation.AnnotationUseStyleCheck.name=Annotation Use Style diff --git a/plugins/sonar-checkstyle-plugin/src/main/resources/org/sonar/l10n/checkstyle/rules/checkstyle/com.puppycrawl.tools.checkstyle.checks.coding.DoubleCheckedLockingCheck.html b/plugins/sonar-checkstyle-plugin/src/main/resources/org/sonar/l10n/checkstyle/rules/checkstyle/com.puppycrawl.tools.checkstyle.checks.coding.DoubleCheckedLockingCheck.html deleted file mode 100644 index 08da5a1549b..00000000000 --- a/plugins/sonar-checkstyle-plugin/src/main/resources/org/sonar/l10n/checkstyle/rules/checkstyle/com.puppycrawl.tools.checkstyle.checks.coding.DoubleCheckedLockingCheck.html +++ /dev/null @@ -1 +0,0 @@ -Detect the double-checked locking idiom, a technique that tries to avoid synchronization overhead but is incorrect because of subtle artifacts of the java memory model. \ No newline at end of file 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 3edfba5d493..70b881c4b26 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 @@ -38,10 +38,6 @@ checkstyle com.puppycrawl.tools.checkstyle.checks.coding.InnerAssignmentCheck - - checkstyle - com.puppycrawl.tools.checkstyle.checks.coding.DoubleCheckedLockingCheck - checkstyle com.puppycrawl.tools.checkstyle.checks.imports.UnusedImportsCheck diff --git a/plugins/sonar-checkstyle-plugin/src/main/resources/org/sonar/plugins/checkstyle/profile-sun-conventions.xml b/plugins/sonar-checkstyle-plugin/src/main/resources/org/sonar/plugins/checkstyle/profile-sun-conventions.xml index e987174d78d..75e32602b29 100644 --- a/plugins/sonar-checkstyle-plugin/src/main/resources/org/sonar/plugins/checkstyle/profile-sun-conventions.xml +++ b/plugins/sonar-checkstyle-plugin/src/main/resources/org/sonar/plugins/checkstyle/profile-sun-conventions.xml @@ -184,10 +184,6 @@ - - checkstyle - com.puppycrawl.tools.checkstyle.checks.coding.DoubleCheckedLockingCheck - checkstyle com.puppycrawl.tools.checkstyle.checks.coding.EqualsHashCodeCheck diff --git a/plugins/sonar-checkstyle-plugin/src/main/resources/org/sonar/plugins/checkstyle/rules.xml b/plugins/sonar-checkstyle-plugin/src/main/resources/org/sonar/plugins/checkstyle/rules.xml index 6e9b9e608cb..4d48d0cdc49 100644 --- a/plugins/sonar-checkstyle-plugin/src/main/resources/org/sonar/plugins/checkstyle/rules.xml +++ b/plugins/sonar-checkstyle-plugin/src/main/resources/org/sonar/plugins/checkstyle/rules.xml @@ -349,12 +349,6 @@ - - MAJOR - - - - MAJOR diff --git a/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleRuleRepositoryTest.java b/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleRuleRepositoryTest.java index 9c6daac1e04..387815fe9bb 100644 --- a/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleRuleRepositoryTest.java +++ b/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleRuleRepositoryTest.java @@ -44,7 +44,7 @@ public class CheckstyleRuleRepositoryTest { List rules = repository.createRules(); assertThat(repository.getKey()).isEqualTo("checkstyle"); - assertThat(rules.size()).isEqualTo(129); + assertThat(rules.size()).isEqualTo(128); } @Test 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 2631ba5db86..29c69ed9244 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(33); + assertThat(profile.getActiveRulesByRepository(CheckstyleConstants.REPOSITORY_KEY).size()).isEqualTo(32); assertThat(validation.hasErrors()).isFalse(); } diff --git a/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/SunConventionsProfileTest.java b/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/SunConventionsProfileTest.java index dc49069e45e..6ec39c4933f 100644 --- a/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/SunConventionsProfileTest.java +++ b/plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/SunConventionsProfileTest.java @@ -42,7 +42,7 @@ public class SunConventionsProfileTest { ProfileDefinition definition = new SunConventionsProfile(new XMLProfileParser(newRuleFinder(), mock(MetricFinder.class))); ValidationMessages validation = ValidationMessages.create(); RulesProfile sunProfile = definition.createProfile(validation); - assertThat(sunProfile.getActiveRulesByRepository(CheckstyleConstants.REPOSITORY_KEY).size()).isEqualTo(59); + assertThat(sunProfile.getActiveRulesByRepository(CheckstyleConstants.REPOSITORY_KEY).size()).isEqualTo(58); assertThat(validation.hasErrors()).isFalse(); }