]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-3432 Partially migrate rule param types to new names
authorDavid Gageot <david@gageot.net>
Fri, 6 Jul 2012 11:51:26 +0000 (13:51 +0200)
committerDavid Gageot <david@gageot.net>
Fri, 6 Jul 2012 11:51:26 +0000 (13:51 +0200)
plugins/sonar-checkstyle-plugin/src/main/resources/org/sonar/plugins/checkstyle/rules.xml
plugins/sonar-pmd-plugin/src/main/resources/org/sonar/plugins/pmd/rules.xml
sonar-server/src/main/webapp/WEB-INF/app/helpers/rules_configuration_helper.rb
sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/disableDeprecatedActiveRuleParameters.xml
sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/disableDeprecatedActiveRules.xml
sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/disableDeprecatedRules.xml
sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/shared.xml
sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/updadeRuleFields.xml
sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/updateRuleParameters.xml

index 91be0290e3d42b953ffe7cd73f740a514a2efac0..9b250bb4d51e8bc08ee8cafb0775719de3dfa477 100644 (file)
@@ -57,7 +57,7 @@
     <configKey><![CDATA[Checker/TreeWalker/MissingOverride]]></configKey>
 
 
-    <param key="javaFiveCompatibility" type="b">
+    <param key="javaFiveCompatibility" type="BOOLEAN">
 
     </param>
   </rule>
     <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>
     <configKey><![CDATA[Checker/JavadocPackage]]></configKey>
 
 
-    <param key="allowLegacy" type="b">
+    <param key="allowLegacy" type="BOOLEAN">
 
     </param>
   </rule>
 
     <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>
 
 
     <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>
 
 
     <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>
     <configKey><![CDATA[Checker/TreeWalker/OuterTypeNumber]]></configKey>
 
 
-    <param key="max" type="i">
+    <param key="max" type="INTEGER">
 
     </param>
   </rule>
     <configKey><![CDATA[Checker/FileTabCharacter]]></configKey>
 
 
-    <param key="eachLine" type="b">
+    <param key="eachLine" type="BOOLEAN">
 
     </param>
   </rule>
     <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>
     <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>
     <configKey><![CDATA[Checker/TreeWalker/AnonInnerLength]]></configKey>
 
 
-    <param key="max" type="i">
+    <param key="max" type="INTEGER">
 
     </param>
   </rule>
     <configKey><![CDATA[Checker/TreeWalker/ArrayTypeStyle]]></configKey>
 
 
-    <param key="javaStyle" type="b">
+    <param key="javaStyle" type="BOOLEAN">
 
     </param>
   </rule>
     <configKey><![CDATA[Checker/TreeWalker/AvoidNestedBlocks]]></configKey>
 
 
-    <param key="allowInSwitchCase" type="b">
+    <param key="allowInSwitchCase" type="BOOLEAN">
 
     </param>
   </rule>
 
     <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>
     <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]">
     <configKey><![CDATA[Checker/TreeWalker/ClassDataAbstractionCoupling]]></configKey>
 
 
-    <param key="max" type="i">
+    <param key="max" type="INTEGER">
 
     </param>
   </rule>
     <configKey><![CDATA[Checker/TreeWalker/ClassFanOutComplexity]]></configKey>
 
 
-    <param key="max" type="i">
+    <param key="max" type="INTEGER">
 
     </param>
   </rule>
     <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>
     <configKey><![CDATA[Checker/TreeWalker/CyclomaticComplexity]]></configKey>
 
 
-    <param key="max" type="i">
+    <param key="max" type="INTEGER">
 
     </param>
   </rule>
     <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>
     <configKey><![CDATA[Checker/TreeWalker/ExecutableStatementCount]]></configKey>
 
 
-    <param key="max" type="i">
+    <param key="max" type="INTEGER">
 
 
     </param>
     <configKey><![CDATA[Checker/TreeWalker/FallThrough]]></configKey>
 
 
-    <param key="checkLastCaseGroup" type="b">
+    <param key="checkLastCaseGroup" type="BOOLEAN">
 
     </param>
     <param key="reliefPattern" type="r">
     <configKey><![CDATA[Checker/FileLength]]></configKey>
 
 
-    <param key="max" type="i">
+    <param key="max" type="INTEGER">
 
     </param>
   </rule>
 
 
     </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>
     <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>
     <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>
     <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>
     <configKey><![CDATA[Checker/TreeWalker/InterfaceIsType]]></configKey>
 
 
-    <param key="allowMarkerInterfaces" type="b">
+    <param key="allowMarkerInterfaces" type="BOOLEAN">
 
 
     </param>
 
 
     </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>
 
 
     </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>
 
 
     </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]">
     <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]">
     <param key="option" type="s[eol,nl,nlow]">
 
     </param>
-    <param key="maxLineLength" type="i">
+    <param key="maxLineLength" type="INTEGER">
 
     </param>
     <param key="tokens"
 
 
     </param>
