]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-2094 Add the column RULES_PROFILES.ENABLED
authorsimonbrandhof <simon.brandhof@gmail.com>
Tue, 1 Feb 2011 21:08:15 +0000 (22:08 +0100)
committersimonbrandhof <simon.brandhof@gmail.com>
Tue, 1 Feb 2011 21:08:15 +0000 (22:08 +0100)
33 files changed:
sonar-core/src/main/java/org/sonar/jpa/dao/ProfilesDao.java
sonar-core/src/main/java/org/sonar/jpa/entity/SchemaMigration.java
sonar-core/src/test/java/org/sonar/jpa/dao/ProfilesDaoTest.java
sonar-core/src/test/resources/org/sonar/jpa/dao/ProfilesDaoTest/shouldGetProfiles.xml
sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldAddActiveRulesToProfile-result.xml
sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldAddActiveRulesToProfile.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/shouldDeleteActiveRules-result.xml
sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldDeleteActiveRules.xml
sonar-core/src/test/resources/org/sonar/jpa/dao/RulesDaoTest/shouldGetActiveRules.xml
sonar-plugin-api/src/main/java/org/sonar/api/profiles/RulesProfile.java
sonar-server/src/main/java/org/sonar/server/configuration/ProfilesBackup.java
sonar-server/src/main/java/org/sonar/server/configuration/ProfilesManager.java
sonar-server/src/main/webapp/WEB-INF/db/migrate/180_add_profiles_disabled.rb [new file with mode: 0644]
sonar-server/src/test/resources/org/sonar/server/configuration/BackupTest/backup-valid.xml
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/InheritedProfilesTest/shouldChangeParent-result.xml
sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldChangeParent.xml
sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldCheckCycles.xml
sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldDeactivateInChildren-result.xml
sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldDeactivateInChildren.xml
sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldNotDeleteInheritedProfile-result.xml
sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldRemoveParent-result.xml
sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldRemoveParent.xml
sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldRenameInheritedProfile-result.xml
sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldSetParent-result.xml
sonar-server/src/test/resources/org/sonar/server/configuration/InheritedProfilesTest/shouldSetParent.xml
sonar-server/src/test/resources/org/sonar/server/startup/RegisterMetricsTest/cleanAlerts-result.xml
sonar-server/src/test/resources/org/sonar/server/startup/RegisterMetricsTest/cleanAlerts.xml
sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/disableDeprecatedActiveRuleParameters.xml
sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/disableDeprecatedActiveRules.xml

index 65944ab720b73ec31bd86cc4bfe79483fbbc4ec6..ba1eb21cf8057e1b047c264c4fd510267c7e1397 100644 (file)
@@ -23,44 +23,22 @@ import org.sonar.api.database.DatabaseSession;
 import org.sonar.api.database.model.ResourceModel;
 import org.sonar.api.profiles.RulesProfile;
 
