summaryrefslogtreecommitdiffstats
path: root/sonar-server/src
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2011-02-02 09:16:14 +0100
committersimonbrandhof <simon.brandhof@gmail.com>2011-02-02 09:16:14 +0100
commitc75f06d423d330fcd85ffcca92a58dfb5db8e77b (patch)
treeb7419eb8a31d1f15504b0f3d2fe08f1b33d9597f /sonar-server/src
parent4c4af803b71cabb8fabd7ae142bb6a6efd9bdbd9 (diff)
parentaf8cbb165e10a9bcd5ccef57ec7813645bfaf5d4 (diff)
downloadsonarqube-c75f06d423d330fcd85ffcca92a58dfb5db8e77b.tar.gz
sonarqube-c75f06d423d330fcd85ffcca92a58dfb5db8e77b.zip
Merge branch 'SONAR-2094'
Diffstat (limited to 'sonar-server/src')
-rw-r--r--sonar-server/src/main/java/org/sonar/server/configuration/ProfilesBackup.java3
-rw-r--r--sonar-server/src/main/java/org/sonar/server/configuration/ProfilesManager.java6
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/db/migrate/180_add_profiles_disabled.rb36
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/configuration/BackupTest/backup-valid.xml2
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldActivateInChildren-result.xml4
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldActivateInChildren.xml4
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldChangeParent-result.xml6
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldChangeParent.xml6
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldCheckCycles.xml6
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldDeactivateInChildren-result.xml4
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldDeactivateInChildren.xml4
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldNotDeleteInheritedProfile-result.xml6
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldRemoveParent-result.xml4
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldRemoveParent.xml4
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldRenameInheritedProfile-result.xml6
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldSetParent-result.xml4
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldSetParent.xml4
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/startup/RegisterMetricsTest/cleanAlerts-result.xml4
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/startup/RegisterMetricsTest/cleanAlerts.xml4
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/disableDeprecatedActiveRuleParameters.xml2
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/disableDeprecatedActiveRules.xml2
21 files changed, 80 insertions, 41 deletions
diff --git a/sonar-server/src/main/java/org/sonar/server/configuration/ProfilesBackup.java b/sonar-server/src/main/java/org/sonar/server/configuration/ProfilesBackup.java
index 854ef5c8594..71d57d8c148 100644
--- a/sonar-server/src/main/java/org/sonar/server/configuration/ProfilesBackup.java
+++ b/sonar-server/src/main/java/org/sonar/server/configuration/ProfilesBackup.java
@@ -32,7 +32,6 @@ import org.sonar.api.measures.Metric;
import org.sonar.api.profiles.Alert;
import org.sonar.api.profiles.RulesProfile;
import org.sonar.api.rules.*;
-import org.sonar.jpa.dao.ProfilesDao;
import org.sonar.jpa.dao.RulesDao;
import java.util.*;
@@ -63,7 +62,7 @@ public class ProfilesBackup implements Backupable {
}
public void exportXml(SonarConfig sonarConfig) {
- this.profiles = this.profiles == null ? new ProfilesDao(session).getProfiles() : this.profiles;
+ this.profiles = (this.profiles == null ? session.getResults(RulesProfile.class) : this.profiles);
// the profiles objects must be cloned to avoid issues CGLib
List<RulesProfile> cloned = new ArrayList<RulesProfile>();
for (RulesProfile profile : this.profiles) {
diff --git a/sonar-server/src/main/java/org/sonar/server/configuration/ProfilesManager.java b/sonar-server/src/main/java/org/sonar/server/configuration/ProfilesManager.java
index 98f1dc6ca76..96f55348b17 100644
--- a/sonar-server/src/main/java/org/sonar/server/configuration/ProfilesManager.java
+++ b/sonar-server/src/main/java/org/sonar/server/configuration/ProfilesManager.java
@@ -222,7 +222,8 @@ public class ProfilesManager extends BaseDao {
return getSession().getResults(RulesProfile.class,
"language", parent.getLanguage(),
"parentName", parent.getName(),
- "provided", false);
+ "provided", false,
+ "enabled", true);
}
private void removeActiveRule(RulesProfile profile, ActiveRule activeRule) {
@@ -233,7 +234,8 @@ public class ProfilesManager extends BaseDao {
RulesProfile getProfile(String language, String name) {
return getSession().getSingleResult(RulesProfile.class,
"language", language,
- "name", name);
+ "name", name,
+ "enabled", true);
}
RulesProfile getParentProfile(RulesProfile profile) {
diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/180_add_profiles_disabled.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/180_add_profiles_disabled.rb
new file mode 100644
index 00000000000..da3087a1f6b
--- /dev/null
+++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/180_add_profiles_disabled.rb
@@ -0,0 +1,36 @@
+#
+# Sonar, entreprise quality control tool.
+# Copyright (C) 2009 SonarSource SA
+# mailto:contact AT sonarsource DOT com
+#
+# Sonar is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 3 of the License, or (at your option) any later version.
+#
+# Sonar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with Sonar; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
+#
+
+#
+# Sonar 2.6
+#
+class AddProfilesDisabled < ActiveRecord::Migration
+
+ def self.up
+ add_column 'rules_profiles', 'enabled', :boolean, :null => false, :default => true
+ Profile.reset_column_information
+
+ Profile.find(:all).each do |profile|
+ profile.enabled=true
+ profile.save
+ end
+ end
+
+end
diff --git a/sonar-server/src/test/resources/org/sonar/server/configuration/BackupTest/backup-valid.xml b/sonar-server/src/test/resources/org/sonar/server/configuration/BackupTest/backup-valid.xml
index fb024b6d419..fb33ff6a535 100644
--- a/sonar-server/src/test/resources/org/sonar/server/configuration/BackupTest/backup-valid.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/configuration/BackupTest/backup-valid.xml
@@ -39,6 +39,7 @@
<default-profile><![CDATA[true]]></default-profile>
<provided><![CDATA[true]]></provided>
<language><![CDATA[test language]]></language>
+ <enabled><![CDATA[true]]></enabled>
<active-rules>
<active-rule>
<key><![CDATA[test key]]></key>
@@ -66,6 +67,7 @@
<default-profile><![CDATA[false]]></default-profile>
<provided><![CDATA[false]]></provided>
<language><![CDATA[test language]]></language>
+ <enabled><![CDATA[true]]></enabled>
<parentName><![CDATA[test name]]></parentName>
<active-rules>
<active-rule>
diff --git a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldActivateInChildren-result.xml b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldActivateInChildren-result.xml
index dff95033851..c6e3fb56922 100644
--- a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldActivateInChildren-result.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldActivateInChildren-result.xml
@@ -5,9 +5,9 @@
<rules_parameters id="1" rule_id="1" name="param1" description="[null]" param_type="r"/>
- <rules_profiles id="1" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]"/>
+ <rules_profiles id="1" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" enabled="true"/>
- <rules_profiles id="2" provided="false" name="child" default_profile="0" language="java" parent_name="parent"/>
+ <rules_profiles id="2" provided="false" name="child" default_profile="0" language="java" parent_name="parent" enabled="true"/>
<active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"/>
<active_rule_parameters id="1" active_rule_id="1" rules_parameter_id="1" value="30"/>
diff --git a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldActivateInChildren.xml b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldActivateInChildren.xml
index 4b555960447..130072bb538 100644
--- a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldActivateInChildren.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldActivateInChildren.xml
@@ -5,9 +5,9 @@
<rules_parameters id="1" rule_id="1" name="param1" description="[null]" param_type="r"/>
- <rules_profiles id="1" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]"/>
+ <rules_profiles id="1" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" enabled="true"/>
- <rules_profiles id="2" provided="false" name="child" default_profile="0" language="java" parent_name="parent"/>
+ <rules_profiles id="2" provided="false" name="child" default_profile="0" language="java" parent_name="parent" enabled="true"/>
<active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"/>
<active_rule_parameters id="1" active_rule_id="1" rules_parameter_id="1" value="30"/>
diff --git a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldChangeParent-result.xml b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldChangeParent-result.xml
index 1f7efb177a9..524f5db30ea 100644
--- a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldChangeParent-result.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldChangeParent-result.xml
@@ -6,11 +6,11 @@
<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_profiles id="1" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]"/>
+ <rules_profiles id="1" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" enabled="true"/>
- <rules_profiles id="2" provided="false" name="new_parent" default_profile="0" language="java" parent_name="[null]"/>
+ <rules_profiles id="2" provided="false" name="new_parent" default_profile="0" language="java" parent_name="[null]" enabled="true"/>
- <rules_profiles id="3" provided="false" name="child" default_profile="0" language="java" parent_name="new_parent"/>
+ <rules_profiles id="3" provided="false" name="child" default_profile="0" language="java" parent_name="new_parent" enabled="true"/>
<active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"/>
diff --git a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldChangeParent.xml b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldChangeParent.xml
index ba8530b21f7..a5d444cf42e 100644
--- a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldChangeParent.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldChangeParent.xml
@@ -6,11 +6,11 @@
<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_profiles id="1" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]"/>
+ <rules_profiles id="1" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" enabled="true"/>
- <rules_profiles id="2" provided="false" name="new_parent" default_profile="0" language="java" parent_name="[null]"/>
+ <rules_profiles id="2" provided="false" name="new_parent" default_profile="0" language="java" parent_name="[null]" enabled="true"/>
- <rules_profiles id="3" provided="false" name="child" default_profile="0" language="java" parent_name="parent"/>
+ <rules_profiles id="3" provided="false" name="child" default_profile="0" language="java" parent_name="parent" enabled="true"/>
<active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"/>
diff --git a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldCheckCycles.xml b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldCheckCycles.xml
index fd3b5e3e589..38df95e0995 100644
--- a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldCheckCycles.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldCheckCycles.xml
@@ -3,10 +3,10 @@
<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_profiles id="1" provided="false" name="level1" default_profile="0" language="java" parent_name="[null]"/>
+ <rules_profiles id="1" provided="false" name="level1" default_profile="0" language="java" parent_name="[null]" enabled="true"/>
- <rules_profiles id="2" provided="false" name="level2" default_profile="0" language="java" parent_name="level1"/>
+ <rules_profiles id="2" provided="false" name="level2" default_profile="0" language="java" parent_name="level1" enabled="true"/>
- <rules_profiles id="3" provided="false" name="level3" default_profile="0" language="java" parent_name="level2"/>
+ <rules_profiles id="3" provided="false" name="level3" default_profile="0" language="java" parent_name="level2" enabled="true"/>
</dataset>
diff --git a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldDeactivateInChildren-result.xml b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldDeactivateInChildren-result.xml
index 9a2c56efae8..18e99729416 100644
--- a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldDeactivateInChildren-result.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldDeactivateInChildren-result.xml
@@ -3,9 +3,9 @@
<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_profiles id="1" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]"/>
+ <rules_profiles id="1" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" enabled="true"/>
- <rules_profiles id="2" provided="false" name="child" default_profile="0" language="java" parent_name="parent"/>
+ <rules_profiles id="2" provided="false" name="child" default_profile="0" language="java" parent_name="parent" enabled="true"/>
<active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"/>
diff --git a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldDeactivateInChildren.xml b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldDeactivateInChildren.xml
index 4760d12b7d9..b8489c1fbd2 100644
--- a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldDeactivateInChildren.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldDeactivateInChildren.xml
@@ -3,9 +3,9 @@
<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_profiles id="1" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]"/>
+ <rules_profiles id="1" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" enabled="true"/>
- <rules_profiles id="2" provided="false" name="child" default_profile="0" language="java" parent_name="parent"/>
+ <rules_profiles id="2" provided="false" name="child" default_profile="0" language="java" parent_name="parent" enabled="true"/>
<active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"/>
diff --git a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldNotDeleteInheritedProfile-result.xml b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldNotDeleteInheritedProfile-result.xml
index fd3b5e3e589..38df95e0995 100644
--- a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldNotDeleteInheritedProfile-result.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldNotDeleteInheritedProfile-result.xml
@@ -3,10 +3,10 @@
<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_profiles id="1" provided="false" name="level1" default_profile="0" language="java" parent_name="[null]"/>
+ <rules_profiles id="1" provided="false" name="level1" default_profile="0" language="java" parent_name="[null]" enabled="true"/>
- <rules_profiles id="2" provided="false" name="level2" default_profile="0" language="java" parent_name="level1"/>
+ <rules_profiles id="2" provided="false" name="level2" default_profile="0" language="java" parent_name="level1" enabled="true"/>
- <rules_profiles id="3" provided="false" name="level3" default_profile="0" language="java" parent_name="level2"/>
+ <rules_profiles id="3" provided="false" name="level3" default_profile="0" language="java" parent_name="level2" enabled="true"/>
</dataset>
diff --git a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldRemoveParent-result.xml b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldRemoveParent-result.xml
index 1493a8e8897..540b18c3ace 100644
--- a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldRemoveParent-result.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldRemoveParent-result.xml
@@ -3,9 +3,9 @@
<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_profiles id="1" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]"/>
+ <rules_profiles id="1" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" enabled="true"/>
- <rules_profiles id="2" provided="false" name="child" default_profile="0" language="java" parent_name="[null]"/>
+ <rules_profiles id="2" provided="false" name="child" default_profile="0" language="java" parent_name="[null]" enabled="true"/>
<active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"/>
diff --git a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldRemoveParent.xml b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldRemoveParent.xml
index 4760d12b7d9..b8489c1fbd2 100644
--- a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldRemoveParent.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldRemoveParent.xml
@@ -3,9 +3,9 @@
<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_profiles id="1" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]"/>
+ <rules_profiles id="1" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" enabled="true"/>
- <rules_profiles id="2" provided="false" name="child" default_profile="0" language="java" parent_name="parent"/>
+ <rules_profiles id="2" provided="false" name="child" default_profile="0" language="java" parent_name="parent" enabled="true"/>
<active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"/>
diff --git a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldRenameInheritedProfile-result.xml b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldRenameInheritedProfile-result.xml
index d42f80577cb..a7374525f59 100644
--- a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldRenameInheritedProfile-result.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldRenameInheritedProfile-result.xml
@@ -3,10 +3,10 @@
<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_profiles id="1" provided="false" name="newName" default_profile="0" language="java" parent_name="[null]"/>
+ <rules_profiles id="1" provided="false" name="newName" default_profile="0" language="java" parent_name="[null]" enabled="true"/>
- <rules_profiles id="2" provided="false" name="level2" default_profile="0" language="java" parent_name="newName"/>
+ <rules_profiles id="2" provided="false" name="level2" default_profile="0" language="java" parent_name="newName" enabled="true"/>
- <rules_profiles id="3" provided="false" name="level3" default_profile="0" language="java" parent_name="level2"/>
+ <rules_profiles id="3" provided="false" name="level3" default_profile="0" language="java" parent_name="level2" enabled="true"/>
</dataset>
diff --git a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldSetParent-result.xml b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldSetParent-result.xml
index 4760d12b7d9..b8489c1fbd2 100644
--- a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldSetParent-result.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldSetParent-result.xml
@@ -3,9 +3,9 @@
<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_profiles id="1" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]"/>
+ <rules_profiles id="1" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" enabled="true"/>
- <rules_profiles id="2" provided="false" name="child" default_profile="0" language="java" parent_name="parent"/>
+ <rules_profiles id="2" provided="false" name="child" default_profile="0" language="java" parent_name="parent" enabled="true"/>
<active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"/>
diff --git a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldSetParent.xml b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldSetParent.xml
index 1493a8e8897..540b18c3ace 100644
--- a/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldSetParent.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldSetParent.xml
@@ -3,9 +3,9 @@
<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_profiles id="1" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]"/>
+ <rules_profiles id="1" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" enabled="true"/>
- <rules_profiles id="2" provided="false" name="child" default_profile="0" language="java" parent_name="[null]"/>
+ <rules_profiles id="2" provided="false" name="child" default_profile="0" language="java" parent_name="[null]" enabled="true"/>
<active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"/>
diff --git a/sonar-server/src/test/resources/org/sonar/server/startup/RegisterMetricsTest/cleanAlerts-result.xml b/sonar-server/src/test/resources/org/sonar/server/startup/RegisterMetricsTest/cleanAlerts-result.xml
index 11fa97ca970..1bf29a3a0d2 100644
--- a/sonar-server/src/test/resources/org/sonar/server/startup/RegisterMetricsTest/cleanAlerts-result.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/startup/RegisterMetricsTest/cleanAlerts-result.xml
@@ -6,8 +6,8 @@
<metrics id="2" name="disabledkey2" val_type="INT" description="description" domain="domain"
short_name="name2" qualitative="false" user_managed="false" enabled="false" origin="JAV" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="1" hidden="false"/>
- <rules_profiles id="1" name="profile1" default_profile="true" provided="true" language="JAV"/>
- <rules_profiles id="2" name="profile2" default_profile="false" provided="false" language="JAV"/>
+ <rules_profiles id="1" name="profile1" default_profile="true" provided="true" language="JAV" enabled="true"/>
+ <rules_profiles id="2" name="profile2" default_profile="false" provided="false" language="JAV" enabled="true"/>
<!-- ok -->
<alerts id="1" profile_id="1" metric_id="1" operator=">" value_error="30" value_warning="[null]"/>
diff --git a/sonar-server/src/test/resources/org/sonar/server/startup/RegisterMetricsTest/cleanAlerts.xml b/sonar-server/src/test/resources/org/sonar/server/startup/RegisterMetricsTest/cleanAlerts.xml
index 0e16ee2667e..67ea704c420 100644
--- a/sonar-server/src/test/resources/org/sonar/server/startup/RegisterMetricsTest/cleanAlerts.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/startup/RegisterMetricsTest/cleanAlerts.xml
@@ -7,8 +7,8 @@
short_name="name2" qualitative="false" user_managed="false" enabled="false" origin="JAV" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="1" hidden="false"/>
- <rules_profiles id="1" name="profile1" default_profile="true" provided="true" language="JAV"/>
- <rules_profiles id="2" name="profile2" default_profile="false" provided="false" language="JAV"/>
+ <rules_profiles id="1" name="profile1" default_profile="true" provided="true" language="JAV" enabled="true"/>
+ <rules_profiles id="2" name="profile2" default_profile="false" provided="false" language="JAV" enabled="true"/>
<!-- ok -->
<alerts id="1" profile_id="1" metric_id="1" operator=">" value_error="30" value_warning="[null]"/>
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 09b7c3dd728..df722428cb4 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
@@ -12,7 +12,7 @@
<rules_parameters id="3" rule_id="1" name="param3" description="[null]" param_type="[null]"/>
- <rules_profiles id="1" name="profile name" language="java" default_profile="false" provided="false" />
+ <rules_profiles id="1" name="profile name" language="java" default_profile="false" provided="false" enabled="true"/>
<active_rules id="1" rule_id="1" profile_id="1" failure_level="4" />
<active_rule_parameters id="1" active_rule_id="1" rules_parameter_id="1" value="one" />
<active_rule_parameters id="2" active_rule_id="1" rules_parameter_id="2" value="two" />
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 de7eea07189..ae76f8c4ba6 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
@@ -8,7 +8,7 @@
<rules_parameters id="1" rule_id="1" name="deprecated-prop" description="[null]" param_type="[null]"/>
- <rules_profiles id="1" name="sonar way" language="java" default_profile="false" provided="true" />
+ <rules_profiles id="1" 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" />
<active_rules id="2" rule_id="2" profile_id="1" failure_level="0" />