@abaplint/cli 2.106.2 → 2.106.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/cli.js +35 -23
- package/package.json +7 -7
package/build/cli.js
CHANGED
|
@@ -9233,10 +9233,10 @@ class TypeTable extends combi_1.Expression {
|
|
|
9233
9233
|
const header = "WITH HEADER LINE";
|
|
9234
9234
|
const initial = (0, combi_1.seq)("INITIAL SIZE", _1.Constant);
|
|
9235
9235
|
const generic = (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.alt)("STANDARD", "HASHED", "INDEX", "SORTED", "ANY")), "TABLE");
|
|
9236
|
-
const normal1 = (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.alt)("STANDARD", "HASHED", "INDEX", "SORTED", "ANY")), "TABLE OF", (0, combi_1.
|
|
9236
|
+
const normal1 = (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.alt)("STANDARD", "HASHED", "INDEX", "SORTED", "ANY")), "TABLE OF", (0, combi_1.optPrio)("REF TO"), _1.TypeName);
|
|
9237
9237
|
const likeType = (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.alt)("STANDARD", "HASHED", "INDEX", "SORTED", "ANY")), "TABLE OF", (0, combi_1.optPrio)("REF TO"), (0, combi_1.opt)(field_chain_1.FieldChain), (0, combi_1.opt)((0, combi_1.per)(header, initial, (0, combi_1.plusPrio)(type_table_key_1.TypeTableKey))));
|
|
9238
|
-
const rangeType = (0, combi_1.seq)("RANGE OF", _1.TypeName, (0, combi_1.
|
|
9239
|
-
const rangeLike = (0, combi_1.seq)("RANGE OF", _1.SimpleFieldChain, (0, combi_1.
|
|
9238
|
+
const rangeType = (0, combi_1.seq)("RANGE OF", _1.TypeName, (0, combi_1.optPrio)(header), (0, combi_1.optPrio)(initial));
|
|
9239
|
+
const rangeLike = (0, combi_1.seq)("RANGE OF", _1.SimpleFieldChain, (0, combi_1.optPrio)(header), (0, combi_1.optPrio)(initial));
|
|
9240
9240
|
// a maximum of 15 secondary table keys can be defined
|
|
9241
9241
|
// "WITH" is not allowed as a field name in keys
|
|
9242
9242
|
const typetable = (0, combi_1.alt)(generic, (0, combi_1.seq)(normal1, (0, combi_1.alt)((0, combi_1.opt)((0, combi_1.per)(header, initial, (0, combi_1.plusPrio)(type_table_key_1.TypeTableKey))), (0, combi_1.seq)((0, combi_1.plus)(type_table_key_1.TypeTableKey), (0, combi_1.optPrio)(initial)))));
|
|
@@ -51381,7 +51381,7 @@ class Registry {
|
|
|
51381
51381
|
}
|
|
51382
51382
|
static abaplintVersion() {
|
|
51383
51383
|
// magic, see build script "version.sh"
|
|
51384
|
-
return "2.106.
|
|
51384
|
+
return "2.106.3";
|
|
51385
51385
|
}
|
|
51386
51386
|
getDDICReferences() {
|
|
51387
51387
|
return this.ddicReferences;
|
|
@@ -65091,17 +65091,17 @@ class NoPrefixesConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
|
65091
65091
|
constructor() {
|
|
65092
65092
|
super(...arguments);
|
|
65093
65093
|
/** DATA, CLASS-DATA, DATA BEGIN OF, CLASS-DATA BEGIN OF, FINAL(), DATA(), case insensitive regex */
|
|
65094
|
-
this.data = "^[
|
|
65094
|
+
this.data = "^[LGM].?_";
|
|
65095
65095
|
/** STATICS, STATICS BEGIN OF, case insensitive regex */
|
|
65096
|
-
this.statics = "";
|
|
65096
|
+
this.statics = "^S.?_";
|
|
65097
65097
|
/** FIELD-SYMBOLS and inline FIELD-SYMBOLS(), case insensitive regex */
|
|
65098
|
-
this.fieldSymbols = "^<
|
|
65098
|
+
this.fieldSymbols = "^<[LGM].?_";
|
|
65099
65099
|
/** CONSTANTS, CONSTANTS BEGIN OF, case insensitive regex */
|
|
65100
|
-
this.constants = "^[
|
|
65100
|
+
this.constants = "^[LGM]?C.?_";
|
|
65101
65101
|
/** TYPES, ENUM, MESH, case insensitive regex */
|
|
65102
|
-
this.types = "^
|
|
65102
|
+
this.types = "^TY_";
|
|
65103
65103
|
/** importing, exporting, returning and changing parameters, case insensitive regex */
|
|
65104
|
-
this.methodParameters = "^[
|
|
65104
|
+
this.methodParameters = "^[ICER].?_";
|
|
65105
65105
|
// todo, public localClass: string = "";
|
|
65106
65106
|
// todo, public localInterface: string = "";
|
|
65107
65107
|
// todo, public functionModuleParameters: string = "";
|
|
@@ -72720,16 +72720,15 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
72720
72720
|
exports.WhitespaceEnd = exports.WhitespaceEndConf = void 0;
|
|
72721
72721
|
const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
|
|
72722
72722
|
const position_1 = __webpack_require__(/*! ../position */ "./node_modules/@abaplint/core/build/src/position.js");
|
|
72723
|
-
const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@abaplint/core/build/src/rules/_abap_rule.js");
|
|
72724
72723
|
const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
|
|
72725
72724
|
const edit_helper_1 = __webpack_require__(/*! ../edit_helper */ "./node_modules/@abaplint/core/build/src/edit_helper.js");
|
|
72726
72725
|
const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
|
|
72726
|
+
const objects_1 = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
|
|
72727
72727
|
class WhitespaceEndConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
72728
72728
|
}
|
|
72729
72729
|
exports.WhitespaceEndConf = WhitespaceEndConf;
|
|
72730
|
-
class WhitespaceEnd
|
|
72730
|
+
class WhitespaceEnd {
|
|
72731
72731
|
constructor() {
|
|
72732
|
-
super(...arguments);
|
|
72733
72732
|
this.conf = new WhitespaceEndConf();
|
|
72734
72733
|
}
|
|
72735
72734
|
getMetadata() {
|
|
@@ -72737,7 +72736,10 @@ class WhitespaceEnd extends _abap_rule_1.ABAPRule {
|
|
|
72737
72736
|
key: "whitespace_end",
|
|
72738
72737
|
title: "Whitespace at end of line",
|
|
72739
72738
|
shortDescription: `Checks for redundant whitespace at the end of each line.`,
|
|
72739
|
+
extendedInformation: `SMIM and W3MI files are not checked.`,
|
|
72740
72740
|
tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
|
|
72741
|
+
badExample: `WRITE 'hello'. `,
|
|
72742
|
+
goodExample: `WRITE 'hello'.`,
|
|
72741
72743
|
};
|
|
72742
72744
|
}
|
|
72743
72745
|
getMessage() {
|
|
@@ -72749,17 +72751,25 @@ class WhitespaceEnd extends _abap_rule_1.ABAPRule {
|
|
|
72749
72751
|
setConfig(conf) {
|
|
72750
72752
|
this.conf = conf;
|
|
72751
72753
|
}
|
|
72752
|
-
|
|
72754
|
+
initialize(_reg) {
|
|
72755
|
+
return this;
|
|
72756
|
+
}
|
|
72757
|
+
run(obj) {
|
|
72753
72758
|
const issues = [];
|
|
72754
|
-
const
|
|
72755
|
-
|
|
72756
|
-
|
|
72757
|
-
|
|
72758
|
-
|
|
72759
|
-
|
|
72760
|
-
|
|
72761
|
-
|
|
72762
|
-
|
|
72759
|
+
for (const file of obj.getFiles()) {
|
|
72760
|
+
if (obj instanceof objects_1.MIMEObject || obj instanceof objects_1.WebMIME) {
|
|
72761
|
+
continue;
|
|
72762
|
+
}
|
|
72763
|
+
const rows = file.getRawRows();
|
|
72764
|
+
for (let i = 0; i < rows.length; i++) {
|
|
72765
|
+
if (rows[i].endsWith(" ") || rows[i].endsWith(" \r")) {
|
|
72766
|
+
const match = / +\r?$/.exec(rows[i]);
|
|
72767
|
+
const start = new position_1.Position(i + 1, match.index + 1);
|
|
72768
|
+
const end = new position_1.Position(i + 1, rows[i].length + 1);
|
|
72769
|
+
const fix = edit_helper_1.EditHelper.deleteRange(file, start, end);
|
|
72770
|
+
const issue = issue_1.Issue.atRange(file, start, end, this.getMessage(), this.getMetadata().key, this.conf.severity, fix);
|
|
72771
|
+
issues.push(issue);
|
|
72772
|
+
}
|
|
72763
72773
|
}
|
|
72764
72774
|
}
|
|
72765
72775
|
return issues;
|
|
@@ -75275,6 +75285,8 @@ class OrderedObjParser{
|
|
|
75275
75285
|
"copyright" : { regex: /&(copy|#169);/g, val: "©" },
|
|
75276
75286
|
"reg" : { regex: /&(reg|#174);/g, val: "®" },
|
|
75277
75287
|
"inr" : { regex: /&(inr|#8377);/g, val: "₹" },
|
|
75288
|
+
"num_dec": { regex: /&#([0-9]{1,7});/g, val : (_, str) => String.fromCharCode(Number.parseInt(str, 10)) },
|
|
75289
|
+
"num_hex": { regex: /&#x([0-9a-fA-F]{1,6});/g, val : (_, str) => String.fromCharCode(Number.parseInt(str, 16)) },
|
|
75278
75290
|
};
|
|
75279
75291
|
this.addExternalEntities = addExternalEntities;
|
|
75280
75292
|
this.parseXml = parseXml;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.106.
|
|
3
|
+
"version": "2.106.3",
|
|
4
4
|
"description": "abaplint - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -38,24 +38,24 @@
|
|
|
38
38
|
},
|
|
39
39
|
"homepage": "https://abaplint.org",
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@abaplint/core": "^2.106.
|
|
42
|
-
"@types/chai": "^4.3.
|
|
41
|
+
"@abaplint/core": "^2.106.3",
|
|
42
|
+
"@types/chai": "^4.3.14",
|
|
43
43
|
"@types/glob": "^8.1.0",
|
|
44
44
|
"@types/minimist": "^1.2.5",
|
|
45
45
|
"@types/mocha": "^10.0.6",
|
|
46
|
-
"@types/node": "^20.11.
|
|
46
|
+
"@types/node": "^20.11.30",
|
|
47
47
|
"@types/progress": "^2.0.7",
|
|
48
48
|
"chai": "^4.4.1",
|
|
49
49
|
"chalk": "^5.3.0",
|
|
50
50
|
"eslint": "^8.57.0",
|
|
51
51
|
"glob": "^7.2.3",
|
|
52
52
|
"json5": "^2.2.3",
|
|
53
|
-
"memfs": "^4.
|
|
53
|
+
"memfs": "^4.8.0",
|
|
54
54
|
"minimist": "^1.2.8",
|
|
55
55
|
"mocha": "^10.3.0",
|
|
56
56
|
"progress": "^2.0.3",
|
|
57
|
-
"typescript": "^5.4.
|
|
58
|
-
"webpack": "^5.
|
|
57
|
+
"typescript": "^5.4.3",
|
|
58
|
+
"webpack": "^5.91.0",
|
|
59
59
|
"webpack-cli": "^5.1.4",
|
|
60
60
|
"xml-js": "^1.6.11"
|
|
61
61
|
},
|