-    <param key="max" type="i">
+    <param key="max" type="INTEGER">
 
 
     </param>
-    <param key="tabWidth" type="i">
+    <param key="tabWidth" type="INTEGER">
 
     </param>
   </rule>
     </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>
     <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>
     <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]">
     <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>
     <configKey><![CDATA[Checker/TreeWalker/MethodParamPad]]></configKey>
 
 
-    <param key="allowLineBreaks" type="b">
+    <param key="allowLineBreaks" type="BOOLEAN">
 
     </param>
     <param key="option" type="s[nospace,space]">
     <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>
     <configKey><![CDATA[Checker/TreeWalker/NPathComplexity]]></configKey>
 
 
-    <param key="max" type="i">
+    <param key="max" type="INTEGER">
 
 
     </param>
     <configKey><![CDATA[Checker/TreeWalker/NestedIfDepth]]></configKey>
 
 
-    <param key="max" type="i">
+    <param key="max" type="INTEGER">
 
     </param>
   </rule>
     <configKey><![CDATA[Checker/TreeWalker/NestedTryDepth]]></configKey>
 
 
-    <param key="max" type="i">
+    <param key="max" type="INTEGER">
 
     </param>
   </rule>
     <configKey><![CDATA[Checker/TreeWalker/NoWhitespaceAfter]]></configKey>
 
 
-    <param key="allowLineBreaks" type="b">
+    <param key="allowLineBreaks" type="BOOLEAN">
 
 
     </param>
     <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]">
     <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">
     <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>
     <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>
     <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>
     <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>
     <configKey><![CDATA[Checker/TreeWalker/ReturnCount]]></configKey>
 
 
-    <param key="max" type="i">
+    <param key="max" type="INTEGER">
 
     </param>
     <param key="format" type="r">
     <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>
     <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>
     <configKey><![CDATA[Checker/TreeWalker/ThrowsCount]]></configKey>
 
 
-    <param key="max" type="i">
+    <param key="max" type="INTEGER">
 
     </param>
   </rule>
     <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>
     <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>
     <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">
 
 
     </param>
-    <param key="allowEmptyConstructors" type="b">
+    <param key="allowEmptyConstructors" type="BOOLEAN">
 
 
     </param>
-    <param key="allowEmptyMethods" type="b">
+    <param key="allowEmptyMethods" type="BOOLEAN">
 
     </param>
   </rule>
     <configKey><![CDATA[Checker/TreeWalker/WriteTag]]></configKey>
 
 
-    <param key="tag" type="s">
+    <param key="tag" type="STRING">
 
     </param>
     <param key="tagFormat" type="r">
     <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>
     <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>
index 3bea66d480868507c6da453d69ed79f887f9d61b..402f37088c93b233aea7d64f2d30b01d38fdd9de 100644 (file)
     <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>
     <configKey><![CDATA[rulesets/codesize.xml/TooManyMethods]]></configKey>
 
 
-    <param key="maxmethods" type="i">
+    <param key="maxmethods" type="INTEGER">
 
 
     </param>
     <configKey><![CDATA[rulesets/design.xml/TooFewBranchesForASwitchStatement]]></configKey>
 
 
-    <param key="minimumNumberCaseForASwitch" type="i">
+    <param key="minimumNumberCaseForASwitch" type="INTEGER">
 
     </param>
   </rule>
     <configKey><![CDATA[rulesets/codesize.xml/NPathComplexity]]></configKey>
 
 
-    <param key="minimum" type="i">
+    <param key="minimum" type="INTEGER">
 
 
     </param>
     <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>
     <configKey><![CDATA[rulesets/coupling.xml/CouplingBetweenObjects]]></configKey>
 
 
-    <param key="threshold" type="i">
+    <param key="threshold" type="INTEGER">
 
 
     </param>
     <configKey><![CDATA[rulesets/coupling.xml/ExcessiveImports]]></configKey>
 
 
-    <param key="minimum" type="i">
+    <param key="minimum" type="INTEGER">
 
 
     </param>
     <configKey><![CDATA[rulesets/basic.xml/EmptyCatchBlock]]></configKey>
 
 
-    <param key="allowCommentedBlocks" type="b">
+    <param key="allowCommentedBlocks" type="BOOLEAN">
 
 
     </param>
     <configKey><![CDATA[rulesets/basic.xml/UselessOverridingMethod]]></configKey>
 
 
-    <param key="ignoreAnnotations" type="b">
+    <param key="ignoreAnnotations" type="BOOLEAN">
 
     </param>
   </rule>
     <configKey><![CDATA[rulesets/design.xml/AvoidDeeplyNestedIfStmts]]></configKey>
 
 
-    <param key="problemDepth" type="i">
+    <param key="problemDepth" type="INTEGER">
 
 
     </param>
     <configKey><![CDATA[rulesets/design.xml/SwitchDensity]]></configKey>
 
 
-    <param key="minimum" type="i">
+    <param key="minimum" type="INTEGER">
 
 
     </param>
     <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>
     <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>
 
 
     <configKey><![CDATA[rulesets/design.xml/UncommentedEmptyConstructor]]></configKey>
 
 
