/** * @deprecated since 2.5. See SONAR-2007. */ @Deprecated public static RuleMeasure createForCategory(Metric metric, Integer category, @Nullable Double value) { return new RuleMeasure(metric, (RuleKey) null, null, category).setValue(value); } }
@VisibleForTesting void saveRuleMeasure(DecoratorContext context, org.sonar.api.rules.Rule rule, Double value, boolean inMemory) { // we need the value on projects (root or module) even if value==0 in order to display correctly the SQALE history chart (see SQALE-122) // BUT we don't want to save zero-values for non top-characteristics (see SQALE-147) if (value > 0.0) { RuleMeasure measure = new RuleMeasure(CoreMetrics.TECHNICAL_DEBT, rule, null, null); saveMeasure(context, measure, value, inMemory); } }
/** * @deprecated since 4.4 use {@link #createForRule(Metric, RuleKey, Double)} */ @Deprecated public static RuleMeasure createForRule(Metric metric, Rule rule, @Nullable Double value) { return new RuleMeasure(metric, rule, null, null).setValue(value); }
public static RuleMeasure createForPriority(Metric metric, RulePriority priority, @Nullable Double value) { return new RuleMeasure(metric, (RuleKey) null, priority, null).setValue(value); }
public static RuleMeasure createForRule(Metric metric, RuleKey ruleKey, @Nullable Double value) { return new RuleMeasure(metric, ruleKey, null, null).setValue(value); }