aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch/src/test/resources/org/sonar
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2014-03-11 08:09:01 +0100
committerJulien Lancelot <julien.lancelot@sonarsource.com>2014-03-11 08:09:01 +0100
commitdce23fcf9ac907f6621ab0c11c397febff280ebc (patch)
treef819d4a7216d35389a3063b0f0a96cde49cb62db /sonar-batch/src/test/resources/org/sonar
parent1ffa320fb3e44cdaf635678a04c473ca4f348514 (diff)
downloadsonarqube-dce23fcf9ac907f6621ab0c11c397febff280ebc.tar.gz
sonarqube-dce23fcf9ac907f6621ab0c11c397febff280ebc.zip
SONAR-5056 Read debt from rule during analysis
Diffstat (limited to 'sonar-batch/src/test/resources/org/sonar')
-rw-r--r--sonar-batch/src/test/resources/org/sonar/batch/rule/RulesProviderTest/build_rules_with_default_and_user_debt_definitions.xml29
-rw-r--r--sonar-batch/src/test/resources/org/sonar/batch/rule/RulesProviderTest/build_rules_with_default_debt_definitions.xml29
-rw-r--r--sonar-batch/src/test/resources/org/sonar/batch/rule/RulesProviderTest/build_rules_with_user_debt_definitions.xml29
-rw-r--r--sonar-batch/src/test/resources/org/sonar/batch/rule/RulesProviderTest/fail_if_characteristic_not_found.xml29
-rw-r--r--sonar-batch/src/test/resources/org/sonar/batch/rule/RulesProviderTest/fail_if_no_function.xml29
-rw-r--r--sonar-batch/src/test/resources/org/sonar/batch/rule/RulesProviderTest/shared.xml31
6 files changed, 176 insertions, 0 deletions
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/rule/RulesProviderTest/build_rules_with_default_and_user_debt_definitions.xml b/sonar-batch/src/test/resources/org/sonar/batch/rule/RulesProviderTest/build_rules_with_default_and_user_debt_definitions.xml
new file mode 100644
index 00000000000..5090b80b139
--- /dev/null
+++ b/sonar-batch/src/test/resources/org/sonar/batch/rule/RulesProviderTest/build_rules_with_default_and_user_debt_definitions.xml
@@ -0,0 +1,29 @@
+<!--
+ ~ SonarQube, open source software quality management tool.
+ ~ Copyright (C) 2008-2013 SonarSource
+ ~ mailto:contact AT sonarsource DOT com
+ ~
+ ~ SonarQube 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.
+ ~
+ ~ SonarQube 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.
+ -->
+
+<dataset>
+
+ <rules id="1" plugin_rule_key="AvoidNull" plugin_name="checkstyle" name="Avoid Null" description="Should avoid NULL" status="READY" priority="1"
+ characteristic_id="103" default_characteristic_id="101"
+ remediation_function="LINEAR" default_remediation_function="LINEAR_OFFSET"
+ remediation_factor="2h" default_remediation_factor="5d"
+ remediation_offset="[null]" default_remediation_offset="10h"/>
+
+</dataset>
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/rule/RulesProviderTest/build_rules_with_default_debt_definitions.xml b/sonar-batch/src/test/resources/org/sonar/batch/rule/RulesProviderTest/build_rules_with_default_debt_definitions.xml
new file mode 100644
index 00000000000..024cc36f848
--- /dev/null
+++ b/sonar-batch/src/test/resources/org/sonar/batch/rule/RulesProviderTest/build_rules_with_default_debt_definitions.xml
@@ -0,0 +1,29 @@
+<!--
+ ~ SonarQube, open source software quality management tool.
+ ~ Copyright (C) 2008-2013 SonarSource
+ ~ mailto:contact AT sonarsource DOT com
+ ~
+ ~ SonarQube 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.
+ ~
+ ~ SonarQube 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.
+ -->
+
+<dataset>
+
+ <rules id="1" plugin_rule_key="AvoidNull" plugin_name="checkstyle" name="Avoid Null" description="Should avoid NULL" status="READY" priority="1"
+ characteristic_id="[null]" default_characteristic_id="101"
+ remediation_function="[null]" default_remediation_function="LINEAR_OFFSET"
+ remediation_factor="[null]" default_remediation_factor="5d"
+ remediation_offset="[null]" default_remediation_offset="10h"/>
+
+</dataset>
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/rule/RulesProviderTest/build_rules_with_user_debt_definitions.xml b/sonar-batch/src/test/resources/org/sonar/batch/rule/RulesProviderTest/build_rules_with_user_debt_definitions.xml
new file mode 100644
index 00000000000..97b8965b1a8
--- /dev/null
+++ b/sonar-batch/src/test/resources/org/sonar/batch/rule/RulesProviderTest/build_rules_with_user_debt_definitions.xml
@@ -0,0 +1,29 @@
+<!--
+ ~ SonarQube, open source software quality management tool.
+ ~ Copyright (C) 2008-2013 SonarSource
+ ~ mailto:contact AT sonarsource DOT com
+ ~
+ ~ SonarQube 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.
+ ~
+ ~ SonarQube 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.
+ -->
+
+<dataset>
+
+ <rules id="1" plugin_rule_key="AvoidNull" plugin_name="checkstyle" name="Avoid Null" description="Should avoid NULL" status="READY" priority="1"
+ characteristic_id="103" default_characteristic_id="[null]"
+ remediation_function="LINEAR" default_remediation_function="[null]"
+ remediation_factor="2h" default_remediation_factor="[null]"
+ remediation_offset="[null]" default_remediation_offset="[null]"/>
+
+</dataset>
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/rule/RulesProviderTest/fail_if_characteristic_not_found.xml b/sonar-batch/src/test/resources/org/sonar/batch/rule/RulesProviderTest/fail_if_characteristic_not_found.xml
new file mode 100644
index 00000000000..005d68415d8
--- /dev/null
+++ b/sonar-batch/src/test/resources/org/sonar/batch/rule/RulesProviderTest/fail_if_characteristic_not_found.xml
@@ -0,0 +1,29 @@
+<!--
+ ~ SonarQube, open source software quality management tool.
+ ~ Copyright (C) 2008-2013 SonarSource
+ ~ mailto:contact AT sonarsource DOT com
+ ~
+ ~ SonarQube 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.
+ ~
+ ~ SonarQube 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.
+ -->
+
+<dataset>
+
+ <rules id="1" plugin_rule_key="AvoidNull" plugin_name="checkstyle" name="Avoid Null" description="Should avoid NULL" status="READY" priority="1"
+ characteristic_id="[null]" default_characteristic_id="999"
+ remediation_function="[null]" default_remediation_function="LINEAR_OFFSET"
+ remediation_factor="[null]" default_remediation_factor="5d"
+ remediation_offset="[null]" default_remediation_offset="10h"/>
+
+</dataset>
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/rule/RulesProviderTest/fail_if_no_function.xml b/sonar-batch/src/test/resources/org/sonar/batch/rule/RulesProviderTest/fail_if_no_function.xml
new file mode 100644
index 00000000000..7c069728ff9
--- /dev/null
+++ b/sonar-batch/src/test/resources/org/sonar/batch/rule/RulesProviderTest/fail_if_no_function.xml
@@ -0,0 +1,29 @@
+<!--
+ ~ SonarQube, open source software quality management tool.
+ ~ Copyright (C) 2008-2013 SonarSource
+ ~ mailto:contact AT sonarsource DOT com
+ ~
+ ~ SonarQube 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.
+ ~
+ ~ SonarQube 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.
+ -->
+
+<dataset>
+
+ <rules id="1" plugin_rule_key="AvoidNull" plugin_name="checkstyle" name="Avoid Null" description="Should avoid NULL" status="READY" priority="1"
+ characteristic_id="[null]" default_characteristic_id="101"
+ remediation_function="[null]" default_remediation_function="[null]"
+ remediation_factor="[null]" default_remediation_factor="5d"
+ remediation_offset="[null]" default_remediation_offset="10h"/>
+
+</dataset>
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/rule/RulesProviderTest/shared.xml b/sonar-batch/src/test/resources/org/sonar/batch/rule/RulesProviderTest/shared.xml
new file mode 100644
index 00000000000..916cabb500c
--- /dev/null
+++ b/sonar-batch/src/test/resources/org/sonar/batch/rule/RulesProviderTest/shared.xml
@@ -0,0 +1,31 @@
+<!--
+ ~ SonarQube, open source software quality management tool.
+ ~ Copyright (C) 2008-2013 SonarSource
+ ~ mailto:contact AT sonarsource DOT com
+ ~
+ ~ SonarQube 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.
+ ~
+ ~ SonarQube 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.
+ -->
+
+<dataset>
+
+ <rules id="1" plugin_rule_key="AvoidNull" plugin_name="checkstyle" name="Avoid Null" description="Should avoid NULL" status="READY" priority="1"
+ characteristic_id="[null]" default_characteristic_id="101"
+ remediation_function="[null]" default_remediation_function="LINEAR_OFFSET"
+ remediation_factor="[null]" default_remediation_factor="5d"
+ remediation_offset="[null]" default_remediation_offset="10h"/>
+
+ <rules_parameters id="1" rule_id="1" name="myParameter" param_type="plop" default_value="plouf" description="My Parameter"/>
+
+</dataset>