From: Evgeny Mandrikov Date: Wed, 29 Aug 2012 09:26:54 +0000 (+0600) Subject: SONAR-3600 SONAR-3600 Support Checkstyle rules ClassTypeParameterName and MethodTypeP... X-Git-Tag: 3.3~334 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5febd810614b647ca3d2c2d7149adc58c18942c7;p=sonarqube.git SONAR-3600 SONAR-3600 Support Checkstyle rules ClassTypeParameterName and MethodTypeParameterName --- 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 a882de63115..f993268da83 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 @@ -148,11 +148,11 @@ checkstyle - com.puppycrawl.tools.checkstyle.checks.naming.ClassTypeParameterName + com.puppycrawl.tools.checkstyle.checks.naming.ClassTypeParameterNameCheck checkstyle - com.puppycrawl.tools.checkstyle.checks.naming.MethodTypeParameterName + com.puppycrawl.tools.checkstyle.checks.naming.MethodTypeParameterNameCheck 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 9eef0c794d0..e987174d78d 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 @@ -619,11 +619,11 @@ checkstyle - com.puppycrawl.tools.checkstyle.checks.naming.ClassTypeParameterName + com.puppycrawl.tools.checkstyle.checks.naming.ClassTypeParameterNameCheck checkstyle - com.puppycrawl.tools.checkstyle.checks.naming.MethodTypeParameterName + com.puppycrawl.tools.checkstyle.checks.naming.MethodTypeParameterNameCheck 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 651b39e9ec0..c281f27bdcd 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 @@ -1298,7 +1298,7 @@ - + MAJOR @@ -1307,7 +1307,7 @@ - + MAJOR diff --git a/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/checkstyle.properties b/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/checkstyle.properties index 24312ba339e..160fe92f4bc 100644 --- a/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/checkstyle.properties +++ b/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/checkstyle.properties @@ -338,5 +338,5 @@ rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.sizes.MethodCountCheck.pa rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.sizes.MethodCountCheck.param.maxProtected=maximum allowable number of protected methods. rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.sizes.MethodCountCheck.param.maxPublic=maximum allowable number of public methods. rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.coding.OneStatementPerLineCheck.name=One Statement Per Line -rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.naming.ClassTypeParameterName.name=Class Type Parameter Name -rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.naming.MethodTypeParameterName.name=Method Type Parameter Name +rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.naming.ClassTypeParameterNameCheck.name=Class Type Parameter Name +rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.naming.MethodTypeParameterNameCheck.name=Method Type Parameter Name diff --git a/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/checkstyle/rules/checkstyle/com.puppycrawl.tools.checkstyle.checks.naming.ClassTypeParameterName.html b/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/checkstyle/rules/checkstyle/com.puppycrawl.tools.checkstyle.checks.naming.ClassTypeParameterName.html deleted file mode 100644 index 31398fe860b..00000000000 --- a/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/checkstyle/rules/checkstyle/com.puppycrawl.tools.checkstyle.checks.naming.ClassTypeParameterName.html +++ /dev/null @@ -1 +0,0 @@ -Checks that class parameter names conform to the specified format diff --git a/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/checkstyle/rules/checkstyle/com.puppycrawl.tools.checkstyle.checks.naming.ClassTypeParameterNameCheck.html b/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/checkstyle/rules/checkstyle/com.puppycrawl.tools.checkstyle.checks.naming.ClassTypeParameterNameCheck.html new file mode 100644 index 00000000000..2e812af3fbc --- /dev/null +++ b/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/checkstyle/rules/checkstyle/com.puppycrawl.tools.checkstyle.checks.naming.ClassTypeParameterNameCheck.html @@ -0,0 +1,12 @@ +Checks that class parameter names conform to the specified format + +

+The following code snippet illustrates this rule for format "^[A-Z]$": +

+
+class Something { // Non-compliant
+}
+
+class Something { // Compliant
+}
+
diff --git a/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/checkstyle/rules/checkstyle/com.puppycrawl.tools.checkstyle.checks.naming.MethodTypeParameterName.html b/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/checkstyle/rules/checkstyle/com.puppycrawl.tools.checkstyle.checks.naming.MethodTypeParameterName.html deleted file mode 100644 index cfdf3b02410..00000000000 --- a/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/checkstyle/rules/checkstyle/com.puppycrawl.tools.checkstyle.checks.naming.MethodTypeParameterName.html +++ /dev/null @@ -1 +0,0 @@ -Checks that method type parameter names conform to the specified format diff --git a/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/checkstyle/rules/checkstyle/com.puppycrawl.tools.checkstyle.checks.naming.MethodTypeParameterNameCheck.html b/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/checkstyle/rules/checkstyle/com.puppycrawl.tools.checkstyle.checks.naming.MethodTypeParameterNameCheck.html new file mode 100644 index 00000000000..f34d4fc3868 --- /dev/null +++ b/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/checkstyle/rules/checkstyle/com.puppycrawl.tools.checkstyle.checks.naming.MethodTypeParameterNameCheck.html @@ -0,0 +1,13 @@ +Checks that method type parameter names conform to the specified format + +

+The following code snippet illustrates this rule for format "^[A-Z]$": +

+
+public  type method() { // Non-compliant
+  return null;
+}
+
+public  T method() { // Compliant
+}
+