INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1614');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1615');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1616');
+INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1617');
INSERT INTO USERS(ID, LOGIN, NAME, EMAIL, EXTERNAL_IDENTITY, EXTERNAL_IDENTITY_PROVIDER, USER_LOCAL, CRYPTED_PASSWORD, SALT, IS_ROOT, CREATED_AT, UPDATED_AT) VALUES (1, 'admin', 'Administrator', '', 'admin', 'sonarqube', true, 'a373a0e667abb2604c1fd571eb4ad47fe8cc0878', '48bc4b0d93179b5103fd3885ea9119498e9d161b', false, '1418215735482', '1418215735482');
ALTER TABLE USERS ALTER COLUMN ID RESTART WITH 2;
"NAME" VARCHAR(200),
"STATUS" VARCHAR(40),
"LANGUAGE" VARCHAR(20),
- "NOTE_DATA" CLOB(2147483647),
- "NOTE_USER_LOGIN" VARCHAR(255),
- "NOTE_CREATED_AT" TIMESTAMP,
- "NOTE_UPDATED_AT" TIMESTAMP,
- "REMEDIATION_FUNCTION" VARCHAR(20),
"DEF_REMEDIATION_FUNCTION" VARCHAR(20),
- "REMEDIATION_GAP_MULT" VARCHAR(20),
"DEF_REMEDIATION_GAP_MULT" VARCHAR(20),
- "REMEDIATION_BASE_EFFORT" VARCHAR(20),
"DEF_REMEDIATION_BASE_EFFORT" VARCHAR(20),
"GAP_DESCRIPTION" VARCHAR(4000),
- "TAGS" VARCHAR(4000),
"SYSTEM_TAGS" VARCHAR(4000),
"RULE_TYPE" TINYINT,
"CREATED_AT" BIGINT,
<dataset>
- <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="NewRuleKey" plugin_name="plugin" name="new name" description="new description" status="DEPRECATED"
- plugin_config_key="NewConfigKey" priority="0" is_template="[true]" language="dart" template_id="3"
- note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]"
- remediation_function="linear" def_remediation_function="linear_offset"
- remediation_gap_mult="1h" def_remediation_gap_mult="5d"
- remediation_base_effort="5min" def_remediation_base_effort="10h"
- gap_description="squid.S115.effortToFix"
- created_at="[null]" updated_at="[null]"
- />
- <rules_parameters id="1" rule_id="1" name="max" param_type="INTEGER" default_value="30" description="My Parameter"/>
+ <rules system_tags="[null]"
+ id="1"
+ plugin_rule_key="NewRuleKey"
+ plugin_name="plugin"
+ name="new name"
+ description="new description"
+ status="DEPRECATED"
+ plugin_config_key="NewConfigKey"
+ priority="0"
+ is_template="[true]"
+ language="dart"
+ template_id="3"
+ def_remediation_function="linear_offset"
+ def_remediation_gap_mult="5d"
+ def_remediation_base_effort="10h"
+ gap_description="squid.S115.effortToFix"
+ created_at="[null]"
+ updated_at="[null]"
+ />
+ <rules_parameters id="1"
+ rule_id="1"
+ name="max"
+ param_type="INTEGER"
+ default_value="30"
+ description="My Parameter"/>
</dataset>
<dataset>
- <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="NewRuleKey" plugin_name="plugin" name="new name" description="new description" status="DEPRECATED"
- plugin_config_key="NewConfigKey" priority="0" is_template="[true]" language="dart" template_id="3"
- note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]"
- remediation_function="linear" def_remediation_function="linear_offset"
- remediation_gap_mult="1h" def_remediation_gap_mult="5d"
- remediation_base_effort="5min" def_remediation_base_effort="10h"
- gap_description="squid.S115.effortToFix"
- created_at="[null]" updated_at="[null]"
- />
+ <rules system_tags="[null]"
+ id="1"
+ plugin_rule_key="NewRuleKey"
+ plugin_name="plugin"
+ name="new name"
+ description="new description"
+ status="DEPRECATED"
+ plugin_config_key="NewConfigKey"
+ priority="0"
+ is_template="[true]"
+ language="dart"
+ template_id="3"
+ def_remediation_function="linear_offset"
+ def_remediation_gap_mult="5d"
+ def_remediation_base_effort="10h"
+ gap_description="squid.S115.effortToFix"
+ created_at="[null]"
+ updated_at="[null]"
+ />
</dataset>
<dataset>
- <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="AvoidNull" plugin_name="checkstyle" name="Avoid Null" description="Should avoid NULL" status="READY"
- note_data="Rule note with accents éèà" note_user_login="polop.palap" note_created_at="2013-12-25" description_format="HTML"
- remediation_function="LINEAR" def_remediation_function="LINEAR_OFFSET"
- remediation_gap_mult="1h" def_remediation_gap_mult="5d"
- remediation_base_effort="5min" def_remediation_base_effort="10h"
+ <rules system_tags="[null]"
+ id="1"
+ plugin_rule_key="AvoidNull"
+ plugin_name="checkstyle"
+ name="Avoid Null"
+ description="Should avoid NULL"
+ description_format="HTML"
+ status="READY"
+ def_remediation_function="LINEAR_OFFSET"
+ def_remediation_gap_mult="5d"
+ def_remediation_base_effort="10h"
gap_description="squid.S115.effortToFix"
- created_at="1500000000000" updated_at="1600000000000"
+ created_at="1500000000000"
+ updated_at="1600000000000"
/>
- <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="AvoidNull" plugin_name="squid" name="Avoid Null" description="Should avoid NULL" status="REMOVED"
- note_data="[null]" note_user_login="[null]" note_created_at="[null]" description_format="HTML"
- remediation_function="[null]" def_remediation_function="[null]"
- remediation_gap_mult="[null]" def_remediation_gap_mult="[null]"
- remediation_base_effort="[null]" def_remediation_base_effort="[null]"
+ <rules system_tags="[null]"
+ id="2"
+ plugin_rule_key="AvoidNull"
+ plugin_name="squid"
+ name="Avoid Null"
+ description="Should avoid NULL"
+ description_format="HTML"
+ status="REMOVED"
+ def_remediation_function="[null]"
+ def_remediation_gap_mult="[null]"
+ def_remediation_base_effort="[null]"
gap_description="[null]"
- created_at="1500000000000" updated_at="1600000000000"
+ created_at="1500000000000"
+ updated_at="1600000000000"
/>
</dataset>
<dataset>
- <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="AvoidNull" plugin_name="checkstyle"
- name="Avoid Null" description="Should avoid NULL" status="READY" description_format="HTML"
- created_at="1500000000000" updated_at="1600000000000"/>
- <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="AvoidNull" plugin_name="manual" name="Manual Rule"
- description="Should not appear" status="READY" description_format="HTML"
- created_at="1500000000000" updated_at="1600000000000"/>
+ <rules system_tags="[null]"
+ id="1"
+ plugin_rule_key="AvoidNull"
+ plugin_name="checkstyle"
+ name="Avoid Null"
+ description="Should avoid NULL"
+ status="READY"
+ description_format="HTML"
+ created_at="1500000000000"
+ updated_at="1600000000000"/>
+ <rules system_tags="[null]"
+ id="2"
+ plugin_rule_key="AvoidNull"
+ plugin_name="manual"
+ name="Manual Rule"
+ description="Should not appear"
+ status="READY"
+ description_format="HTML"
+ created_at="1500000000000"
+ updated_at="1600000000000"/>
</dataset>
<dataset>
- <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="AvoidNull" plugin_name="checkstyle"
- name="Avoid Null" description="Should avoid NULL" status="READY"
- created_at="1500000000000" updated_at="1600000000000"/>
- <rules_parameters id="1" rule_id="1" name="myParameter" param_type="plop" default_value="plouf"
+ <rules system_tags="[null]"
+ id="1"
+ plugin_rule_key="AvoidNull"
+ plugin_name="checkstyle"
+ name="Avoid Null"
+ description="Should avoid NULL"
+ status="READY"
+ created_at="1500000000000"
+ updated_at="1600000000000"/>
+ <rules_parameters id="1"
+ rule_id="1"
+ name="myParameter"
+ param_type="plop"
+ default_value="plouf"
description="My Parameter"/>
- <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="Unused" plugin_name="unused" name="Unused Rule"
- description="Not used" status="REMOVED"
- created_at="1500000000000" updated_at="1600000000000"/>
- <rules_parameters id="2" rule_id="2" name="otherParam" param_type="plop" default_value="plouf"
+ <rules system_tags="[null]"
+ id="2"
+ plugin_rule_key="Unused"
+ plugin_name="unused"
+ name="Unused Rule"
+ description="Not used"
+ status="REMOVED"
+ created_at="1500000000000"
+ updated_at="1600000000000"/>
+ <rules_parameters id="2"
+ rule_id="2"
+ name="otherParam"
+ param_type="plop"
+ default_value="plouf"
description="Other Parameter"/>
</dataset>
status="READY"
is_template="[false]"
template_id="[null]"
- tags="bug,performance"
system_tags="cwe"
created_at="1500000000000"
updated_at="1600000000000"
status="BETA"
is_template="[false]"
template_id="[null]"
- tags="[null]"
system_tags="[null]"
created_at="1500000000000"
updated_at="1600000000000"
status="REMOVED"
is_template="[false]"
template_id="[null]"
- tags="[null]"
system_tags="[null]"
created_at="1500000000000"
updated_at="1600000000000"
<dataset>
- <rules tags="[null]"
- system_tags="[null]"
+ <rules system_tags="[null]"
id="1"
plugin_rule_key="AvoidNull"
plugin_name="checkstyle"
<dataset>
- <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="AvoidNull" plugin_name="checkstyle"
- name="Avoid Null" description="Should avoid NULL" status="READY"
- created_at="1500000000000" updated_at="1600000000000"/>
+ <rules system_tags="[null]"
+ id="1"
+ plugin_rule_key="AvoidNull"
+ plugin_name="checkstyle"
+ name="Avoid Null"
+ description="Should avoid NULL"
+ status="READY"
+ created_at="1500000000000"
+ updated_at="1600000000000"/>
- <rules_parameters id="1" rule_id="1" name="max" param_type="STRING" default_value="^[a-z]+(\.[a-z][a-z0-9]*)*$"
+ <rules_parameters id="1"
+ rule_id="1"
+ name="max"
+ param_type="STRING"
+ default_value="^[a-z]+(\.[a-z][a-z0-9]*)*$"
description="Regular expression used to check the package names against."/>
</dataset>
<dataset>
- <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="AvoidNull" plugin_name="checkstyle"
- name="Avoid Null" description="Should avoid NULL" status="READY"
- created_at="1500000000000" updated_at="1600000000000"/>
+ <rules system_tags="[null]"
+ id="1"
+ plugin_rule_key="AvoidNull"
+ plugin_name="checkstyle"
+ name="Avoid Null"
+ description="Should avoid NULL"
+ status="READY"
+ created_at="1500000000000"
+ updated_at="1600000000000"/>
- <rules_parameters id="1" rule_id="1" name="max" param_type="INTEGER" default_value="30" description="My Parameter"/>
+ <rules_parameters id="1"
+ rule_id="1"
+ name="max"
+ param_type="INTEGER"
+ default_value="30"
+ description="My Parameter"/>
</dataset>
.add(1613, "Add index LOADED_TEMPLATES_TYPE", AddIndexLoadedTemplatesType.class)
.add(1614, "Upgrade loaded template entries for quality profiles", UpgradeQualityTemplateLoadedTemplates.class)
.add(1615, "Create table RULES_METADATA", CreateRulesMetadata.class)
- .add(1616, "Populate table RULES_METADATA", PopulateRulesMetadata.class);
+ .add(1616, "Populate table RULES_METADATA", PopulateRulesMetadata.class)
+ .add(1617, "Drop metadata columns from RULES", DropMetadataColumnsFromRules.class);
}
}
--- /dev/null
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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 this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.sonar.server.platform.db.migration.version.v64;
+
+import java.sql.SQLException;
+import org.sonar.db.Database;
+import org.sonar.server.platform.db.migration.sql.DropColumnsBuilder;
+import org.sonar.server.platform.db.migration.step.DdlChange;
+
+public class DropMetadataColumnsFromRules extends DdlChange {
+
+ private static final String TABLE_RULES = "rules";
+
+ public DropMetadataColumnsFromRules(Database db) {
+ super(db);
+ }
+
+ @Override
+ public void execute(Context context) throws SQLException {
+ context.execute(new DropColumnsBuilder(
+ getDialect(), TABLE_RULES,
+ "note_data", "note_user_login", "note_created_at", "note_updated_at",
+ "remediation_function", "remediation_gap_mult", "remediation_base_effort",
+ "tags")
+ .build());
+ }
+}
@Test
public void verify_migration_count() {
- verifyMigrationCount(underTest, 17);
+ verifyMigrationCount(underTest, 18);
}
}
--- /dev/null
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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 this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.sonar.server.platform.db.migration.version.v64;
+
+import java.sql.SQLException;
+import org.junit.Rule;
+import org.junit.Test;
+import org.sonar.db.CoreDbTester;
+
+public class DropMetadataColumnsFromRulesTest {
+
+ private static final String TABLE_RULES = "rules";
+
+ @Rule
+ public CoreDbTester db = CoreDbTester.createForSchema(DropMetadataColumnsFromRulesTest.class, "rules.sql");
+
+ private DropMetadataColumnsFromRules underTest = new DropMetadataColumnsFromRules(db.database());
+
+ @Test
+ public void execute_drops_metadata_columns_from_table_RULES() throws SQLException {
+ underTest.execute();
+
+ db.assertColumnDoesNotExist(TABLE_RULES, "note_data");
+ db.assertColumnDoesNotExist(TABLE_RULES, "note_user_login");
+ db.assertColumnDoesNotExist(TABLE_RULES, "note_created_at");
+ db.assertColumnDoesNotExist(TABLE_RULES, "note_updated_at");
+ db.assertColumnDoesNotExist(TABLE_RULES, "remediation_function");
+ db.assertColumnDoesNotExist(TABLE_RULES, "remediation_gap_mult");
+ db.assertColumnDoesNotExist(TABLE_RULES, "remediation_base_effort");
+ db.assertColumnDoesNotExist(TABLE_RULES, "tags");
+ }
+}
--- /dev/null
+CREATE TABLE "RULES" (
+ "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
+ "PLUGIN_RULE_KEY" VARCHAR(200) NOT NULL,
+ "PLUGIN_NAME" VARCHAR(255) NOT NULL,
+ "DESCRIPTION" VARCHAR(16777215),
+ "DESCRIPTION_FORMAT" VARCHAR(20),
+ "PRIORITY" INTEGER,
+ "IS_TEMPLATE" BOOLEAN DEFAULT FALSE,
+ "TEMPLATE_ID" INTEGER,
+ "PLUGIN_CONFIG_KEY" VARCHAR(200),
+ "NAME" VARCHAR(200),
+ "STATUS" VARCHAR(40),
+ "LANGUAGE" VARCHAR(20),
+ "NOTE_DATA" CLOB(2147483647),
+ "NOTE_USER_LOGIN" VARCHAR(255),
+ "NOTE_CREATED_AT" TIMESTAMP,
+ "NOTE_UPDATED_AT" TIMESTAMP,
+ "REMEDIATION_FUNCTION" VARCHAR(20),
+ "DEF_REMEDIATION_FUNCTION" VARCHAR(20),
+ "REMEDIATION_GAP_MULT" VARCHAR(20),
+ "DEF_REMEDIATION_GAP_MULT" VARCHAR(20),
+ "REMEDIATION_BASE_EFFORT" VARCHAR(20),
+ "DEF_REMEDIATION_BASE_EFFORT" VARCHAR(20),
+ "GAP_DESCRIPTION" VARCHAR(4000),
+ "TAGS" VARCHAR(4000),
+ "SYSTEM_TAGS" VARCHAR(4000),
+ "RULE_TYPE" TINYINT,
+ "CREATED_AT" BIGINT,
+ "UPDATED_AT" BIGINT
+);
+CREATE UNIQUE INDEX "RULES_REPO_KEY" ON "RULES" ("PLUGIN_NAME", "PLUGIN_RULE_KEY");
<dataset>
- <rules id="1" plugin_rule_key="S01" plugin_name="xoo" name="name" description="description" status="READY"
- plugin_config_key="[null]" priority="0" is_template="[true]" language="xoo" template_id="[null]"
- note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]"
- remediation_function="LINEAR_OFFSET" def_remediation_function="LINEAR_OFFSET"
- remediation_coeff="1h" def_remediation_coeff="5d"
- remediation_offset="5min" def_remediation_offset="10h"
- effort_to_fix_description="[null]" description_format="MARKDOWN"
- tags="[null]" system_tags="[null]"
- created_at="1500000000000" updated_at="1500000000000"
- />
+ <rules id="1"
+ plugin_rule_key="S01"
+ plugin_name="xoo"
+ name="name"
+ description="description"
+ status="READY"
+ plugin_config_key="[null]"
+ priority="0"
+ is_template="[true]"
+ language="xoo"
+ template_id="[null]"
+ def_remediation_function="LINEAR_OFFSET"
+ def_remediation_coeff="5d"
+ def_remediation_offset="10h"
+ effort_to_fix_description="[null]"
+ description_format="MARKDOWN"
+ system_tags="[null]"
+ created_at="1500000000000"
+ updated_at="1500000000000"
+ />
</dataset>
<dataset>
- <rules id="1" plugin_rule_key="S01" plugin_name="xoo" name="name" description="description" status="READY"
- plugin_config_key="[null]" priority="0" is_template="[true]" language="xoo" template_id="[null]"
- note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]"
- remediation_function="LINEAR" def_remediation_function="LINEAR_OFFSET"
- remediation_gap_mult="1h" def_remediation_gap_mult="5d"
- remediation_base_effort="5min" def_remediation_base_effort="10h"
- gap_description="[null]" description_format="MARKDOWN"
- tags="[null]" system_tags="[null]"
- created_at="1500000000000" updated_at="1500000000000"
- />
+ <rules id="1"
+ plugin_rule_key="S01"
+ plugin_name="xoo"
+ name="name"
+ description="description"
+ status="READY"
+ plugin_config_key="[null]"
+ priority="0"
+ is_template="[true]"
+ language="xoo"
+ template_id="[null]"
+ def_remediation_function="LINEAR_OFFSET"
+ def_remediation_gap_mult="5d"
+ def_remediation_base_effort="10h"
+ gap_description="[null]"
+ description_format="MARKDOWN"
+ system_tags="[null]"
+ created_at="1500000000000"
+ updated_at="1500000000000"
+ />
<issues
id="1"
updated_at="1300000000000"
locations="[null]"
issue_type="[null]"
- />
+ />
</dataset>
<dataset>
<rules id="1"
- tags="[null]"
system_tags="[null]"
name="Avoid Cycles"
plugin_rule_key="AvoidCycles"
<dataset>
<rules id="1"
- tags="[null]"
system_tags="[null]"
name="Avoid Cycles"
plugin_rule_key="AvoidCycles"
<dataset>
- <rules tags="[null]"
- system_tags="[null]"
+ <rules system_tags="[null]"
id="200"
name="Avoid Cycles"
plugin_rule_key="AvoidCycles"
kee="pom"
name="pom.xml"/>
- <issues
- id="1"
- kee="ABC"
- resolution="FIXED"
- status="RESOLVED"
- severity="BLOCKER"
- manual_severity="[false]"
- assignee="guy1"
- author_login="guy2"
- checksum="FFFFF"
- gap="[null]"
- effort="10"
- message="[null]"
- line="444"
- component_uuid="FILE"
- project_uuid="PROJECT"
- rule_id="200"
- reporter="[null]"
- issue_attributes="JIRA=http://jira.com"
- action_plan_key="[null]"
- tags="tag1,tag2,tag3"
- created_at="1400000000000"
- updated_at="1400000000000"
- issue_creation_date="1115848800000"
- issue_update_date="1356994800000"
- issue_close_date="[null]"
- locations="[null]"
- issue_type="1"/>
+ <issues id="1"
+ kee="ABC"
+ resolution="FIXED"
+ status="RESOLVED"
+ severity="BLOCKER"
+ manual_severity="[false]"
+ assignee="guy1"
+ author_login="guy2"
+ checksum="FFFFF"
+ gap="[null]"
+ effort="10"
+ message="[null]"
+ line="444"
+ component_uuid="FILE"
+ project_uuid="PROJECT"
+ rule_id="200"
+ reporter="[null]"
+ issue_attributes="JIRA=http://jira.com"
+ action_plan_key="[null]"
+ tags="tag1,tag2,tag3"
+ created_at="1400000000000"
+ updated_at="1400000000000"
+ issue_creation_date="1115848800000"
+ issue_update_date="1356994800000"
+ issue_close_date="[null]"
+ locations="[null]"
+ issue_type="1"/>
<issues
- id="2"
- kee="DEF"
- resolution="[null]"
- status="OPEN"
- severity="MAJOR"
- manual_severity="[false]"
- assignee="guy2"
- author_login="[null]"
- checksum="FFFFF"
- gap="[null]"
- effort="15"
- message="[null]"
- line="444"
- component_uuid="ROOT_FILE"
- project_uuid="PROJECT"
- rule_id="200"
- reporter="[null]"
- issue_attributes="JIRA=http://jira.com"
- action_plan_key="[null]"
- tags="[null]"
- created_at="1400000000000"
- updated_at="1450000000000"
- issue_creation_date="1115848800000"
- issue_update_date="1368828000000"
- issue_close_date="[null]"
- locations="[null]"
- issue_type="1"/>
+ id="2"
+ kee="DEF"
+ resolution="[null]"
+ status="OPEN"
+ severity="MAJOR"
+ manual_severity="[false]"
+ assignee="guy2"
+ author_login="[null]"
+ checksum="FFFFF"
+ gap="[null]"
+ effort="15"
+ message="[null]"
+ line="444"
+ component_uuid="ROOT_FILE"
+ project_uuid="PROJECT"
+ rule_id="200"
+ reporter="[null]"
+ issue_attributes="JIRA=http://jira.com"
+ action_plan_key="[null]"
+ tags="[null]"
+ created_at="1400000000000"
+ updated_at="1450000000000"
+ issue_creation_date="1115848800000"
+ issue_update_date="1368828000000"
+ issue_close_date="[null]"
+ locations="[null]"
+ issue_type="1"/>
<issues
- id="3"
- kee="EFG"
- resolution="[null]"
- status="OPEN"
- severity="MAJOR"
- manual_severity="[false]"
- assignee="guy2"
- author_login="[null]"
- checksum="FFFFF"
- gap="[null]"
- effort="15"
- message="[null]"
- line="[null]"
- component_uuid="PROJECT"
- project_uuid="PROJECT"
- rule_id="200"
- reporter="[null]"
- issue_attributes="JIRA=http://jira.com"
- action_plan_key="[null]"
- tags="[null]"
- created_at="1400000000000"
- updated_at="1450000000000"
- issue_creation_date="1115848800000"
- issue_update_date="1368828000000"
- issue_close_date="[null]"
- locations="[null]"
- issue_type="1"/>
+ id="3"
+ kee="EFG"
+ resolution="[null]"
+ status="OPEN"
+ severity="MAJOR"
+ manual_severity="[false]"
+ assignee="guy2"
+ author_login="[null]"
+ checksum="FFFFF"
+ gap="[null]"
+ effort="15"
+ message="[null]"
+ line="[null]"
+ component_uuid="PROJECT"
+ project_uuid="PROJECT"
+ rule_id="200"
+ reporter="[null]"
+ issue_attributes="JIRA=http://jira.com"
+ action_plan_key="[null]"
+ tags="[null]"
+ created_at="1400000000000"
+ updated_at="1450000000000"
+ issue_creation_date="1115848800000"
+ issue_update_date="1368828000000"
+ issue_close_date="[null]"
+ locations="[null]"
+ issue_type="1"/>
<issues
- id="4"
- kee="FGH"
- resolution="[null]"
- status="OPEN"
- severity="MAJOR"
- manual_severity="[false]"
- assignee="guy2"
- author_login="[null]"
- checksum="FFFFF"
- gap="[null]"
- effort="15"
- message="[null]"
- line="[null]"
- component_uuid="MODULE"
- project_uuid="PROJECT"
- rule_id="200"
- reporter="[null]"
- issue_attributes="JIRA=http://jira.com"
- action_plan_key="[null]"
- tags="[null]"
- created_at="1400000000000"
- updated_at="1450000000000"
- issue_creation_date="1115848800000"
- issue_update_date="1368828000000"
- issue_close_date="[null]"
- locations="[null]"
- issue_type="1"/>
+ id="4"
+ kee="FGH"
+ resolution="[null]"
+ status="OPEN"
+ severity="MAJOR"
+ manual_severity="[false]"
+ assignee="guy2"
+ author_login="[null]"
+ checksum="FFFFF"
+ gap="[null]"
+ effort="15"
+ message="[null]"
+ line="[null]"
+ component_uuid="MODULE"
+ project_uuid="PROJECT"
+ rule_id="200"
+ reporter="[null]"
+ issue_attributes="JIRA=http://jira.com"
+ action_plan_key="[null]"
+ tags="[null]"
+ created_at="1400000000000"
+ updated_at="1450000000000"
+ issue_creation_date="1115848800000"
+ issue_update_date="1368828000000"
+ issue_close_date="[null]"
+ locations="[null]"
+ issue_type="1"/>
</dataset>
<dataset>
- <rules tags="[null]"
- system_tags="[null]"
+ <rules system_tags="[null]"
id="200"
name="Avoid Cycles"
plugin_rule_key="AvoidCycles"
<dataset>
<rules id="1"
- tags="[null]"
system_tags="[null]"
name="Avoid Cycles"
plugin_rule_key="AvoidCycles"
kee="the_file_1"
name="TheFile1"/>
- <issues id="1"
- kee="ABCDE"
- resolution="FIXED"
- status="RESOLVED"
- severity="BLOCKER"
- manual_severity="[false]"
- assignee="winner"
- author_login="[null]"
- checksum="FFFFF"
- gap="[null]"
- effort="[null]"
- message="[null]"
- line="444"
- component_uuid="THE_FILE_1"
- project_uuid="THE_PROJECT_1"
- rule_id="1"
- reporter="[null]"
- issue_attributes="JIRA=http://jira.com"
- action_plan_key="[null]"
- created_at="1500000000000"
- updated_at="1550000000000"
- issue_creation_date="1115848800000"
- issue_update_date="1368828000000"
- issue_close_date="[null]"
- locations="[null]"
- issue_type="1"
+ <issues
+ id="1"
+ kee="ABCDE"
+ resolution="FIXED"
+ status="RESOLVED"
+ severity="BLOCKER"
+ manual_severity="[false]"
+ assignee="winner"
+ author_login="[null]"
+ checksum="FFFFF"
+ gap="[null]"
+ effort="[null]"
+ message="[null]"
+ line="444"
+ component_uuid="THE_FILE_1"
+ project_uuid="THE_PROJECT_1"
+ rule_id="1"
+ reporter="[null]"
+ issue_attributes="JIRA=http://jira.com"
+ action_plan_key="[null]"
+ created_at="1500000000000"
+ updated_at="1550000000000"
+ issue_creation_date="1115848800000"
+ issue_update_date="1368828000000"
+ issue_close_date="[null]"
+ locations="[null]"
+ issue_type="1"
/>
<issues id="2"
<dataset>
- <rules tags="[null]"
- system_tags="[null]"
+ <rules system_tags="[null]"
id="200"
name="Avoid Cycles"
plugin_rule_key="AvoidCycles"
name="Action"/>
<issues
- id="1"
- kee="ABC"
- resolution="FIXED"
- status="RESOLVED"
- severity="BLOCKER"
- manual_severity="[false]"
- assignee="guy1"
- author_login="guy2"
- checksum="FFFFF"
- gap="2"
- effort="10"
- message="[null]"
- line="444"
- component_uuid="FILE1"
- project_uuid="PROJECT1"
- rule_id="200"
- reporter="[null]"
- issue_attributes="JIRA=http://jira.com"
- action_plan_key="PLAN1"
- tags="tag1,tag2,tag3"
- created_at="1400000000000"
- updated_at="1400000000000"
- issue_creation_date="1115848800000"
- issue_update_date="1356994800000"
- issue_close_date="[null]"
- locations="[null]"
- issue_type="2"
+ id="1"
+ kee="ABC"
+ resolution="FIXED"
+ status="RESOLVED"
+ severity="BLOCKER"
+ manual_severity="[false]"
+ assignee="guy1"
+ author_login="guy2"
+ checksum="FFFFF"
+ gap="2"
+ effort="10"
+ message="[null]"
+ line="444"
+ component_uuid="FILE1"
+ project_uuid="PROJECT1"
+ rule_id="200"
+ reporter="[null]"
+ issue_attributes="JIRA=http://jira.com"
+ action_plan_key="PLAN1"
+ tags="tag1,tag2,tag3"
+ created_at="1400000000000"
+ updated_at="1400000000000"
+ issue_creation_date="1115848800000"
+ issue_update_date="1356994800000"
+ issue_close_date="[null]"
+ locations="[null]"
+ issue_type="2"
/>
</dataset>
<dataset>
- <rules tags="[null]"
- system_tags="[null]"
+ <rules system_tags="[null]"
id="200"
name="Avoid Cycles"
plugin_rule_key="AvoidCycles"
version="[null]"
/>
- <rules tags="[null]"
- system_tags="[null]"
+ <rules system_tags="[null]"
id="1"
plugin_rule_key="NewRuleKey"
plugin_name="plugin"
is_template="[true]"
language="dart"
template_id="3"
- note_data="[null]"
- note_user_login="[null]"
- note_created_at="[null]"
- note_updated_at="[null]"
- remediation_function="LINEAR"
def_remediation_function="LINEAR_OFFSET"
- remediation_gap_mult="1h"
def_remediation_gap_mult="5d"
- remediation_base_effort="5min"
def_remediation_base_effort="10h"
gap_description="squid.S115.effortToFix"
description_format="MARKDOWN"
<dataset>
- <rules id="10" name="Null Pointer" plugin_name="xoo" plugin_rule_key="S001"
- plugin_config_key="S1" description_format="HTML" description="S001 desc" language="xoo"
- priority="4" status="READY" is_template="[false]" template_id="[null]"
- tags="bug,performance" system_tags="cwe"
- created_at="1500000000000" updated_at="1600000000000"/>
+ <rules id="10"
+ name="Null Pointer"
+ plugin_name="xoo"
+ plugin_rule_key="S001"
+ plugin_config_key="S1"
+ description_format="HTML"
+ description="S001 desc"
+ language="xoo"
+ priority="4"
+ status="READY"
+ is_template="[false]"
+ template_id="[null]"
+ system_tags="cwe"
+ created_at="1500000000000"
+ updated_at="1600000000000"/>
- <rules_profiles id="100" name="Sonar Way" organization_uuid="org-123" kee="sonar-way" language="xoo" parent_kee="[null]" is_default="[false]"/>
+ <rules_profiles id="100"
+ name="Sonar Way"
+ organization_uuid="org-123"
+ kee="sonar-way"
+ language="xoo"
+ parent_kee="[null]"
+ is_default="[false]"/>
- <active_rules id="1" profile_id="100" rule_id="10" failure_level="3" inheritance="[null]"
- created_at="1500000000000" updated_at="1600000000000"/>
+ <active_rules id="1"
+ profile_id="100"
+ rule_id="10"
+ failure_level="3"
+ inheritance="[null]"
+ created_at="1500000000000"
+ updated_at="1600000000000"/>
</dataset>
<dataset>
- <rules id="10" name="Null Pointer" plugin_rule_key="S001" plugin_name="xoo"
- plugin_config_key="S1" description_format="HTML" description="S001 desc" language="xoo"
- priority="4" status="READY" is_template="[false]" template_id="[null]"
- tags="bug,performance" system_tags="cwe"
- created_at="1500000000000" updated_at="1600000000000"/>
+ <rules id="10"
+ name="Null Pointer"
+ plugin_rule_key="S001"
+ plugin_name="xoo"
+ plugin_config_key="S1"
+ description_format="HTML"
+ description="S001 desc"
+ language="xoo"
+ priority="4"
+ status="READY"
+ is_template="[false]"
+ template_id="[null]"
+ system_tags="cwe"
+ created_at="1500000000000"
+ updated_at="1600000000000"/>
- <rules_profiles id="1" name="Parent" organization_uuid="org-123" kee="parent" language="xoo" parent_kee="[null]" is_default="[false]"/>
+ <rules_profiles id="1"
+ name="Parent"
+ organization_uuid="org-123"
+ kee="parent"
+ language="xoo"
+ parent_kee="[null]"
+ is_default="[false]"/>
- <rules_profiles id="2" name="Child" organization_uuid="org-123" kee="child" language="xoo" parent_kee="parent" is_default="[false]"/>
+ <rules_profiles id="2"
+ name="Child"
+ organization_uuid="org-123"
+ kee="child"
+ language="xoo"
+ parent_kee="parent"
+ is_default="[false]"/>
- <active_rules id="1" profile_id="2" rule_id="10" failure_level="4" inheritance="INHERITED"
- created_at="1500000000000" updated_at="1600000000000"/>
+ <active_rules id="1"
+ profile_id="2"
+ rule_id="10"
+ failure_level="4"
+ inheritance="INHERITED"
+ created_at="1500000000000"
+ updated_at="1600000000000"/>
<!-- Parent of Active rule 1 -->
- <active_rules id="2" profile_id="1" rule_id="10" failure_level="0" inheritance="[null]"
- created_at="1500000000000" updated_at="1600000000000"/>
+ <active_rules id="2"
+ profile_id="1"
+ rule_id="10"
+ failure_level="0"
+ inheritance="[null]"
+ created_at="1500000000000"
+ updated_at="1600000000000"/>
</dataset>
<dataset>
- <rules id="10" name="Null Pointer" plugin_rule_key="S001" plugin_name="xoo"
- plugin_config_key="S1" description_format="HTML" description="S001 desc" language="xoo"
- priority="4" status="READY" is_template="[false]" template_id="[null]"
- tags="bug,performance" system_tags="cwe"
- created_at="1500000000000" updated_at="1600000000000"/>
+ <rules id="10"
+ name="Null Pointer"
+ plugin_rule_key="S001"
+ plugin_name="xoo"
+ plugin_config_key="S1"
+ description_format="HTML"
+ description="S001 desc"
+ language="xoo"
+ priority="4"
+ status="READY"
+ is_template="[false]"
+ template_id="[null]"
+ system_tags="cwe"
+ created_at="1500000000000"
+ updated_at="1600000000000"/>
- <rules_profiles id="1" name="Parent" organization_uuid="org-123" kee="parent" language="xoo" parent_kee="[null]" is_default="[false]"/>
+ <rules_profiles id="1"
+ name="Parent"
+ organization_uuid="org-123"
+ kee="parent"
+ language="xoo"
+ parent_kee="[null]"
+ is_default="[false]"/>
- <rules_profiles id="2" name="Child" organization_uuid="org-123" kee="child" language="xoo" parent_kee="parent" is_default="[false]"/>
+ <rules_profiles id="2"
+ name="Child"
+ organization_uuid="org-123"
+ kee="child"
+ language="xoo"
+ parent_kee="parent"
+ is_default="[false]"/>
- <active_rules id="1" profile_id="2" rule_id="10" failure_level="2" inheritance="OVERRIDES"
- created_at="1500000000000" updated_at="1600000000000"/>
+ <active_rules id="1"
+ profile_id="2"
+ rule_id="10"
+ failure_level="2"
+ inheritance="OVERRIDES"
+ created_at="1500000000000"
+ updated_at="1600000000000"/>
<!-- Parent of Active rule 1 -->
- <active_rules id="2" profile_id="1" rule_id="10" failure_level="0" inheritance="[null]"
- created_at="1500000000000" updated_at="1600000000000"/>
+ <active_rules id="2"
+ profile_id="1"
+ rule_id="10"
+ failure_level="0"
+ inheritance="[null]"
+ created_at="1500000000000"
+ updated_at="1600000000000"/>
</dataset>
<dataset>
- <rules id="10" name="Null Pointer" plugin_name="xoo" plugin_rule_key="S001"
- plugin_config_key="S1" description_format="HTML" description="S001 desc" language="xoo"
- priority="4" status="READY" is_template="[false]" template_id="[null]"
- tags="bug,performance" system_tags="cwe"
- created_at="1500000000000" updated_at="1600000000000"/>
+ <rules id="10"
+ name="Null Pointer"
+ plugin_name="xoo"
+ plugin_rule_key="S001"
+ plugin_config_key="S1"
+ description_format="HTML"
+ description="S001 desc"
+ language="xoo"
+ priority="4"
+ status="READY"
+ is_template="[false]"
+ template_id="[null]"
+ system_tags="cwe"
+ created_at="1500000000000"
+ updated_at="1600000000000"/>
- <rules_profiles id="100" name="Sonar Way" organization_uuid="org-123" kee="sonar-way" language="xoo" parent_kee="[null]" is_default="[false]"/>
+ <rules_profiles id="100"
+ name="Sonar Way"
+ organization_uuid="org-123"
+ kee="sonar-way"
+ language="xoo"
+ parent_kee="[null]"
+ is_default="[false]"/>
- <active_rules id="1" profile_id="100" rule_id="10" failure_level="3" inheritance="[null]"
- created_at="1500000000000" updated_at="1600000000000"/>
+ <active_rules id="1"
+ profile_id="100"
+ rule_id="10"
+ failure_level="3"
+ inheritance="[null]"
+ created_at="1500000000000"
+ updated_at="1600000000000"/>
</dataset>
<dataset>
- <rules id="10" name="Null Pointer" plugin_rule_key="S001"
- plugin_config_key="S1" plugin_name="xoo"
- description_format="HTML" description="S001 desc" language="xoo"
- priority="4" status="READY"
- is_template="[false]" template_id="[null]"
- tags="bug,performance" system_tags="cwe"
- created_at="1500000000000" updated_at="1600000000000"/>
+ <rules id="10"
+ name="Null Pointer"
+ plugin_rule_key="S001"
+ plugin_config_key="S1"
+ plugin_name="xoo"
+ description_format="HTML"
+ description="S001 desc"
+ language="xoo"
+ priority="4"
+ status="READY"
+ is_template="[false]"
+ template_id="[null]"
+ system_tags="cwe"
+ created_at="1500000000000"
+ updated_at="1600000000000"/>
- <rules id="11" name="Slow" plugin_rule_key="S002"
- plugin_config_key="S2" plugin_name="xoo"
- description_format="MARKDOWN" description="*S002 desc*" language="xoo"
- priority="3" status="BETA"
- is_template="[true]" template_id="[null]"
- tags="[null]" system_tags="[null]"
- created_at="2000000000000" updated_at="2100000000000"/>
+ <rules id="11"
+ name="Slow"
+ plugin_rule_key="S002"
+ plugin_config_key="S2"
+ plugin_name="xoo"
+ description_format="MARKDOWN"
+ description="*S002 desc*"
+ language="xoo"
+ priority="3"
+ status="BETA"
+ is_template="[true]"
+ template_id="[null]"
+ system_tags="[null]"
+ created_at="2000000000000"
+ updated_at="2100000000000"/>
- <rules_profiles id="1" name="Parent" organization_uuid="org-123" kee="parent" language="xoo" parent_kee="[null]" is_default="[false]"/>
+ <rules_profiles id="1"
+ name="Parent"
+ organization_uuid="org-123"
+ kee="parent"
+ language="xoo"
+ parent_kee="[null]"
+ is_default="[false]"/>
- <rules_profiles id="2" name="Child" organization_uuid="org-123" kee="child" language="xoo" parent_kee="parent" is_default="[false]"/>
+ <rules_profiles id="2"
+ name="Child"
+ organization_uuid="org-123"
+ kee="child"
+ language="xoo"
+ parent_kee="parent"
+ is_default="[false]"/>
- <active_rules id="1" profile_id="2" rule_id="10" failure_level="4" inheritance="INHERITED"
- created_at="1500000000000" updated_at="1600000000000"/>
+ <active_rules id="1"
+ profile_id="2"
+ rule_id="10"
+ failure_level="4"
+ inheritance="INHERITED"
+ created_at="1500000000000"
+ updated_at="1600000000000"/>
<!-- Parent of Active rule 1 -->
- <active_rules id="2" profile_id="1" rule_id="10" failure_level="0" inheritance="[null]"
- created_at="1700000000000" updated_at="1800000000000"/>
+ <active_rules id="2"
+ profile_id="1"
+ rule_id="10"
+ failure_level="0"
+ inheritance="[null]"
+ created_at="1700000000000"
+ updated_at="1800000000000"/>
- <rules_profiles id="3" name="Sonar Way" organization_uuid="org-123" kee="sonar-way" language="xoo" parent_kee="[null]" is_default="[false]"/>
+ <rules_profiles id="3"
+ name="Sonar Way"
+ organization_uuid="org-123"
+ kee="sonar-way"
+ language="xoo"
+ parent_kee="[null]"
+ is_default="[false]"/>
- <active_rules id="3" profile_id="3" rule_id="11" failure_level="3" inheritance="[null]"
- created_at="2000000000000" updated_at="2100000000000"/>
+ <active_rules id="3"
+ profile_id="3"
+ rule_id="11"
+ failure_level="3"
+ inheritance="[null]"
+ created_at="2000000000000"
+ updated_at="2100000000000"/>
</dataset>