-import java.util.List;
-
 public class ProfilesDao extends BaseDao {
 
   public ProfilesDao(DatabaseSession session) {
     super(session);
   }
 
-  public List<RulesProfile> getActiveProfiles() {
-    return getSession().getResults(RulesProfile.class, "defaultProfile", true);
-  }
-
   public RulesProfile getActiveProfile(String languageKey, String projectResourceKey) {
     ResourceModel projectResource = getSession().getSingleResult(ResourceModel.class, "key", projectResourceKey, "scope", ResourceModel.SCOPE_PROJECT);
-    if (projectResource != null && projectResource.getRulesProfile() != null) {
+    if (projectResource != null && projectResource.getRulesProfile() != null && projectResource.getRulesProfile().isEnabled()) {
       return projectResource.getRulesProfile();
     }
-    return getSession().getSingleResult(RulesProfile.class, "defaultProfile", true, "language", languageKey);
-  }
-
-  public List<RulesProfile> getProfiles(String languageKey) {
-    return getSession().getResults(RulesProfile.class, "language", languageKey);
-  }
-
-  public List<RulesProfile> getProfiles() {
-    return getSession().getResults(RulesProfile.class);
-  }
-
-  public List<RulesProfile> getProvidedProfiles() {
-    return getSession().getResults(RulesProfile.class, "provided", true);
+    return getSession().getSingleResult(RulesProfile.class, "defaultProfile", true, "language", languageKey, "enabled", true);
   }
 
   public RulesProfile getProfile(String languageKey, String profileName) {
-    return getSession().getSingleResult(RulesProfile.class, "language", languageKey, "name", profileName);
-  }
-
-  public RulesProfile getProfileById(int profileId) {
-    return getSession().getEntityManager().getReference(RulesProfile.class, profileId);
+    return getSession().getSingleResult(RulesProfile.class, "language", languageKey, "name", profileName, "enabled", true);
   }
 
 }
index a80961ba4cec5b6cf34af26a0e1e1ee34ec4db78..921cbcab6d3b8a0bc85a3269ec2a757fb03542c5 100644 (file)
@@ -31,7 +31,7 @@ import javax.persistence.*;
 public class SchemaMigration {
 
   public final static int VERSION_UNKNOWN = -1;
-  public static final int LAST_VERSION = 170;
+  public static final int LAST_VERSION = 180;
 
   public final static String TABLE_NAME = "schema_migrations";
 
index 796435c5dabe47dfb727d23338a61c2de9846d07..0b821d51dc2f411ccfce14c1c22e4688639b590d 100644 (file)
@@ -25,10 +25,8 @@ import org.sonar.api.database.model.ResourceModel;
 import org.sonar.api.profiles.RulesProfile;\r
 import org.sonar.jpa.test.AbstractDbUnitTestCase;\r
 \r
-import java.util.List;\r
-\r
-import static org.hamcrest.CoreMatchers.is;\r
-import static org.junit.Assert.*;\r
+import static org.junit.Assert.assertEquals;\r
+import static org.junit.Assert.assertNull;\r
 \r
 public class ProfilesDaoTest extends AbstractDbUnitTestCase {\r
 \r
@@ -39,14 +37,6 @@ public class ProfilesDaoTest extends AbstractDbUnitTestCase {
     profilesDao = new ProfilesDao(getSession());\r
   }\r
 \r
-  @Test\r
-  public void shouldGetProfiles() {\r
-    setupData("shouldGetProfiles");\r
-\r
-    List<RulesProfile> profiles = profilesDao.getProfiles("java");\r
-\r
-    assertThat(profiles.size(), is(2));\r
-  }\r
 \r
   @Test\r
   public void testGetActiveProfile() {\r
index f1e87d6dcb56824776dba1bd169356fe1f0a56cd..3325d8baf745108c72ea501b03bf7f814e5e654d 100644 (file)
@@ -1,7 +1,7 @@
 <dataset>\r
 \r
-  <rules_profiles id="1" provided="true" name="profile one" default_profile="0" language="java"/>\r
-  <rules_profiles id="2" provided="true" name="profile two" default_profile="0" language="java"/>\r
-  <rules_profiles id="3" provided="true" name="profile three" default_profile="0" language="plsql"/>\r
+  <rules_profiles id="1" provided="true" name="profile one" default_profile="0" language="java" enabled="true"/>\r
+  <rules_profiles id="2" provided="true" name="profile two" default_profile="0" language="java" enabled="true"/>\r
+  <rules_profiles id="3" provided="true" name="profile three" default_profile="0" language="plsql" enabled="true"/>\r
 \r
 </dataset>
\ No newline at end of file
index cd31402ceb14f9e5685e13621f357fa68291e601..cecf13ba8e1ab6d2b772f7ee847d62efa94ac675 100644 (file)
@@ -1,6 +1,6 @@
 <dataset>
 
-  <rules_profiles id="1" parent_name="[null]" provided="true" name="profile" default_profile="1" language="java"/>
+  <rules_profiles id="1" parent_name="[null]" provided="true" name="profile" default_profile="1" language="java" enabled="true"/>
 
   <rules_categories id="1" name="category one" description="[null]"/>
 
index 19b124c737d9b7cec85acbaed761e9f5a616a8b1..0851c7441a01ecfb4f2ed6d1580448fb9efb0e0e 100644 (file)
@@ -1,6 +1,6 @@
 <dataset>
 
-  <rules_profiles id="1" provided="true" name="profile" default_profile="1" language="java"/>
+  <rules_profiles id="1" provided="true" name="profile" default_profile="1" language="java" enabled="true"/>
 
   <rules_categories id="1" name="category one" description="[null]"/>
 
index 5f86b0492401d87ffa48588e691998665042ac6e..be6be226a5653c545aec241f989621249ad28565 100644 (file)
@@ -8,8 +8,8 @@
   <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_profiles id="1" provided="true" name="profile1" default_profile="1" language="java"/>
-  <rules_profiles id="2" provided="true" name="profile2" default_profile="1" language="OTHER"/>
+  <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"/>
 
   <active_rules id="1" profile_id="1" rule_id="1" failure_level="2"/>
   <active_rules id="2" profile_id="2" rule_id="1" failure_level="2"/>
index f2d17bc78be4428ae81760bd110664b150c47141..f19937676d1601360189b8469206f2a62ce90e6e 100644 (file)
@@ -8,8 +8,8 @@
   <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_profiles id="1" provided="true" name="profile1" default_profile="1" language="java"/>
-  <rules_profiles id="2" provided="true" name="profile2" default_profile="1" language="OTHER"/>
+  <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"/>
 
   <active_rules id="1" profile_id="1" rule_id="1" failure_level="2"/>
   <active_rules id="2" profile_id="2" rule_id="1" failure_level="2"/>
index 736de8e24123de8ff4d3a2004b356bca3ff1ff5e..94757dbf118de941cd879253e22840a14ad8e968 100644 (file)
@@ -2,8 +2,8 @@
 \r
   <rules_categories id="1" name="category one" description="[null]"/>\r
 \r
-  <rules_profiles id="1" provided="true" name="profile one" default_profile="1" language="java"/>\r
-  <rules_profiles id="2" provided="true" name="profile two" default_profile="0" language="java"/>\r
+  <rules_profiles id="1" provided="true" name="profile one" default_profile="1" language="java" enabled="true"/>\r
+  <rules_profiles id="2" provided="true" name="profile two" default_profile="0" language="java" enabled="true"/>\r
 \r
   <rules id="1" name="foo" description="test" plugin_config_key="checker/foo"\r
          plugin_rule_key="checkstyle.rule1" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/>\r
index 89f2fecf7cfb1a63792402c08783bff8068fb956..de59da7e6e7909d8e1d9c51e54f55f83b8d4445d 100644 (file)
@@ -2,8 +2,8 @@
 \r
   <rules_categories id="1" name="category one" description="[null]"/>\r
 \r
-  <rules_profiles id="1" provided="true" name="profile one" default_profile="1" language="java"/>\r
-  <rules_profiles id="2" provided="true" name="profile two" default_profile="0" language="java"/>\r
+  <rules_profiles id="1" provided="true" name="profile one" default_profile="1" language="java" enabled="true"/>\r
+  <rules_profiles id="2" provided="true" name="profile two" default_profile="0" language="java" enabled="true"/>\r
 \r
   <rules id="1" name="foo" description="test" plugin_config_key="checker/foo"\r
          plugin_rule_key="checkstyle.rule1" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/>\r
index 736de8e24123de8ff4d3a2004b356bca3ff1ff5e..94757dbf118de941cd879253e22840a14ad8e968 100644 (file)
@@ -2,8 +2,8 @@
 \r
   <rules_categories id="1" name="category one" description="[null]"/>\r
 \r
-  <rules_profiles id="1" provided="true" name="profile one" default_profile="1" language="java"/>\r
-  <rules_profiles id="2" provided="true" name="profile two" default_profile="0" language="java"/>\r
+  <rules_profiles id="1" provided="true" name="profile one" default_profile="1" language="java" enabled="true"/>\r
+  <rules_profiles id="2" provided="true" name="profile two" default_profile="0" language="java" enabled="true"/>\r
 \r
   <rules id="1" name="foo" description="test" plugin_config_key="checker/foo"\r
          plugin_rule_key="checkstyle.rule1" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/>\r
index 6a50730d3088c5096987244cd3c4bc05790992db..fbf2d2bea04801ba29e92924e54d0d853d98244a 100644 (file)
@@ -29,11 +29,10 @@ import org.sonar.api.rules.ActiveRule;
 import org.sonar.api.rules.Rule;
 import org.sonar.api.rules.RulePriority;
 
+import javax.persistence.*;
 import java.util.ArrayList;
 import java.util.List;
 
-import javax.persistence.*;
-
 /**
  * This class is badly named. It should be "QualityProfile". Indeed it does not relate only to rules but to metric thresholds too.
  */
@@ -70,6 +69,9 @@ public class RulesProfile implements Cloneable {
   @Column(name = "provided", updatable = true, nullable = false)
   private Boolean provided = Boolean.FALSE;
 
+  @Column(name = "enabled", updatable = true, nullable = false)
+  private boolean enabled = true;
+
   @Column(name = "language", updatable = true, nullable = false)
   private String language;
 
@@ -177,6 +179,15 @@ public class RulesProfile implements Cloneable {
     this.provided = b;
   }
 
+  public boolean isEnabled() {
+    return enabled;
+  }
+
+  public RulesProfile setEnabled(boolean b) {
+    this.enabled = b;
+    return this;
+  }
+
   /**
    * @return the profile language
    */
index 854ef5c8594004ac87f79be3e722090130bfd7cd..71d57d8c1481b22a73b283f1f373ee3b7d311106 100644 (file)
@@ -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) {
index 98f1dc6ca76eaca55bb001a537bbe3b46d0cba3f..96f55348b1727feb6f67157c6833c9599d64a61c 100644 (file)
@@ -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 (file)
index 0000000..da3087a
--- /dev/null
@@ -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
index fb024b6d4190f848090e7b25876188b24d52d5ec..fb33ff6a535280c416b7670f49aa3069b32e17b0 100644 (file)
@@ -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>
index dff950338514cc4bcb18f9baddf4c0aa38152fdd..c6e3fb5692264279b6277dea0be7a1ed4bd7ab0d 100644 (file)
@@ -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"/>
index 4b5559604476cbd78cf7d83303e9188c2abf7606..130072bb538e869da4df059d0e759190ddf91c11 100644 (file)
@@ -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"/>
index 1f7efb177a9e7cd08121a8e72d202c7194b9abf2..524f5db30ea72c0752bd482d74458fdc33d24577 100644 (file)
@@ -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]"/>
 
index ba8530b21f7f53f8ecb7338fb1354d861d2b2d46..a5d444cf42ef4943aa15ef82a13f73404edc8368 100644 (file)
@@ -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]"/>
 
index fd3b5e3e5894f0d91b75aa64c8857b4bc5203668..38df95e09956f10c278b86df81ddd6d744d1f553 100644 (file)
@@ -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>
index 9a2c56efae83482345afe00dae3316dd3248f697..18e99729416ae6b0eb772443c6126216018eee29 100644 (file)
@@ -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]"/>
 
index 4760d12b7d93d376241a8553871620e19821196f..b8489c1fbd27cb574af52b8b37df6328128d708a 100644 (file)
@@ -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]"/>
 
index fd3b5e3e5894f0d91b75aa64c8857b4bc5203668..38df95e09956f10c278b86df81ddd6d744d1f553 100644 (file)
@@ -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>
index 1493a8e8897dd9cd0e70e1d14c4b77fccef12685..540b18c3ace956a0802aa003b33d046e234de55a 100644 (file)
@@ -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]"/>
 
