]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-3600 SONAR-3600 Support Checkstyle rules ClassTypeParameterName and MethodTypeP...
authorEvgeny Mandrikov <mandrikov@gmail.com>
Wed, 29 Aug 2012 09:26:54 +0000 (15:26 +0600)
committerEvgeny Mandrikov <mandrikov@gmail.com>
Wed, 29 Aug 2012 10:01:55 +0000 (16:01 +0600)
plugins/sonar-checkstyle-plugin/src/main/resources/org/sonar/plugins/checkstyle/profile-sonar-way.xml
plugins/sonar-checkstyle-plugin/src/main/resources/org/sonar/plugins/checkstyle/profile-sun-conventions.xml
plugins/sonar-checkstyle-plugin/src/main/resources/org/sonar/plugins/checkstyle/rules.xml
plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/checkstyle.properties
plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/checkstyle/rules/checkstyle/com.puppycrawl.tools.checkstyle.checks.naming.ClassTypeParameterName.html [deleted file]
plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/checkstyle/rules/checkstyle/com.puppycrawl.tools.checkstyle.checks.naming.ClassTypeParameterNameCheck.html [new file with mode: 0644]
plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/checkstyle/rules/checkstyle/com.puppycrawl.tools.checkstyle.checks.naming.MethodTypeParameterName.html [deleted file]
plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/checkstyle/rules/checkstyle/com.puppycrawl.tools.checkstyle.checks.naming.MethodTypeParameterNameCheck.html [new file with mode: 0644]

index a882de63115fb6e6dddcb787b7dc828fdaa701cf..f993268da8339af6c416dce2de6c518d947963fb 100644 (file)
     </rule>
     <rule>
       <repositoryKey>checkstyle</repositoryKey>
-      <key>com.puppycrawl.tools.checkstyle.checks.naming.ClassTypeParameterName</key>
+      <key>com.puppycrawl.tools.checkstyle.checks.naming.ClassTypeParameterNameCheck</key>
     </rule>
     <rule>
       <repositoryKey>checkstyle</repositoryKey>
-      <key>com.puppycrawl.tools.checkstyle.checks.naming.MethodTypeParameterName</key>
+      <key>com.puppycrawl.tools.checkstyle.checks.naming.MethodTypeParameterNameCheck</key>
     </rule>
   </rules>
 </profile>
index 9eef0c794d0cb5329ba6cf48b4c3987aef34661d..e987174d78dca62706f48e26d27238b37a609f5a 100644 (file)
     </rule>
     <rule>
       <repositoryKey>checkstyle</repositoryKey>
-      <key>com.puppycrawl.tools.checkstyle.checks.naming.ClassTypeParameterName</key>
+      <key>com.puppycrawl.tools.checkstyle.checks.naming.ClassTypeParameterNameCheck</key>
     </rule>
     <rule>
       <repositoryKey>checkstyle</repositoryKey>
-      <key>com.puppycrawl.tools.checkstyle.checks.naming.MethodTypeParameterName</key>
+      <key>com.puppycrawl.tools.checkstyle.checks.naming.MethodTypeParameterNameCheck</key>
     </rule>
   </rules>
 </profile>
index 651b39e9ec01d98a377bb07b71a198252e9f4834..c281f27bdcd41d83f46466a1bff9fca7c92bb40a 100644 (file)
     <configKey><![CDATA[Checker/TreeWalker/OneStatementPerLine]]></configKey>
   </rule>
 
-  <rule key="com.puppycrawl.tools.checkstyle.checks.naming.ClassTypeParameterName">
+  <rule key="com.puppycrawl.tools.checkstyle.checks.naming.ClassTypeParameterNameCheck">
     <priority>MAJOR</priority>
     <name><![CDATA[Class Type Parameter Name]]></name>
     <configKey><![CDATA[Checker/TreeWalker/ClassTypeParameterName]]></configKey>
     </param>
   </rule>
 
-  <rule key="com.puppycrawl.tools.checkstyle.checks.naming.MethodTypeParameterName">
+  <rule key="com.puppycrawl.tools.checkstyle.checks.naming.MethodTypeParameterNameCheck">
     <priority>MAJOR</priority>
     <name><![CDATA[Method Type Parameter Name]]></name>
     <configKey><![CDATA[Checker/TreeWalker/MethodTypeParameterName]]></configKey>
index 24312ba339e11cb87859ddbb330f05bef209468c..160fe92f4bcbaf4a9abdd33ac2df29cd192299af 100644 (file)
@@ -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 (file)
index 31398fe..0000000
+++ /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 (file)
index 0000000..2e812af
--- /dev/null
@@ -0,0 +1,12 @@
+Checks that class parameter names conform to the specified format
+
+<p>
+The following code snippet illustrates this rule for format "^[A-Z]$":
+</p>
+<pre>
+class Something<type> { // Non-compliant
+}
+
+class Something<T> { // Compliant
+}
+</pre>
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 (file)
index cfdf3b0..0000000
+++ /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 (file)
index 0000000..f34d4fc
--- /dev/null
@@ -0,0 +1,13 @@
+Checks that method type parameter names conform to the specified format
+
+<p>
+The following code snippet illustrates this rule for format "^[A-Z]$":
+</p>
+<pre>
+public <type> type method() { // Non-compliant
+  return null;
+}
+
+public <T> T method() { // Compliant
+}
+</pre>