Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 11350x 11350x 11350x 11350x 33897x 33897x 33897x 33897x 33897x 33897x 33897x 33897x 33897x 33897x 11350x 11350x 2x 2x 11350x 11350x 10854x 10854x 11350x 11350x 233x 233x 11350x 11350x 233x 233x 11350x 11350x 302x 282x 282x 20x 302x 2x 2x 2x 2x 2x 2x 2x 2x 2x 18x 18x 18x 11350x | import {Issue} from "../issue";
import {BasicRuleConfig} from "./_basic_rule_config";
import {IRegistry} from "../_iregistry";
import {Table, EnhancementCategory} from "../objects";
import {IRule, IRuleMetadata} from "./_irule";
import {IObject} from "../objects/_iobject";
import {Position} from "../position";
export class TABLEnhancementCategoryConf extends BasicRuleConfig {
}
export class TABLEnhancementCategory implements IRule {
private conf = new TABLEnhancementCategoryConf();
public getMetadata(): IRuleMetadata {
return {
key: "tabl_enhancement_category",
title: "TABL enhancement category must be set",
shortDescription: `Checks that tables do not have the enhancement category 'not classified'.`,
extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
You may use standard report RS_DDIC_CLASSIFICATION_FINAL for adjustment.`,
tags: [],
};
}
private getDescription(name: string): string {
return "TABL enhancement category not classified in " + name;
}
public getConfig() {
return this.conf;
}
public setConfig(conf: TABLEnhancementCategoryConf) {
this.conf = conf;
}
public initialize(_reg: IRegistry) {
return this;
}
public run(obj: IObject): Issue[] {
if (!(obj instanceof Table)) {
return [];
}
if (obj.getEnhancementCategory() === EnhancementCategory.NotClassified) {
const position = new Position(1, 1);
const issue = Issue.atPosition(
obj.getFiles()[0],
position,
this.getDescription(obj.getName()),
this.getMetadata().key,
this.conf.severity);
return [issue];
}
return [];
}
}
|