@abaplint/core 2.79.2 → 2.79.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/abaplint.d.ts +12 -1
- package/build/src/issue.js +3 -0
- package/build/src/registry.js +1 -1
- package/build/src/rules/check_syntax.js +13 -1
- package/package.json +2 -2
package/build/abaplint.d.ts
CHANGED
|
@@ -2550,6 +2550,16 @@ export declare interface IInterfaceDefinition extends Identifier {
|
|
|
2550
2550
|
getImplementing(): readonly IImplementing[];
|
|
2551
2551
|
}
|
|
2552
2552
|
|
|
2553
|
+
declare interface IIssueData {
|
|
2554
|
+
filename: string;
|
|
2555
|
+
message: string;
|
|
2556
|
+
key: string;
|
|
2557
|
+
start: Position;
|
|
2558
|
+
end: Position;
|
|
2559
|
+
severity: Severity;
|
|
2560
|
+
fix?: IEdit;
|
|
2561
|
+
}
|
|
2562
|
+
|
|
2553
2563
|
declare interface IKeyword {
|
|
2554
2564
|
word: string;
|
|
2555
2565
|
source: string[];
|
|
@@ -3090,7 +3100,8 @@ export declare class Issue {
|
|
|
3090
3100
|
static atRange(file: IFile, start: Position, end: Position, message: string, key: string, severity?: Severity, fix?: IEdit): Issue;
|
|
3091
3101
|
static atToken(file: IFile, token: Token, message: string, key: string, severity?: Severity, fix?: IEdit): Issue;
|
|
3092
3102
|
static atIdentifier(identifier: Identifier, message: string, key: string, severity?: Severity, fix?: IEdit): Issue;
|
|
3093
|
-
|
|
3103
|
+
constructor(data: IIssueData);
|
|
3104
|
+
getData(): IIssueData;
|
|
3094
3105
|
getMessage(): string;
|
|
3095
3106
|
getKey(): string;
|
|
3096
3107
|
getStart(): Position;
|
package/build/src/issue.js
CHANGED
package/build/src/registry.js
CHANGED
|
@@ -4,7 +4,9 @@ exports.CheckSyntax = exports.CheckSyntaxConf = void 0;
|
|
|
4
4
|
const syntax_1 = require("../abap/5_syntax/syntax");
|
|
5
5
|
const _basic_rule_config_1 = require("./_basic_rule_config");
|
|
6
6
|
const _abap_object_1 = require("../objects/_abap_object");
|
|
7
|
+
const issue_1 = require("../issue");
|
|
7
8
|
const _irule_1 = require("./_irule");
|
|
9
|
+
const severity_1 = require("../severity");
|
|
8
10
|
class CheckSyntaxConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
9
11
|
}
|
|
10
12
|
exports.CheckSyntaxConf = CheckSyntaxConf;
|
|
@@ -34,7 +36,17 @@ class CheckSyntax {
|
|
|
34
36
|
if (!(obj instanceof _abap_object_1.ABAPObject)) {
|
|
35
37
|
return [];
|
|
36
38
|
}
|
|
37
|
-
|
|
39
|
+
const issues = new syntax_1.SyntaxLogic(this.reg, obj).run().issues;
|
|
40
|
+
// the syntax logic does not know the rule severity when its run
|
|
41
|
+
if (this.conf.severity
|
|
42
|
+
&& this.conf.severity !== severity_1.Severity.Error) {
|
|
43
|
+
issues.forEach((value, index) => {
|
|
44
|
+
const data = value.getData();
|
|
45
|
+
data.severity = this.conf.severity;
|
|
46
|
+
issues[index] = new issue_1.Issue(data);
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
return issues;
|
|
38
50
|
}
|
|
39
51
|
}
|
|
40
52
|
exports.CheckSyntax = CheckSyntax;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.79.
|
|
3
|
+
"version": "2.79.3",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@microsoft/api-extractor": "^7.18.9",
|
|
58
58
|
"@types/chai": "^4.2.21",
|
|
59
59
|
"@types/mocha": "^9.0.0",
|
|
60
|
-
"@types/node": "^16.9.
|
|
60
|
+
"@types/node": "^16.9.2",
|
|
61
61
|
"chai": "^4.3.4",
|
|
62
62
|
"eslint": "^7.32.0",
|
|
63
63
|
"madge": "^5.0.1",
|