renderRemediation = () => {
const { ruleDetails } = this.props;
- if (!ruleDetails.debtRemFnType) {
+ if (!ruleDetails.remFnType) {
return null;
}
return (
<Tooltip overlay={translate('coding_rules.remediation_function')}>
<li className="coding-rules-detail-property" data-meta="remediation-function">
- {translate('coding_rules.remediation_function', ruleDetails.debtRemFnType)}
+ {translate('coding_rules.remediation_function', ruleDetails.remFnType)}
{':'}
- {ruleDetails.debtRemFnOffset !== undefined && ` ${ruleDetails.debtRemFnOffset}`}
- {ruleDetails.debtRemFnCoeff !== undefined && ` +${ruleDetails.debtRemFnCoeff}`}
- {ruleDetails.effortToFixDescription !== undefined &&
- ` ${ruleDetails.effortToFixDescription}`}
+ {ruleDetails.remFnBaseEffort !== undefined && ` ${ruleDetails.remFnBaseEffort}`}
+ {ruleDetails.remFnGapMultiplier !== undefined && ` +${ruleDetails.remFnGapMultiplier}`}
+ {ruleDetails.gapDescription !== undefined && ` ${ruleDetails.gapDescription}`}
</li>
</Tooltip>
);
langName: 'Java',
scope: 'MAIN',
type: 'CODE_SMELL',
+ remFnType: 'LINEAR_OFFSET',
+ remFnBaseEffort: '1min',
+ remFnGapMultiplier: '2min',
+ gapDescription: 'per test',
};
const EXTERNAL_RULE: RuleDetails = {
ruleDetails={
{
"createdAt": "2014-12-16T17:26:54+0100",
- "debtOverloaded": false,
- "debtRemFnOffset": "5min",
- "debtRemFnType": "CONSTANT_ISSUE",
- "defaultDebtRemFnOffset": "5min",
- "defaultDebtRemFnType": "CONSTANT_ISSUE",
"defaultRemFnBaseEffort": "5min",
"defaultRemFnType": "CONSTANT_ISSUE",
"descriptionSections": [
ruleDetails={
{
"createdAt": "2014-12-16T17:26:54+0100",
- "debtOverloaded": false,
- "debtRemFnOffset": "5min",
- "debtRemFnType": "CONSTANT_ISSUE",
- "defaultDebtRemFnOffset": "5min",
- "defaultDebtRemFnType": "CONSTANT_ISSUE",
"defaultRemFnBaseEffort": "5min",
"defaultRemFnType": "CONSTANT_ISSUE",
"descriptionSections": [
ruleDetails={
{
"createdAt": "2014-12-16T17:26:54+0100",
- "debtOverloaded": false,
- "debtRemFnOffset": "5min",
- "debtRemFnType": "CONSTANT_ISSUE",
- "defaultDebtRemFnOffset": "5min",
- "defaultDebtRemFnType": "CONSTANT_ISSUE",
"defaultRemFnBaseEffort": "5min",
"defaultRemFnType": "CONSTANT_ISSUE",
"descriptionSections": [
ruleDetails={
{
"createdAt": "2014-12-16T17:26:54+0100",
- "debtOverloaded": false,
- "debtRemFnOffset": "5min",
- "debtRemFnType": "CONSTANT_ISSUE",
- "defaultDebtRemFnOffset": "5min",
- "defaultDebtRemFnType": "CONSTANT_ISSUE",
"defaultRemFnBaseEffort": "5min",
"defaultRemFnType": "CONSTANT_ISSUE",
"descriptionSections": [
{
"createdAt": "2013-07-26T09:40:51+0200",
"descriptionSections": [],
+ "gapDescription": "per test",
"key": "squid:S1133",
"lang": "java",
"langName": "Java",
"name": "Deprecated code should be removed",
+ "remFnBaseEffort": "1min",
+ "remFnGapMultiplier": "2min",
+ "remFnType": "LINEAR_OFFSET",
"repo": "squid",
"scope": "MAIN",
"severity": "INFO",
date="2013-07-26T09:40:51+0200"
/>
</li>
+ <Tooltip
+ overlay="coding_rules.remediation_function"
+ >
+ <li
+ className="coding-rules-detail-property"
+ data-meta="remediation-function"
+ >
+ coding_rules.remediation_function.LINEAR_OFFSET
+ :
+ 1min
+ +2min
+ per test
+ </li>
+ </Tooltip>
</ul>
</div>
`;
lang: 'java',
langName: 'Java',
params: [],
- defaultDebtRemFnType: 'CONSTANT_ISSUE',
- defaultDebtRemFnOffset: '5min',
- debtOverloaded: false,
- debtRemFnType: 'CONSTANT_ISSUE',
- debtRemFnOffset: '5min',
defaultRemFnType: 'CONSTANT_ISSUE',
defaultRemFnBaseEffort: '5min',
remFnType: 'CONSTANT_ISSUE',
export interface RuleDetails extends Rule {
createdAt: string;
- debtOverloaded?: boolean;
- debtRemFnCoeff?: string;
- debtRemFnOffset?: string;
- debtRemFnType?: string;
- defaultDebtRemFnOffset?: string;
- defaultDebtRemFnType?: string;
defaultRemFnBaseEffort?: string;
defaultRemFnType?: string;
descriptionSections?: RuleDescriptionSection[];
educationPrinciples?: string[];
- effortToFixDescription?: string;
+ gapDescription?: string;
htmlDesc?: string;
htmlNote?: string;
internalKey?: string;
mdDesc?: string;
mdNote?: string;
remFnBaseEffort?: string;
+ remFnGapMultiplier?: string;
remFnOverloaded?: boolean;
remFnType?: string;
repo: string;