diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2011-12-12 10:43:33 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2011-12-12 10:45:15 +0100 |
commit | 5bfd55625c8a62cf308d388784497db52b6e0b78 (patch) | |
tree | 702958ba607ceaf4b7566eb726f70c515dab467a | |
parent | 435ea536687a88f5ffa765947eb23b3dc70eca4d (diff) | |
download | sonarqube-5bfd55625c8a62cf308d388784497db52b6e0b78.tar.gz sonarqube-5bfd55625c8a62cf308d388784497db52b6e0b78.zip |
SONAR-2973 replace RULE_FAILURES_OVERRIDDEN_SEVERITY by REVIEWS.MANUAL_SEVERITY (boolean)
31 files changed, 461 insertions, 401 deletions
diff --git a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/fixture.xml b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/fixture.xml index 0e5a5c21d3d..80e649a8312 100644 --- a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/fixture.xml +++ b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/fixture.xml @@ -24,31 +24,31 @@ id="1" permanent_id="1" snapshot_id="11" - rule_id="1" failure_level="1" overridden_severity="[null]"/> + rule_id="1" failure_level="1"/> <rule_failures id="2" permanent_id="2" snapshot_id="22" - rule_id="1" failure_level="1" overridden_severity="[null]"/> + rule_id="1" failure_level="1"/> <rule_failures id="3" permanent_id="3" snapshot_id="22" - rule_id="1" failure_level="1" overridden_severity="[null]"/> + rule_id="1" failure_level="1"/> <!-- Violations on new analysis --> <!-- Violation #1 still exists --> <rule_failures id="4" permanent_id="1" snapshot_id="111" - rule_id="1" failure_level="1" overridden_severity="[null]"/> + rule_id="1" failure_level="1"/> <!-- Violation #2 has been fixed --> <!-- Violation #3 still exists --> <rule_failures id="5" permanent_id="3" snapshot_id="222" - rule_id="1" failure_level="1" overridden_severity="[null]"/> + rule_id="1" failure_level="1"/> <!-- Existing reviews --> <!-- @@ -68,7 +68,8 @@ user_id="[null]" resource_id="555" rule_id="[null]" - manual_violation="false"/> + manual_violation="false" + manual_severity="false"/> <reviews id="2" @@ -76,28 +77,32 @@ rule_failure_permanent_id="2" resource_id="666" rule_id="[null]" - manual_violation="false"/> + manual_violation="false" + manual_severity="false"/> <reviews id="3" status="OPEN" rule_failure_permanent_id="3" resource_id="666" rule_id="[null]" - manual_violation="false"/> + manual_violation="false" + manual_severity="false"/> <reviews id="4" status="CLOSED" rule_failure_permanent_id="2" resource_id="666" rule_id="[null]" - manual_violation="false"/> + manual_violation="false" + manual_severity="false"/> <reviews id="5" status="REOPENED" rule_failure_permanent_id="3" resource_id="666" rule_id="[null]" - manual_violation="false"/> + manual_violation="false" + manual_severity="false"/> <reviews id="6" status="RESOLVED" @@ -105,14 +110,16 @@ rule_failure_permanent_id="3" resource_id="666" rule_id="[null]" - manual_violation="false"/> + manual_violation="false" + manual_severity="false"/> <reviews id="7" status="REOPENED" rule_failure_permanent_id="2" resource_id="666" rule_id="[null]" - manual_violation="false"/> + manual_violation="false" + manual_severity="false"/> <reviews id="8" status="RESOLVED" @@ -120,6 +127,7 @@ rule_failure_permanent_id="2" resource_id="666" rule_id="[null]" - manual_violation="false"/> + manual_violation="false" + manual_severity="false"/> </dataset>
\ No newline at end of file diff --git a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/shouldCloseResolvedManualViolations.xml b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/shouldCloseResolvedManualViolations.xml index f0bc8b8442d..177a41706b0 100644 --- a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/shouldCloseResolvedManualViolations.xml +++ b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/shouldCloseResolvedManualViolations.xml @@ -12,7 +12,7 @@ snapshot_id="11" rule_id="1" failure_level="1" - overridden_severity="[null]"/> + /> <!-- Manual violations --> @@ -22,7 +22,7 @@ snapshot_id="22" rule_id="2" failure_level="4" - overridden_severity="[null]"/> + /> <rule_failures id="3" @@ -30,7 +30,7 @@ snapshot_id="22" rule_id="2" failure_level="4" - overridden_severity="[null]"/> + /> <!-- @@ -51,7 +51,8 @@ user_id="[null]" resource_id="555" rule_id="1" - manual_violation="false"/> + manual_violation="false" + manual_severity="false"/> <!-- @@ -73,7 +74,8 @@ user_id="[null]" resource_id="555" rule_id="2" - manual_violation="true"/> + manual_violation="true" + manual_severity="false"/> <!-- to keep opened --> <reviews @@ -89,6 +91,7 @@ user_id="[null]" resource_id="555" rule_id="2" - manual_violation="true"/> + manual_violation="true" + manual_severity="false"/> </dataset>
\ No newline at end of file diff --git a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/shouldCloseReviewWithoutCorrespondingViolation-result.xml b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/shouldCloseReviewWithoutCorrespondingViolation-result.xml index ff2961fdd66..d70fd3292dd 100644 --- a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/shouldCloseReviewWithoutCorrespondingViolation-result.xml +++ b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/shouldCloseReviewWithoutCorrespondingViolation-result.xml @@ -1,68 +1,76 @@ <dataset> <reviews - id="1" - status="OPEN" - rule_failure_permanent_id="1" - resource_id="555" - created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false"/> + id="1" + status="OPEN" + rule_failure_permanent_id="1" + resource_id="555" + created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" + rule_id="[null]" + manual_violation="false" + manual_severity="false"/> <reviews - id="2" - status="CLOSED" - rule_failure_permanent_id="2" - resource_id="666" - created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false"/> + id="2" + status="CLOSED" + rule_failure_permanent_id="2" + resource_id="666" + created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" + rule_id="[null]" + manual_violation="false" + manual_severity="false"/> <reviews - id="3" - status="OPEN" - rule_failure_permanent_id="3" - resource_id="666" - created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false"/> + id="3" + status="OPEN" + rule_failure_permanent_id="3" + resource_id="666" + created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" + rule_id="[null]" + manual_violation="false" + manual_severity="false"/> <reviews - id="4" - status="CLOSED" - rule_failure_permanent_id="2" - resource_id="666" - created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false"/> + id="4" + status="CLOSED" + rule_failure_permanent_id="2" + resource_id="666" + created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" + rule_id="[null]" + manual_violation="false" + manual_severity="false"/> <reviews - id="5" - status="REOPENED" - rule_failure_permanent_id="3" - resource_id="666" - created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false"/> + id="5" + status="REOPENED" + rule_failure_permanent_id="3" + resource_id="666" + created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" + rule_id="[null]" + manual_violation="false" + manual_severity="false"/> <reviews - id="6" - status="RESOLVED" - rule_failure_permanent_id="3" - resource_id="666" - created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="FIXED" severity="[null]" resource_line="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false"/> + id="6" + status="RESOLVED" + rule_failure_permanent_id="3" + resource_id="666" + created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="FIXED" severity="[null]" resource_line="[null]" project_id="[null]" + rule_id="[null]" + manual_violation="false" + manual_severity="false"/> <reviews - id="7" - status="CLOSED" - rule_failure_permanent_id="2" - resource_id="666" - created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false"/> + id="7" + status="CLOSED" + rule_failure_permanent_id="2" + resource_id="666" + created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" + rule_id="[null]" + manual_violation="false" + manual_severity="false"/> <reviews - id="8" - status="CLOSED" - rule_failure_permanent_id="2" - resource_id="666" - created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="FIXED" severity="[null]" resource_line="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false"/> + id="8" + status="CLOSED" + rule_failure_permanent_id="2" + resource_id="666" + created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="FIXED" severity="[null]" resource_line="[null]" project_id="[null]" + rule_id="[null]" + manual_violation="false" + manual_severity="false"/> </dataset>
\ No newline at end of file diff --git a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/shouldReopenResolvedReviewWithNonFixedViolation-result.xml b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/shouldReopenResolvedReviewWithNonFixedViolation-result.xml index d31d65c35ec..d36f1d7de19 100644 --- a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/shouldReopenResolvedReviewWithNonFixedViolation-result.xml +++ b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/shouldReopenResolvedReviewWithNonFixedViolation-result.xml @@ -1,68 +1,76 @@ <dataset> <reviews - id="1" - status="OPEN" - rule_failure_permanent_id="1" - resource_id="555" - created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false"/> + id="1" + status="OPEN" + rule_failure_permanent_id="1" + resource_id="555" + created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" + rule_id="[null]" + manual_violation="false" + manual_severity="false"/> <reviews - id="2" - status="CLOSED" - rule_failure_permanent_id="2" - resource_id="666" - created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false"/> + id="2" + status="CLOSED" + rule_failure_permanent_id="2" + resource_id="666" + created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" + rule_id="[null]" + manual_violation="false" + manual_severity="false"/> <reviews - id="3" - status="OPEN" - rule_failure_permanent_id="3" - resource_id="666" - created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false"/> + id="3" + status="OPEN" + rule_failure_permanent_id="3" + resource_id="666" + created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" + rule_id="[null]" + manual_violation="false" + manual_severity="false"/> <reviews - id="4" - status="CLOSED" - rule_failure_permanent_id="2" - resource_id="666" - created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false"/> + id="4" + status="CLOSED" + rule_failure_permanent_id="2" + resource_id="666" + created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" + rule_id="[null]" + manual_violation="false" + manual_severity="false"/> <reviews - id="5" - status="REOPENED" - rule_failure_permanent_id="3" - resource_id="666" - created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false"/> + id="5" + status="REOPENED" + rule_failure_permanent_id="3" + resource_id="666" + created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" + rule_id="[null]" + manual_violation="false" + manual_severity="false"/> <reviews - id="6" - status="REOPENED" - rule_failure_permanent_id="3" - resource_id="666" - created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false"/> + id="6" + status="REOPENED" + rule_failure_permanent_id="3" + resource_id="666" + created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" + rule_id="[null]" + manual_violation="false" + manual_severity="false"/> <reviews - id="7" - status="CLOSED" - rule_failure_permanent_id="2" - resource_id="666" - created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false"/> + id="7" + status="CLOSED" + rule_failure_permanent_id="2" + resource_id="666" + created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" project_id="[null]" + rule_id="[null]" + manual_violation="false" + manual_severity="false"/> <reviews - id="8" - status="CLOSED" - rule_failure_permanent_id="2" - resource_id="666" - created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="FIXED" severity="[null]" resource_line="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false"/> + id="8" + status="CLOSED" + rule_failure_permanent_id="2" + resource_id="666" + created_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="FIXED" severity="[null]" resource_line="[null]" project_id="[null]" + rule_id="[null]" + manual_violation="false" + manual_severity="false"/> </dataset>
\ No newline at end of file diff --git a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/UpdateReviewsDecoratorTest/fixture.xml b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/UpdateReviewsDecoratorTest/fixture.xml index 26f917e26fb..62e91386059 100644 --- a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/UpdateReviewsDecoratorTest/fixture.xml +++ b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/UpdateReviewsDecoratorTest/fixture.xml @@ -1,45 +1,49 @@ <dataset> <reviews - id="1" - status="OPEN" - rule_failure_permanent_id="1" - resource_id="1" - title="message OLD" - resource_line="0" - resolution="[null]" - created_at="[null]" - updated_at="[null]" - project_id="[null]" - severity="[null]" - user_id="[null]" - rule_id="[null]" - manual_violation="false"/> + id="1" + status="OPEN" + rule_failure_permanent_id="1" + resource_id="1" + title="message OLD" + resource_line="0" + resolution="[null]" + created_at="[null]" + updated_at="[null]" + project_id="[null]" + severity="[null]" + user_id="[null]" + rule_id="[null]" + manual_violation="false" + manual_severity="false"/> <reviews - id="2" - status="OPEN" - rule_failure_permanent_id="2" - resource_id="1" - title="message 2" - resource_line="2" - rule_id="[null]" - manual_violation="false"/> + id="2" + status="OPEN" + rule_failure_permanent_id="2" + resource_id="1" + title="message 2" + resource_line="2" + rule_id="[null]" + manual_violation="false" + manual_severity="false"/> <reviews - id="3" - status="OPEN" - rule_failure_permanent_id="3" - resource_id="1" - title="message 3" - resource_line="0" - rule_id="[null]" - manual_violation="false"/> + id="3" + status="OPEN" + rule_failure_permanent_id="3" + resource_id="1" + title="message 3" + resource_line="0" + rule_id="[null]" + manual_violation="false" + manual_severity="false"/> <reviews - id="4" - status="OPEN" - rule_failure_permanent_id="4" - resource_id="1" - title="message OLD" - resource_line="4" - rule_id="[null]" - manual_violation="false"/> + id="4" + status="OPEN" + rule_failure_permanent_id="4" + resource_id="1" + title="message OLD" + resource_line="4" + rule_id="[null]" + manual_violation="false" + manual_severity="false"/> </dataset>
\ No newline at end of file diff --git a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/UpdateReviewsDecoratorTest/shouldUpdateReviews-result.xml b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/UpdateReviewsDecoratorTest/shouldUpdateReviews-result.xml index 186ef803194..83dd96b6121 100644 --- a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/UpdateReviewsDecoratorTest/shouldUpdateReviews-result.xml +++ b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/UpdateReviewsDecoratorTest/shouldUpdateReviews-result.xml @@ -1,44 +1,48 @@ <dataset> <reviews - id="1" - status="OPEN" - rule_failure_permanent_id="1" - resource_id="1" - title="message 1" - resource_line="1" - created_at="[null]" user_id="[null]" assignee_id="[null]" resolution="[null]" severity="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false"/> + id="1" + status="OPEN" + rule_failure_permanent_id="1" + resource_id="1" + title="message 1" + resource_line="1" + created_at="[null]" user_id="[null]" assignee_id="[null]" resolution="[null]" severity="[null]" project_id="[null]" + rule_id="[null]" + manual_violation="false" + manual_severity="false"/> <reviews - id="2" - status="OPEN" - rule_failure_permanent_id="2" - resource_id="1" - title="message 2" - resource_line="2" - created_at="[null]" user_id="[null]" assignee_id="[null]" resolution="[null]" severity="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false"/> + id="2" + status="OPEN" + rule_failure_permanent_id="2" + resource_id="1" + title="message 2" + resource_line="2" + created_at="[null]" user_id="[null]" assignee_id="[null]" resolution="[null]" severity="[null]" project_id="[null]" + rule_id="[null]" + manual_violation="false" + manual_severity="false"/> <reviews - id="3" - status="OPEN" - rule_failure_permanent_id="3" - resource_id="1" - title="message 3" - resource_line="3" - created_at="[null]" user_id="[null]" assignee_id="[null]" resolution="[null]" severity="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false"/> + id="3" + status="OPEN" + rule_failure_permanent_id="3" + resource_id="1" + title="message 3" + resource_line="3" + created_at="[null]" user_id="[null]" assignee_id="[null]" resolution="[null]" severity="[null]" project_id="[null]" + rule_id="[null]" + manual_violation="false" + manual_severity="false"/> <reviews - id="4" - status="OPEN" - rule_failure_permanent_id="4" - resource_id="1" - title="message 4" - resource_line="4" - created_at="[null]" user_id="[null]" assignee_id="[null]" resolution="[null]" severity="[null]" project_id="[null]" - rule_id="[null]" - manual_violation="false"/> + id="4" + status="OPEN" + rule_failure_permanent_id="4" + resource_id="1" + title="message 4" + resource_line="4" + created_at="[null]" user_id="[null]" assignee_id="[null]" resolution="[null]" severity="[null]" project_id="[null]" + rule_id="[null]" + manual_violation="false" + manual_severity="false"/> </dataset>
\ No newline at end of file diff --git a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shared.xml b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shared.xml index 198fa99726d..1a5d21da075 100644 --- a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shared.xml +++ b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shared.xml @@ -22,7 +22,7 @@ status="U" islast="false" depth="3"/> <rule_failures switched_off="false" permanent_id="1" ID="1" SNAPSHOT_ID="1000" RULE_ID="30" FAILURE_LEVEL="3" MESSAGE="old message" LINE="10" COST="[null]" - created_at="2008-11-01 13:58:00.00" checksum="[null]" committer="[null]" overridden_severity="[null]"/> + created_at="2008-11-01 13:58:00.00" checksum="[null]" committer="[null]"/> <rule_failures switched_off="true" permanent_id="2" ID="2" SNAPSHOT_ID="1000" RULE_ID="30" FAILURE_LEVEL="3" MESSAGE="old message" LINE="10" COST="[null]" - created_at="2008-11-01 13:58:00.00" checksum="[null]" committer="[null]" overridden_severity="[null]"/> + created_at="2008-11-01 13:58:00.00" checksum="[null]" committer="[null]"/> </dataset> diff --git a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shouldCopyPermanentIdFromReferenceViolation-result.xml b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shouldCopyPermanentIdFromReferenceViolation-result.xml index 77079806665..c2dabd0789d 100644 --- a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shouldCopyPermanentIdFromReferenceViolation-result.xml +++ b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shouldCopyPermanentIdFromReferenceViolation-result.xml @@ -22,10 +22,10 @@ status="U" islast="false" depth="3"/> <rule_failures switched_off="false" permanent_id="1" ID="1" SNAPSHOT_ID="1000" RULE_ID="30" FAILURE_LEVEL="3" MESSAGE="old message" LINE="10" COST="[null]" - created_at="2008-11-01 13:58:00.00" checksum="[null]" committer="[null]" overridden_severity="[null]"/> + created_at="2008-11-01 13:58:00.00" checksum="[null]" committer="[null]"/> <rule_failures switched_off="true" permanent_id="2" ID="2" SNAPSHOT_ID="1000" RULE_ID="30" FAILURE_LEVEL="3" MESSAGE="old message" LINE="10" COST="[null]" - created_at="2008-11-01 13:58:00.00" checksum="[null]" committer="[null]" overridden_severity="[null]"/> + created_at="2008-11-01 13:58:00.00" checksum="[null]" committer="[null]"/> <rule_failures switched_off="false" permanent_id="1" ID="3" SNAPSHOT_ID="1000" RULE_ID="30" FAILURE_LEVEL="2" MESSAGE="new message" LINE="[null]" COST="[null]" - created_at="[null]" checksum="[null]" committer="[null]" overridden_severity="[null]"/> + created_at="[null]" checksum="[null]" committer="[null]"/> </dataset> diff --git a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shouldSaveViolations-result.xml b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shouldSaveViolations-result.xml index 03bcb346d36..7552966eefe 100644 --- a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shouldSaveViolations-result.xml +++ b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shouldSaveViolations-result.xml @@ -21,13 +21,13 @@ status="U" islast="false" depth="3"/> <rule_failures switched_off="false" permanent_id="1" ID="1" SNAPSHOT_ID="1000" RULE_ID="30" FAILURE_LEVEL="3" MESSAGE="old message" LINE="10" COST="[null]" - created_at="2008-11-01 13:58:00.00" checksum="[null]" committer="[null]" overridden_severity="[null]"/> + created_at="2008-11-01 13:58:00.00" checksum="[null]" committer="[null]"/> <rule_failures switched_off="true" permanent_id="2" ID="2" SNAPSHOT_ID="1000" RULE_ID="30" FAILURE_LEVEL="3" MESSAGE="old message" LINE="10" COST="[null]" - created_at="2008-11-01 13:58:00.00" checksum="[null]" committer="[null]" overridden_severity="[null]"/> + created_at="2008-11-01 13:58:00.00" checksum="[null]" committer="[null]"/> <rule_failures switched_off="false" permanent_id="3" ID="3" SNAPSHOT_ID="1000" RULE_ID="30" FAILURE_LEVEL="3" MESSAGE="the message" LINE="20" COST="55.6" - created_at="2010-12-25 00:00:00.00" checksum="checksum" committer="[null]" overridden_severity="[null]"/> + created_at="2010-12-25 00:00:00.00" checksum="checksum" committer="[null]"/> <rule_failures switched_off="false" permanent_id="4" ID="4" SNAPSHOT_ID="1000" RULE_ID="30" FAILURE_LEVEL="3" MESSAGE="[null]" LINE="50" COST="80" created_at="[null]" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <rule_failures switched_off="true" permanent_id="5" ID="5" SNAPSHOT_ID="1000" RULE_ID="31" FAILURE_LEVEL="1" MESSAGE="[null]" LINE="[null]" COST="[null]" created_at="[null]" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> </dataset> diff --git a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/api/PurgeUtilsTest/purgeSnapshots-result.xml b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/api/PurgeUtilsTest/purgeSnapshots-result.xml index 7f1d2b867c8..cc74ed382d4 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/api/PurgeUtilsTest/purgeSnapshots-result.xml +++ b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/api/PurgeUtilsTest/purgeSnapshots-result.xml @@ -61,11 +61,11 @@ <rule_failures switched_off="[null]" permanent_id="[null]" ID="1" SNAPSHOT_ID="1" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <rule_failures switched_off="[null]" permanent_id="[null]" ID="2" SNAPSHOT_ID="2" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> - <!--<rule_failures switched_off="[null]" permanent_id="[null]" ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" checksum="[null]" committer="[null]" overridden_severity="[null]" />--> - <!--<rule_failures switched_off="[null]" permanent_id="[null]" ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" checksum="[null]" committer="[null]" overridden_severity="[null]" />--> + checksum="[null]" committer="[null]"/> + <!--<rule_failures switched_off="[null]" permanent_id="[null]" ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" checksum="[null]" committer="[null]" />--> + <!--<rule_failures switched_off="[null]" permanent_id="[null]" ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" checksum="[null]" committer="[null]" />--> <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]" diff --git a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/api/PurgeUtilsTest/purgeSnapshots.xml b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/api/PurgeUtilsTest/purgeSnapshots.xml index 48b63fb9687..09e1ecd3edf 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/api/PurgeUtilsTest/purgeSnapshots.xml +++ b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/api/PurgeUtilsTest/purgeSnapshots.xml @@ -65,13 +65,13 @@ <rule_failures switched_off="[null]" permanent_id="[null]" ID="1" SNAPSHOT_ID="1" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <rule_failures switched_off="[null]" permanent_id="[null]" ID="2" SNAPSHOT_ID="2" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <rule_failures switched_off="[null]" permanent_id="[null]" ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <rule_failures switched_off="[null]" permanent_id="[null]" ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]" diff --git a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDeletedResourcesTest/purgeDeletedResources-result.xml b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDeletedResourcesTest/purgeDeletedResources-result.xml index 7cd3b233cdc..c2cdea12b0d 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDeletedResourcesTest/purgeDeletedResources-result.xml +++ b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDeletedResourcesTest/purgeDeletedResources-result.xml @@ -33,12 +33,12 @@ <rule_failures switched_off="[null]" permanent_id="[null]" ID="1" SNAPSHOT_ID="1" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <rule_failures switched_off="[null]" permanent_id="[null]" ID="2" SNAPSHOT_ID="2" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> - <!--<rule_failures switched_off="[null]" permanent_id="[null]" ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" checksum="[null]" committer="[null]" overridden_severity="[null]"/>--> + checksum="[null]" committer="[null]"/> + <!--<rule_failures switched_off="[null]" permanent_id="[null]" ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" checksum="[null]" committer="[null]" />--> <rule_failures switched_off="[null]" permanent_id="[null]" ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]" rule_priority="[null]" diff --git a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDeletedResourcesTest/purgeDeletedResources.xml b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDeletedResourcesTest/purgeDeletedResources.xml index 42603daccc6..05d60bc932b 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDeletedResourcesTest/purgeDeletedResources.xml +++ b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDeletedResourcesTest/purgeDeletedResources.xml @@ -35,13 +35,13 @@ <rule_failures switched_off="[null]" permanent_id="[null]" ID="1" SNAPSHOT_ID="1" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <rule_failures switched_off="[null]" permanent_id="[null]" ID="2" SNAPSHOT_ID="2" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <rule_failures switched_off="[null]" permanent_id="[null]" ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <rule_failures switched_off="[null]" permanent_id="[null]" ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]" rule_priority="[null]" diff --git a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDeprecatedLastTest/purgeDeprecatedLast-result.xml b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDeprecatedLastTest/purgeDeprecatedLast-result.xml index 3d27ddbfba6..9b3f79ab67b 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDeprecatedLastTest/purgeDeprecatedLast-result.xml +++ b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDeprecatedLastTest/purgeDeprecatedLast-result.xml @@ -35,12 +35,12 @@ <SNAPSHOT_SOURCES ID="2" SNAPSHOT_ID="4" DATA="foo"/> <rule_failures switched_off="[null]" permanent_id="[null]" ID="1" SNAPSHOT_ID="1" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <rule_failures switched_off="[null]" permanent_id="[null]" ID="2" SNAPSHOT_ID="2" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> - <!--<rule_failures switched_off="[null]" permanent_id="[null]" ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" checksum="[null]" committer="[null]" overridden_severity="[null]"/>--> + checksum="[null]" committer="[null]"/> + <!--<rule_failures switched_off="[null]" permanent_id="[null]" ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" checksum="[null]" committer="[null]" />--> <rule_failures switched_off="[null]" permanent_id="[null]" ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]" diff --git a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDeprecatedLastTest/purgeDeprecatedLast.xml b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDeprecatedLastTest/purgeDeprecatedLast.xml index ae44da882e4..793feabf319 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDeprecatedLastTest/purgeDeprecatedLast.xml +++ b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDeprecatedLastTest/purgeDeprecatedLast.xml @@ -37,13 +37,13 @@ <SNAPSHOT_SOURCES ID="2" SNAPSHOT_ID="4" DATA="foo"/> <rule_failures switched_off="[null]" permanent_id="[null]" ID="1" SNAPSHOT_ID="1" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <rule_failures switched_off="[null]" permanent_id="[null]" ID="2" SNAPSHOT_ID="2" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <rule_failures switched_off="[null]" permanent_id="[null]" ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <rule_failures switched_off="[null]" permanent_id="[null]" ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]" diff --git a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeEntitiesTest/purgeEntities-result.xml b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeEntitiesTest/purgeEntities-result.xml index 650af66deae..9a2baa79336 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeEntitiesTest/purgeEntities-result.xml +++ b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeEntitiesTest/purgeEntities-result.xml @@ -67,22 +67,22 @@ <!-- old violations --> <rule_failures switched_off="[null]" permanent_id="[null]" ID="1" SNAPSHOT_ID="1" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <rule_failures switched_off="[null]" permanent_id="[null]" ID="2" SNAPSHOT_ID="2" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> - <!--<rule_failures switched_off="[null]" permanent_id="[null]" ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" COST="[null]" created_at="2008-12-02 13:58:00.00" checksum="[null]" committer="[null]" overridden_severity="[null]"/>--> - <!--<rule_failures switched_off="[null]" permanent_id="[null]" ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" COST="[null]" created_at="2008-12-02 13:58:00.00" checksum="[null]" committer="[null]" overridden_severity="[null]"/>--> + checksum="[null]" committer="[null]"/> + <!--<rule_failures switched_off="[null]" permanent_id="[null]" ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" COST="[null]" created_at="2008-12-02 13:58:00.00" checksum="[null]" committer="[null]" />--> + <!--<rule_failures switched_off="[null]" permanent_id="[null]" ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" COST="[null]" created_at="2008-12-02 13:58:00.00" checksum="[null]" committer="[null]" />--> <!-- last violations --> <rule_failures switched_off="[null]" permanent_id="[null]" ID="5" SNAPSHOT_ID="5" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" COST="[null]" created_at="2008-12-02 13:58:00.00" checksum="[null]" - committer="[null]" overridden_severity="[null]"/> + committer="[null]"/> <rule_failures switched_off="[null]" permanent_id="[null]" ID="6" SNAPSHOT_ID="6" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" COST="[null]" created_at="2008-12-02 13:58:00.00" checksum="[null]" - committer="[null]" overridden_severity="[null]"/> + committer="[null]"/> <rule_failures switched_off="[null]" permanent_id="[null]" ID="7" SNAPSHOT_ID="7" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" COST="[null]" created_at="2008-12-02 13:58:00.00" checksum="[null]" - committer="[null]" overridden_severity="[null]"/> + committer="[null]"/> <rule_failures switched_off="[null]" permanent_id="[null]" ID="8" SNAPSHOT_ID="8" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" COST="[null]" created_at="2008-12-02 13:58:00.00" checksum="[null]" - committer="[null]" overridden_severity="[null]"/> + committer="[null]"/> <!-- old measures --> <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]" diff --git a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeEntitiesTest/purgeEntities.xml b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeEntitiesTest/purgeEntities.xml index 9c73d74f79e..45ced11f7b0 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeEntitiesTest/purgeEntities.xml +++ b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeEntitiesTest/purgeEntities.xml @@ -71,24 +71,24 @@ <!-- old violations --> <rule_failures switched_off="[null]" permanent_id="[null]" ID="1" SNAPSHOT_ID="1" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <rule_failures switched_off="[null]" permanent_id="[null]" ID="2" SNAPSHOT_ID="2" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <rule_failures switched_off="[null]" permanent_id="[null]" ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <rule_failures switched_off="[null]" permanent_id="[null]" ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <!-- last violations --> <rule_failures switched_off="[null]" permanent_id="[null]" ID="5" SNAPSHOT_ID="5" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <rule_failures switched_off="[null]" permanent_id="[null]" ID="6" SNAPSHOT_ID="6" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <rule_failures switched_off="[null]" permanent_id="[null]" ID="7" SNAPSHOT_ID="7" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <rule_failures switched_off="[null]" permanent_id="[null]" ID="8" SNAPSHOT_ID="8" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <!-- old measures --> <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]" diff --git a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeOrphanReviewsTest/purgeOrphanReviews-result.xml b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeOrphanReviewsTest/purgeOrphanReviews-result.xml index e1c2a3256b2..028c70bd8cd 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeOrphanReviewsTest/purgeOrphanReviews-result.xml +++ b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeOrphanReviewsTest/purgeOrphanReviews-result.xml @@ -13,14 +13,15 @@ manual_violation="false"/>--> <reviews - id="1" - status="OPEN" - rule_failure_permanent_id="1" - resource_id="555" - project_id="1" - created_at="[null]" updated_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" - rule_id="[null]" - manual_violation="false"/> + id="1" + status="OPEN" + rule_failure_permanent_id="1" + resource_id="555" + project_id="1" + created_at="[null]" updated_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" + rule_id="[null]" + manual_violation="false" + manual_severity="false"/> <!-- Following must have been deleted <reviews @@ -31,13 +32,14 @@ project_id="2" created_at="[null]" updated_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" rule_id="[null]" - manual_violation="false"/> + manual_violation="false" + manual_severity="false"/> --> <review_comments - id="1" - review_id="1" - created_at="[null]" updated_at="[null]" user_id="[null]" review_text=""/> + id="1" + review_id="1" + created_at="[null]" updated_at="[null]" user_id="[null]" review_text=""/> <!-- Following must have been deleted <review_comments diff --git a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeOrphanReviewsTest/purgeOrphanReviews.xml b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeOrphanReviewsTest/purgeOrphanReviews.xml index 6b5dfe3401e..55dd57660c5 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeOrphanReviewsTest/purgeOrphanReviews.xml +++ b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeOrphanReviewsTest/purgeOrphanReviews.xml @@ -11,33 +11,35 @@ <!--enabled="true" language="java" copy_resource_id="[null]"/>--> <reviews - id="1" - status="OPEN" - rule_failure_permanent_id="1" - resource_id="555" - project_id="1" - created_at="[null]" updated_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" - rule_id="[null]" - manual_violation="false"/> + id="1" + status="OPEN" + rule_failure_permanent_id="1" + resource_id="555" + project_id="1" + created_at="[null]" updated_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" + rule_id="[null]" + manual_violation="false" + manual_severity="false"/> <reviews - id="2" - status="CLOSED" - rule_failure_permanent_id="2" - resource_id="666" - project_id="2" - created_at="[null]" updated_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" - rule_id="[null]" - manual_violation="false"/> + id="2" + status="CLOSED" + rule_failure_permanent_id="2" + resource_id="666" + project_id="2" + created_at="[null]" updated_at="[null]" user_id="[null]" assignee_id="[null]" title="[null]" resolution="[null]" severity="[null]" resource_line="[null]" + rule_id="[null]" + manual_violation="false" + manual_severity="false"/> <review_comments - id="1" - review_id="1" - created_at="[null]" updated_at="[null]" user_id="[null]" review_text=""/> + id="1" + review_id="1" + created_at="[null]" updated_at="[null]" user_id="[null]" review_text=""/> <review_comments - id="2" - review_id="2" - created_at="[null]" updated_at="[null]" user_id="[null]" review_text=""/> + id="2" + review_id="2" + created_at="[null]" updated_at="[null]" user_id="[null]" review_text=""/> </dataset>
\ No newline at end of file diff --git a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeUnprocessedTest/purgeUnprocessed-result.xml b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeUnprocessedTest/purgeUnprocessed-result.xml index 2782cad8bac..6d5fd59dcd8 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeUnprocessedTest/purgeUnprocessed-result.xml +++ b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeUnprocessedTest/purgeUnprocessed-result.xml @@ -63,20 +63,20 @@ <!-- valid violations --> <rule_failures switched_off="[null]" permanent_id="[null]" ID="1" SNAPSHOT_ID="1" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <rule_failures switched_off="[null]" permanent_id="[null]" ID="2" SNAPSHOT_ID="2" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <rule_failures switched_off="[null]" permanent_id="[null]" ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <rule_failures switched_off="[null]" permanent_id="[null]" ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <!-- unprocessed violations --> - <!--<rule_failures switched_off="[null]" permanent_id="[null]" ID="5" SNAPSHOT_ID="5" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" checksum="[null]" committer="[null]" overridden_severity="[null]"/>--> - <!--<rule_failures switched_off="[null]" permanent_id="[null]" ID="6" SNAPSHOT_ID="6" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" checksum="[null]" committer="[null]" overridden_severity="[null]"/>--> - <!--<rule_failures switched_off="[null]" permanent_id="[null]" ID="7" SNAPSHOT_ID="7" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" checksum="[null]" committer="[null]" overridden_severity="[null]"/>--> - <!--<rule_failures switched_off="[null]" permanent_id="[null]" ID="8" SNAPSHOT_ID="8" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" checksum="[null]" committer="[null]" overridden_severity="[null]"/>--> + <!--<rule_failures switched_off="[null]" permanent_id="[null]" ID="5" SNAPSHOT_ID="5" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" checksum="[null]" committer="[null]" />--> + <!--<rule_failures switched_off="[null]" permanent_id="[null]" ID="6" SNAPSHOT_ID="6" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" checksum="[null]" committer="[null]" />--> + <!--<rule_failures switched_off="[null]" permanent_id="[null]" ID="7" SNAPSHOT_ID="7" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" checksum="[null]" committer="[null]" />--> + <!--<rule_failures switched_off="[null]" permanent_id="[null]" ID="8" SNAPSHOT_ID="8" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" checksum="[null]" committer="[null]" />--> <!-- valid measures --> <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]" diff --git a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeUnprocessedTest/purgeUnprocessed.xml b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeUnprocessedTest/purgeUnprocessed.xml index fa0ed17a04d..4d1f4cffc89 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeUnprocessedTest/purgeUnprocessed.xml +++ b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeUnprocessedTest/purgeUnprocessed.xml @@ -71,24 +71,24 @@ <!-- valid violations --> <rule_failures switched_off="[null]" permanent_id="[null]" ID="1" SNAPSHOT_ID="1" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <rule_failures switched_off="[null]" permanent_id="[null]" ID="2" SNAPSHOT_ID="2" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <rule_failures switched_off="[null]" permanent_id="[null]" ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <rule_failures switched_off="[null]" permanent_id="[null]" ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <!-- unprocessed violations --> <rule_failures switched_off="[null]" permanent_id="[null]" ID="5" SNAPSHOT_ID="5" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <rule_failures switched_off="[null]" permanent_id="[null]" ID="6" SNAPSHOT_ID="6" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <rule_failures switched_off="[null]" permanent_id="[null]" ID="7" SNAPSHOT_ID="7" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <rule_failures switched_off="[null]" permanent_id="[null]" ID="8" SNAPSHOT_ID="8" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" COST="[null]" created_at="2008-12-02 13:58:00.00" - checksum="[null]" committer="[null]" overridden_severity="[null]"/> + checksum="[null]" committer="[null]"/> <!-- valid measures --> <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]" diff --git a/sonar-batch/src/test/resources/org/sonar/batch/phases/UpdateStatusJobTest/shouldNotEnableSnapshotWhenNotLatest-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/phases/UpdateStatusJobTest/shouldNotEnableSnapshotWhenNotLatest-result.xml index 7ce1af3fd28..4b001e23b5c 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/phases/UpdateStatusJobTest/shouldNotEnableSnapshotWhenNotLatest-result.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/phases/UpdateStatusJobTest/shouldNotEnableSnapshotWhenNotLatest-result.xml @@ -77,13 +77,13 @@ <SNAPSHOT_SOURCES ID="1" SNAPSHOT_ID="4" DATA="source code of Class1"/> <SNAPSHOT_SOURCES ID="2" SNAPSHOT_ID="5" DATA="source code of Class2"/> - <rule_failures switched_off="[null]" permanent_id="[null]" ID="1" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" COST="[null]" overridden_severity="[null]"/> - <rule_failures switched_off="[null]" permanent_id="[null]" ID="2" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" COST="[null]" overridden_severity="[null]"/> - <rule_failures switched_off="[null]" permanent_id="[null]" ID="3" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" COST="[null]" overridden_severity="[null]"/> - <rule_failures switched_off="[null]" permanent_id="[null]" ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" COST="[null]" overridden_severity="[null]"/> + <rule_failures switched_off="[null]" permanent_id="[null]" ID="1" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" COST="[null]"/> + <rule_failures switched_off="[null]" permanent_id="[null]" ID="2" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" COST="[null]"/> + <rule_failures switched_off="[null]" permanent_id="[null]" ID="3" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" COST="[null]"/> + <rule_failures switched_off="[null]" permanent_id="[null]" ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" COST="[null]"/> - <rule_failures switched_off="[null]" permanent_id="[null]" ID="5" SNAPSHOT_ID="5" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg5" COST="[null]" overridden_severity="[null]"/> - <rule_failures switched_off="[null]" permanent_id="[null]" ID="6" SNAPSHOT_ID="5" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg6" COST="[null]" overridden_severity="[null]"/> + <rule_failures switched_off="[null]" permanent_id="[null]" ID="5" SNAPSHOT_ID="5" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg5" COST="[null]"/> + <rule_failures switched_off="[null]" permanent_id="[null]" ID="6" SNAPSHOT_ID="5" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg6" COST="[null]"/> <!-- measures at project level --> <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]" diff --git a/sonar-batch/src/test/resources/org/sonar/batch/phases/UpdateStatusJobTest/shouldNotEnableSnapshotWhenNotLatest.xml b/sonar-batch/src/test/resources/org/sonar/batch/phases/UpdateStatusJobTest/shouldNotEnableSnapshotWhenNotLatest.xml index 9b582046f3d..fa6bb85346a 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/phases/UpdateStatusJobTest/shouldNotEnableSnapshotWhenNotLatest.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/phases/UpdateStatusJobTest/shouldNotEnableSnapshotWhenNotLatest.xml @@ -78,13 +78,13 @@ <SNAPSHOT_SOURCES ID="1" SNAPSHOT_ID="4" DATA="source code of Class1"/> <SNAPSHOT_SOURCES ID="2" SNAPSHOT_ID="5" DATA="source code of Class2"/> - <rule_failures switched_off="[null]" permanent_id="[null]" ID="1" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" COST="[null]" overridden_severity="[null]"/> - <rule_failures switched_off="[null]" permanent_id="[null]" ID="2" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" COST="[null]" overridden_severity="[null]"/> - <rule_failures switched_off="[null]" permanent_id="[null]" ID="3" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" COST="[null]" overridden_severity="[null]"/> - <rule_failures switched_off="[null]" permanent_id="[null]" ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" COST="[null]" overridden_severity="[null]"/> + <rule_failures switched_off="[null]" permanent_id="[null]" ID="1" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" COST="[null]"/> + <rule_failures switched_off="[null]" permanent_id="[null]" ID="2" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" COST="[null]"/> + <rule_failures switched_off="[null]" permanent_id="[null]" ID="3" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" COST="[null]"/> + <rule_failures switched_off="[null]" permanent_id="[null]" ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" COST="[null]"/> - <rule_failures switched_off="[null]" permanent_id="[null]" ID="5" SNAPSHOT_ID="5" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg5" COST="[null]" overridden_severity="[null]"/> - <rule_failures switched_off="[null]" permanent_id="[null]" ID="6" SNAPSHOT_ID="5" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg6" COST="[null]" overridden_severity="[null]"/> + <rule_failures switched_off="[null]" permanent_id="[null]" ID="5" SNAPSHOT_ID="5" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg5" COST="[null]"/> + <rule_failures switched_off="[null]" permanent_id="[null]" ID="6" SNAPSHOT_ID="5" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg6" COST="[null]"/> <!-- measures at project level --> <project_measures characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]" diff --git a/sonar-core/src/main/java/org/sonar/persistence/model/Review.java b/sonar-core/src/main/java/org/sonar/persistence/model/Review.java index 4badd593f87..4f680448212 100644 --- a/sonar-core/src/main/java/org/sonar/persistence/model/Review.java +++ b/sonar-core/src/main/java/org/sonar/persistence/model/Review.java @@ -49,6 +49,7 @@ public class Review { private String severity; private Integer ruleId; private Boolean manualViolation; + private Boolean manualSeverity; public Long getId() { return id; @@ -185,6 +186,15 @@ public class Review { return this; } + public Boolean getManualSeverity() { + return manualSeverity; + } + + public Review setManualSeverity(Boolean b) { + this.manualSeverity = b; + return this; + } + @Override public String toString() { return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE); diff --git a/sonar-core/src/main/java/org/sonar/persistence/model/ReviewMapper.java b/sonar-core/src/main/java/org/sonar/persistence/model/ReviewMapper.java index 82b39c74356..2eb0c23025a 100644 --- a/sonar-core/src/main/java/org/sonar/persistence/model/ReviewMapper.java +++ b/sonar-core/src/main/java/org/sonar/persistence/model/ReviewMapper.java @@ -19,6 +19,8 @@ */ package org.sonar.persistence.model; +import org.apache.ibatis.annotations.Param; + import java.util.List; /** @@ -30,4 +32,6 @@ public interface ReviewMapper { List<Review> selectByResource(int resourceId); List<Review> selectByQuery(ReviewQuery query); + + List<Review> selectCloseables(@Param("resourceId") int resourceId, @Param("snapshotId") int snapshotId); } diff --git a/sonar-core/src/main/resources/org/sonar/persistence/model/ReviewMapper.xml b/sonar-core/src/main/resources/org/sonar/persistence/model/ReviewMapper.xml index e336df91505..e60a06ce745 100644 --- a/sonar-core/src/main/resources/org/sonar/persistence/model/ReviewMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/persistence/model/ReviewMapper.xml @@ -47,5 +47,19 @@ </where> </select> + <select id="selectCloseables" parameterType="map" resultMap="reviewResultMap"> + select + <include refid="reviewColumns"/> + from reviews + <where> + resource_id=#{resourceId} AND + ( + (manual_violation=false AND status!='CLOSED' AND rule_failure_permanent_id NOT IN (SELECT permanent_id FROM rule_failures WHERE snapshot_id=#{snapshotId} AND permanent_id IS NOT NULL)) + OR + (manual_violation=true AND status='RESOLVED') + ) + </where> + </select> + </mapper> diff --git a/sonar-core/src/main/resources/org/sonar/persistence/schema-derby.ddl b/sonar-core/src/main/resources/org/sonar/persistence/schema-derby.ddl index c08611c872c..05bf6631511 100644 --- a/sonar-core/src/main/resources/org/sonar/persistence/schema-derby.ddl +++ b/sonar-core/src/main/resources/org/sonar/persistence/schema-derby.ddl @@ -314,7 +314,8 @@ CREATE TABLE "REVIEWS" ( "RESOURCE_LINE" INTEGER, "RESOLUTION" VARCHAR(200), "RULE_ID" INTEGER, - "MANUAL_VIOLATION" BOOLEAN + "MANUAL_VIOLATION" BOOLEAN, + "MANUAL_SEVERITY" BOOLEAN ); CREATE TABLE "RULES_CATEGORIES" ( @@ -433,8 +434,7 @@ CREATE TABLE "RULE_FAILURES" ( "CHECKSUM" VARCHAR(1000), "PERMANENT_ID" INTEGER, "SWITCHED_OFF" BOOLEAN, - "COMMITTER" VARCHAR(100), - "OVERRIDDEN_SEVERITY" BOOLEAN + "COMMITTER" VARCHAR(100) ); CREATE TABLE "METRICS" ( diff --git a/sonar-core/src/test/resources/org/sonar/persistence/dao/ReviewDaoTest/shared.xml b/sonar-core/src/test/resources/org/sonar/persistence/dao/ReviewDaoTest/shared.xml index 6cbe3307202..70c101759de 100644 --- a/sonar-core/src/test/resources/org/sonar/persistence/dao/ReviewDaoTest/shared.xml +++ b/sonar-core/src/test/resources/org/sonar/persistence/dao/ReviewDaoTest/shared.xml @@ -2,50 +2,53 @@ <!-- First resource --> <reviews - id="100" - status="OPEN" - rule_failure_permanent_id="1" - resolution="RESOLVE" - created_at="[null]" - updated_at="[null]" - project_id="20" - resource_line="200" - severity="BLOCKER" - user_id="300" - resource_id="400" - rule_id="500" - manual_violation="[true]"/> + id="100" + status="OPEN" + rule_failure_permanent_id="1" + resolution="RESOLVE" + created_at="[null]" + updated_at="[null]" + project_id="20" + resource_line="200" + severity="BLOCKER" + user_id="300" + resource_id="400" + rule_id="500" + manual_violation="[true]" + manual_severity="[false]"/> <reviews - id="101" - status="CLOSED" - rule_failure_permanent_id="1" - resolution="RESOLVE" - created_at="[null]" - updated_at="[null]" - project_id="30" - resource_line="120" - severity="MAJOR" - user_id="300" - resource_id="400" - rule_id="505" - manual_violation="[false]"/> + id="101" + status="CLOSED" + rule_failure_permanent_id="1" + resolution="RESOLVE" + created_at="[null]" + updated_at="[null]" + project_id="30" + resource_line="120" + severity="MAJOR" + user_id="300" + resource_id="400" + rule_id="505" + manual_violation="[false]" + manual_severity="[false]"/> <!-- Second resource --> <reviews - id="102" - status="OPEN" - rule_failure_permanent_id="1" - resolution="RESOLVE" - created_at="[null]" - updated_at="[null]" - project_id="20" - resource_line="200" - severity="BLOCKER" - user_id="300" - resource_id="401" - rule_id="500" - manual_violation="[true]"/> + id="102" + status="OPEN" + rule_failure_permanent_id="1" + resolution="RESOLVE" + created_at="[null]" + updated_at="[null]" + project_id="20" + resource_line="200" + severity="BLOCKER" + user_id="300" + resource_id="401" + rule_id="500" + manual_violation="[true]" + manual_severity="[false]"/> </dataset> diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/database/model/RuleFailureModel.java b/sonar-plugin-api/src/main/java/org/sonar/api/database/model/RuleFailureModel.java index 7a42f5e459b..bbab74ade0b 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/database/model/RuleFailureModel.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/database/model/RuleFailureModel.java @@ -70,9 +70,6 @@ public class RuleFailureModel extends BaseIdentifiable { @Column(name = "committer", updatable = true, nullable = true, length = 100) private String committer; - @Column(name = "overridden_severity", updatable = true, nullable = true) - private Boolean overriddenSeverity; - public String getMessage() { return message; } @@ -185,15 +182,6 @@ public class RuleFailureModel extends BaseIdentifiable { return this; } - public Boolean getOverriddenSeverity() { - return overriddenSeverity; - } - - public RuleFailureModel setOverriddenSeverity(Boolean overriddenSeverity) { - this.overriddenSeverity = overriddenSeverity; - return this; - } - @Override public boolean equals(Object obj) { if (!(obj instanceof RuleFailureModel)) { diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/rule_failure.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/rule_failure.rb index 2dcabc50107..dc2f0b8480b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/rule_failure.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/rule_failure.rb @@ -29,28 +29,28 @@ class RuleFailure < ActiveRecord::Base # first line of message def title @title||= - begin - if message.blank? - rule.name - else - parts=Api::Utils.split_newlines(message) - parts.size==0 ? rule.name : parts[0] - end + begin + if message.blank? + rule.name + else + parts=Api::Utils.split_newlines(message) + parts.size==0 ? rule.name : parts[0] end + end end def plain_message @plain_message ||= - begin - Api::Utils.convert_string_to_unix_newlines(message) - end + begin + Api::Utils.convert_string_to_unix_newlines(message) + end end def html_message @html_message ||= - begin - message ? Api::Utils.split_newlines(ERB::Util.html_escape(message)).join('<br/>') : '' - end + begin + message ? Api::Utils.split_newlines(ERB::Util.html_escape(message)).join('<br/>') : '' + end end def severity @@ -72,15 +72,15 @@ class RuleFailure < ActiveRecord::Base json['createdAt'] = Api::Utils.format_datetime(created_at) end json['rule'] = { - :key => rule.key, - :name => rule.name + :key => rule.key, + :name => rule.name } json['resource'] = { - :key => resource.key, - :name => resource.name, - :scope => resource.scope, - :qualifier => resource.qualifier, - :language => resource.language + :key => resource.key, + :name => resource.name, + :scope => resource.scope, + :qualifier => resource.qualifier, + :language => resource.language } json['review'] = review.to_json(convert_markdown) if include_review && review json @@ -114,14 +114,16 @@ class RuleFailure < ActiveRecord::Base def build_review(options={}) if self.review.nil? self.review=Review.new( - {:status => Review::STATUS_OPEN, - :severity => severity, - :resource_line => line, - :resource => resource, - :title => title, - :rule => rule, - :manual_violation => false - }.merge(options)) + { + :status => Review::STATUS_OPEN, + :severity => severity, + :resource_line => line, + :resource => resource, + :title => title, + :rule => rule, + :manual_violation => false, + :manual_severity => false + }.merge(options)) end end diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/234_add_overridden_severity_to_rule_failures.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/234_add_manual_severity_to_reviews.rb index 98839ca0d66..91799f97c4c 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/234_add_overridden_severity_to_rule_failures.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/234_add_manual_severity_to_reviews.rb @@ -21,10 +21,10 @@ # # Sonar 2.13 # -class AddOverriddenSeverityToRuleFailures < ActiveRecord::Migration +class AddManualSeverityToReviews < ActiveRecord::Migration def self.up - add_column 'rule_failures', 'overridden_severity', :boolean, :null => true + add_column 'reviews', 'manual_severity', :boolean, :null => true end end |