diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2010-12-01 11:30:48 +0000 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2010-12-01 11:30:48 +0000 |
commit | e537ea6120df8eb20ba04da66811c21161f6ec6d (patch) | |
tree | e0e5898938290b5506bb834106c908780125ff88 /sonar-core/src | |
parent | 0441e5cb03ef5fcd21f681682a994437e985768d (diff) | |
download | sonarqube-e537ea6120df8eb20ba04da66811c21161f6ec6d.tar.gz sonarqube-e537ea6120df8eb20ba04da66811c21161f6ec6d.zip |
SONAR-2007 Remove the useless ISO Categories + fix components page
Diffstat (limited to 'sonar-core/src')
18 files changed, 41 insertions, 81 deletions
diff --git a/sonar-core/src/main/java/org/sonar/jpa/dao/RulesDao.java b/sonar-core/src/main/java/org/sonar/jpa/dao/RulesDao.java index 3f5788bae6c..736d977ac30 100644 --- a/sonar-core/src/main/java/org/sonar/jpa/dao/RulesDao.java +++ b/sonar-core/src/main/java/org/sonar/jpa/dao/RulesDao.java @@ -23,16 +23,16 @@ import org.sonar.api.database.DatabaseSession; import org.sonar.api.database.model.RuleFailureModel;
import org.sonar.api.database.model.Snapshot;
import org.sonar.api.profiles.RulesProfile;
-import org.sonar.api.rules.*;
+import org.sonar.api.rules.ActiveRule;
+import org.sonar.api.rules.ActiveRuleParam;
+import org.sonar.api.rules.Rule;
+import org.sonar.api.rules.RuleParam;
-import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class RulesDao extends BaseDao {
- private List<RulesCategory> rulesCategories;
-
public RulesDao(DatabaseSession session) {
super(session);
}
@@ -45,39 +45,18 @@ public class RulesDao extends BaseDao { return getSession().getResults(Rule.class, "pluginName", pluginKey, "enabled", true);
}
- public List<Rule> getRulesByCategory(RulesCategory categ) {
- List<Rule> result = new ArrayList<Rule>();
- for (Rule rule : getRules()) {
- if (rule.getRulesCategory().equals(categ)) {
- result.add(rule);
- }
- }
- return result;
- }
public Rule getRuleByKey(String pluginKey, String ruleKey) {
return getSession().getSingleResult(Rule.class, "key", ruleKey, "pluginName", pluginKey, "enabled", true);
}
- public Long countRules(List<String> plugins, String categoryName) {
+ public Long countRules(List<String> plugins) {
return (Long) getSession().createQuery(
- "SELECT COUNT(r) FROM Rule r WHERE r.pluginName IN (:pluginNames) AND r.rulesCategory=:rulesCategory AND r.enabled=true").
+ "SELECT COUNT(r) FROM Rule r WHERE r.pluginName IN (:pluginNames) AND r.enabled=true").
setParameter("pluginNames", plugins).
- setParameter("rulesCategory", getCategory(categoryName)).
getSingleResult();
}
- public List<RulesCategory> getCategories() {
- if (rulesCategories == null) {
- rulesCategories = getSession().getResults(RulesCategory.class);
- }
- return rulesCategories;
- }
-
- public RulesCategory getCategory(String key) {
- return getSession().getSingleResult(RulesCategory.class, "name", key);
- }
-
public List<RuleParam> getRuleParams() {
return getSession().getResults(RuleParam.class);
@@ -96,13 +75,6 @@ public class RulesDao extends BaseDao { }
}
- public void deleteActiveRuleParameters(RuleParam ruleParam) {
- getSession().createQuery(
- "DELETE FROM ActiveRuleParam arp WHERE ruleParam=:param")
- .setParameter("param", ruleParam)
- .executeUpdate();
- }
-
public List<RuleFailureModel> getViolations(Snapshot snapshot) {
return getSession().getResults(RuleFailureModel.class, "snapshotId", snapshot.getId());
}
diff --git a/sonar-core/src/main/java/org/sonar/jpa/entity/SchemaMigration.java b/sonar-core/src/main/java/org/sonar/jpa/entity/SchemaMigration.java index 5d9eb70c3bc..0be085d8be8 100644 --- a/sonar-core/src/main/java/org/sonar/jpa/entity/SchemaMigration.java +++ b/sonar-core/src/main/java/org/sonar/jpa/entity/SchemaMigration.java @@ -30,7 +30,7 @@ import java.sql.Statement; public class SchemaMigration { public final static int VERSION_UNKNOWN = -1; - public static final int LAST_VERSION = 161; + public static final int LAST_VERSION = 162; public final static String TABLE_NAME = "schema_migrations"; diff --git a/sonar-core/src/main/resources/ehcache.xml b/sonar-core/src/main/resources/ehcache.xml index 99e2597c98e..9385f272c34 100644 --- a/sonar-core/src/main/resources/ehcache.xml +++ b/sonar-core/src/main/resources/ehcache.xml @@ -70,7 +70,7 @@ overflowToDisk="false"/> <cache name="org.sonar.api.rules.RulesCategory" - maxElementsInMemory="32" + maxElementsInMemory="6" eternal="true" overflowToDisk="false"/> </ehcache>
\ No newline at end of file diff --git a/sonar-core/src/test/java/org/sonar/jpa/dao/RulesDaoTest.java b/sonar-core/src/test/java/org/sonar/jpa/dao/RulesDaoTest.java index 30dc9fc0602..4656c20bb1b 100644 --- a/sonar-core/src/test/java/org/sonar/jpa/dao/RulesDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/jpa/dao/RulesDaoTest.java @@ -51,7 +51,6 @@ public class RulesDaoTest extends AbstractDbUnitTestCase { assertEquals("rule_one", rules.get(0).getKey());
assertEquals(1, rules.get(0).getParams().size());
- assertEquals("category one", rules.get(0).getRulesCategory().getName());
}
@Test
@@ -67,17 +66,6 @@ public class RulesDaoTest extends AbstractDbUnitTestCase { }
@Test
- public void shouldCountNumberOfRulesOfACategoryForGivenPlugins() {
- setupData("shouldCountNumberOfRulesOfACategoryForGivenPlugins");
-
- Long result = rulesDao.countRules(Arrays.asList("plugin1", "plugin2"), "category one");
- assertThat(result, is(3L));
-
- result = rulesDao.countRules(Arrays.asList("plugin1", "plugin2"), "category two");
- assertThat(result, is(1L));
- }
-
- @Test
public void shouldGetRuleParams() {
setupData("shouldGetRuleParams");
@@ -116,7 +104,7 @@ public class RulesDaoTest extends AbstractDbUnitTestCase { public void shouldAddActiveRulesToProfile() {
setupData("shouldAddActiveRulesToProfile");
- Rule rule = new Rule("rule1", "key1", "config1", new RulesCategory("test"), null);
+ Rule rule = new Rule("rule1", "key1", "config1", null, null);
RuleParam ruleParam = new RuleParam(null, "param1", null, null);
rule.setParams(Arrays.asList(ruleParam));
diff --git a/sonar-core/src/test/resources/org/sonar/core/components/CacheRuleFinderTest/shared.xml b/sonar-core/src/test/resources/org/sonar/core/components/CacheRuleFinderTest/shared.xml index f6adafee0da..de08ce13d22 100644 --- a/sonar-core/src/test/resources/org/sonar/core/components/CacheRuleFinderTest/shared.xml +++ b/sonar-core/src/test/resources/org/sonar/core/components/CacheRuleFinderTest/shared.xml @@ -3,18 +3,18 @@ <!-- CHECKSTYLE --> - <rules id="1" name="Check Header" rules_category_id="6" plugin_rule_key="com.puppycrawl.tools.checkstyle.checks.header.HeaderCheck" + <rules id="1" name="Check Header" plugin_rule_key="com.puppycrawl.tools.checkstyle.checks.header.HeaderCheck" plugin_config_key="Checker/Treewalker/HeaderCheck" plugin_name="checkstyle" description="[null]" priority="4" enabled="true" cardinality="SINGLE" parent_id="[null]"/> <!-- disabled rule --> - <rules id="2" name="Disabled checked" rules_category_id="6" plugin_rule_key="DisabledCheck" + <rules id="2" name="Disabled checked" plugin_rule_key="DisabledCheck" plugin_config_key="Checker/Treewalker/DisabledCheck" plugin_name="checkstyle" description="[null]" priority="4" enabled="false" cardinality="SINGLE" parent_id="[null]" /> - <rules id="3" name="Check Annotation" rules_category_id="6" plugin_rule_key="com.puppycrawl.tools.checkstyle.checks.annotation.AnnotationUseStyleCheck" + <rules id="3" name="Check Annotation" plugin_rule_key="com.puppycrawl.tools.checkstyle.checks.annotation.AnnotationUseStyleCheck" plugin_config_key="Checker/Treewalker/AnnotationUseStyleCheck" plugin_name="checkstyle" description="[null]" priority="4" enabled="true" cardinality="SINGLE" parent_id="[null]" /> <!-- PMD --> - <rules id="4" name="Call Super First" rules_category_id="6" plugin_rule_key="CallSuperFirst" + <rules id="4" name="Call Super First" plugin_rule_key="CallSuperFirst" plugin_config_key="rulesets/android.xml/CallSuperFirst" plugin_name="pmd" description="[null]" priority="2" enabled="true" cardinality="SINGLE" parent_id="[null]" /> </dataset>
\ No newline at end of file diff --git a/sonar-core/src/test/resources/org/sonar/core/components/DefaultRuleFinderTest/shared.xml b/sonar-core/src/test/resources/org/sonar/core/components/DefaultRuleFinderTest/shared.xml index f6adafee0da..de08ce13d22 100644 --- a/sonar-core/src/test/resources/org/sonar/core/components/DefaultRuleFinderTest/shared.xml +++ b/sonar-core/src/test/resources/org/sonar/core/components/DefaultRuleFinderTest/shared.xml @@ -3,18 +3,18 @@ <!-- CHECKSTYLE --> - <rules id="1" name="Check Header" rules_category_id="6" plugin_rule_key="com.puppycrawl.tools.checkstyle.checks.header.HeaderCheck" + <rules id="1" name="Check Header" plugin_rule_key="com.puppycrawl.tools.checkstyle.checks.header.HeaderCheck" plugin_config_key="Checker/Treewalker/HeaderCheck" plugin_name="checkstyle" description="[null]" priority="4" enabled="true" cardinality="SINGLE" parent_id="[null]"/> <!-- disabled rule --> - <rules id="2" name="Disabled checked" rules_category_id="6" plugin_rule_key="DisabledCheck" + <rules id="2" name="Disabled checked" plugin_rule_key="DisabledCheck" plugin_config_key="Checker/Treewalker/DisabledCheck" plugin_name="checkstyle" description="[null]" priority="4" enabled="false" cardinality="SINGLE" parent_id="[null]" /> - <rules id="3" name="Check Annotation" rules_category_id="6" plugin_rule_key="com.puppycrawl.tools.checkstyle.checks.annotation.AnnotationUseStyleCheck" + <rules id="3" name="Check Annotation" plugin_rule_key="com.puppycrawl.tools.checkstyle.checks.annotation.AnnotationUseStyleCheck" plugin_config_key="Checker/Treewalker/AnnotationUseStyleCheck" plugin_name="checkstyle" description="[null]" priority="4" enabled="true" cardinality="SINGLE" parent_id="[null]" /> <!-- PMD --> - <rules id="4" name="Call Super First" rules_category_id="6" plugin_rule_key="CallSuperFirst" + <rules id="4" name="Call Super First" plugin_rule_key="CallSuperFirst" plugin_config_key="rulesets/android.xml/CallSuperFirst" plugin_name="pmd" description="[null]" priority="2" enabled="true" cardinality="SINGLE" parent_id="[null]" /> </dataset>
\ No newline at end of file diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldAddActiveRulesToProfile-result.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldAddActiveRulesToProfile-result.xml index c7059375406..6818bf4c09e 100644 --- a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldAddActiveRulesToProfile-result.xml +++ b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldAddActiveRulesToProfile-result.xml @@ -4,7 +4,7 @@ <rules_categories id="1" name="category one" description="[null]"/> - <rules id="1" name="rule1" rules_category_id="1" description="desc" plugin_config_key="config1" + <rules id="1" name="rule1" description="desc" plugin_config_key="config1" plugin_rule_key="key1" plugin_name="plugin" priority="1" enabled="true" cardinality="SINGLE" parent_id="[null]"/> <rules_parameters id="1" rule_id="1" name="param1" description="foo" param_type="r"/> diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldAddActiveRulesToProfile.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldAddActiveRulesToProfile.xml index f30fb8d64d9..19b124c737d 100644 --- a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldAddActiveRulesToProfile.xml +++ b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldAddActiveRulesToProfile.xml @@ -4,7 +4,7 @@ <rules_categories id="1" name="category one" description="[null]"/> - <rules id="1" name="rule1" rules_category_id="1" description="desc" plugin_config_key="config1" + <rules id="1" name="rule1" description="desc" plugin_config_key="config1" plugin_rule_key="key1" plugin_name="plugin" priority="1" enabled="true" cardinality="SINGLE" parent_id="[null]"/> <rules_parameters id="1" rule_id="1" name="param1" description="foo" param_type="r"/> diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldCountNumberOfRulesOfACategoryForGivenPlugins.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldCountNumberOfRulesOfACategoryForGivenPlugins.xml index edb6c8d9271..86c8d928eee 100644 --- a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldCountNumberOfRulesOfACategoryForGivenPlugins.xml +++ b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldCountNumberOfRulesOfACategoryForGivenPlugins.xml @@ -3,15 +3,15 @@ <rules_categories id="1" name="category one" description="[null]"/> <rules_categories id="2" name="category two" description="[null]"/> - <rules id="1" name="rule one" rules_category_id="1" description="desc" plugin_config_key="config" + <rules id="1" name="rule one" description="desc" plugin_config_key="config" plugin_rule_key="rule_one" plugin_name="plugin1" enabled="true" cardinality="SINGLE" parent_id="[null]"/> - <rules id="2" name="rule two" rules_category_id="1" description="desc" plugin_config_key="config" + <rules id="2" name="rule two" description="desc" plugin_config_key="config" plugin_rule_key="rule_two" plugin_name="plugin2" enabled="true" cardinality="SINGLE" parent_id="[null]"/> - <rules id="3" name="rule three" rules_category_id="1" description="desc" plugin_config_key="config" + <rules id="3" name="rule three" description="desc" plugin_config_key="config" plugin_rule_key="rule_three" plugin_name="plugin2" enabled="true" cardinality="SINGLE" parent_id="[null]"/> - <rules id="4" name="rule 4" rules_category_id="2" description="desc" plugin_config_key="config" + <rules id="4" name="rule 4" description="desc" plugin_config_key="config" plugin_rule_key="rule_4" plugin_name="plugin2" enabled="true" cardinality="SINGLE" parent_id="[null]"/> </dataset>
\ No newline at end of file diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRuleParametersFromARuleParameter-result.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRuleParametersFromARuleParameter-result.xml index 71c8345bb80..5f86b049240 100644 --- a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRuleParametersFromARuleParameter-result.xml +++ b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRuleParametersFromARuleParameter-result.xml @@ -2,7 +2,7 @@ <rules_categories id="1" name="category one" description="[null]"/> - <rules id="1" name="rule1" rules_category_id="1" description="desc" plugin_config_key="config" + <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"/> diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRuleParametersFromARuleParameter.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRuleParametersFromARuleParameter.xml index 90456d43522..f2d17bc78be 100644 --- a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRuleParametersFromARuleParameter.xml +++ b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRuleParametersFromARuleParameter.xml @@ -2,7 +2,7 @@ <rules_categories id="1" name="category one" description="[null]"/> - <rules id="1" name="rule1" rules_category_id="1" description="desc" plugin_config_key="config" + <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"/> diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRules-result.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRules-result.xml index 58dc223fc1f..736de8e2412 100644 --- a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRules-result.xml +++ b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRules-result.xml @@ -5,11 +5,11 @@ <rules_profiles id="1" provided="true" name="profile one" default_profile="1" language="java"/>
<rules_profiles id="2" provided="true" name="profile two" default_profile="0" language="java"/>
- <rules id="1" name="foo" rules_category_id="1" description="test" plugin_config_key="checker/foo"
+ <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 id="2" name="bar" rules_category_id="1" description="test" plugin_config_key="checker/bar"
+ <rules id="2" name="bar" description="test" plugin_config_key="checker/bar"
plugin_rule_key="checkstyle.rule2" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/>
- <rules id="3" name="baz" rules_category_id="1" description="test" plugin_config_key="checker/baz"
+ <rules id="3" name="baz" description="test" plugin_config_key="checker/baz"
plugin_rule_key="checkstyle.rule3" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/>
<active_rules id="1" profile_id="1" rule_id="1" failure_level="2"/>
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRules.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRules.xml index ffd0336d51f..89f2fecf7cf 100644 --- a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRules.xml +++ b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRules.xml @@ -5,11 +5,11 @@ <rules_profiles id="1" provided="true" name="profile one" default_profile="1" language="java"/>
<rules_profiles id="2" provided="true" name="profile two" default_profile="0" language="java"/>
- <rules id="1" name="foo" rules_category_id="1" description="test" plugin_config_key="checker/foo"
+ <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 id="2" name="bar" rules_category_id="1" description="test" plugin_config_key="checker/bar"
+ <rules id="2" name="bar" description="test" plugin_config_key="checker/bar"
plugin_rule_key="checkstyle.rule2" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/>
- <rules id="3" name="baz" rules_category_id="1" description="test" plugin_config_key="checker/baz"
+ <rules id="3" name="baz" description="test" plugin_config_key="checker/baz"
plugin_rule_key="checkstyle.rule3" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/>
<active_rules id="1" profile_id="1" rule_id="1" failure_level="2"/>
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetActiveRules.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetActiveRules.xml index 58dc223fc1f..736de8e2412 100644 --- a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetActiveRules.xml +++ b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetActiveRules.xml @@ -5,11 +5,11 @@ <rules_profiles id="1" provided="true" name="profile one" default_profile="1" language="java"/>
<rules_profiles id="2" provided="true" name="profile two" default_profile="0" language="java"/>
- <rules id="1" name="foo" rules_category_id="1" description="test" plugin_config_key="checker/foo"
+ <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 id="2" name="bar" rules_category_id="1" description="test" plugin_config_key="checker/bar"
+ <rules id="2" name="bar" description="test" plugin_config_key="checker/bar"
plugin_rule_key="checkstyle.rule2" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/>
- <rules id="3" name="baz" rules_category_id="1" description="test" plugin_config_key="checker/baz"
+ <rules id="3" name="baz" description="test" plugin_config_key="checker/baz"
plugin_rule_key="checkstyle.rule3" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/>
<active_rules id="1" profile_id="1" rule_id="1" failure_level="2"/>
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetRuleParams.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetRuleParams.xml index 2eded82f21f..7df82f67476 100644 --- a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetRuleParams.xml +++ b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetRuleParams.xml @@ -3,9 +3,9 @@ <rules_categories id="1" name="category one" description="[null]"/>
<!-- Rules -->
- <rules id="1" name="new1" rules_category_id="1" description="test1" plugin_config_key="checker/new1"
+ <rules id="1" name="new1" description="test1" plugin_config_key="checker/new1"
plugin_rule_key="checkstyle.new1" plugin_name="PLUGIN_KEY" enabled="true" cardinality="SINGLE" parent_id="[null]"/>
- <rules id="2" name="new2" rules_category_id="1" description="test2" plugin_config_key="checker/new2"
+ <rules id="2" name="new2" description="test2" plugin_config_key="checker/new2"
plugin_rule_key="checkstyle.new2" plugin_name="PLUGIN_KEY" enabled="true" cardinality="SINGLE" parent_id="[null]"/>
<!-- Rules parameters -->
diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetRuleWithRuleKeyAndPluginKey.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetRuleWithRuleKeyAndPluginKey.xml index 00de02226cf..42176327e03 100644 --- a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetRuleWithRuleKeyAndPluginKey.xml +++ b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetRuleWithRuleKeyAndPluginKey.xml @@ -2,7 +2,7 @@ <rules_categories id="1" name="category one" description="[null]"/>
- <rules id="1" name="foo" rules_category_id="1" description="test" plugin_config_key="checker/foo"
+ <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]"/>
</dataset>
\ No newline at end of file diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetRules.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetRules.xml index 9190f5bcdab..303865ba8fb 100644 --- a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetRules.xml +++ b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetRules.xml @@ -2,9 +2,9 @@ <rules_categories id="1" name="category one" description="[null]"/> - <rules id="1" name="rule one" rules_category_id="1" description="desc" plugin_config_key="other config" + <rules id="1" name="rule one" description="desc" plugin_config_key="other config" plugin_rule_key="rule_one" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/> - <rules id="2" name="rule two" rules_category_id="1" description="desc" plugin_config_key="config" + <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" diff --git a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldSynchronizeRuleOfActiveRule.xml b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldSynchronizeRuleOfActiveRule.xml index 3de538103e6..94227fff982 100644 --- a/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldSynchronizeRuleOfActiveRule.xml +++ b/sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldSynchronizeRuleOfActiveRule.xml @@ -2,9 +2,9 @@ <rules_categories id="1" name="category one" description="[null]"/> - <rules id="1" name="other rule" rules_category_id="1" description="desc" plugin_config_key="other config" + <rules id="1" name="other rule" description="desc" plugin_config_key="other config" plugin_rule_key="other key" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/> - <rules id="2" name="rule" rules_category_id="1" description="desc" plugin_config_key="config" + <rules id="2" name="rule" description="desc" plugin_config_key="config" plugin_rule_key="key" 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" /> |