]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-3432 Support Regular expressions
authorDavid Gageot <david@gageot.net>
Fri, 6 Jul 2012 12:24:23 +0000 (14:24 +0200)
committerDavid Gageot <david@gageot.net>
Fri, 6 Jul 2012 12:51:51 +0000 (14:51 +0200)
18 files changed:
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-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRuleParametersFromARuleParameter-result.xml
sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRuleParametersFromARuleParameter.xml
sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetRuleParams.xml
sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetRules.xml
sonar-plugin-api/src/main/java/org/sonar/api/PropertyType.java
sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetPropertyType.java
sonar-server/src/main/webapp/WEB-INF/app/helpers/properties_helper.rb
sonar-server/src/main/webapp/WEB-INF/app/helpers/rules_configuration_helper.rb
sonar-server/src/main/webapp/WEB-INF/app/models/api/utils.rb
sonar-server/src/main/webapp/WEB-INF/app/models/property_type.rb
sonar-server/src/main/webapp/WEB-INF/app/views/settings/_type_REGULAR_EXPRESSION.html.erb [new file with mode: 0644]
sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldActivateInChildren-result.xml
sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldActivateInChildren.xml
sonar-server/src/test/resources/org/sonar/server/configuration/RuleChangeTest/changeParentProfile.xml
sonar-server/src/test/resources/org/sonar/server/configuration/RuleChangeTest/initialData.xml
sonar-server/src/test/resources/org/sonar/server/configuration/RuleChangeTest/ruleReverted.xml

index 9b250bb4d51e8bc08ee8cafb0775719de3dfa477..e8de5fb04c7ecf42891e023bbb64065d07cb764d 100644 (file)
     <name><![CDATA[Abstract Class Name]]></name>
     <configKey><![CDATA[Checker/TreeWalker/AbstractClassName]]></configKey>
 
-    <param key="format" type="r">
+    <param key="format" type="REGULAR_EXPRESSION">
       <defaultValue>^Abstract.*$|^.*Factory$</defaultValue>
     </param>
     <param key="ignoreModifier" type="BOOLEAN">
     <configKey><![CDATA[Checker/TreeWalker/ConstantName]]></configKey>
     <cardinality>MULTIPLE</cardinality>
 
-    <param key="format" type="r">
+    <param key="format" type="REGULAR_EXPRESSION">
       <defaultValue>^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$</defaultValue>
     </param>
     <param key="applyToPublic" type="BOOLEAN">
     <param key="checkLastCaseGroup" type="BOOLEAN">
 
     </param>
-    <param key="reliefPattern" type="r">
+    <param key="reliefPattern" type="REGULAR_EXPRESSION">
 
 
     </param>
     <param key="tokens" type="s[PARAMETER_DEF,VARIABLE_DEF]">
 
     </param>
-    <param key="ignoreFormat" type="r">
+    <param key="ignoreFormat" type="REGULAR_EXPRESSION">
 
 
     </param>
     <param key="tokens" type="s{}">
 
     </param>
-    <param key="format" type="r">
+    <param key="format" type="REGULAR_EXPRESSION">
 
     </param>
     <param key="ignoreCase" type="BOOLEAN">
     <param key="ignoredMethodNames" type="s{}">
 
     </param>
-    <param key="format" type="r">
+    <param key="format" type="REGULAR_EXPRESSION">
 
     </param>
   </rule>
     <param key="excludeScope" type="s[nothing,public,protected,package,private,anoninner]">
 
     </param>
-    <param key="authorFormat" type="r">
+    <param key="authorFormat" type="REGULAR_EXPRESSION">
 
     </param>
-    <param key="versionFormat" type="r">
+    <param key="versionFormat" type="REGULAR_EXPRESSION">
 
     </param>
     <param key="allowMissingParamTags" type="BOOLEAN">
     <configKey><![CDATA[Checker/TreeWalker/LineLength]]></configKey>
 
 
