@@ -26,10 +26,10 @@ | |||
<SNAPSHOT_SOURCES ID="2" SNAPSHOT_ID="4" DATA="foo"/> | |||
<RULE_FAILURES ID="1" SNAPSHOT_ID="1" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="2" SNAPSHOT_ID="2" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" POINTS="[null]"/> | |||
<!--<RULE_FAILURES ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" POINTS="[null]"/>--> | |||
<RULE_FAILURES ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="1" SNAPSHOT_ID="1" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" COST="[null]"/> | |||
<RULE_FAILURES ID="2" SNAPSHOT_ID="2" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" COST="[null]"/> | |||
<!--<RULE_FAILURES ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" COST="[null]"/>--> | |||
<RULE_FAILURES ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" COST="[null]"/> | |||
<project_measures characteristic_id="[null]" url="[null]" diff_value_1="[null]" diff_value_2="[null]" diff_value_3="[null]" | |||
rule_priority="[null]" |
@@ -26,10 +26,10 @@ | |||
<SNAPSHOT_SOURCES ID="2" SNAPSHOT_ID="4" DATA="foo"/> | |||
<RULE_FAILURES ID="1" SNAPSHOT_ID="1" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="2" SNAPSHOT_ID="2" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="1" SNAPSHOT_ID="1" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" COST="[null]"/> | |||
<RULE_FAILURES ID="2" SNAPSHOT_ID="2" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" COST="[null]"/> | |||
<RULE_FAILURES ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" COST="[null]"/> | |||
<RULE_FAILURES ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" COST="[null]"/> | |||
<project_measures characteristic_id="[null]" url="[null]" diff_value_1="[null]" diff_value_2="[null]" diff_value_3="[null]" | |||
rule_priority="[null]" |
@@ -28,10 +28,10 @@ | |||
<!--<SNAPSHOT_SOURCES ID="1" SNAPSHOT_ID="3" DATA="foo"/>--> | |||
<SNAPSHOT_SOURCES ID="2" SNAPSHOT_ID="4" DATA="foo"/> | |||
<RULE_FAILURES ID="1" SNAPSHOT_ID="1" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="2" SNAPSHOT_ID="2" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" POINTS="[null]"/> | |||
<!--<RULE_FAILURES ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" POINTS="[null]"/>--> | |||
<RULE_FAILURES ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="1" SNAPSHOT_ID="1" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" COST="[null]"/> | |||
<RULE_FAILURES ID="2" SNAPSHOT_ID="2" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" COST="[null]"/> | |||
<!--<RULE_FAILURES ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" COST="[null]"/>--> | |||
<RULE_FAILURES ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" COST="[null]"/> | |||
<project_measures characteristic_id="[null]" url="[null]" diff_value_1="[null]" diff_value_2="[null]" diff_value_3="[null]" |
@@ -28,10 +28,10 @@ | |||
<SNAPSHOT_SOURCES ID="1" SNAPSHOT_ID="3" DATA="foo"/> | |||
<SNAPSHOT_SOURCES ID="2" SNAPSHOT_ID="4" DATA="foo"/> | |||
<RULE_FAILURES ID="1" SNAPSHOT_ID="1" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="2" SNAPSHOT_ID="2" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="1" SNAPSHOT_ID="1" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" COST="[null]"/> | |||
<RULE_FAILURES ID="2" SNAPSHOT_ID="2" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" COST="[null]"/> | |||
<RULE_FAILURES ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" COST="[null]"/> | |||
<RULE_FAILURES ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" COST="[null]"/> | |||
<project_measures characteristic_id="[null]" url="[null]" diff_value_1="[null]" diff_value_2="[null]" diff_value_3="[null]" |
@@ -54,17 +54,17 @@ | |||
<!-- old violations --> | |||
<RULE_FAILURES ID="1" SNAPSHOT_ID="1" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="2" SNAPSHOT_ID="2" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" POINTS="[null]"/> | |||
<!--<RULE_FAILURES ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" POINTS="[null]"/>--> | |||
<!--<RULE_FAILURES ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" POINTS="[null]"/>--> | |||
<RULE_FAILURES ID="1" SNAPSHOT_ID="1" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" COST="[null]"/> | |||
<RULE_FAILURES ID="2" SNAPSHOT_ID="2" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" COST="[null]"/> | |||
<!--<RULE_FAILURES ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" COST="[null]"/>--> | |||
<!--<RULE_FAILURES ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" COST="[null]"/>--> | |||
<!-- last violations --> | |||
<RULE_FAILURES ID="5" SNAPSHOT_ID="5" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" POINTS="[null]"/> | |||
<RULE_FAILURES ID="6" SNAPSHOT_ID="6" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" POINTS="[null]"/> | |||
<RULE_FAILURES ID="7" SNAPSHOT_ID="7" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" POINTS="[null]"/> | |||
<RULE_FAILURES ID="8" SNAPSHOT_ID="8" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" POINTS="[null]"/> | |||
<RULE_FAILURES ID="5" SNAPSHOT_ID="5" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" COST="[null]"/> | |||
<RULE_FAILURES ID="6" SNAPSHOT_ID="6" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" COST="[null]"/> | |||
<RULE_FAILURES ID="7" SNAPSHOT_ID="7" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" COST="[null]"/> | |||
<RULE_FAILURES ID="8" SNAPSHOT_ID="8" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" COST="[null]"/> | |||
<!-- old measures --> | |||
<project_measures characteristic_id="[null]" url="[null]" diff_value_1="[null]" diff_value_2="[null]" diff_value_3="[null]" |
@@ -54,17 +54,17 @@ | |||
<!-- old violations --> | |||
<RULE_FAILURES ID="1" SNAPSHOT_ID="1" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="2" SNAPSHOT_ID="2" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="1" SNAPSHOT_ID="1" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" COST="[null]"/> | |||
<RULE_FAILURES ID="2" SNAPSHOT_ID="2" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" COST="[null]"/> | |||
<RULE_FAILURES ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" COST="[null]"/> | |||
<RULE_FAILURES ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" COST="[null]"/> | |||
<!-- last violations --> | |||
<RULE_FAILURES ID="5" SNAPSHOT_ID="5" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="6" SNAPSHOT_ID="6" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="7" SNAPSHOT_ID="7" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="8" SNAPSHOT_ID="8" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="5" SNAPSHOT_ID="5" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" COST="[null]"/> | |||
<RULE_FAILURES ID="6" SNAPSHOT_ID="6" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" COST="[null]"/> | |||
<RULE_FAILURES ID="7" SNAPSHOT_ID="7" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" COST="[null]"/> | |||
<RULE_FAILURES ID="8" SNAPSHOT_ID="8" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" COST="[null]"/> | |||
<!-- old measures --> | |||
<project_measures characteristic_id="[null]" url="[null]" diff_value_1="[null]" diff_value_2="[null]" diff_value_3="[null]" |
@@ -54,17 +54,17 @@ | |||
<!-- valid violations --> | |||
<RULE_FAILURES ID="1" SNAPSHOT_ID="1" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="2" SNAPSHOT_ID="2" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="1" SNAPSHOT_ID="1" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" COST="[null]"/> | |||
<RULE_FAILURES ID="2" SNAPSHOT_ID="2" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" COST="[null]"/> | |||
<RULE_FAILURES ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" COST="[null]"/> | |||
<RULE_FAILURES ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" COST="[null]"/> | |||
<!-- unprocessed violations --> | |||
<!--<RULE_FAILURES ID="5" SNAPSHOT_ID="5" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" POINTS="[null]"/>--> | |||
<!--<RULE_FAILURES ID="6" SNAPSHOT_ID="6" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" POINTS="[null]"/>--> | |||
<!--<RULE_FAILURES ID="7" SNAPSHOT_ID="7" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" POINTS="[null]"/>--> | |||
<!--<RULE_FAILURES ID="8" SNAPSHOT_ID="8" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" POINTS="[null]"/>--> | |||
<!--<RULE_FAILURES ID="5" SNAPSHOT_ID="5" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" COST="[null]"/>--> | |||
<!--<RULE_FAILURES ID="6" SNAPSHOT_ID="6" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" COST="[null]"/>--> | |||
<!--<RULE_FAILURES ID="7" SNAPSHOT_ID="7" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" COST="[null]"/>--> | |||
<!--<RULE_FAILURES ID="8" SNAPSHOT_ID="8" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" COST="[null]"/>--> | |||
<!-- valid measures --> | |||
<project_measures characteristic_id="[null]" url="[null]" diff_value_1="[null]" diff_value_2="[null]" diff_value_3="[null]" |
@@ -54,17 +54,17 @@ | |||
<!-- valid violations --> | |||
<RULE_FAILURES ID="1" SNAPSHOT_ID="1" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="2" SNAPSHOT_ID="2" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="1" SNAPSHOT_ID="1" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" COST="[null]"/> | |||
<RULE_FAILURES ID="2" SNAPSHOT_ID="2" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" COST="[null]"/> | |||
<RULE_FAILURES ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" COST="[null]"/> | |||
<RULE_FAILURES ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" COST="[null]"/> | |||
<!-- unprocessed violations --> | |||
<RULE_FAILURES ID="5" SNAPSHOT_ID="5" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="6" SNAPSHOT_ID="6" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="7" SNAPSHOT_ID="7" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="8" SNAPSHOT_ID="8" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="5" SNAPSHOT_ID="5" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" COST="[null]"/> | |||
<RULE_FAILURES ID="6" SNAPSHOT_ID="6" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" COST="[null]"/> | |||
<RULE_FAILURES ID="7" SNAPSHOT_ID="7" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" COST="[null]"/> | |||
<RULE_FAILURES ID="8" SNAPSHOT_ID="8" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" COST="[null]"/> | |||
<!-- valid measures --> | |||
<project_measures characteristic_id="[null]" url="[null]" diff_value_1="[null]" diff_value_2="[null]" diff_value_3="[null]" |
@@ -56,7 +56,7 @@ public class ViolationsDao { | |||
violation.setLineId(model.getLine()); | |||
violation.setMessage(model.getMessage()); | |||
violation.setPriority(model.getPriority()); | |||
violation.setPoints(model.getPoints()); | |||
violation.setCost(model.getCost()); | |||
violations.add(violation); | |||
} | |||
return violations; | |||
@@ -90,7 +90,7 @@ public class ViolationsDao { | |||
violation.setPriority(activeRule.getPriority()); | |||
model.setLine(violation.getLineId()); | |||
model.setMessage(violation.getMessage()); | |||
model.setPoints(violation.getPoints()); | |||
model.setCost(violation.getCost()); | |||
model.setSnapshotId(snapshot.getId()); | |||
return model; |
@@ -57,13 +57,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 ID="1" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" POINTS="[null]"/> | |||
<RULE_FAILURES ID="2" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" POINTS="[null]"/> | |||
<RULE_FAILURES ID="3" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" POINTS="[null]"/> | |||
<RULE_FAILURES ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" POINTS="[null]"/> | |||
<RULE_FAILURES ID="1" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" COST="[null]"/> | |||
<RULE_FAILURES ID="2" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" COST="[null]"/> | |||
<RULE_FAILURES ID="3" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" COST="[null]"/> | |||
<RULE_FAILURES ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" COST="[null]"/> | |||
<RULE_FAILURES ID="5" SNAPSHOT_ID="5" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg5" POINTS="[null]"/> | |||
<RULE_FAILURES ID="6" SNAPSHOT_ID="5" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg6" POINTS="[null]"/> | |||
<RULE_FAILURES ID="5" SNAPSHOT_ID="5" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg5" COST="[null]"/> | |||
<RULE_FAILURES 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]" diff_value_1="[null]" diff_value_2="[null]" diff_value_3="[null]" |
@@ -58,13 +58,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 ID="1" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" POINTS="[null]"/> | |||
<RULE_FAILURES ID="2" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" POINTS="[null]"/> | |||
<RULE_FAILURES ID="3" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" POINTS="[null]"/> | |||
<RULE_FAILURES ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" POINTS="[null]"/> | |||
<RULE_FAILURES ID="1" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" COST="[null]"/> | |||
<RULE_FAILURES ID="2" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" COST="[null]"/> | |||
<RULE_FAILURES ID="3" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" COST="[null]"/> | |||
<RULE_FAILURES ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" COST="[null]"/> | |||
<RULE_FAILURES ID="5" SNAPSHOT_ID="5" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg5" POINTS="[null]"/> | |||
<RULE_FAILURES ID="6" SNAPSHOT_ID="5" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg6" POINTS="[null]"/> | |||
<RULE_FAILURES ID="5" SNAPSHOT_ID="5" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg5" COST="[null]"/> | |||
<RULE_FAILURES 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]" diff_value_1="[null]" diff_value_2="[null]" diff_value_3="[null]" |
@@ -56,10 +56,10 @@ | |||
<!--<SNAPSHOT_SOURCES ID="2" SNAPSHOT_ID="4" DATA="some sources"/>--> | |||
<RULE_FAILURES ID="1" SNAPSHOT_ID="1" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="2" SNAPSHOT_ID="2" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" POINTS="[null]"/> | |||
<!--<RULE_FAILURES ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" POINTS="[null]"/>--> | |||
<!--<RULE_FAILURES ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" POINTS="[null]"/>--> | |||
<RULE_FAILURES ID="1" SNAPSHOT_ID="1" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" COST="[null]"/> | |||
<RULE_FAILURES ID="2" SNAPSHOT_ID="2" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" COST="[null]"/> | |||
<!--<RULE_FAILURES ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" COST="[null]"/>--> | |||
<!--<RULE_FAILURES ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" COST="[null]"/>--> | |||
<project_measures characteristic_id="[null]" url="[null]" diff_value_1="[null]" diff_value_2="[null]" diff_value_3="[null]" |
@@ -56,10 +56,10 @@ | |||
<SNAPSHOT_SOURCES ID="2" SNAPSHOT_ID="4" DATA="some sources"/> | |||
<RULE_FAILURES ID="1" SNAPSHOT_ID="1" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="2" SNAPSHOT_ID="2" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" POINTS="[null]"/> | |||
<RULE_FAILURES ID="1" SNAPSHOT_ID="1" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" COST="[null]"/> | |||
<RULE_FAILURES ID="2" SNAPSHOT_ID="2" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" COST="[null]"/> | |||
<RULE_FAILURES ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" COST="[null]"/> | |||
<RULE_FAILURES ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" COST="[null]"/> | |||
<project_measures characteristic_id="[null]" url="[null]" diff_value_1="[null]" diff_value_2="[null]" diff_value_3="[null]" |
@@ -52,8 +52,8 @@ public class RuleFailureModel extends BaseIdentifiable { | |||
@Column(name = "line", updatable = true, nullable = true) | |||
private Integer line; | |||
@Column(name = "points", updatable = true, nullable = true) | |||
private Double points; | |||
@Column(name = "cost", updatable = true, nullable = true) | |||
private Double cost; | |||
public RuleFailureModel() { | |||
} | |||
@@ -112,12 +112,12 @@ public class RuleFailureModel extends BaseIdentifiable { | |||
this.line = line; | |||
} | |||
public Double getPoints() { | |||
return points; | |||
public Double getCost() { | |||
return cost; | |||
} | |||
public RuleFailureModel setPoints(Double d) { | |||
this.points = d; | |||
public RuleFailureModel setCost(Double d) { | |||
this.cost = d; | |||
return this; | |||
} | |||
@@ -34,7 +34,7 @@ public class Violation { | |||
private String message; | |||
private RulePriority priority; | |||
private Integer lineId; | |||
private Double points; | |||
private Double cost; | |||
/** | |||
* Creates of a violation from a rule. Will need to define the resource later on | |||
@@ -124,12 +124,22 @@ public class Violation { | |||
return this; | |||
} | |||
public Double getPoints() { | |||
return points; | |||
/** | |||
* @see <code>setCost()</code> | |||
*/ | |||
public Double getCost() { | |||
return cost; | |||
} | |||
public Violation setPoints(Double d) { | |||
this.points = d; | |||
/** | |||
* The cost to fix a violation can't be precisely computed without this information. | |||
* Let's take the following example : a rule forbids to have methods whose complexity is greater than 10. Without this field "cost", | |||
* the same violation is created with a method whose complexity is 15 and a method whose complexity is 100. | |||
* If the cost to fix one point of complexity is 0.05h, then 15mn is necessary to fix the method whose complexity is 15, | |||
* and 3h5mn is required to fix the method whose complexity is 100. | |||
*/ | |||
public Violation setCost(Double d) { | |||
this.cost = d; | |||
return this; | |||
} | |||
@@ -17,10 +17,10 @@ | |||
# License along with Sonar; if not, write to the Free Software | |||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 | |||
# | |||
class AddRuleFailuresPoints < ActiveRecord::Migration | |||
class AddRuleFailuresCost < ActiveRecord::Migration | |||
def self.up | |||
add_column 'rule_failures', 'points', :decimal, :null => true, :precision => 30, :scale => 20 | |||
add_column 'rule_failures', 'cost', :decimal, :null => true, :precision => 30, :scale => 20 | |||
end | |||
end |