diff options
8 files changed, 33 insertions, 10 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 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 @@ </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> 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 @@ </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> 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 @@ <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> @@ -1307,7 +1307,7 @@ </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> 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 + +<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 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 + +<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> |