<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]"
<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]"
<!--<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]"
<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]"
<!-- 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]"
<!-- 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]"
<!-- 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]"
<!-- 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]"
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;
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;
<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]"
<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]"
<!--<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]"
<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]"
@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() {
}
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;
}
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
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;
}
--- /dev/null
+#
+# Sonar, entreprise quality control tool.
+# Copyright (C) 2009 SonarSource SA
+# mailto:contact AT sonarsource DOT com
+#
+# Sonar is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 3 of the License, or (at your option) any later version.
+#
+# Sonar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with Sonar; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
+#
+class AddRuleFailuresCost < ActiveRecord::Migration
+
+ def self.up
+ add_column 'rule_failures', 'cost', :decimal, :null => true, :precision => 30, :scale => 20
+ end
+
+end
+++ /dev/null
-#
-# Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
-# mailto:contact AT sonarsource DOT com
-#
-# Sonar is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 3 of the License, or (at your option) any later version.
-#
-# Sonar is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with Sonar; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
-#
-class AddRuleFailuresPoints < ActiveRecord::Migration
-
- def self.up
- add_column 'rule_failures', 'points', :decimal, :null => true, :precision => 30, :scale => 20
- end
-
-end