index 4760d12b7d93d376241a8553871620e19821196f..b8489c1fbd27cb574af52b8b37df6328128d708a 100644 (file)
@@ -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]"/>
 
index d42f80577cb1f8313eb7ea3e5922b2d47bb9b204..a7374525f59263f5e47e649533a3e981ba989be9 100644 (file)
@@ -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>
index 4760d12b7d93d376241a8553871620e19821196f..b8489c1fbd27cb574af52b8b37df6328128d708a 100644 (file)
@@ -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]"/>
 
index 1493a8e8897dd9cd0e70e1d14c4b77fccef12685..540b18c3ace956a0802aa003b33d046e234de55a 100644 (file)
@@ -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]"/>
 
index 11fa97ca970e2659e835b0b283c5d2602b3bb99d..1bf29a3a0d2656f4573f326ee33582abf070b74a 100644 (file)
@@ -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]"/>
index 0e16ee2667e10ef1c2d6831452269076083d56f5..67ea704c42083e86e8483c1aa6d8b258157398bf 100644 (file)
@@ -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]"/>
index 09b7c3dd728c3db1d36ad615f93ed2ccf692d6a5..df722428cb45eca94e8b424a2adaa3d01ed4e5dc 100644 (file)
@@ -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" />
index de7eea071892950ca2c4420d35e2e03ea26759e0..ae76f8c4ba6759d1edf4d6b6802cd7583f56578d 100644 (file)
@@ -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" />