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 11214x 11214x 11214x 11214x 33489x 33489x 33489x 33489x 33489x 33489x 33489x 33489x 33489x 33489x 11214x 11214x 2x 2x 11214x 11214x 10730x 10730x 11214x 11214x 227x 227x 11214x 11214x 227x 227x 11214x 11214x 293x 275x 275x 18x 293x 2x 2x 2x 2x 2x 2x 2x 2x 2x 16x 16x 16x 11214x | 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 []; } } |