From 197fef26231c2bf0fdf2db20074c1a3a4931911b Mon Sep 17 00:00:00 2001 From: simonbrandhof Date: Thu, 3 Feb 2011 18:56:30 +0100 Subject: [PATCH] SONAR-2165 Cardinality of checkstyle rule Local Variable Name should be updated to multiple --- .../org/sonar/plugins/checkstyle/rules.xml | 129 +++++++++--------- 1 file changed, 65 insertions(+), 64 deletions(-) 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 74bdfd05e83..67c532669c1 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 @@ -88,7 +88,7 @@ MAJOR - + @@ -97,7 +97,7 @@ MAJOR - + @@ -110,7 +110,7 @@ MINOR - + This check makes sure that all package annotations are in the package-info.java file.

According to the Java JLS 3rd ed.

The JLS does not enforce the placement of package annotations. This placement may vary based on implementation. The JLS does highly recommend that all package annotations are placed in the package-info.java file. See Java Language specification, sections 7.4.1.1.

]]>
@@ -120,7 +120,7 @@ MAJOR - + This check allows you to specify what warnings that SuppressWarnings is not allowed to suppress. You can also specify a list of TokenTypes that the configured warning(s) cannot be suppressed on.

Limitations: This check does not consider conditionals inside the SuppressWarnings annotation. @@ -139,7 +139,7 @@ For example: @SupressWarnings((false) ? (true) ? "unchecked" : "foo" : "unused") MAJOR - + Checks that any combination of String literals with optional assignment is on the left side of an equals() comparison.

Rationale: Calling the equals() method on String literals will avoid a potential NullPointerException. Also, it is pretty common to see null check right before equals comparisons which is not necessary in the below example.

@@ -173,7 +173,7 @@ should be refactored to: MAJOR - + Checks that the clone method is not overridden from the Object class.

Rationale: The clone method relies on strange/hard to follow rules that do not work it all situations. Consequently, it is difficult to override correctly. Below are some of the rules/reasons why the clone method should be avoided. @@ -220,7 +220,7 @@ should be refactored to: MAJOR - + Verifies there are no finalize() methods defined in a class.

]]>
@@ -228,7 +228,7 @@ should be refactored to: MINOR - + Checks that there are no static import statements. Rationale: Importing static members can lead to naming conflicts between class' members. It may lead to poor code readability since it may no longer be clear what class a member resides in (without looking at the import statement).

]]>
@@ -242,7 +242,7 @@ For example: Excluding java.lang.Math.*. will allow the import of each static me MINOR - + Checks that each Java package has a Javadoc file used for commenting. By default it only allows a package-info.java file, but can be configured to allow a package.html file. An error will be reported if both files exist as this is not allowed by the Javadoc tool.

]]>
@@ -254,7 +254,7 @@ For example: Excluding java.lang.Math.*. will allow the import of each static me MAJOR - + MULTIPLE A check for detecting that matches across multiple lines. Rationale: This check can be used to when the regular expression can be span multiple lines.

]]>
@@ -278,7 +278,7 @@ For example: Excluding java.lang.Math.*. will allow the import of each static me MAJOR - + A check for detecting single lines that match a supplied regular expression. Works with any file type. Rationale: This check can be used to prototype checks and to find common bad practice such as calling ex.printStacktrace(), System.out.println(), System.exit(), etc.

]]>
MULTIPLE @@ -302,7 +302,7 @@ For example: Excluding java.lang.Math.*. will allow the import of each static me MAJOR - + This class is variation on RegexpSingleline for detecting single lines that match a supplied regular expression in Java files. It supports suppressing matches in Java comments.

]]>
MULTIPLE @@ -373,15 +373,15 @@ But the following example is not: ]]>
- + - - + + MAJOR - + MAJOR - + @@ -477,7 +477,7 @@ Rationale: Too large methods and classes are hard to read and costly to maintain MINOR - + @@ -488,7 +488,7 @@ Rationale: Too large methods and classes are hard to read and costly to maintain MAJOR - + @@ -503,7 +503,7 @@ Rationale: Too large methods and classes are hard to read and costly to maintain MAJOR - + @@ -514,7 +514,7 @@ Rationale: Too large methods and classes are hard to read and costly to maintain MAJOR - + @@ -536,7 +536,7 @@ Rationale: Too large methods and classes are hard to read and costly to maintain CRITICAL - + @@ -544,7 +544,7 @@ Rationale: Too large methods and classes are hard to read and costly to maintain MAJOR - + @@ -570,14 +570,14 @@ Rationale: Too large methods and classes are hard to read and costly to maintain MINOR - + MAJOR - + @@ -585,7 +585,7 @@ Rationale: Too large methods and classes are hard to read and costly to maintain MAJOR - + @@ -621,21 +621,21 @@ Rationale: Too large methods and classes are hard to read and costly to maintain MINOR - + CRITICAL - + MAJOR - + @@ -650,7 +650,7 @@ Rationale: Too large methods and classes are hard to read and costly to maintain MAJOR - + @@ -658,7 +658,7 @@ Rationale: Too large methods and classes are hard to read and costly to maintain MAJOR - + @@ -674,7 +674,7 @@ Rationale: Too large methods and classes are hard to read and costly to maintain MAJOR - + Checks for long source files.

