*/
public class DatabaseVersion implements BatchComponent, ServerComponent {
- public static final int LAST_VERSION = 331;
+ public static final int LAST_VERSION = 332;
public static enum Status {
UP_TO_DATE, REQUIRES_UPGRADE, REQUIRES_DOWNGRADE, FRESH_INSTALL
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('321');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('330');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('331');
+INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('332');
INSERT INTO USERS(ID, LOGIN, NAME, EMAIL, CRYPTED_PASSWORD, SALT, CREATED_AT, UPDATED_AT, REMEMBER_TOKEN, REMEMBER_TOKEN_EXPIRES_AT) VALUES (1, 'admin', 'Administrator', '', 'a373a0e667abb2604c1fd571eb4ad47fe8cc0878', '48bc4b0d93179b5103fd3885ea9119498e9d161b', '2011-09-26 22:27:48.0', '2011-09-26 22:27:48.0', null, null);
ALTER TABLE USERS ALTER COLUMN ID RESTART WITH 2;
"PROVIDED" BOOLEAN NOT NULL DEFAULT FALSE,
"LANGUAGE" VARCHAR(16),
"PARENT_NAME" VARCHAR(100),
- "ENABLED" BOOLEAN NOT NULL DEFAULT TRUE,
"VERSION" INTEGER DEFAULT 1,
"USED_PROFILE" BOOLEAN DEFAULT FALSE
);
<dataset>
- <rules_profiles id="1" provided="true" name="profile one" default_profile="0" language="java" enabled="true"/>
- <rules_profiles id="2" provided="true" name="profile two" default_profile="0" language="java" enabled="true"/>
- <rules_profiles id="3" provided="true" name="profile three" default_profile="0" language="plsql" enabled="true"/>
+ <rules_profiles id="1" provided="true" name="profile one" default_profile="0" language="java"/>
+ <rules_profiles id="2" provided="true" name="profile two" default_profile="0" language="java"/>
+ <rules_profiles id="3" provided="true" name="profile three" default_profile="0" language="plsql"/>
</dataset>
\ No newline at end of file
<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"/>
+ <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"/>
<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"/>
<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"/>
+ <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"/>
<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"/>
<dataset>
- <rules_profiles id="1" provided="true" name="profile one" default_profile="1" language="java" enabled="true"/>
- <rules_profiles id="2" provided="true" name="profile two" default_profile="0" language="java" enabled="true"/>
+ <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" description="test" plugin_config_key="checker/foo"
plugin_rule_key="checkstyle.rule1" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/>
<dataset>
- <rules_profiles id="1" provided="true" name="profile one" default_profile="1" language="java" enabled="true"/>
- <rules_profiles id="2" provided="true" name="profile two" default_profile="0" language="java" enabled="true"/>
+ <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" description="test" plugin_config_key="checker/foo"
plugin_rule_key="checkstyle.rule1" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/>
<dataset>
- <rules_profiles id="1" provided="true" name="profile one" default_profile="1" language="java" enabled="true"/>
- <rules_profiles id="2" provided="true" name="profile two" default_profile="0" language="java" enabled="true"/>
+ <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" description="test" plugin_config_key="checker/foo"
plugin_rule_key="checkstyle.rule1" plugin_name="plugin" enabled="true" cardinality="SINGLE" parent_id="[null]"/>
@Column(name = "provided", updatable = true, nullable = false)
private Boolean provided = Boolean.FALSE;
- @Column(name = "enabled", updatable = true, nullable = false)
- private Boolean enabled = Boolean.TRUE;
-
@Column(name = "used_profile", updatable = true, nullable = false)
private Boolean used = Boolean.FALSE;
this.provided = b;
}
+ /**
+ * @deprecated since 3.3. Always return true.
+ * @return
+ */
+ @Deprecated
public Boolean getEnabled() {
- return enabled;
+ return Boolean.TRUE;
}
+ /**
+ * @deprecated since 3.3. Always return true.
+ * @return
+ */
+@Deprecated
public boolean isEnabled() {
- return enabled == Boolean.TRUE;
+ return true;
}
+ /**
+ * @deprecated since 3.3.
+ * @return
+ */
+ @Deprecated
public RulesProfile setEnabled(Boolean b) {
- this.enabled = b;
- return this;
+ throw new UnsupportedOperationException("The field RulesProfile#enabled is not supported since 3.3.");
}
/**
}
public void importProfile(RulesDao rulesDao, RulesProfile toImport) {
- if (toImport.getEnabled() == null) {
- // backward-compatibility with versions < 2.6. The field "enabled" did not exist. Default value is true.
- toImport.setEnabled(true);
- }
if (toImport.getVersion() == 0) {
// backward-compatibility with versions < 2.9. The field "version" did not exist. Default value is 1.
toImport.setVersion(1);
return getSession().getResults(RulesProfile.class,
"language", parent.getLanguage(),
"parentName", parent.getName(),
- "provided", false,
- "enabled", true);
+ "provided", false);
}
private void removeActiveRule(RulesProfile profile, ActiveRule activeRule) {
RulesProfile getProfile(String language, String name) {
return getSession().getSingleResult(RulesProfile.class,
"language", language,
- "name", name,
- "enabled", true);
+ "name", name);
}
RulesProfile getParentProfile(RulesProfile profile) {
startupContainer.addSingleton(RegisterMetrics.class);
startupContainer.addSingleton(RegisterRules.class);
startupContainer.addSingleton(RegisterProvidedProfiles.class);
- startupContainer.addSingleton(EnableProfiles.class);
startupContainer.addSingleton(ActivateDefaultProfiles.class);
startupContainer.addSingleton(JdbcDriverDeployer.class);
startupContainer.addSingleton(ServerMetadataPersister.class);
+++ /dev/null
-/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2008-2012 SonarSource
- * 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
- */
-package org.sonar.server.startup;
-
-import com.google.common.collect.Sets;
-import org.sonar.api.database.DatabaseSession;
-import org.sonar.api.profiles.RulesProfile;
-import org.sonar.api.resources.Language;
-import org.sonar.api.utils.TimeProfiler;
-import org.sonar.jpa.session.DatabaseSessionFactory;
-
-import javax.persistence.Query;
-import java.util.Set;
-
-/**
- * @since 2.6
- */
-public final class EnableProfiles {
-
- private Language[] languages;
- private DatabaseSessionFactory sessionFactory;
-
-
- public EnableProfiles(Language[] languages, DatabaseSessionFactory sessionFactory, RegisterProvidedProfiles registerProfilesBefore) {// NOSONAR the parameter registerProfilesBefore is used to define the execution order of startup components
- this.languages = languages;
- this.sessionFactory = sessionFactory;
- }
-
- public void start() {
- TimeProfiler profiler = new TimeProfiler().start("Enable profiles");
- DatabaseSession session = sessionFactory.getSession();
- Set<String> languages = getLanguageKeys();
-
- enableProfilesOnKnownLanguages(languages, session);
- disableProfilesOnMissingLanguages(languages, session);
-
- session.commit();
- profiler.stop();
- }
-
- private void enableProfilesOnKnownLanguages(Set<String> languages, DatabaseSession session) {
- Query query = session.createQuery("update " + RulesProfile.class.getSimpleName() + " set enabled=:enabled where language in (:languages)");
- query.setParameter("enabled", Boolean.TRUE);
- query.setParameter("languages", languages);
- query.executeUpdate();
- }
-
- private void disableProfilesOnMissingLanguages(Set<String> languages, DatabaseSession session) {
- Query query = session.createQuery("update " + RulesProfile.class.getSimpleName() + " set enabled=:enabled where language not in (:languages)");
- query.setParameter("enabled", Boolean.FALSE);
- query.setParameter("languages", languages);
- query.executeUpdate();
- }
-
- private Set<String> getLanguageKeys() {
- Set<String> keys = Sets.newLinkedHashSet();
- for (Language language : languages) {
- keys.add(language.getKey());
- }
- return keys;
- }
-}
name=params[:name]
if name.blank?
- @profile=Profile.find(:first, :conditions => ['language=? and default_profile=? and enabled=?', language, true, true])
+ @profile=Profile.find(:first, :conditions => ['language=? and default_profile=?', language, true])
else
- @profile=Profile.find(:first, :conditions => ['language=? and name=? and enabled=?', language, name, true])
+ @profile=Profile.find(:first, :conditions => ['language=? and name=?', language, name])
end
raise ApiException.new(404, "Profile not found") if @profile.nil?
bad_request('Missing parameter: language') if params[:language].blank?
if params[:name].blank?
- profile=Profile.find(:first, :conditions => ['language=? and default_profile=? and enabled=?', params[:language], true, true])
+ profile=Profile.find(:first, :conditions => ['language=? and default_profile=?', params[:language], true])
else
- profile=Profile.find(:first, :conditions => ['language=? and name=? and enabled=?', params[:language], params[:name], true])
+ profile=Profile.find(:first, :conditions => ['language=? and name=?', params[:language], params[:name]])
end
not_found('Profile not found') unless profile
--- /dev/null
+#
+# Sonar, entreprise quality control tool.
+# Copyright (C) 2008-2012 SonarSource
+# 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 3.3
+#
+class RemoveProfilesEnabledColumn < ActiveRecord::Migration
+
+ class Profile < ActiveRecord::Base
+ set_table_name 'rules_profiles'
+ end
+
+ class ActiveRule < ActiveRecord::Base
+ end
+
+ def self.up
+ disabled_profiles = Profile.find(:all, :conditions => {:enabled => false})
+ disabled_profiles.each do |profile|
+ ActiveRule.delete_all ['profile_id=?', profile.id]
+ Profile.delete(profile.id)
+ end
+
+ remove_column('rules_profiles', 'enabled')
+ end
+
+end
*/
package org.sonar.server.configuration;
-import org.apache.commons.io.FileUtils;
import org.junit.Before;
import org.junit.Test;
import org.sonar.api.measures.Metric;
import org.sonar.api.rules.RuleParam;
import org.sonar.api.rules.RulePriority;
import org.sonar.jpa.test.AbstractDbUnitTestCase;
-import org.sonar.server.platform.PersistentSettings;
-import org.sonar.test.TestUtils;
-import java.io.IOException;
import java.util.Arrays;
import static org.fest.assertions.Assertions.assertThat;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.collection.IsCollectionContaining.hasItem;
-import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThat;
-import static org.mockito.Mockito.mock;
public class ProfilesBackupTest extends AbstractDbUnitTestCase {
assertEquals(1, newProfile.getActiveRules(RulePriority.MAJOR).get(0).getActiveRuleParams().size());
assertEquals(2, newProfile.getAlerts().size());
}
-
- /**
- * The field <profile><enabled> has been added in version 2.6. Profiles imported from backup of previous releases must
- * be considered as enabled.
- */
- @Test
- public void shouldSupportMissingEnabledField() throws IOException {
- Backup backup = new Backup(getSession(), mock(PersistentSettings.class));
- backup.doImportXml(FileUtils.readFileToString(TestUtils.getResource(getClass(), "shouldSupportMissingEnabledField.xml")));
-
- RulesProfile profile = getSession().getSingleResult(RulesProfile.class, "name", "Missing enabled field");
- assertThat(profile.getEnabled(), is(Boolean.TRUE));
- }
-
- @Test
- public void shouldSupportEnabledField() throws IOException {
- Backup backup = new Backup(getSession(), mock(PersistentSettings.class));
- backup.doImportXml(FileUtils.readFileToString(TestUtils.getResource(getClass(), "shouldSupportEnabledField.xml")));
-
- RulesProfile enabledProfile = getSession().getSingleResult(RulesProfile.class, "name", "Enabled");
- assertThat(enabledProfile.getEnabled(), is(Boolean.TRUE));
-
- RulesProfile disabledProfile = getSession().getSingleResult(RulesProfile.class, "name", "Disabled");
- assertThat(disabledProfile.getEnabled(), is(Boolean.FALSE));
- }
}
+++ /dev/null
-/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2008-2012 SonarSource
- * 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
- */
-package org.sonar.server.startup;
-
-import org.junit.Test;
-import org.sonar.api.resources.AbstractLanguage;
-import org.sonar.api.resources.Java;
-import org.sonar.api.resources.Language;
-import org.sonar.jpa.test.AbstractDbUnitTestCase;
-
-public class EnableProfilesTest extends AbstractDbUnitTestCase {
-
- @Test
- public void shouldDisableProfilesWithMissingLanguages() {
- setupData("shouldDisableProfilesWithMissingLanguages");
-
- Language[] languages = new Language[]{Java.INSTANCE, new Php()};
- EnableProfiles task = new EnableProfiles(languages, getSessionFactory(), null);
- task.start();
-
- checkTables("shouldDisableProfilesWithMissingLanguages", "rules_profiles");
- }
-
- @Test
- public void shouldEnableProfilesWithKnownLanguages() {
- setupData("shouldEnableProfilesWithKnownLanguages");
-
- Language[] languages = new Language[]{Java.INSTANCE, new Php()};
- EnableProfiles task = new EnableProfiles(languages, getSessionFactory(), null);
- task.start();
-
- checkTables("shouldEnableProfilesWithKnownLanguages", "rules_profiles");
- }
-
- private static class Php extends AbstractLanguage {
-
- public Php() {
- super("php");
- }
-
- public String[] getFileSuffixes() {
- return new String[0];
- }
- }
-}
-
<provided><![CDATA[true]]></provided>
<used><![CDATA[false]]></used>
<language><![CDATA[test language]]></language>
- <enabled><![CDATA[true]]></enabled>
<active-rules>
<active-rule>
<key><![CDATA[test key]]></key>
<default-profile><![CDATA[false]]></default-profile>
<provided><![CDATA[false]]></provided>
<language><![CDATA[test language]]></language>
- <enabled><![CDATA[true]]></enabled>
<used><![CDATA[false]]></used>
<parentName><![CDATA[test name]]></parentName>
<active-rules>
<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"/>
+ <rules_profiles id="1" version="2" used_profile="false" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" />
- <rules_profiles id="2" version="2" used_profile="false" provided="false" name="child" default_profile="0" language="java" parent_name="parent" enabled="true"/>
+ <rules_profiles id="2" version="2" used_profile="false" provided="false" name="child" default_profile="0" language="java" parent_name="parent" />
<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"/>
<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"/>
+ <rules_profiles id="1" version="1" used_profile="true" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" />
- <rules_profiles id="2" version="1" used_profile="true" provided="false" name="child" default_profile="0" language="java" parent_name="parent" enabled="true"/>
+ <rules_profiles id="2" version="1" used_profile="true" provided="false" name="child" default_profile="0" language="java" parent_name="parent" />
<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"/>
<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" version="1" used_profile="true" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" enabled="true"/>
+ <rules_profiles id="1" version="1" used_profile="true" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" />
- <rules_profiles id="2" version="1" used_profile="true" provided="false" name="new_parent" default_profile="0" language="java" parent_name="[null]" enabled="true"/>
+ <rules_profiles id="2" version="1" used_profile="true" provided="false" name="new_parent" default_profile="0" language="java" parent_name="[null]" />
- <rules_profiles id="3" version="2" used_profile="false" provided="false" name="child" default_profile="0" language="java" parent_name="new_parent" enabled="true"/>
+ <rules_profiles id="3" version="2" used_profile="false" provided="false" name="child" default_profile="0" language="java" parent_name="new_parent" />
<active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"/>
<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" version="1" used_profile="true" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" enabled="true"/>
+ <rules_profiles id="1" version="1" used_profile="true" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" />
- <rules_profiles id="2" version="1" used_profile="true" provided="false" name="new_parent" default_profile="0" language="java" parent_name="[null]" enabled="true"/>
+ <rules_profiles id="2" version="1" used_profile="true" provided="false" name="new_parent" default_profile="0" language="java" parent_name="[null]" />
- <rules_profiles id="3" version="1" used_profile="true" provided="false" name="child" default_profile="0" language="java" parent_name="parent" enabled="true"/>
+ <rules_profiles id="3" version="1" used_profile="true" provided="false" name="child" default_profile="0" language="java" parent_name="parent" />
<active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"/>
<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" version="1" used_profile="true" provided="false" name="level1" default_profile="0" language="java" parent_name="[null]" enabled="true"/>
-
- <rules_profiles id="2" version="1" used_profile="true" provided="false" name="level2" default_profile="0" language="java" parent_name="level1" enabled="true"/>
-
- <rules_profiles id="3" version="1" used_profile="true" provided="false" name="level3" default_profile="0" language="java" parent_name="level2" enabled="true"/>
+ <rules_profiles id="1" version="1" used_profile="true" provided="false" name="level1" default_profile="0" language="java" parent_name="[null]" />
+
+ <rules_profiles id="2" version="1" used_profile="true" provided="false" name="level2" default_profile="0" language="java" parent_name="level1" />
+
+ <rules_profiles id="3" version="1" used_profile="true" provided="false" name="level3" default_profile="0" language="java" parent_name="level2" />
</dataset>
<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" version="2" used_profile="false" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" enabled="true"/>
-
- <rules_profiles id="2" version="2" used_profile="false" provided="false" name="child" default_profile="0" language="java" parent_name="parent" enabled="true"/>
+ <rules_profiles id="1" version="2" used_profile="false" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]"/>
+
+ <rules_profiles id="2" version="2" used_profile="false" provided="false" name="child" default_profile="0" language="java" parent_name="parent" />
<active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"/>
<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" version="1" used_profile="true" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" enabled="true"/>
+ <rules_profiles id="1" version="1" used_profile="true" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" />
- <rules_profiles id="2" version="1" used_profile="true" provided="false" name="child" default_profile="0" language="java" parent_name="parent" enabled="true"/>
+ <rules_profiles id="2" version="1" used_profile="true" provided="false" name="child" default_profile="0" language="java" parent_name="parent" />
<active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"/>
<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" version="1" used_profile="true" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" enabled="true"/>
+ <rules_profiles id="1" version="1" used_profile="true" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" />
- <rules_profiles id="2" version="2" used_profile="false" provided="false" name="child" default_profile="0" language="java" parent_name="[null]" enabled="true"/>
+ <rules_profiles id="2" version="2" used_profile="false" provided="false" name="child" default_profile="0" language="java" parent_name="[null]" />
<active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"/>
<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" version="1" used_profile="true" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" enabled="true"/>
+ <rules_profiles id="1" version="1" used_profile="true" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" />
- <rules_profiles id="2" version="1" used_profile="true" provided="false" name="child" default_profile="0" language="java" parent_name="parent" enabled="true"/>
+ <rules_profiles id="2" version="1" used_profile="true" provided="false" name="child" default_profile="0" language="java" parent_name="parent" />
<active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"/>
<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" version="1" used_profile="true" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" enabled="true"/>
+ <rules_profiles id="1" version="1" used_profile="true" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" />
- <rules_profiles id="2" version="2" used_profile="false" provided="false" name="child" default_profile="0" language="java" parent_name="parent" enabled="true"/>
+ <rules_profiles id="2" version="2" used_profile="false" provided="false" name="child" default_profile="0" language="java" parent_name="parent" />
<active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"/>
<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" version="1" used_profile="true" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" enabled="true"/>
+ <rules_profiles id="1" version="1" used_profile="true" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" />
- <rules_profiles id="2" version="1" used_profile="true" provided="false" name="child" default_profile="0" language="java" parent_name="[null]" enabled="true"/>
+ <rules_profiles id="2" version="1" used_profile="true" provided="false" name="child" default_profile="0" language="java" parent_name="[null]" />
<active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"/>
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="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"/>
+ <rules_profiles id="1" version="1" used_profile="true" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" />
- <rules_profiles id="2" version="1" used_profile="true" provided="false" name="child" default_profile="0" language="java" parent_name="[null]" enabled="true"/>
+ <rules_profiles id="2" version="1" used_profile="true" provided="false" name="child" default_profile="0" language="java" parent_name="[null]" />
<active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"/>
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="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"/>
+ <rules_profiles id="1" version="1" used_profile="true" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" />
- <rules_profiles id="2" version="1" used_profile="true" provided="false" name="child" default_profile="0" language="java" parent_name="parent" enabled="true"/>
+ <rules_profiles id="2" version="1" used_profile="true" provided="false" name="child" default_profile="0" language="java" parent_name="parent" />
<active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"/>
<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"/>
+ <rules_profiles id="1" version="1" used_profile="true" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" />
- <rules_profiles id="2" version="1" used_profile="true" provided="false" name="child" default_profile="0" language="java" parent_name="parent" enabled="true"/>
+ <rules_profiles id="2" version="1" used_profile="true" provided="false" name="child" default_profile="0" language="java" parent_name="parent" />
<active_rules id="2" profile_id="1" rule_id="2" failure_level="2" inheritance="[null]"/>
<active_rule_parameters id="3" active_rule_id="2" rules_parameter_id="14" value="50"/>
<dataset>
- <rules_profiles id="1" version="1" used_profile="true" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" enabled="true"/>
+ <rules_profiles id="1" version="1" used_profile="true" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" />
- <rules_profiles id="2" version="2" used_profile="false" provided="false" name="child" default_profile="0" language="java" parent_name="parent" enabled="true"/>
+ <rules_profiles id="2" version="2" used_profile="false" provided="false" name="child" default_profile="0" language="java" parent_name="parent" />
</dataset>
<dataset>
- <rules_profiles id="1" version="2" used_profile="false" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" enabled="true"/>
+ <rules_profiles id="1" version="2" used_profile="false" provided="false" name="parent" default_profile="0" language="java" parent_name="[null]" />
- <rules_profiles id="2" version="2" used_profile="false" provided="false" name="child" default_profile="0" language="java" parent_name="parent" enabled="true"/>
+ <rules_profiles id="2" version="2" used_profile="false" provided="false" name="child" default_profile="0" language="java" parent_name="parent" />
</dataset>
+++ /dev/null
-<dataset>
- <rules_profiles id="1" version="1" used_profile="true" provided="true" name="Java 1" default_profile="0" language="java" enabled="true" PARENT_NAME="[null]"/>
- <rules_profiles id="2" version="1" used_profile="true" provided="false" name="Java 2" default_profile="1" language="java" enabled="true" PARENT_NAME="[null]"/>
- <rules_profiles id="3" version="1" used_profile="true" provided="true" name="Php" default_profile="0" language="php" enabled="true" PARENT_NAME="[null]"/>
-
- <!-- disabled -->
- <rules_profiles id="4" version="1" used_profile="true" provided="true" name="Cobol 1" default_profile="1" language="cobol" enabled="false" PARENT_NAME="[null]"/>
- <rules_profiles id="5" version="1" used_profile="true" provided="false" name="Cobol 2" default_profile="0" language="cobol" enabled="false" PARENT_NAME="[null]"/>
-</dataset>
\ No newline at end of file
+++ /dev/null
-<dataset>
- <rules_profiles id="1" version="1" used_profile="true" provided="true" name="Java 1" default_profile="0" language="java" enabled="true" PARENT_NAME="[null]"/>
- <rules_profiles id="2" version="1" used_profile="true" provided="false" name="Java 2" default_profile="1" language="java" enabled="true" PARENT_NAME="[null]"/>
- <rules_profiles id="3" version="1" used_profile="true" provided="true" name="Php" default_profile="0" language="php" enabled="true" PARENT_NAME="[null]"/>
- <rules_profiles id="4" version="1" used_profile="true" provided="true" name="Cobol 1" default_profile="1" language="cobol" enabled="true" PARENT_NAME="[null]"/>
- <rules_profiles id="5" version="1" used_profile="true" provided="false" name="Cobol 2" default_profile="0" language="cobol" enabled="true" PARENT_NAME="[null]"/>
-</dataset>
\ No newline at end of file
+++ /dev/null
-<dataset>
- <rules_profiles id="1" version="1" used_profile="true" provided="true" name="Java 1" default_profile="0" language="java" enabled="true" PARENT_NAME="[null]"/>
- <rules_profiles id="2" version="1" used_profile="true" provided="false" name="Java 2" default_profile="1" language="java" enabled="true" PARENT_NAME="[null]"/>
-
- <!-- enabled -->
- <rules_profiles id="3" version="1" used_profile="true" provided="true" name="Disabled Php 1" default_profile="0" language="php" enabled="true" PARENT_NAME="[null]"/>
- <rules_profiles id="4" version="1" used_profile="true" provided="false" name="Disabled Php 2" default_profile="1" language="php" enabled="true" PARENT_NAME="[null]"/>
-
- <!-- keep disabled -->
- <rules_profiles id="5" version="1" used_profile="true" provided="true" name="Disabled Cobol" default_profile="1" language="cobol" enabled="false" PARENT_NAME="[null]"/>
-</dataset>
\ No newline at end of file
+++ /dev/null
-<dataset>
- <rules_profiles id="1" version="1" used_profile="true" provided="true" name="Java 1" default_profile="0" language="java" enabled="true" PARENT_NAME="[null]"/>
- <rules_profiles id="2" version="1" used_profile="true" provided="false" name="Java 2" default_profile="1" language="java" enabled="true" PARENT_NAME="[null]"/>
- <rules_profiles id="3" version="1" used_profile="true" provided="true" name="Disabled Php 1" default_profile="0" language="php" enabled="false" PARENT_NAME="[null]"/>
- <rules_profiles id="4" version="1" used_profile="true" provided="false" name="Disabled Php 2" default_profile="1" language="php" enabled="false" PARENT_NAME="[null]"/>
- <rules_profiles id="5" version="1" used_profile="true" provided="true" name="Disabled Cobol" default_profile="1" language="cobol" enabled="false" PARENT_NAME="[null]"/>
-</dataset>
\ No newline at end of file
<metrics delete_historical_data="[null]" 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" version="1" used_profile="true" name="profile1" default_profile="true" provided="true" language="JAV" enabled="true"/>
- <rules_profiles id="2" version="1" used_profile="true" name="profile2" default_profile="false" provided="false" language="JAV" enabled="true"/>
+ <rules_profiles id="1" version="1" used_profile="true" name="profile1" default_profile="true" provided="true" language="JAV" />
+ <rules_profiles id="2" version="1" used_profile="true" name="profile2" default_profile="false" provided="false" language="JAV" />
<!-- ok -->
<alerts id="1" profile_id="1" metric_id="1" operator=">" value_error="30" value_warning="[null]"/>
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" version="1" used_profile="true" name="profile1" default_profile="true" provided="true" language="JAV" enabled="true"/>
- <rules_profiles id="2" version="1" used_profile="true" name="profile2" default_profile="false" provided="false" language="JAV" enabled="true"/>
+ <rules_profiles id="1" version="1" used_profile="true" name="profile1" default_profile="true" provided="true" language="JAV" />
+ <rules_profiles id="2" version="1" used_profile="true" name="profile2" default_profile="false" provided="false" language="JAV" />
<!-- ok -->
<alerts id="1" profile_id="1" metric_id="1" operator=">" value_error="30" value_warning="[null]"/>
<rules_parameters id="3" rule_id="1" name="param3" description="[null]" param_type="STRING"/>
- <rules_profiles id="1" version="1" used_profile="true" name="profile name" language="java" default_profile="false" provided="false" enabled="true"/>
+ <rules_profiles id="1" version="1" used_profile="true" name="profile name" language="java" default_profile="false" provided="false" />
<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" />
<rules_parameters id="1" rule_id="1" name="deprecated-prop" description="[null]" param_type="STRING"/>
- <rules_profiles id="1" version="1" used_profile="true" name="sonar way" language="java" default_profile="false" provided="true" enabled="true"/>
+ <rules_profiles id="1" version="1" used_profile="true" name="sonar way" language="java" default_profile="false" provided="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" />