-    <param key="ignorePattern" type="r">
+    <param key="ignorePattern" type="REGULAR_EXPRESSION">
 
 
     </param>
     <name><![CDATA[Local Final Variable Name]]></name>
     <configKey><![CDATA[Checker/TreeWalker/LocalFinalVariableName]]></configKey>
 
-    <param key="format" type="r">
+    <param key="format" type="REGULAR_EXPRESSION">
       <defaultValue>^[a-z][a-zA-Z0-9]*$</defaultValue>
     </param>
   </rule>
     <name><![CDATA[Local Variable Name]]></name>
     <configKey><![CDATA[Checker/TreeWalker/LocalVariableName]]></configKey>
 
-    <param key="format" type="r">
+    <param key="format" type="REGULAR_EXPRESSION">
       <defaultValue>^[a-z][a-zA-Z0-9]*$</defaultValue>
     </param>
     <param key="tokens" type="s[VARIABLE_DEF,PARAMETER_DEF]">
     <name><![CDATA[Member name]]></name>
     <configKey><![CDATA[Checker/TreeWalker/MemberName]]></configKey>
 
-    <param key="format" type="r">
+    <param key="format" type="REGULAR_EXPRESSION">
       <defaultValue>^[a-z][a-zA-Z0-9]*$</defaultValue>
     </param>
     <param key="applyToPublic" type="BOOLEAN">
     <name><![CDATA[Method Name]]></name>
     <configKey><![CDATA[Checker/TreeWalker/MethodName]]></configKey>
 
-    <param key="format" type="r">
+    <param key="format" type="REGULAR_EXPRESSION">
       <defaultValue>^[a-z][a-zA-Z0-9]*$</defaultValue>
     </param>
     <param key="allowClassName" type="BOOLEAN">
     <param key="allowedDuplicates" type="INTEGER">
 
     </param>
-    <param key="ignoreStringsRegexp" type="r">
+    <param key="ignoreStringsRegexp" type="REGULAR_EXPRESSION">
 
     </param>
     <param key="ignoreOccurrenceContext" type="STRING">
     <configKey><![CDATA[Checker/TreeWalker/MutableException]]></configKey>
 
 
-    <param key="format" type="r">
+    <param key="format" type="REGULAR_EXPRESSION">
 
 
     </param>
     <configKey><![CDATA[Checker/TreeWalker/PackageName]]></configKey>
 
 
-    <param key="format" type="r">
+    <param key="format" type="REGULAR_EXPRESSION">
       <defaultValue>^[a-z]+(\.[a-zA-Z_][a-zA-Z0-9_]*)*$</defaultValue>
     </param>
   </rule>
     <name><![CDATA[Parameter Name]]></name>
     <configKey><![CDATA[Checker/TreeWalker/ParameterName]]></configKey>
 
-    <param key="format" type="r">
+    <param key="format" type="REGULAR_EXPRESSION">
       <defaultValue>^[a-z][a-zA-Z0-9]*$</defaultValue>
     </param>
   </rule>
 
     <cardinality>MULTIPLE</cardinality>
 
-    <param key="format" type="r">
+    <param key="format" type="REGULAR_EXPRESSION">
 
     </param>
     <param key="message" type="STRING">
     <param key="max" type="INTEGER">
 
     </param>
-    <param key="format" type="r">
+    <param key="format" type="REGULAR_EXPRESSION">
 
     </param>
   </rule>
     <configKey><![CDATA[Checker/TreeWalker/StaticVariableName]]></configKey>
     <cardinality>MULTIPLE</cardinality>
 
-    <param key="format" type="r">
+    <param key="format" type="REGULAR_EXPRESSION">
       <defaultValue>^[a-z][a-zA-Z0-9]*$</defaultValue>
     </param>
     <param key="applyToPublic" type="BOOLEAN">
 
     <cardinality>MULTIPLE</cardinality>
 
-    <param key="format" type="r">
+    <param key="format" type="REGULAR_EXPRESSION">
 
     </param>
   </rule>
     <configKey><![CDATA[Checker/TreeWalker/TypeName]]></configKey>
     <cardinality>MULTIPLE</cardinality>
 
