aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sonar-checkstyle-plugin/src/main
diff options
context:
space:
mode:
authorEvgeny Mandrikov <mandrikov@gmail.com>2012-08-08 00:17:54 +0600
committerEvgeny Mandrikov <mandrikov@gmail.com>2012-08-08 01:36:54 +0600
commit4ccfd4e84e152cce4f6bf166f6ea478ebcdaf445 (patch)
tree993e82d15f8b7bba84f6ea650168df89638065e5 /plugins/sonar-checkstyle-plugin/src/main
parent2ef978c162f11c5cee5944327568b69bbdea1142 (diff)
downloadsonarqube-4ccfd4e84e152cce4f6bf166f6ea478ebcdaf445.tar.gz
sonarqube-4ccfd4e84e152cce4f6bf166f6ea478ebcdaf445.zip
SONAR-3600 Support Checkstyle rules ClassTypeParameterName and MethodTypeParameterName
Diffstat (limited to 'plugins/sonar-checkstyle-plugin/src/main')
-rw-r--r--plugins/sonar-checkstyle-plugin/src/main/resources/org/sonar/plugins/checkstyle/profile-sonar-way.xml10
-rw-r--r--plugins/sonar-checkstyle-plugin/src/main/resources/org/sonar/plugins/checkstyle/profile-sun-conventions.xml10
-rw-r--r--plugins/sonar-checkstyle-plugin/src/main/resources/org/sonar/plugins/checkstyle/rules.xml21
3 files changed, 39 insertions, 2 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 d6798e01b1e..1b91689f319 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
@@ -146,5 +146,13 @@
</parameter>
</parameters>
</rule>
+ <rule>
+ <repositoryKey>checkstyle</repositoryKey>
+ <key>com.puppycrawl.tools.checkstyle.checks.naming.ClassTypeParameterName</key>
+ </rule>
+ <rule>
+ <repositoryKey>checkstyle</repositoryKey>
+ <key>com.puppycrawl.tools.checkstyle.checks.naming.MethodTypeParameterName</key>
+ </rule>
</rules>
-</profile> \ No newline at end of file
+</profile>
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 81d18cd226b..9eb0857c211 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
@@ -617,5 +617,13 @@
</parameter>
</parameters>
</rule>
+ <rule>
+ <repositoryKey>checkstyle</repositoryKey>
+ <key>com.puppycrawl.tools.checkstyle.checks.naming.ClassTypeParameterName</key>
+ </rule>
+ <rule>
+ <repositoryKey>checkstyle</repositoryKey>
+ <key>com.puppycrawl.tools.checkstyle.checks.naming.MethodTypeParameterName</key>
+ </rule>
</rules>
-</profile> \ No newline at end of file
+</profile>
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 e8de5fb04c7..64033016da6 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
@@ -1645,4 +1645,25 @@
<name><![CDATA[One Statement Per Line]]></name>
<configKey><![CDATA[Checker/TreeWalker/OneStatementPerLine]]></configKey>
</rule>
+
+ <rule key="com.puppycrawl.tools.checkstyle.checks.naming.ClassTypeParameterName">
+ <priority>MAJOR</priority>
+ <name><![CDATA[Class Type Parameter Name]]></name>
+ <configKey><![CDATA[Checker/TreeWalker/ClassTypeParameterName]]></configKey>
+
+ <param key="format" type="REGULAR_EXPRESSION">
+ <defaultValue>^[A-Z]$</defaultValue>
+ </param>
+ </rule>
+
+ <rule key="com.puppycrawl.tools.checkstyle.checks.naming.MethodTypeParameterName">
+ <priority>MAJOR</priority>
+ <name><![CDATA[Method Type Parameter Name]]></name>
+ <configKey><![CDATA[Checker/TreeWalker/MethodTypeParameterName]]></configKey>
+
+ <param key="format" type="REGULAR_EXPRESSION">
+ <defaultValue>^[A-Z]$</defaultValue>
+ </param>
+ </rule>
+
</rules>