public static enum DebtRemediationFunction.Type extends Enum<DebtRemediationFunction.Type>
Enum Constant and Description |
---|
CONSTANT_ISSUE
The cost to fix all the issues of the rule is the same whatever the number of issues
of this rule in the file.
|
LINEAR
The cost to fix an issue of this type depends on the magnitude of the issue.
|
LINEAR_OFFSET
It takes a certain amount of time to deal with an issue of this type (this is the gap multiplier).
|
Modifier and Type | Method and Description |
---|---|
boolean |
usesBaseEffort() |
boolean |
usesCoefficient()
Deprecated.
since 5.5, replaced by
usesGapMultiplier() |
boolean |
usesGapMultiplier() |
boolean |
usesOffset()
Deprecated.
since 5.5, replaced by
usesBaseEffort() |
static DebtRemediationFunction.Type |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DebtRemediationFunction.Type[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DebtRemediationFunction.Type LINEAR
public static final DebtRemediationFunction.Type LINEAR_OFFSET
Total remediation cost = base effort + (number of noncompliance x gap multiplier)
The rule must provide the "gap" value when raising an issue. Let’s take as a example the “Paragraphs should not be too complex” rule. If you set the rule threshold to 20, and you have a paragraph with a complexity of 27, you have 7 points of complexity to remove. Internally, this is called the Gap. In that case, if you use the LINEAR_OFFSET configuration with an base effort of 4h and a remediation cost of 1mn, the effort for this issue related to a too-complex block of code will be: (7 complexity points x 1min) + 4h = 4h and 7mn
public static final DebtRemediationFunction.Type CONSTANT_ISSUE
public static DebtRemediationFunction.Type[] values()
for (DebtRemediationFunction.Type c : DebtRemediationFunction.Type.values()) System.out.println(c);
public static DebtRemediationFunction.Type valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null@Deprecated public boolean usesCoefficient()
usesGapMultiplier()
public boolean usesGapMultiplier()
@Deprecated public boolean usesOffset()
usesBaseEffort()
public boolean usesBaseEffort()
Copyright © 2009–2018 SonarSource. All rights reserved.