-    <param key="format" type="r">
+    <param key="format" type="REGULAR_EXPRESSION">
       <defaultValue>^[A-Z][a-zA-Z0-9]*$</defaultValue>
     </param>
     <param key="tokens" type="s[CLASS_DEF,INTERFACE_DEF]">
     <configKey><![CDATA[Checker/TreeWalker/UncommentedMain]]></configKey>
 
 
-    <param key="excludedClasses" type="r">
+    <param key="excludedClasses" type="REGULAR_EXPRESSION">
 
 
     </param>
     <param key="protectedAllowed" type="BOOLEAN">
 
     </param>
-    <param key="publicMemberPattern" type="r">
+    <param key="publicMemberPattern" type="REGULAR_EXPRESSION">
 
     </param>
   </rule>
     <param key="tag" type="STRING">
 
     </param>
-    <param key="tagFormat" type="r">
+    <param key="tagFormat" type="REGULAR_EXPRESSION">
 
     </param>
     <param key="tagSeverity" type="s[ignore,info,warning,error]">
index 402f37088c93b233aea7d64f2d30b01d38fdd9de..36d5aee2b8f5b73dc80ea21ea6c1e92b819791d7 100644 (file)
     <configKey><![CDATA[rulesets/basic.xml/AvoidUsingHardCodedIP]]></configKey>
 
 
-    <param key="pattern" type="r">
+    <param key="pattern" type="REGULAR_EXPRESSION">
 
 
     </param>
index f5004757f820b9051d24a0378454af4c8f3ab941..0d8e296a25a277b1912e40b0cd0f2c8444375188 100644 (file)
@@ -3,8 +3,8 @@
   <rules id="1" name="rule1" description="desc" plugin_config_key="config"
          plugin_rule_key="key1" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/>
 
-  <rules_parameters id="1" rule_id="1" name="param1" description="[null]" param_type="r"/>
-  <rules_parameters id="2" rule_id="1" name="param2" description="[null]" param_type="r"/>
+  <rules_parameters id="1" rule_id="1" name="param1" description="[null]" param_type="REGULAR_EXPRESSION"/>
+  <rules_parameters id="2" rule_id="1" name="param2" description="[null]" param_type="REGULAR_EXPRESSION"/>
 
   <rules_profiles id="1" provided="true" name="profile1" default_profile="1" language="java" enabled="true"/>
   <rules_profiles id="2" provided="true" name="profile2" default_profile="1" language="OTHER" enabled="true"/>
index ad93402fa5b4ea8cdeff6a1ebd6c9a434717a7e1..0a6b2ee0e2c9e11cdb2b07ba21eaddc361a1828f 100644 (file)
@@ -3,8 +3,8 @@
   <rules id="1" name="rule1" description="desc" plugin_config_key="config"
          plugin_rule_key="key1" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/>
 
-  <rules_parameters id="1" rule_id="1" name="param1" description="foo" param_type="r"/>
-  <rules_parameters id="2" rule_id="1" name="param2" description="foo" param_type="r"/>
+  <rules_parameters id="1" rule_id="1" name="param1" description="foo" param_type="REGULAR_EXPRESSION"/>
+  <rules_parameters id="2" rule_id="1" name="param2" description="foo" param_type="REGULAR_EXPRESSION"/>
 
   <rules_profiles id="1" provided="true" name="profile1" default_profile="1" language="java" enabled="true"/>
   <rules_profiles id="2" provided="true" name="profile2" default_profile="1" language="OTHER" enabled="true"/>
index 8bb3979e8ad54b99e21d27d477d6d27ab1debc84..fa092663e15c17e1343509ada578cac3ee8468f0 100644 (file)
@@ -7,11 +7,11 @@
          plugin_rule_key="checkstyle.new2" plugin_name="PLUGIN_KEY" enabled="true" cardinality="SINGLE" parent_id="[null]"/>
 
   <!-- Rules parameters -->