Rationale: If a source file becomes very long it is hard to understand. Therefore long classes should usually be refactored into several individual classes that focus on a specific task.

]]>
@@ -741,7 +741,7 @@ Rationale: Too large methods and classes are hard to read and costly to maintain MAJOR - + @@ -749,7 +749,7 @@ Rationale: Too large methods and classes are hard to read and costly to maintain MAJOR - + @@ -770,7 +770,7 @@ Rationale: Too large methods and classes are hard to read and costly to maintain MAJOR - + java.lang.Boolean class. In order to save memory and CPU cycles, it is preferable to use the predefined constants TRUE and FALSE. Constructor invocations should be replaced by calls to Boolean.valueOf(). Some extremely performance sensitive projects may require the use of factory methods for other classes as well, to enforce the usage of number caches or object pools.]]> @@ -781,7 +781,7 @@ Rationale: Too large methods and classes are hard to read and costly to maintain MAJOR - + @@ -824,7 +824,7 @@ Rationale: Too large methods and classes are hard to read and costly to maintain MAJOR - + @@ -1095,7 +1095,7 @@ Rationale: Too large methods and classes are hard to read and costly to maintain MAJOR - + @@ -1123,6 +1123,7 @@ Rationale: Too large methods and classes are hard to read and costly to maintain MAJOR + MULTIPLE @@ -1141,7 +1142,7 @@ Rationale: Too large methods and classes are hard to read and costly to maintain MINOR - + @@ -1157,7 +1158,7 @@ Rationale: Too large methods and classes are hard to read and costly to maintain - +
@@ -1179,7 +1180,7 @@ Rationale: Too large methods and classes are hard to read and costly to maintain MAJOR - + @@ -1233,14 +1234,14 @@ Rationale: Too large methods and classes are hard to read and costly to maintain MAJOR - + MAJOR - + @@ -1257,7 +1258,7 @@ Rationale: Too large methods and classes are hard to read and costly to maintain MULTIPLE - + @@ -1296,7 +1297,7 @@ Rationale: Too large methods and classes are hard to read and costly to maintain MAJOR - + @@ -1318,7 +1319,7 @@ Rationale: Too large methods and classes are hard to read and costly to maintain MAJOR - + @@ -1328,7 +1329,7 @@ Rationale: Too large methods and classes are hard to read and costly to maintain MAJOR - + @@ -1399,7 +1400,7 @@ Rationale: Too large methods and classes are hard to read and costly to maintain MAJOR - + @@ -1438,7 +1439,7 @@ Rationale: Too large methods and classes are hard to read and costly to maintain MAJOR - + @@ -1467,7 +1468,7 @@ Rationale: Too large methods and classes are hard to read and costly to maintain MINOR - + @@ -1477,7 +1478,7 @@ Rationale: Too large methods and classes are hard to read and costly to maintain MINOR - + @@ -1534,12 +1535,12 @@ Rationale: Too large methods and classes are hard to read and costly to maintain - + MAJOR - + @@ -1567,14 +1568,14 @@ Rationale: Too large methods and classes are hard to read and costly to maintain MAJOR - + MAJOR - + @@ -1592,7 +1593,7 @@ Rationale: Too large methods and classes are hard to read and costly to maintain MAJOR - + @@ -1606,28 +1607,28 @@ Rationale: Too large methods and classes are hard to read and costly to maintain MAJOR - + MAJOR - + MAJOR - + MAJOR - + @@ -1637,7 +1638,7 @@ Rationale: Too large methods and classes are hard to read and costly to maintain MINOR - + MULTIPLE @@ -1675,7 +1676,7 @@ Rationale: Too large methods and classes are hard to read and costly to maintain --> - + MAJOR @@ -1728,7 +1729,7 @@ Rationale: Too large methods and classes are hard to read and costly to maintain INFO - + @@ -1743,7 +1744,7 @@ Rationale: Too large methods and classes are hard to read and costly to maintain MAJOR - + -- 2.39.5