-    <param key="ignoreExplicitConstructorInvocation" type="b">
+    <param key="ignoreExplicitConstructorInvocation" type="BOOLEAN">
 
 
     </param>
     <configKey><![CDATA[rulesets/javabeans.xml/BeanMembersShouldSerialize]]></configKey>
 
 
-    <param key="prefix" type="s">
+    <param key="prefix" type="STRING">
 
 
     </param>
     <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>
     <configKey><![CDATA[rulesets/strings.xml/ConsecutiveLiteralAppends]]></configKey>
 
 
-    <param key="threshold" type="i">
+    <param key="threshold" type="INTEGER">
 
 
     </param>
     <configKey><![CDATA[rulesets/codesize.xml/ExcessiveMethodLength]]></configKey>
 
 
-    <param key="minimum" type="i">
+    <param key="minimum" type="INTEGER">
 
 
     </param>
     <configKey><![CDATA[rulesets/codesize.xml/ExcessiveParameterList]]></configKey>
 
 
-    <param key="minimum" type="i">
+    <param key="minimum" type="INTEGER">
 
 
     </param>
     <configKey><![CDATA[rulesets/codesize.xml/ExcessiveClassLength]]></configKey>
 
 
-    <param key="minimum" type="i">
+    <param key="minimum" type="INTEGER">
 
 
     </param>
     <configKey><![CDATA[rulesets/codesize.xml/ExcessivePublicCount]]></configKey>
 
 
-    <param key="minimum" type="i">
+    <param key="minimum" type="INTEGER">
 
 
     </param>
     <configKey><![CDATA[rulesets/codesize.xml/TooManyFields]]></configKey>
 
 
-    <param key="maxfields" type="i">
+    <param key="maxfields" type="INTEGER">
 
 
     </param>
     <configKey><![CDATA[rulesets/codesize.xml/NcssMethodCount]]></configKey>
 
 
-    <param key="minimum" type="i">
+    <param key="minimum" type="INTEGER">
 
     </param>
   </rule>
     <configKey><![CDATA[rulesets/codesize.xml/NcssTypeCount]]></configKey>
 
 
-    <param key="minimum" type="i">
+    <param key="minimum" type="INTEGER">
 
     </param>
   </rule>
     <configKey><![CDATA[rulesets/codesize.xml/NcssConstructorCount]]></configKey>
 
 
-    <param key="minimum" type="i">
+    <param key="minimum" type="INTEGER">
 
     </param>
   </rule>
     <configKey><![CDATA[rulesets/logging-jakarta-commons.xml/ProperLogger]]></configKey>
 
 
-    <param key="staticLoggerName" type="s">
+    <param key="staticLoggerName" type="STRING">
 
 
     </param>
     <configKey><![CDATA[rulesets/naming.xml/LongVariable]]></configKey>
 
 
-    <param key="minimum" type="i">
+    <param key="minimum" type="INTEGER">
 
 
     </param>
     <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>
     <configKey><![CDATA[rulesets/imports.xml/TooManyStaticImports]]></configKey>
 
 
-    <param key="maximumStaticImports" type="i">
+    <param key="maximumStaticImports" type="INTEGER">
 
 
     </param>
     <configKey><![CDATA[rulesets/naming.xml/BooleanGetMethodName]]></configKey>
 
 
-    <param key="checkParameterizedMethods" type="b">
+    <param key="checkParameterizedMethods" type="BOOLEAN">
 
 
     </param>
     <param key="xpath" type="TEXT">
 
     </param>
-    <param key="message" type="s">
+    <param key="message" type="STRING">
 
     </param>
   </rule>
index b3ea8ddf3a56b8e6cb6f20fbe3c286008f841d82..056026b22c583b0d070d0e5a0fb28cbd1c09391a 100644 (file)
@@ -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)
index c2218110bbbf6b2d99ac824358b4e7b8e3a4441d..f4e777801543ad6c759410e9e012b959a84e0dee 100644 (file)
@@ -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"/>
index dbca5e27e84d6cc1466785d169f9e5436e255e4b..801d00ec9feaaf73588bbd25b07db97307d1594e 100644 (file)
@@ -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" />
index f1cabc5ac680d44aa195c3eefabe76dcb75e9842..8aec705f79f7b87a2587993f3c6404a0006d1814 100644 (file)
@@ -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
index 2b8ce0bd6695e940e08efb68eeb2b49a19aa65d0..5b95916c6d921395f5c9b2e68bbea04053ba9c8a 100644 (file)
@@ -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
index a21b0eddd82c3c9354bdddc85b1c827029e3195b..0ddafe203029f89f3bb1067033a2351db2a4d38d 100644 (file)
@@ -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>
index 5afc29ed294d433b59273e5ec89aeffe5b08f87b..0bc07f241d071750857efef9d15d5ca4ddc3ca3b 100644 (file)
@@ -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>