-  <rules_parameters id="1" rule_id="1" name="rule1_param1" description="rule1_desc1" param_type="r"
+  <rules_parameters id="1" rule_id="1" name="rule1_param1" description="rule1_desc1" param_type="REGULAR_EXPRESSION"
       />
-  <rules_parameters id="2" rule_id="1" name="rule1_param2" description="rule1_desc2" param_type="r"
+  <rules_parameters id="2" rule_id="1" name="rule1_param2" description="rule1_desc2" param_type="REGULAR_EXPRESSION"
       />
-  <rules_parameters id="3" rule_id="2" name="rule2_param1" description="rule2_desc1" param_type="r"
+  <rules_parameters id="3" rule_id="2" name="rule2_param1" description="rule2_desc1" param_type="REGULAR_EXPRESSION"
       />
 
 </dataset>
\ No newline at end of file
index 35d4172d221617bb400bbdaa484b972cc9bb32bd..04a15024e0ac4dca5a9e77d7cf4ae9895102e100 100644 (file)
@@ -5,9 +5,9 @@
   <rules id="2" name="rule two" description="desc" plugin_config_key="config"
          plugin_rule_key="rule_two" plugin_name="other plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/>
 
-  <rules_parameters id="1" rule_id="1" name="rule1_param1" description="rule1_desc1" param_type="r"
+  <rules_parameters id="1" rule_id="1" name="rule1_param1" description="rule1_desc1" param_type="REGULAR_EXPRESSION"
       />
-  <rules_parameters id="2" rule_id="2" name="rule2_param1" description="rule2_desc1" param_type="r"
+  <rules_parameters id="2" rule_id="2" name="rule2_param1" description="rule2_desc1" param_type="REGULAR_EXPRESSION"
       />
 
 </dataset>
\ No newline at end of file
index 6e0a40ea0883b9991a2c2a1c1eaa8ae42fc46da3..39d0bb63b543c74949f37ae501950fd035beb77e 100644 (file)
@@ -66,5 +66,12 @@ public enum PropertyType {
   /**
    * SonarSource license
    */
-  LICENSE
+  LICENSE,
+
+  /**
+   * Regular expression
+   *
+   * @since 3.2
+   */
+  REGULAR_EXPRESSION
 }
index d34ed2dadb2943eb3e7bea5d96593bb5ef21f6d3..edff6ee319fbc55f05033aeb9093e7a5d80815c0 100644 (file)
@@ -66,5 +66,12 @@ public enum WidgetPropertyType {
    *
    * @since 3.2
    */
-  PASSWORD
+  PASSWORD,
+
+  /**
+   * Regular expression
+   *
+   * @since 3.2
+   */
+  REGULAR_EXPRESSION
 }
index 999d06c0f7aebffe77671b458acb433df590d9f2..f9f215479c0cd45e411f0de6cc9e38c9fe39258c 100644 (file)
 module PropertiesHelper
 
   def property_value(key, type, value, options = {})
-    if type==PropertyType::TYPE_INTEGER
-      text_field_tag key, value, {:size => 10}.update(options)
+    if type==PropertyType::TYPE_STRING
+      text_field_tag key, value, {:size => 25}.update(options)
+
+    elsif type==PropertyType::TYPE_TEXT
+      text_area_tag key, value, {:size => '40x6'}.update(options)
+
+    elsif type==PropertyType::TYPE_PASSWORD
+      password_field_tag key, value, {:size => 25}.update(options)
 
     elsif type==PropertyType::TYPE_BOOLEAN
       check_box_tag key, "true", value=='true', options
 
-    elsif type==PropertyType::TYPE_FLOAT
+    elsif type==PropertyType::TYPE_INTEGER
       text_field_tag key, value, {:size => 10}.update(options)
 
