@abaplint/core 2.82.12 → 2.82.13
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
CHANGED
|
@@ -3150,7 +3150,7 @@ export declare class Issue {
|
|
|
3150
3150
|
static atRow(file: IFile, row: number, message: string, key: string, severity?: Severity): Issue;
|
|
3151
3151
|
static atStatement(file: IFile, statement: StatementNode, message: string, key: string, severity?: Severity, fix?: IEdit): Issue;
|
|
3152
3152
|
static atPosition(file: IFile, start: Position, message: string, key: string, severity?: Severity, fix?: IEdit): Issue;
|
|
3153
|
-
static atRowRange(file: IFile, row: number, startCol: number, endCol: number, message: string, key: string, severity?: Severity): Issue;
|
|
3153
|
+
static atRowRange(file: IFile, row: number, startCol: number, endCol: number, message: string, key: string, severity?: Severity, fix?: IEdit): Issue;
|
|
3154
3154
|
static atRange(file: IFile, start: Position, end: Position, message: string, key: string, severity?: Severity, fix?: IEdit): Issue;
|
|
3155
3155
|
static atToken(file: IFile, token: Token, message: string, key: string, severity?: Severity, fix?: IEdit): Issue;
|
|
3156
3156
|
static atIdentifier(identifier: Identifier, message: string, key: string, severity?: Severity, fix?: IEdit): Issue;
|
package/build/src/issue.js
CHANGED
|
@@ -48,7 +48,7 @@ class Issue {
|
|
|
48
48
|
severity,
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
-
static atRowRange(file, row, startCol, endCol, message, key, severity) {
|
|
51
|
+
static atRowRange(file, row, startCol, endCol, message, key, severity, fix) {
|
|
52
52
|
const start = new position_1.Position(row, startCol);
|
|
53
53
|
const end = new position_1.Position(row, endCol);
|
|
54
54
|
severity = severity !== null && severity !== void 0 ? severity : severity_1.Severity.Error;
|
|
@@ -58,6 +58,7 @@ class Issue {
|
|
|
58
58
|
key,
|
|
59
59
|
start,
|
|
60
60
|
end,
|
|
61
|
+
fix,
|
|
61
62
|
severity,
|
|
62
63
|
});
|
|
63
64
|
}
|
package/build/src/registry.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SpaceBeforeColon = exports.SpaceBeforeColonConf = void 0;
|
|
4
|
+
const position_1 = require("../position");
|
|
5
|
+
const edit_helper_1 = require("../edit_helper");
|
|
4
6
|
const issue_1 = require("../issue");
|
|
5
7
|
const _abap_rule_1 = require("./_abap_rule");
|
|
6
8
|
const _basic_rule_config_1 = require("./_basic_rule_config");
|
|
@@ -19,7 +21,7 @@ class SpaceBeforeColon extends _abap_rule_1.ABAPRule {
|
|
|
19
21
|
title: "Space before colon",
|
|
20
22
|
shortDescription: `Checks that there are no spaces in front of colons in chained statements.`,
|
|
21
23
|
extendedInformation: `https://docs.abapopenchecks.org/checks/80/`,
|
|
22
|
-
tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
|
|
24
|
+
tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
|
|
23
25
|
badExample: `DATA : foo TYPE string.`,
|
|
24
26
|
goodExample: `DATA: foo TYPE string.`,
|
|
25
27
|
};
|
|
@@ -44,8 +46,10 @@ class SpaceBeforeColon extends _abap_rule_1.ABAPRule {
|
|
|
44
46
|
else if (token.getStr() === ":"
|
|
45
47
|
&& prev.getRow() === token.getRow()
|
|
46
48
|
&& prev.getCol() + prev.getStr().length < token.getCol()) {
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
+
const start = new position_1.Position(token.getRow(), prev.getEnd().getCol());
|
|
50
|
+
const end = new position_1.Position(token.getRow(), token.getStart().getCol());
|
|
51
|
+
const fix = edit_helper_1.EditHelper.deleteRange(file, start, end);
|
|
52
|
+
const issue = issue_1.Issue.atRowRange(file, start.getRow(), start.getCol(), end.getCol(), this.getMessage(), this.getMetadata().key, this.conf.severity, fix);
|
|
49
53
|
issues.push(issue);
|
|
50
54
|
}
|
|
51
55
|
prev = token;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.82.
|
|
3
|
+
"version": "2.82.13",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"homepage": "https://abaplint.org",
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@microsoft/api-extractor": "^7.18.
|
|
48
|
+
"@microsoft/api-extractor": "^7.18.20",
|
|
49
49
|
"@types/chai": "^4.2.22",
|
|
50
50
|
"@types/mocha": "^9.0.0",
|
|
51
51
|
"@types/node": "^16.11.11",
|