private Long reviewId;
private String ruleRepositoryKey;
private String ruleKey;
+ private String ruleName;
private Long line;
private boolean switchedOff = false;
private boolean manual = false;
return this;
}
+ public String getRuleName() {
+ return ruleName;
+ }
+
+ public DefaultReview setRuleName(String s) {
+ this.ruleName = s;
+ return this;
+ }
+
public Long getLine() {
return line;
}
clone.setReviewId(reviewId);
clone.setRuleKey(ruleKey);
clone.setRuleRepositoryKey(ruleRepositoryKey);
+ clone.setRuleName(ruleName);
clone.setSeverity(severity);
clone.setStatus(status);
clone.setSwitchedOff(switchedOff);
public class ImmutableReview implements Review {
private Long violationId;
private Long reviewId;
- private Long ruleId;
private String ruleRepositoryKey;
private String ruleKey;
+ private String ruleName;
private Long line;
private boolean switchedOff = false;
private boolean manual = false;
this.reviewId = reviewId;
}
- public Long getRuleId() {
- return ruleId;
+ public String getRuleName() {
+ return ruleName;
}
- void setRuleId(Long ruleId) {
- this.ruleId = ruleId;
+ void setRuleName(String s) {
+ this.ruleName = s;
}
public String getRuleRepositoryKey() {
String getRuleKey();
+ String getRuleName();
+
boolean isSwitchedOff();
String getMessage();
name.downcase<=>other.name.downcase
end
- def name
- @l10n_name ||=
+ def name(l10n=true)
+ if l10n
+ @l10n_name ||=
begin
result = Java::OrgSonarServerUi::JRubyFacade.getInstance().getRuleName(I18n.locale, repository_key, plugin_rule_key)
result = read_attribute(:name) unless result
result
end
+ else
+ read_attribute(:name)
+ end
end
def name=(value)
java_review.setSeverity(violation.severity.to_s)
java_review.setRuleKey(violation.rule.plugin_rule_key)
java_review.setRuleRepositoryKey(violation.rule.repository_key)
+ java_review.setRuleName(violation.rule.name(false)) # rule name is not localized
java_review.setSwitchedOff(violation.switched_off||false)
java_review.setMessage(violation.message)
java_review.setLine(violation.line)