-    elsif type==PropertyType::TYPE_STRING
-      text_field_tag key, value, {:size => 25}.update(options)
+    elsif type==PropertyType::TYPE_FLOAT
+      text_field_tag key, value, {:size => 10}.update(options)
 
     elsif type==PropertyType::TYPE_METRIC
       select_tag key, options_grouped_by_domain(Metric.all.select{|m| m.display?}.sort_by(&:short_name), value, :include_empty => true), options
 
+    elsif type==PropertyType::TYPE_REGULAR_EXPRESSION
+      text_field_tag key, value, {:size => 25}.update(options)
+
     elsif type==PropertyType::TYPE_FILTER
       user_filters = options_key(value, ::Filter.find(:all, :conditions => ['user_id=?', current_user.id]).sort_by(&:id))
       shared_filters = options_key(value, ::Filter.find(:all, :conditions => ['(user_id<>? or user_id is null) and shared=?', current_user.id, true]).sort_by(&:id))
@@ -44,12 +53,6 @@ module PropertiesHelper
 
       "#{filters_combo} #{filter_link}"
 
-    elsif type==PropertyType::TYPE_TEXT
-      text_area_tag key, value, {:size => '40x6'}.update(options)
-
-    elsif type==PropertyType::TYPE_PASSWORD
-      password_field_tag key, value, {:size => 25}.update(options)
-
     else
       hidden_field_tag key, options
     end
index 1a8fb4051d324207b9775beaf6049a0664de71bb..aa4beee3dbf6aafe4f1e8e136cf1fefca8ae36d5 100644 (file)
@@ -22,7 +22,6 @@ module RulesConfigurationHelper
 
   PARAM_TYPE_STRING_LIST = "s{}"
   PARAM_TYPE_INTEGER_LIST = "i{}"
-  PARAM_TYPE_REGEXP = "r"
 
   # Kept for compatibility with old rule param type
   def type_with_compatibility(type)
@@ -31,23 +30,27 @@ module RulesConfigurationHelper
     return PropertyType::TYPE_INTEGER if type == 'i'
     return PropertyType::TYPE_INTEGER if type == PARAM_TYPE_INTEGER_LIST
     return PropertyType::TYPE_BOOLEAN if type == 'b'
-    return PropertyType::TYPE_STRING if type == PARAM_TYPE_REGEXP
+    return PropertyType::TYPE_REGULAR_EXPRESSION if type == 'r'
     return PropertyType::TYPE_STRING if is_set(type)
 
     type
   end
 
-  def readable_type(type)
-    return "Set of comma delimited strings" if type == PARAM_TYPE_STRING_LIST
-    return "Number" if type_with_compatibility(type) == PropertyType::TYPE_INTEGER
-    return "Set of comma delimited numbers" if type == PARAM_TYPE_INTEGER_LIST
-    return "Regular expression" if type == PARAM_TYPE_REGEXP
-    return "Set of comma delimited values" if is_set(type)
+  def readable_type(param_type)
+    type=type_with_compatibility(param_type)
+
+    return "Set of comma delimited strings" if param_type == PARAM_TYPE_STRING_LIST
+    return "Number" if type == PropertyType::TYPE_INTEGER
+    return "Set of comma delimited numbers" if param_type == PARAM_TYPE_INTEGER_LIST
+    return "Regular expression" if type == PropertyType::TYPE_REGULAR_EXPRESSION
+    return "Set of comma delimited values" if is_set(param_type)
     ""
   end
 
   def param_value_input(parameter, value, options = {})
-    property_value 'value', type_with_compatibility(parameter.param_type), value, {:id => parameter.id}.update(options)
+    type=type_with_compatibility(parameter.param_type)
+
+    property_value 'value', type, value, {:id => parameter.id}.update(options)
   end
 
   def is_set(type)
@@ -71,18 +74,12 @@ module RulesConfigurationHelper
           errors.add("#{value}", "'#{n}' must be an integer.")
         end
       end
