aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Gageot <david@gageot.net>2012-07-06 13:51:26 +0200
committerDavid Gageot <david@gageot.net>2012-07-06 13:51:26 +0200
commitbebe12887aae04f27603e45a40d20873455e20a9 (patch)
tree0a58a3aef4d5df39ec5fcaa57743a2e2538cf410
parent234dd7de077a51cd385593fccd77c3f22e356e58 (diff)
downloadsonarqube-bebe12887aae04f27603e45a40d20873455e20a9.tar.gz
sonarqube-bebe12887aae04f27603e45a40d20873455e20a9.zip
SONAR-3432 Partially migrate rule param types to new names
-rw-r--r--plugins/sonar-checkstyle-plugin/src/main/resources/org/sonar/plugins/checkstyle/rules.xml260
-rw-r--r--plugins/sonar-pmd-plugin/src/main/resources/org/sonar/plugins/pmd/rules.xml86
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/helpers/rules_configuration_helper.rb5
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/disableDeprecatedActiveRuleParameters.xml6
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/disableDeprecatedActiveRules.xml2
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/disableDeprecatedRules.xml2
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/shared.xml2
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/updadeRuleFields.xml2
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/updateRuleParameters.xml4
9 files changed, 185 insertions, 184 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 91be0290e3d..9b250bb4d51 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
@@ -57,7 +57,7 @@
<configKey><![CDATA[Checker/TreeWalker/MissingOverride]]></configKey>
- <param key="javaFiveCompatibility" type="b">
+ <param key="javaFiveCompatibility" type="BOOLEAN">
</param>
</rule>
@@ -76,10 +76,10 @@
<configKey><![CDATA[Checker/TreeWalker/SuppressWarnings]]></configKey>
- <param key="format" type="s">
+ <param key="format" type="STRING">
</param>
- <param key="tokens" type="s">
+ <param key="tokens" type="STRING">
</param>
</rule>
@@ -89,7 +89,7 @@
<name><![CDATA[Equals Avoid Null]]></name>
<configKey><![CDATA[Checker/TreeWalker/EqualsAvoidNull]]></configKey>
- <param key="ignoreEqualsIgnoreCase" type="b">
+ <param key="ignoreEqualsIgnoreCase" type="BOOLEAN">
<defaultValue>false</defaultValue>
</param>
</rule>
@@ -129,7 +129,7 @@
<configKey><![CDATA[Checker/JavadocPackage]]></configKey>
- <param key="allowLegacy" type="b">
+ <param key="allowLegacy" type="BOOLEAN">
</param>
</rule>
@@ -141,19 +141,19 @@
<cardinality>MULTIPLE</cardinality>
- <param key="format" type="s">
+ <param key="format" type="STRING">
</param>
- <param key="message" type="s">
+ <param key="message" type="STRING">
</param>
- <param key="ignoreCase" type="b">
+ <param key="ignoreCase" type="BOOLEAN">
</param>
- <param key="minimum" type="i">
+ <param key="minimum" type="INTEGER">
</param>
- <param key="maximum" type="i">
+ <param key="maximum" type="INTEGER">
</param>
</rule>
@@ -165,19 +165,19 @@
<cardinality>MULTIPLE</cardinality>
- <param key="format" type="s">
+ <param key="format" type="STRING">
</param>
- <param key="message" type="s">
+ <param key="message" type="STRING">
</param>
- <param key="ignoreCase" type="b">
+ <param key="ignoreCase" type="BOOLEAN">
</param>
- <param key="minimum" type="i">
+ <param key="minimum" type="INTEGER">
</param>
- <param key="maximum" type="i">
+ <param key="maximum" type="INTEGER">
</param>
</rule>
@@ -189,22 +189,22 @@
<cardinality>MULTIPLE</cardinality>
- <param key="format" type="s">
+ <param key="format" type="STRING">
</param>
- <param key="message" type="s">
+ <param key="message" type="STRING">
</param>
- <param key="ignoreCase" type="b">
+ <param key="ignoreCase" type="BOOLEAN">
</param>
- <param key="minimum" type="i">
+ <param key="minimum" type="INTEGER">
</param>
- <param key="maximum" type="i">
+ <param key="maximum" type="INTEGER">
</param>
- <param key="ignoreComments" type="b">
+ <param key="ignoreComments" type="BOOLEAN">
</param>
</rule>
@@ -215,7 +215,7 @@
<configKey><![CDATA[Checker/TreeWalker/OuterTypeNumber]]></configKey>
- <param key="max" type="i">
+ <param key="max" type="INTEGER">
</param>
</rule>
@@ -226,7 +226,7 @@
<configKey><![CDATA[Checker/FileTabCharacter]]></configKey>
- <param key="eachLine" type="b">
+ <param key="eachLine" type="BOOLEAN">
</param>
</rule>
@@ -249,13 +249,13 @@
<configKey><![CDATA[Checker/TreeWalker/JavaNCSS]]></configKey>
- <param key="methodMaximum" type="i">
+ <param key="methodMaximum" type="INTEGER">
</param>
- <param key="classMaximum" type="i">
+ <param key="classMaximum" type="INTEGER">
</param>
- <param key="fileMaximum" type="i">
+ <param key="fileMaximum" type="INTEGER">
</param>
</rule>
@@ -276,10 +276,10 @@
<param key="format" type="r">
<defaultValue>^Abstract.*$|^.*Factory$</defaultValue>
</param>
- <param key="ignoreModifier" type="b">
+ <param key="ignoreModifier" type="BOOLEAN">
<defaultValue>false</defaultValue>
</param>
- <param key="ignoreName" type="b">
+ <param key="ignoreName" type="BOOLEAN">
<defaultValue>false</defaultValue>
</param>
</rule>
@@ -289,7 +289,7 @@
<configKey><![CDATA[Checker/TreeWalker/AnonInnerLength]]></configKey>
- <param key="max" type="i">
+ <param key="max" type="INTEGER">
</param>
</rule>
@@ -306,7 +306,7 @@
<configKey><![CDATA[Checker/TreeWalker/ArrayTypeStyle]]></configKey>
- <param key="javaStyle" type="b">
+ <param key="javaStyle" type="BOOLEAN">
</param>
</rule>
@@ -323,7 +323,7 @@
<configKey><![CDATA[Checker/TreeWalker/AvoidNestedBlocks]]></configKey>
- <param key="allowInSwitchCase" type="b">
+ <param key="allowInSwitchCase" type="BOOLEAN">
</param>
</rule>
@@ -334,10 +334,10 @@
<param key="excludes" type="s{}">
</param>
- <param key="allowClassImports" type="b">
+ <param key="allowClassImports" type="BOOLEAN">
<defaultValue>false</defaultValue>
</param>
- <param key="allowStaticMemberImports" type="b">
+ <param key="allowStaticMemberImports" type="BOOLEAN">
<defaultValue>false</defaultValue>
</param>
</rule>
@@ -347,7 +347,7 @@
<configKey><![CDATA[Checker/TreeWalker/BooleanExpressionComplexity]]></configKey>
- <param key="max" type="i">
+ <param key="max" type="INTEGER">
</param>
<param key="tokens" type="s[LAND,BAND,LOR,BOR,BXOR]">
@@ -360,7 +360,7 @@
<configKey><![CDATA[Checker/TreeWalker/ClassDataAbstractionCoupling]]></configKey>
- <param key="max" type="i">
+ <param key="max" type="INTEGER">
</param>
</rule>
@@ -370,7 +370,7 @@
<configKey><![CDATA[Checker/TreeWalker/ClassFanOutComplexity]]></configKey>
- <param key="max" type="i">
+ <param key="max" type="INTEGER">
</param>
</rule>
@@ -383,18 +383,18 @@
<param key="format" type="r">
<defaultValue>^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$</defaultValue>
</param>
- <param key="applyToPublic" type="b">
+ <param key="applyToPublic" type="BOOLEAN">
<defaultValue>true</defaultValue>
</param>
- <param key="applyToProtected" type="b">
+ <param key="applyToProtected" type="BOOLEAN">
<defaultValue>true</defaultValue>
</param>
- <param key="applyToPackage" type="b">
+ <param key="applyToPackage" type="BOOLEAN">
<defaultValue>true</defaultValue>
</param>
- <param key="applyToPrivate" type="b">
+ <param key="applyToPrivate" type="BOOLEAN">
<defaultValue>true</defaultValue>
</param>
@@ -412,7 +412,7 @@
<configKey><![CDATA[Checker/TreeWalker/CyclomaticComplexity]]></configKey>
- <param key="max" type="i">
+ <param key="max" type="INTEGER">
</param>
</rule>
@@ -421,9 +421,9 @@
<name><![CDATA[Declaration Order]]></name>
<configKey><![CDATA[Checker/TreeWalker/DeclarationOrder]]></configKey>
- <param key="ignoreConstructors" type="b"/>
- <param key="ignoreMethods" type="b"/>
- <param key="ignoreModifiers" type="b"/>
+ <param key="ignoreConstructors" type="BOOLEAN"/>
+ <param key="ignoreMethods" type="BOOLEAN"/>
+ <param key="ignoreModifiers" type="BOOLEAN"/>
</rule>
<rule key="com.puppycrawl.tools.checkstyle.checks.coding.DefaultComesLastCheck">
<priority>MAJOR</priority>
@@ -500,7 +500,7 @@
<configKey><![CDATA[Checker/TreeWalker/ExecutableStatementCount]]></configKey>
- <param key="max" type="i">
+ <param key="max" type="INTEGER">
</param>
@@ -521,7 +521,7 @@
<configKey><![CDATA[Checker/TreeWalker/FallThrough]]></configKey>
- <param key="checkLastCaseGroup" type="b">
+ <param key="checkLastCaseGroup" type="BOOLEAN">
</param>
<param key="reliefPattern" type="r">
@@ -535,7 +535,7 @@
<configKey><![CDATA[Checker/FileLength]]></configKey>
- <param key="max" type="i">
+ <param key="max" type="INTEGER">
</param>
</rule>
@@ -580,14 +580,14 @@
</param>
- <param key="ignoreConstructorParameter" type="b">
+ <param key="ignoreConstructorParameter" type="BOOLEAN">
</param>
- <param key="ignoreSetter" type="b">
+ <param key="ignoreSetter" type="BOOLEAN">
</param>
- <param key="ignoreAbstractMethods" type="b">
+ <param key="ignoreAbstractMethods" type="BOOLEAN">
</param>
</rule>
@@ -661,10 +661,10 @@
<param key="format" type="r">
</param>
- <param key="ignoreCase" type="b">
+ <param key="ignoreCase" type="BOOLEAN">
</param>
- <param key="message" type="s">
+ <param key="message" type="STRING">
</param>
</rule>
@@ -696,21 +696,21 @@
<configKey><![CDATA[Checker/TreeWalker/ImportOrder]]></configKey>
- <param key="option" type="s">
+ <param key="option" type="STRING">
</param>
<param key="groups" type="s{}">
</param>
- <param key="ordered" type="b">
+ <param key="ordered" type="BOOLEAN">
</param>
- <param key="separated" type="b">
+ <param key="separated" type="BOOLEAN">
</param>
- <param key="caseSensitive" type="b">
+ <param key="caseSensitive" type="BOOLEAN">
</param>
</rule>
@@ -719,19 +719,19 @@
<name><![CDATA[Indentation]]></name>
<configKey><![CDATA[Checker/TreeWalker/Indentation]]></configKey>
- <param key="basicOffset" type="i">
+ <param key="basicOffset" type="INTEGER">
<defaultValue>4</defaultValue>
</param>
- <param key="braceAdjustment" type="i">
+ <param key="braceAdjustment" type="INTEGER">
<defaultValue>0</defaultValue>
</param>
- <param key="caseIndent" type="i">
+ <param key="caseIndent" type="INTEGER">
<defaultValue>4</defaultValue>
</param>
- <param key="tabWidth" type="i">
+ <param key="tabWidth" type="INTEGER">
<defaultValue>8</defaultValue>
</param>
@@ -753,7 +753,7 @@
<configKey><![CDATA[Checker/TreeWalker/InterfaceIsType]]></configKey>
- <param key="allowMarkerInterfaces" type="b">
+ <param key="allowMarkerInterfaces" type="BOOLEAN">
</param>
@@ -772,29 +772,29 @@
</param>
- <param key="allowUndeclaredRTE" type="b">
+ <param key="allowUndeclaredRTE" type="BOOLEAN">
</param>
- <param key="allowThrowsTagsForSubclasses" type="b">
+ <param key="allowThrowsTagsForSubclasses" type="BOOLEAN">
</param>
- <param key="allowMissingParamTags" type="b">
+ <param key="allowMissingParamTags" type="BOOLEAN">
</param>
- <param key="allowMissingThrowsTags" type="b">
+ <param key="allowMissingThrowsTags" type="BOOLEAN">
</param>
- <param key="allowMissingReturnTag" type="b">
+ <param key="allowMissingReturnTag" type="BOOLEAN">
</param>
- <param key="allowMissingJavadoc" type="b">
+ <param key="allowMissingJavadoc" type="BOOLEAN">
</param>
- <param key="allowMissingPropertyJavadoc" type="b">
+ <param key="allowMissingPropertyJavadoc" type="BOOLEAN">
</param>
@@ -802,7 +802,7 @@
</param>
- <param key="suppressLoadErrors" type="b">
+ <param key="suppressLoadErrors" type="BOOLEAN">
<!-- Note that default value in Checkstyle 5.5 is false -->
<defaultValue>true</defaultValue>
</param>
@@ -821,14 +821,14 @@
</param>
- <param key="checkFirstSentence" type="b">
+ <param key="checkFirstSentence" type="BOOLEAN">
</param>
- <param key="checkEmptyJavadoc" type="b">
+ <param key="checkEmptyJavadoc" type="BOOLEAN">
</param>
- <param key="checkHtml" type="b">
+ <param key="checkHtml" type="BOOLEAN">
</param>
<param key="tokens" type="s[INTERFACE_DEF,CLASS_DEF,METHOD_DEF,CTOR_DEF,VARIABLE_DEF]">
@@ -853,10 +853,10 @@
<param key="versionFormat" type="r">
</param>
- <param key="allowMissingParamTags" type="b">
+ <param key="allowMissingParamTags" type="BOOLEAN">
</param>
- <param key="allowUnknownTags" type="b">
+ <param key="allowUnknownTags" type="BOOLEAN">
</param>
<param key="tokens" type="s[INTERFACE_DEF,CLASS_DEF]">
@@ -885,7 +885,7 @@
<param key="option" type="s[eol,nl,nlow]">
</param>
- <param key="maxLineLength" type="i">
+ <param key="maxLineLength" type="INTEGER">
</param>
<param key="tokens"
@@ -904,11 +904,11 @@
</param>
- <param key="max" type="i">
+ <param key="max" type="INTEGER">
</param>
- <param key="tabWidth" type="i">
+ <param key="tabWidth" type="INTEGER">
</param>
</rule>
@@ -943,10 +943,10 @@
</param>
<param key="ignoreNumbers" type="i{}">
</param>
- <param key="ignoreHashCodeMethod" type="b">
+ <param key="ignoreHashCodeMethod" type="BOOLEAN">
<defaultValue>false</defaultValue>
</param>
- <param key="ignoreAnnotation" type="b">
+ <param key="ignoreAnnotation" type="BOOLEAN">
<defaultValue>false</defaultValue>
</param>
</rule>
@@ -959,19 +959,19 @@
<param key="format" type="r">
<defaultValue>^[a-z][a-zA-Z0-9]*$</defaultValue>
</param>
- <param key="applyToPublic" type="b">
+ <param key="applyToPublic" type="BOOLEAN">
<defaultValue>true</defaultValue>
</param>
- <param key="applyToProtected" type="b">
+ <param key="applyToProtected" type="BOOLEAN">
<defaultValue>true</defaultValue>
</param>
- <param key="applyToPackage" type="b">
+ <param key="applyToPackage" type="BOOLEAN">
<defaultValue>true</defaultValue>
</param>
- <param key="applyToPrivate" type="b">
+ <param key="applyToPrivate" type="BOOLEAN">
<defaultValue>true</defaultValue>
</param>
@@ -982,10 +982,10 @@
<configKey><![CDATA[Checker/TreeWalker/MethodLength]]></configKey>
- <param key="max" type="i">
+ <param key="max" type="INTEGER">
</param>
- <param key="countEmpty" type="b">
+ <param key="countEmpty" type="BOOLEAN">
</param>
<param key="tokens" type="s[METHOD_DEF,CTOR_DEF]">
@@ -1000,7 +1000,7 @@
<param key="format" type="r">
<defaultValue>^[a-z][a-zA-Z0-9]*$</defaultValue>
</param>
- <param key="allowClassName" type="b">
+ <param key="allowClassName" type="BOOLEAN">
<defaultValue>false</defaultValue>
</param>
@@ -1011,7 +1011,7 @@
<configKey><![CDATA[Checker/TreeWalker/MethodParamPad]]></configKey>
- <param key="allowLineBreaks" type="b">
+ <param key="allowLineBreaks" type="BOOLEAN">
</param>
<param key="option" type="s[nospace,space]">
@@ -1056,13 +1056,13 @@
<cardinality>MULTIPLE</cardinality>
- <param key="allowedDuplicates" type="i">
+ <param key="allowedDuplicates" type="INTEGER">
</param>
<param key="ignoreStringsRegexp" type="r">
</param>
- <param key="ignoreOccurrenceContext" type="s">
+ <param key="ignoreOccurrenceContext" type="STRING">
</param>
</rule>
@@ -1090,7 +1090,7 @@
<configKey><![CDATA[Checker/TreeWalker/NPathComplexity]]></configKey>
- <param key="max" type="i">
+ <param key="max" type="INTEGER">
</param>
@@ -1111,7 +1111,7 @@
<configKey><![CDATA[Checker/TreeWalker/NestedIfDepth]]></configKey>
- <param key="max" type="i">
+ <param key="max" type="INTEGER">
</param>
</rule>
@@ -1121,7 +1121,7 @@
<configKey><![CDATA[Checker/TreeWalker/NestedTryDepth]]></configKey>
- <param key="max" type="i">
+ <param key="max" type="INTEGER">
</param>
</rule>
@@ -1145,7 +1145,7 @@
<configKey><![CDATA[Checker/TreeWalker/NoWhitespaceAfter]]></configKey>
- <param key="allowLineBreaks" type="b">
+ <param key="allowLineBreaks" type="BOOLEAN">
</param>
@@ -1159,7 +1159,7 @@
<configKey><![CDATA[Checker/TreeWalker/NoWhitespaceBefore]]></configKey>
- <param key="allowLineBreaks" type="b">
+ <param key="allowLineBreaks" type="BOOLEAN">
</param>
<param key="tokens" type="s[SEMI,DOT,POST_DEC,POST_INC]">
@@ -1186,7 +1186,7 @@
<name><![CDATA[Package Declaration]]></name>
<configKey><![CDATA[Checker/TreeWalker/PackageDeclaration]]></configKey>
- <param key="ignoreDirectoryName" type="b"/>
+ <param key="ignoreDirectoryName" type="BOOLEAN"/>
</rule>
<rule key="com.puppycrawl.tools.checkstyle.checks.naming.PackageNameCheck">
@@ -1220,7 +1220,7 @@
<name><![CDATA[Parameter Number]]></name>
<configKey><![CDATA[Checker/TreeWalker/ParameterNumber]]></configKey>
<cardinality>MULTIPLE</cardinality>
- <param key="max" type="i"/>
+ <param key="max" type="INTEGER"/>
<param key="tokens" type="s[METHOD_DEF,CTOR_DEF]">
</param>
</rule>
@@ -1251,13 +1251,13 @@
<configKey><![CDATA[Checker/TreeWalker/RedundantThrows]]></configKey>
- <param key="allowUnchecked" type="b">
+ <param key="allowUnchecked" type="BOOLEAN">
</param>
- <param key="allowSubclasses" type="b">
+ <param key="allowSubclasses" type="BOOLEAN">
</param>
- <param key="suppressLoadErrors" type="b">
+ <param key="suppressLoadErrors" type="BOOLEAN">
<!-- Note that default value in Checkstyle 5.5 is false -->
<defaultValue>true</defaultValue>
</param>
@@ -1272,21 +1272,21 @@
<param key="format" type="r">
</param>
- <param key="message" type="s">
+ <param key="message" type="STRING">
</param>
- <param key="illegalPattern" type="b">
+ <param key="illegalPattern" type="BOOLEAN">
</param>
- <param key="duplicateLimit" type="i">
+ <param key="duplicateLimit" type="INTEGER">
</param>
- <param key="errorLimit" type="i">
+ <param key="errorLimit" type="INTEGER">
</param>
- <param key="ignoreComments" type="b">
+ <param key="ignoreComments" type="BOOLEAN">
</param>
</rule>
@@ -1297,10 +1297,10 @@
<configKey><![CDATA[Checker/TreeWalker/RequireThis]]></configKey>
- <param key="checkFields" type="b">
+ <param key="checkFields" type="BOOLEAN">
</param>
- <param key="checkMethods" type="b">
+ <param key="checkMethods" type="BOOLEAN">
</param>
</rule>
@@ -1311,7 +1311,7 @@
<configKey><![CDATA[Checker/TreeWalker/ReturnCount]]></configKey>
- <param key="max" type="i">
+ <param key="max" type="INTEGER">
</param>
<param key="format" type="r">
@@ -1356,19 +1356,19 @@
<param key="format" type="r">
<defaultValue>^[a-z][a-zA-Z0-9]*$</defaultValue>
</param>
- <param key="applyToPublic" type="b">
+ <param key="applyToPublic" type="BOOLEAN">
<defaultValue>true</defaultValue>
</param>
- <param key="applyToProtected" type="b">
+ <param key="applyToProtected" type="BOOLEAN">
<defaultValue>true</defaultValue>
</param>
- <param key="applyToPackage" type="b">
+ <param key="applyToPackage" type="BOOLEAN">
<defaultValue>true</defaultValue>
</param>
- <param key="applyToPrivate" type="b">
+ <param key="applyToPrivate" type="BOOLEAN">
<defaultValue>true</defaultValue>
</param>
@@ -1379,10 +1379,10 @@
<configKey><![CDATA[Checker/StrictDuplicateCode]]></configKey>
- <param key="min" type="i">
+ <param key="min" type="INTEGER">
</param>
- <param key="charset" type="s">
+ <param key="charset" type="STRING">
</param>
</rule>
@@ -1413,7 +1413,7 @@
<configKey><![CDATA[Checker/TreeWalker/ThrowsCount]]></configKey>
- <param key="max" type="i">
+ <param key="max" type="INTEGER">
</param>
</rule>
@@ -1470,19 +1470,19 @@
<param key="tokens" type="s[CLASS_DEF,INTERFACE_DEF]">
</param>
- <param key="applyToPublic" type="b">
+ <param key="applyToPublic" type="BOOLEAN">
<defaultValue>true</defaultValue>
</param>
- <param key="applyToProtected" type="b">
+ <param key="applyToProtected" type="BOOLEAN">
<defaultValue>true</defaultValue>
</param>
- <param key="applyToPackage" type="b">
+ <param key="applyToPackage" type="BOOLEAN">
<defaultValue>true</defaultValue>
</param>
- <param key="applyToPrivate" type="b">
+ <param key="applyToPrivate" type="BOOLEAN">
<defaultValue>true</defaultValue>
</param>
@@ -1525,7 +1525,7 @@
<name><![CDATA[Unused Imports]]></name>
<configKey><![CDATA[Checker/TreeWalker/UnusedImports]]></configKey>
- <param key="processJavadoc" type="b">
+ <param key="processJavadoc" type="BOOLEAN">
<defaultValue>false</defaultValue>
</param>
</rule>
@@ -1542,10 +1542,10 @@
<configKey><![CDATA[Checker/TreeWalker/VisibilityModifier]]></configKey>
- <param key="packageAllowed" type="b">
+ <param key="packageAllowed" type="BOOLEAN">
</param>
- <param key="protectedAllowed" type="b">
+ <param key="protectedAllowed" type="BOOLEAN">
</param>
<param key="publicMemberPattern" type="r">
@@ -1573,11 +1573,11 @@
</param>
- <param key="allowEmptyConstructors" type="b">
+ <param key="allowEmptyConstructors" type="BOOLEAN">
</param>
- <param key="allowEmptyMethods" type="b">
+ <param key="allowEmptyMethods" type="BOOLEAN">
</param>
</rule>
@@ -1587,7 +1587,7 @@
<configKey><![CDATA[Checker/TreeWalker/WriteTag]]></configKey>
- <param key="tag" type="s">
+ <param key="tag" type="STRING">
</param>
<param key="tagFormat" type="r">
@@ -1614,7 +1614,7 @@
<priority>MAJOR</priority>
<name><![CDATA[Nested For Depth]]></name>
<configKey><![CDATA[Checker/TreeWalker/NestedForDepth]]></configKey>
- <param key="max" type="i">
+ <param key="max" type="INTEGER">
<defaultValue>1</defaultValue>
</param>
</rule>
@@ -1623,19 +1623,19 @@
<priority>MAJOR</priority>
<name><![CDATA[Method Count]]></name>
<configKey><![CDATA[Checker/TreeWalker/MethodCount]]></configKey>
- <param key="maxTotal" type="i">
+ <param key="maxTotal" type="INTEGER">
<defaultValue>100</defaultValue>
</param>
- <param key="maxPrivate" type="i">
+ <param key="maxPrivate" type="INTEGER">
<defaultValue>100</defaultValue>
</param>
- <param key="maxPackage" type="i">
+ <param key="maxPackage" type="INTEGER">
<defaultValue>100</defaultValue>
</param>
- <param key="maxProtected" type="i">
+ <param key="maxProtected" type="INTEGER">
<defaultValue>100</defaultValue>
</param>
- <param key="maxPublic" type="i">
+ <param key="maxPublic" type="INTEGER">
<defaultValue>100</defaultValue>
</param>
</rule>
diff --git a/plugins/sonar-pmd-plugin/src/main/resources/org/sonar/plugins/pmd/rules.xml b/plugins/sonar-pmd-plugin/src/main/resources/org/sonar/plugins/pmd/rules.xml
index 3bea66d4808..402f37088c9 100644
--- a/plugins/sonar-pmd-plugin/src/main/resources/org/sonar/plugins/pmd/rules.xml
+++ b/plugins/sonar-pmd-plugin/src/main/resources/org/sonar/plugins/pmd/rules.xml
@@ -94,14 +94,14 @@
<configKey>rulesets/codesize.xml/CyclomaticComplexity</configKey>
- <param key="reportLevel" type="i">
+ <param key="reportLevel" type="INTEGER">
</param>
- <param key="showClassesComplexity" type="b">
+ <param key="showClassesComplexity" type="BOOLEAN">
</param>
- <param key="showMethodsComplexity" type="b">
+ <param key="showMethodsComplexity" type="BOOLEAN">
</param>
@@ -129,7 +129,7 @@
<configKey><![CDATA[rulesets/codesize.xml/TooManyMethods]]></configKey>
- <param key="maxmethods" type="i">
+ <param key="maxmethods" type="INTEGER">
</param>
@@ -149,7 +149,7 @@
<configKey><![CDATA[rulesets/design.xml/TooFewBranchesForASwitchStatement]]></configKey>
- <param key="minimumNumberCaseForASwitch" type="i">
+ <param key="minimumNumberCaseForASwitch" type="INTEGER">
</param>
</rule>
@@ -193,7 +193,7 @@
<configKey><![CDATA[rulesets/codesize.xml/NPathComplexity]]></configKey>
- <param key="minimum" type="i">
+ <param key="minimum" type="INTEGER">
</param>
@@ -510,11 +510,11 @@
<configKey><![CDATA[rulesets/controversial.xml/DataflowAnomalyAnalysis]]></configKey>
- <param key="maxviolations" type="i">
+ <param key="maxviolations" type="INTEGER">
</param>
- <param key="maxpaths" type="i">
+ <param key="maxpaths" type="INTEGER">
</param>
@@ -525,7 +525,7 @@
<configKey><![CDATA[rulesets/coupling.xml/CouplingBetweenObjects]]></configKey>
- <param key="threshold" type="i">
+ <param key="threshold" type="INTEGER">
</param>
@@ -536,7 +536,7 @@
<configKey><![CDATA[rulesets/coupling.xml/ExcessiveImports]]></configKey>
- <param key="minimum" type="i">
+ <param key="minimum" type="INTEGER">
</param>
@@ -617,7 +617,7 @@
<configKey><![CDATA[rulesets/basic.xml/EmptyCatchBlock]]></configKey>
- <param key="allowCommentedBlocks" type="b">
+ <param key="allowCommentedBlocks" type="BOOLEAN">
</param>
@@ -747,7 +747,7 @@
<configKey><![CDATA[rulesets/basic.xml/UselessOverridingMethod]]></configKey>
- <param key="ignoreAnnotations" type="b">
+ <param key="ignoreAnnotations" type="BOOLEAN">
</param>
</rule>
@@ -827,7 +827,7 @@
<configKey><![CDATA[rulesets/design.xml/AvoidDeeplyNestedIfStmts]]></configKey>
- <param key="problemDepth" type="i">
+ <param key="problemDepth" type="INTEGER">
</param>
@@ -845,7 +845,7 @@
<configKey><![CDATA[rulesets/design.xml/SwitchDensity]]></configKey>
- <param key="minimum" type="i">
+ <param key="minimum" type="INTEGER">
</param>
@@ -877,10 +877,10 @@
<configKey><![CDATA[rulesets/design.xml/CloseResource]]></configKey>
- <param key="types" type="s">
+ <param key="types" type="STRING">
</param>
- <param key="closeTargets" type="s">
+ <param key="closeTargets" type="STRING">
</param>
</rule>
@@ -1051,12 +1051,12 @@
<configKey><![CDATA[rulesets/design.xml/NonThreadSafeSingleton]]></configKey>
- <param key="checkNonStaticMethods" type="b">
+ <param key="checkNonStaticMethods" type="BOOLEAN">
<priority>MAJOR</priority>
</param>
- <param key="checkNonStaticFields" type="b">
+ <param key="checkNonStaticFields" type="BOOLEAN">
<priority>MAJOR</priority>
@@ -1075,7 +1075,7 @@
<configKey><![CDATA[rulesets/design.xml/UncommentedEmptyConstructor]]></configKey>
- <param key="ignoreExplicitConstructorInvocation" type="b">
+ <param key="ignoreExplicitConstructorInvocation" type="BOOLEAN">
</param>
@@ -1177,7 +1177,7 @@
<configKey><![CDATA[rulesets/javabeans.xml/BeanMembersShouldSerialize]]></configKey>
- <param key="prefix" type="s">
+ <param key="prefix" type="STRING">
</param>
@@ -1202,21 +1202,21 @@
<configKey><![CDATA[rulesets/strings.xml/AvoidDuplicateLiterals]]></configKey>
- <param key="threshold" type="i">
+ <param key="threshold" type="INTEGER">
</param>
- <param key="skipAnnotations" type="b">
+ <param key="skipAnnotations" type="BOOLEAN">
</param>
- <param key="exceptionlist" type="s">
+ <param key="exceptionlist" type="STRING">
</param>
- <param key="separator" type="s">
+ <param key="separator" type="STRING">
</param>
- <param key="exceptionfile" type="s">
+ <param key="exceptionfile" type="STRING">
</param>
</rule>
@@ -1268,7 +1268,7 @@
<configKey><![CDATA[rulesets/strings.xml/ConsecutiveLiteralAppends]]></configKey>
- <param key="threshold" type="i">
+ <param key="threshold" type="INTEGER">
</param>
@@ -1314,7 +1314,7 @@
<configKey><![CDATA[rulesets/codesize.xml/ExcessiveMethodLength]]></configKey>
- <param key="minimum" type="i">
+ <param key="minimum" type="INTEGER">
</param>
@@ -1325,7 +1325,7 @@
<configKey><![CDATA[rulesets/codesize.xml/ExcessiveParameterList]]></configKey>
- <param key="minimum" type="i">
+ <param key="minimum" type="INTEGER">
</param>
@@ -1336,7 +1336,7 @@
<configKey><![CDATA[rulesets/codesize.xml/ExcessiveClassLength]]></configKey>
- <param key="minimum" type="i">
+ <param key="minimum" type="INTEGER">
</param>
@@ -1347,7 +1347,7 @@
<configKey><![CDATA[rulesets/codesize.xml/ExcessivePublicCount]]></configKey>
- <param key="minimum" type="i">
+ <param key="minimum" type="INTEGER">
</param>
@@ -1358,7 +1358,7 @@
<configKey><![CDATA[rulesets/codesize.xml/TooManyFields]]></configKey>
- <param key="maxfields" type="i">
+ <param key="maxfields" type="INTEGER">
</param>
@@ -1369,7 +1369,7 @@
<configKey><![CDATA[rulesets/codesize.xml/NcssMethodCount]]></configKey>
- <param key="minimum" type="i">
+ <param key="minimum" type="INTEGER">
</param>
</rule>
@@ -1379,7 +1379,7 @@
<configKey><![CDATA[rulesets/codesize.xml/NcssTypeCount]]></configKey>
- <param key="minimum" type="i">
+ <param key="minimum" type="INTEGER">
</param>
</rule>
@@ -1389,7 +1389,7 @@
<configKey><![CDATA[rulesets/codesize.xml/NcssConstructorCount]]></configKey>
- <param key="minimum" type="i">
+ <param key="minimum" type="INTEGER">
</param>
</rule>
@@ -1434,7 +1434,7 @@
<configKey><![CDATA[rulesets/logging-jakarta-commons.xml/ProperLogger]]></configKey>
- <param key="staticLoggerName" type="s">
+ <param key="staticLoggerName" type="STRING">
</param>
@@ -1452,7 +1452,7 @@
<configKey><![CDATA[rulesets/naming.xml/LongVariable]]></configKey>
- <param key="minimum" type="i">
+ <param key="minimum" type="INTEGER">
</param>
@@ -1470,19 +1470,19 @@
<configKey><![CDATA[rulesets/naming.xml/VariableNamingConventions]]></configKey>
- <param key="staticPrefix" type="s">
+ <param key="staticPrefix" type="STRING">
</param>
- <param key="staticSuffix" type="s">
+ <param key="staticSuffix" type="STRING">
</param>
- <param key="memberPrefix" type="s">
+ <param key="memberPrefix" type="STRING">
</param>
- <param key="memberSuffix" type="s">
+ <param key="memberSuffix" type="STRING">
</param>
@@ -1714,7 +1714,7 @@
<configKey><![CDATA[rulesets/imports.xml/TooManyStaticImports]]></configKey>
- <param key="maximumStaticImports" type="i">
+ <param key="maximumStaticImports" type="INTEGER">
</param>
@@ -1802,7 +1802,7 @@
<configKey><![CDATA[rulesets/naming.xml/BooleanGetMethodName]]></configKey>
- <param key="checkParameterizedMethods" type="b">
+ <param key="checkParameterizedMethods" type="BOOLEAN">
</param>
@@ -1817,7 +1817,7 @@
<param key="xpath" type="TEXT">
</param>
- <param key="message" type="s">
+ <param key="message" type="STRING">
</param>
</rule>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/rules_configuration_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/rules_configuration_helper.rb
index b3ea8ddf3a5..056026b22c5 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/rules_configuration_helper.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/rules_configuration_helper.rb
@@ -27,7 +27,8 @@ module RulesConfigurationHelper
PARAM_TYPE_BOOLEAN = "b"
PARAM_TYPE_REGEXP = "r"
- def property_type_for_param_type(type)
+ # Kept for compatibility with old rule param type
+ def type_with_compatibility(type)
return PropertyType::TYPE_STRING if type == PARAM_TYPE_STRING
return PropertyType::TYPE_STRING if type == PARAM_TYPE_STRING_LIST
return PropertyType::TYPE_INTEGER if type == PARAM_TYPE_INTEGER
@@ -49,7 +50,7 @@ module RulesConfigurationHelper
end
def param_value_input(parameter, value, options = {})
- property_value 'value', property_type_for_param_type(parameter.param_type), value, {:id => parameter.id}.update(options)
+ property_value 'value', type_with_compatibility(parameter.param_type), value, {:id => parameter.id}.update(options)
end
def is_set(type)
diff --git a/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/disableDeprecatedActiveRuleParameters.xml b/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/disableDeprecatedActiveRuleParameters.xml
index c2218110bbb..f4e77780154 100644
--- a/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/disableDeprecatedActiveRuleParameters.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/disableDeprecatedActiveRuleParameters.xml
@@ -3,11 +3,11 @@
<rules id="1" plugin_rule_key="rule1" plugin_name="fake" plugin_config_key="old_config_key" name="old name" description="old description"
enabled="true" priority="2" cardinality="SINGLE" parent_id="[null]" />
- <rules_parameters id="1" rule_id="1" name="param1" description="[null]" param_type="s"/>
- <rules_parameters id="2" rule_id="1" name="param2" description="[null]" param_type="s"/>
+ <rules_parameters id="1" rule_id="1" name="param1" description="[null]" param_type="STRING"/>
+ <rules_parameters id="2" rule_id="1" name="param2" description="[null]" param_type="STRING"/>
<!-- to be removed -->
- <rules_parameters id="3" rule_id="1" name="param3" description="[null]" param_type="s"/>
+ <rules_parameters id="3" rule_id="1" name="param3" description="[null]" param_type="STRING"/>
<rules_profiles id="1" version="1" used_profile="true" name="profile name" language="java" default_profile="false" provided="false" enabled="true"/>
diff --git a/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/disableDeprecatedActiveRules.xml b/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/disableDeprecatedActiveRules.xml
index dbca5e27e84..801d00ec9fe 100644
--- a/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/disableDeprecatedActiveRules.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/disableDeprecatedActiveRules.xml
@@ -6,7 +6,7 @@
<rules id="2" plugin_rule_key="deprecated" plugin_name="fake" plugin_config_key="[null]" name="Deprecated fake" description="[null]"
enabled="true" priority="4" cardinality="SINGLE" parent_id="[null]"/>
- <rules_parameters id="1" rule_id="1" name="deprecated-prop" description="[null]" param_type="s"/>
+ <rules_parameters id="1" rule_id="1" name="deprecated-prop" description="[null]" param_type="STRING"/>
<rules_profiles id="1" version="1" used_profile="true" name="sonar way" language="java" default_profile="false" provided="true" enabled="true"/>
<active_rules id="1" rule_id="1" profile_id="1" failure_level="4" />
diff --git a/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/disableDeprecatedRules.xml b/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/disableDeprecatedRules.xml
index f1cabc5ac68..8aec705f79f 100644
--- a/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/disableDeprecatedRules.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/disableDeprecatedRules.xml
@@ -6,6 +6,6 @@
<rules id="2" plugin_rule_key="deprecated" plugin_name="fake" plugin_config_key="[null]" name="Deprecated fake" description="[null]"
enabled="true" priority="4" cardinality="SINGLE" parent_id="[null]"/>
- <rules_parameters id="1" rule_id="1" name="deprecated-prop" description="[null]" param_type="s"/>
+ <rules_parameters id="1" rule_id="1" name="deprecated-prop" description="[null]" param_type="STRING"/>
</dataset> \ No newline at end of file
diff --git a/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/shared.xml b/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/shared.xml
index 2b8ce0bd669..5b95916c6d9 100644
--- a/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/shared.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/shared.xml
@@ -3,6 +3,6 @@
<rules id="1" plugin_rule_key="deprecated-key" plugin_name="deprecated-repo" plugin_config_key="[null]" name="Deprecated" description="[null]"
enabled="true" priority="4" cardinality="SINGLE" parent_id="[null]"/>
- <rules_parameters id="1" rule_id="1" name="deprecated-prop" description="[null]" param_type="s"/>
+ <rules_parameters id="1" rule_id="1" name="deprecated-prop" description="[null]" param_type="STRING"/>
</dataset> \ No newline at end of file
diff --git a/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/updadeRuleFields.xml b/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/updadeRuleFields.xml
index a21b0eddd82..0ddafe20302 100644
--- a/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/updadeRuleFields.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/updadeRuleFields.xml
@@ -6,6 +6,6 @@
<rules id="2" plugin_rule_key="rule2" plugin_name="fake" plugin_config_key="old_config_key2" name="old name2" description="old description2"
enabled="true" priority="1" cardinality="SINGLE" parent_id="[null]"/>
- <rules_parameters id="1" rule_id="1" name="param1" description="[null]" param_type="s"/>
+ <rules_parameters id="1" rule_id="1" name="param1" description="[null]" param_type="STRING"/>
</dataset>
diff --git a/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/updateRuleParameters.xml b/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/updateRuleParameters.xml
index 5afc29ed294..0bc07f241d0 100644
--- a/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/updateRuleParameters.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/updateRuleParameters.xml
@@ -6,7 +6,7 @@
<rules id="2" plugin_rule_key="rule2" plugin_name="fake" plugin_config_key="old_config_key2" name="old name2" description="old description2"
enabled="true" priority="1" cardinality="SINGLE" parent_id="[null]"/>
- <rules_parameters id="1" rule_id="1" name="param1" description="old description" param_type="s"/>
- <rules_parameters id="2" rule_id="1" name="deprecated_param" description="deprecated param to be removed" param_type="s"/>
+ <rules_parameters id="1" rule_id="1" name="param1" description="old description" param_type="STRING"/>
+ <rules_parameters id="2" rule_id="1" name="deprecated_param" description="deprecated param to be removed" param_type="STRING"/>
</dataset>