-    elsif param_type == RulesConfigurationHelper::PARAM_TYPE_REGEXP
-      if !Api::Utils.is_regexp?(attribute)
-        errors.add("#{value}", "'#{attribute}' must be a regular expression")
-      end
+    elsif type == PropertyType::TYPE_REGULAR_EXPRESSION
+      errors.add("#{value}", "'#{attribute}' must be a regular expression") unless Api::Utils.is_regexp?(attribute)
     elsif type == PropertyType::TYPE_INTEGER
-      if !Api::Utils.is_integer?(attribute)
-        errors.add("#{value}", "'#{attribute}' must be an integer.")
-      end
+      errors.add("#{value}", "'#{attribute}' must be an integer.") unless Api::Utils.is_integer?(attribute)
     elsif type == PropertyType::TYPE_BOOLEAN
-      if !Api::Utils.is_boolean?(attribute)
-        errors.add("#{value}", "'#{attribute}' must be one of : true,false")
-      end
+      errors.add("#{value}", "'#{attribute}' must be one of : true,false") unless Api::Utils.is_boolean?(attribute)
     end
   end
 end
index dc6764f7850e85faf0e92d23001f3424634f60d7..1fe7ec88aa4f3fa52c4d458fd4c9f67eadca48cb 100644 (file)
@@ -47,7 +47,7 @@ class Api::Utils
 
   def self.is_regexp?(s)
     begin
-      Regexp.new(S)
+      Regexp.new(s)
       true
     rescue
       false
index 9a9cd071e8c1ff8afe68cbe92ba04ae49c730519..8fcb9f06da39b6f17069954e606a7229f10c9181 100644 (file)
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
 #
 class PropertyType
-  TYPE_INTEGER = 'INTEGER'
+  TYPE_STRING = 'STRING'
+  TYPE_TEXT = 'TEXT'
+  TYPE_PASSWORD = 'PASSWORD'
   TYPE_BOOLEAN = 'BOOLEAN'
+  TYPE_INTEGER = 'INTEGER'
   TYPE_FLOAT = 'FLOAT'
-  TYPE_STRING = 'STRING'
+  #TYPE_SINGLE_SELECT_LIST = 'SINGLE_SELECT_LIST'
   TYPE_METRIC = 'METRIC'
+  TYPE_LICENSE = 'LICENSE'
+  TYPE_REGULAR_EXPRESSION = 'REGULAR_EXPRESSION'
+
   TYPE_FILTER = 'FILTER'
-  TYPE_TEXT = 'TEXT'
-  TYPE_PASSWORD = 'PASSWORD'
 
   def self.text_to_value(text, type)
     case type
@@ -46,10 +50,12 @@ class PropertyType
     errors.add_to_base("Unknown type for property #{key}") unless type
     if text_value.empty?
       errors.add_to_base("#{key} is empty") unless optional
-    else
-      errors.add_to_base("#{key} is not an integer") if type==PropertyType::TYPE_INTEGER && !Api::Utils.is_integer?(text_value)
-      errors.add_to_base("#{key} is not a decimal number") if type==PropertyType::TYPE_FLOAT && !Api::Utils.is_number?(text_value)
-      errors.add_to_base("#{key} is not a boolean") if type==PropertyType::TYPE_BOOLEAN && !(text_value=="true" || text_value=="false")
+      return
     end
+
+    errors.add_to_base("#{key} is not an integer") if type==TYPE_INTEGER && !Api::Utils.is_integer?(text_value)
+    errors.add_to_base("#{key} is not a decimal number") if type==TYPE_FLOAT && !Api::Utils.is_number?(text_value)
+    errors.add_to_base("#{key} is not a boolean") if type==TYPE_BOOLEAN && !Api::Utils.is_boolean?(text_value)
+    errors.add_to_base("#{key} is not a regular expression") if type==TYPE_REGULAR_EXPRESSION && !Api::Utils.is_regexp?(text_value)
   end
 end
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/settings/_type_REGULAR_EXPRESSION.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/settings/_type_REGULAR_EXPRESSION.html.erb
new file mode 100644 (file)
index 0000000..b4c3b45
--- /dev/null
@@ -0,0 +1,2 @@
+<input type="text" name="<%= h property.getKey() -%>" value="<%= h value if value -%>" size="50" id="input_<%= h property.getKey() -%>"/>
+<%= link_to_function(image_tag('zoom.png'), "enlargeTextInput('#{property.getKey()}')", :class => 'nolink') -%>
\ No newline at end of file
index f34a0b494fdc82238c458e9e3b69b672cab5d87d..cc9d18694784574a9f5f4ba19fc267fefebf47e3 100644 (file)
@@ -3,7 +3,7 @@
   <rules id="1" name="foo" description="test" plugin_config_key="checker/foo"
          plugin_rule_key="checkstyle.rule1" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/>
   
-  <rules_parameters id="1" rule_id="1" name="param1" description="[null]" param_type="r"/>
+  <rules_parameters id="1" rule_id="1" name="param1" description="[null]" param_type="REGULAR_EXPRESSION"/>
 
   <rules_profiles id="1" version="2" used_profile="false" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" enabled="true"/>
   
index 62081abc4038c6e362a4323bacff7b222cb1aca3..75c3d712a0f5e75a57cf0171f1496c6c3c0553c6 100644 (file)
@@ -3,7 +3,7 @@
   <rules id="1" name="foo" description="test" plugin_config_key="checker/foo"
          plugin_rule_key="checkstyle.rule1" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/>
 
-  <rules_parameters id="1" rule_id="1" name="param1" description="[null]" param_type="r"/>
+  <rules_parameters id="1" rule_id="1" name="param1" description="[null]" param_type="REGULAR_EXPRESSION"/>
 
   <rules_profiles id="1" version="1" used_profile="true" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" enabled="true"/>
   
index 7c4d381feea87869cba3b2de97666bbd4efefedf..b5d2d18e4540a7b3fb8a8be765650cc5fa8fc166 100644 (file)
@@ -5,7 +5,7 @@
 
   <rules id="2" name="bar" description="test2" plugin_config_key="checker/bar"
          plugin_rule_key="checkstyle.rule2" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/>
-  <rules_parameters id="13" rule_id="2" name="param1" description="[null]" param_type="r"/>
+  <rules_parameters id="13" rule_id="2" name="param1" description="[null]" param_type="REGULAR_EXPRESSION"/>
 
   <rules_profiles id="1" version="1" used_profile="true" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" enabled="true"/>
   
index aa0cb98276ec583f06394efa198b4fb3d7f4ad9c..7aeb11f9b99326eeedfbfa3fe4710529c28331e1 100644 (file)
@@ -5,7 +5,7 @@
 
   <rules id="2" name="bar" description="test2" plugin_config_key="checker/bar"
          plugin_rule_key="checkstyle.rule2" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/>
-  <rules_parameters id="13" rule_id="2" name="param1" description="[null]" param_type="r"/>
+  <rules_parameters id="13" rule_id="2" name="param1" description="[null]" param_type="REGULAR_EXPRESSION"/>
 
   <rules_profiles id="1" version="1" used_profile="true" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" enabled="true"/>
   
index 2ec87b2cd7b086bd35f5b0290b2336a9788e3d4d..e682eb176a880ddcea6b55d20a0275b9a5ece3f6 100644 (file)
@@ -2,8 +2,8 @@
 
   <rules id="2" name="bar" description="test2" plugin_config_key="checker/bar"
          plugin_rule_key="checkstyle.rule2" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/>
-  <rules_parameters id="13" rule_id="2" name="param1" description="[null]" param_type="r"/>
-  <rules_parameters id="14" rule_id="2" name="param2" description="[null]" param_type="r"/>
+  <rules_parameters id="13" rule_id="2" name="param1" description="[null]" param_type="REGULAR_EXPRESSION"/>
+  <rules_parameters id="14" rule_id="2" name="param2" description="[null]" param_type="REGULAR_EXPRESSION"/>
 
   <rules_profiles id="1" version="1" used_profile="true" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" enabled="true"/>