@abaplint/cli 2.113.0 → 2.113.2
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 +77 -37
- package/package.json +2 -2
package/build/cli.js
CHANGED
|
@@ -35224,6 +35224,8 @@ exports.DECLARATION_STUFF = [
|
|
|
35224
35224
|
Statements.Data,
|
|
35225
35225
|
Statements.DataBegin,
|
|
35226
35226
|
Statements.Constant,
|
|
35227
|
+
Statements.Tables,
|
|
35228
|
+
Statements.Include, // this is not super correct, but anyhow
|
|
35227
35229
|
Statements.Parameter,
|
|
35228
35230
|
Statements.SelectionScreen,
|
|
35229
35231
|
Statements.ConstantBegin,
|
|
@@ -44890,6 +44892,43 @@ exports.AbstractObject = AbstractObject;
|
|
|
44890
44892
|
|
|
44891
44893
|
/***/ }),
|
|
44892
44894
|
|
|
44895
|
+
/***/ "./node_modules/@abaplint/core/build/src/objects/_dynpros.js":
|
|
44896
|
+
/*!*******************************************************************!*\
|
|
44897
|
+
!*** ./node_modules/@abaplint/core/build/src/objects/_dynpros.js ***!
|
|
44898
|
+
\*******************************************************************/
|
|
44899
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
44900
|
+
|
|
44901
|
+
"use strict";
|
|
44902
|
+
|
|
44903
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
44904
|
+
exports.parseDynpros = parseDynpros;
|
|
44905
|
+
const xml_utils_1 = __webpack_require__(/*! ../xml_utils */ "./node_modules/@abaplint/core/build/src/xml_utils.js");
|
|
44906
|
+
function parseDynpros(parsed) {
|
|
44907
|
+
var _a, _b, _c, _d;
|
|
44908
|
+
const dynpros = [];
|
|
44909
|
+
const xmlDynpros = (_c = (_b = (_a = parsed.abapGit) === null || _a === void 0 ? void 0 : _a["asx:abap"]) === null || _b === void 0 ? void 0 : _b["asx:values"]) === null || _c === void 0 ? void 0 : _c.DYNPROS;
|
|
44910
|
+
if (xmlDynpros !== undefined) {
|
|
44911
|
+
for (const d of (0, xml_utils_1.xmlToArray)(xmlDynpros.item)) {
|
|
44912
|
+
const fields = [];
|
|
44913
|
+
for (const f of (0, xml_utils_1.xmlToArray)((_d = d.FIELDS) === null || _d === void 0 ? void 0 : _d.RPY_DYFATC)) {
|
|
44914
|
+
fields.push({
|
|
44915
|
+
name: f.NAME,
|
|
44916
|
+
type: f.TYPE,
|
|
44917
|
+
length: f.LENGTH,
|
|
44918
|
+
});
|
|
44919
|
+
}
|
|
44920
|
+
dynpros.push({
|
|
44921
|
+
number: d.HEADER.SCREEN,
|
|
44922
|
+
fields: fields,
|
|
44923
|
+
});
|
|
44924
|
+
}
|
|
44925
|
+
}
|
|
44926
|
+
return dynpros;
|
|
44927
|
+
}
|
|
44928
|
+
//# sourceMappingURL=_dynpros.js.map
|
|
44929
|
+
|
|
44930
|
+
/***/ }),
|
|
44931
|
+
|
|
44893
44932
|
/***/ "./node_modules/@abaplint/core/build/src/objects/_unknown_object.js":
|
|
44894
44933
|
/*!**************************************************************************!*\
|
|
44895
44934
|
!*** ./node_modules/@abaplint/core/build/src/objects/_unknown_object.js ***!
|
|
@@ -47293,18 +47332,23 @@ const _abap_object_1 = __webpack_require__(/*! ./_abap_object */ "./node_modules
|
|
|
47293
47332
|
const types_1 = __webpack_require__(/*! ../abap/types */ "./node_modules/@abaplint/core/build/src/abap/types/index.js");
|
|
47294
47333
|
const xml_utils_1 = __webpack_require__(/*! ../xml_utils */ "./node_modules/@abaplint/core/build/src/xml_utils.js");
|
|
47295
47334
|
const fast_xml_parser_1 = __webpack_require__(/*! fast-xml-parser */ "./node_modules/fast-xml-parser/src/fxp.js");
|
|
47335
|
+
const _dynpros_1 = __webpack_require__(/*! ./_dynpros */ "./node_modules/@abaplint/core/build/src/objects/_dynpros.js");
|
|
47296
47336
|
class FunctionGroup extends _abap_object_1.ABAPObject {
|
|
47297
47337
|
constructor() {
|
|
47298
47338
|
super(...arguments);
|
|
47299
47339
|
this.includes = undefined;
|
|
47300
47340
|
this.modules = undefined;
|
|
47341
|
+
this.description = undefined;
|
|
47342
|
+
this.dynpros = undefined;
|
|
47301
47343
|
}
|
|
47302
47344
|
getType() {
|
|
47303
47345
|
return "FUGR";
|
|
47304
47346
|
}
|
|
47305
47347
|
getDescription() {
|
|
47306
|
-
|
|
47307
|
-
|
|
47348
|
+
if (this.description === undefined) {
|
|
47349
|
+
this.parseXML();
|
|
47350
|
+
}
|
|
47351
|
+
return this.description;
|
|
47308
47352
|
}
|
|
47309
47353
|
setDirty() {
|
|
47310
47354
|
super.setDirty();
|
|
@@ -47317,6 +47361,12 @@ class FunctionGroup extends _abap_object_1.ABAPObject {
|
|
|
47317
47361
|
allowNamespace: true,
|
|
47318
47362
|
};
|
|
47319
47363
|
}
|
|
47364
|
+
getDynpros() {
|
|
47365
|
+
if (this.dynpros === undefined) {
|
|
47366
|
+
this.parseXML();
|
|
47367
|
+
}
|
|
47368
|
+
return this.dynpros || [];
|
|
47369
|
+
}
|
|
47320
47370
|
getSequencedFiles() {
|
|
47321
47371
|
const main = this.getMainABAPFile();
|
|
47322
47372
|
if (main === undefined) {
|
|
@@ -47418,22 +47468,24 @@ class FunctionGroup extends _abap_object_1.ABAPObject {
|
|
|
47418
47468
|
}
|
|
47419
47469
|
/////////////////////////////////
|
|
47420
47470
|
parseXML() {
|
|
47421
|
-
var _a, _b;
|
|
47471
|
+
var _a, _b, _c;
|
|
47422
47472
|
this.includes = [];
|
|
47423
47473
|
this.modules = [];
|
|
47424
47474
|
const parsed = this.parseRaw2();
|
|
47425
47475
|
if (parsed === undefined) {
|
|
47426
47476
|
return;
|
|
47427
47477
|
}
|
|
47478
|
+
this.description = (_a = parsed.abapGit["asx:abap"]["asx:values"]) === null || _a === void 0 ? void 0 : _a.AREAT;
|
|
47479
|
+
this.dynpros = (0, _dynpros_1.parseDynpros)(parsed);
|
|
47428
47480
|
// INCLUDES
|
|
47429
|
-
const includes = (
|
|
47481
|
+
const includes = (_b = parsed.abapGit["asx:abap"]["asx:values"]) === null || _b === void 0 ? void 0 : _b.INCLUDES;
|
|
47430
47482
|
if (includes !== undefined) {
|
|
47431
47483
|
for (const i of (0, xml_utils_1.xmlToArray)(includes.SOBJ_NAME)) {
|
|
47432
47484
|
this.includes.push(i);
|
|
47433
47485
|
}
|
|
47434
47486
|
}
|
|
47435
47487
|
// FUNCTION MODULES
|
|
47436
|
-
const functions = (
|
|
47488
|
+
const functions = (_c = parsed.abapGit["asx:abap"]["asx:values"]) === null || _c === void 0 ? void 0 : _c.FUNCTIONS;
|
|
47437
47489
|
for (const module of (0, xml_utils_1.xmlToArray)(functions === null || functions === void 0 ? void 0 : functions.item)) {
|
|
47438
47490
|
this.modules.push(new types_1.FunctionModuleDefinition(module));
|
|
47439
47491
|
}
|
|
@@ -49792,7 +49844,7 @@ exports.PersonalizationObject = PersonalizationObject;
|
|
|
49792
49844
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
49793
49845
|
exports.Program = void 0;
|
|
49794
49846
|
const _abap_object_1 = __webpack_require__(/*! ./_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
|
|
49795
|
-
const
|
|
49847
|
+
const _dynpros_1 = __webpack_require__(/*! ./_dynpros */ "./node_modules/@abaplint/core/build/src/objects/_dynpros.js");
|
|
49796
49848
|
class Program extends _abap_object_1.ABAPObject {
|
|
49797
49849
|
getType() {
|
|
49798
49850
|
return "PROG";
|
|
@@ -49828,11 +49880,10 @@ class Program extends _abap_object_1.ABAPObject {
|
|
|
49828
49880
|
}
|
|
49829
49881
|
getDynpros() {
|
|
49830
49882
|
this.parseXML();
|
|
49831
|
-
return this.parsedXML.dynpros;
|
|
49883
|
+
return this.parsedXML.dynpros || [];
|
|
49832
49884
|
}
|
|
49833
49885
|
////////////////////////////
|
|
49834
49886
|
parseXML() {
|
|
49835
|
-
var _a, _b, _c, _d;
|
|
49836
49887
|
if (this.parsedXML !== undefined) {
|
|
49837
49888
|
return;
|
|
49838
49889
|
}
|
|
@@ -49846,24 +49897,7 @@ class Program extends _abap_object_1.ABAPObject {
|
|
|
49846
49897
|
};
|
|
49847
49898
|
return;
|
|
49848
49899
|
}
|
|
49849
|
-
const dynpros =
|
|
49850
|
-
const xmlDynpros = (_c = (_b = (_a = parsed.abapGit) === null || _a === void 0 ? void 0 : _a["asx:abap"]) === null || _b === void 0 ? void 0 : _b["asx:values"]) === null || _c === void 0 ? void 0 : _c.DYNPROS;
|
|
49851
|
-
if (xmlDynpros !== undefined) {
|
|
49852
|
-
for (const d of (0, xml_utils_1.xmlToArray)(xmlDynpros.item)) {
|
|
49853
|
-
const fields = [];
|
|
49854
|
-
for (const f of (0, xml_utils_1.xmlToArray)((_d = d.FIELDS) === null || _d === void 0 ? void 0 : _d.RPY_DYFATC)) {
|
|
49855
|
-
fields.push({
|
|
49856
|
-
name: f.NAME,
|
|
49857
|
-
type: f.TYPE,
|
|
49858
|
-
length: f.LENGTH,
|
|
49859
|
-
});
|
|
49860
|
-
}
|
|
49861
|
-
dynpros.push({
|
|
49862
|
-
number: d.HEADER.SCREEN,
|
|
49863
|
-
fields: fields,
|
|
49864
|
-
});
|
|
49865
|
-
}
|
|
49866
|
-
}
|
|
49900
|
+
const dynpros = (0, _dynpros_1.parseDynpros)(parsed);
|
|
49867
49901
|
this.parsedXML = {
|
|
49868
49902
|
isInclude: file ? file.getRaw().includes("<SUBC>I</SUBC>") : false,
|
|
49869
49903
|
isModulePool: file ? file.getRaw().includes("<SUBC>M</SUBC>") : false,
|
|
@@ -52640,7 +52674,7 @@ class Registry {
|
|
|
52640
52674
|
}
|
|
52641
52675
|
static abaplintVersion() {
|
|
52642
52676
|
// magic, see build script "version.sh"
|
|
52643
|
-
return "2.113.
|
|
52677
|
+
return "2.113.2";
|
|
52644
52678
|
}
|
|
52645
52679
|
getDDICReferences() {
|
|
52646
52680
|
return this.ddicReferences;
|
|
@@ -53308,25 +53342,25 @@ class AddTestAttributes extends _abap_rule_1.ABAPRule {
|
|
|
53308
53342
|
title: "Add test attributes for tests classes with test methods",
|
|
53309
53343
|
shortDescription: `Add test attributes DURATION and RISK LEVEL for tests classes with test methods`,
|
|
53310
53344
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
53311
|
-
badExample: `CLASS
|
|
53345
|
+
badExample: `CLASS ltcl_test1 DEFINITION FINAL FOR TESTING.
|
|
53312
53346
|
PUBLIC SECTION.
|
|
53313
53347
|
PROTECTED SECTION.
|
|
53314
53348
|
PRIVATE SECTION.
|
|
53315
53349
|
METHODS test FOR TESTING RAISING cx_static_check.
|
|
53316
53350
|
ENDCLASS.
|
|
53317
53351
|
|
|
53318
|
-
CLASS
|
|
53352
|
+
CLASS ltcl_test1 IMPLEMENTATION.
|
|
53319
53353
|
METHOD test.
|
|
53320
53354
|
ENDMETHOD.
|
|
53321
53355
|
ENDCLASS.`,
|
|
53322
|
-
goodExample: `CLASS
|
|
53356
|
+
goodExample: `CLASS ltcl_test2 DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
|
|
53323
53357
|
PUBLIC SECTION.
|
|
53324
53358
|
PROTECTED SECTION.
|
|
53325
53359
|
PRIVATE SECTION.
|
|
53326
53360
|
METHODS test FOR TESTING RAISING cx_static_check.
|
|
53327
53361
|
ENDCLASS.
|
|
53328
53362
|
|
|
53329
|
-
CLASS
|
|
53363
|
+
CLASS ltcl_test2 IMPLEMENTATION.
|
|
53330
53364
|
METHOD test.
|
|
53331
53365
|
ENDMETHOD.
|
|
53332
53366
|
ENDCLASS.`,
|
|
@@ -60838,12 +60872,11 @@ class EmptyEvent extends _abap_rule_1.ABAPRule {
|
|
|
60838
60872
|
shortDescription: `Empty selection screen or list processing event block`,
|
|
60839
60873
|
extendedInformation: ``,
|
|
60840
60874
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
60841
|
-
badExample: `
|
|
60842
|
-
|
|
60843
|
-
|
|
60844
|
-
COMMIT WORK.
|
|
60875
|
+
badExample: `
|
|
60876
|
+
INITIALIZATION.
|
|
60877
|
+
WRITE 'hello'.
|
|
60845
60878
|
END-OF-SELECTION.`,
|
|
60846
|
-
goodExample: `
|
|
60879
|
+
goodExample: `
|
|
60847
60880
|
START-OF-SELECTION.
|
|
60848
60881
|
PERFORM sdf.
|
|
60849
60882
|
COMMIT WORK.`,
|
|
@@ -60868,6 +60901,9 @@ START-OF-SELECTION.
|
|
|
60868
60901
|
let children = [];
|
|
60869
60902
|
for (const s of stru.getChildren() || []) {
|
|
60870
60903
|
if (selection_events_1.SELECTION_EVENTS.some(f => s.get() instanceof f)) {
|
|
60904
|
+
if (currentEvent !== undefined && children.length === 0) {
|
|
60905
|
+
issues.push(issue_1.Issue.atStatement(file, currentEvent, "Empty event", this.getMetadata().key, this.getConfig().severity));
|
|
60906
|
+
}
|
|
60871
60907
|
children = [];
|
|
60872
60908
|
currentEvent = s;
|
|
60873
60909
|
}
|
|
@@ -60880,7 +60916,11 @@ START-OF-SELECTION.
|
|
|
60880
60916
|
children.push(s);
|
|
60881
60917
|
}
|
|
60882
60918
|
else {
|
|
60919
|
+
if (currentEvent !== undefined && children.length === 0) {
|
|
60920
|
+
issues.push(issue_1.Issue.atStatement(file, currentEvent, "Empty event", this.getMetadata().key, this.getConfig().severity));
|
|
60921
|
+
}
|
|
60883
60922
|
children = [];
|
|
60923
|
+
currentEvent = undefined;
|
|
60884
60924
|
}
|
|
60885
60925
|
}
|
|
60886
60926
|
if (currentEvent !== undefined && children.length === 0) {
|
|
@@ -63297,7 +63337,7 @@ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapstart-of-selectio
|
|
|
63297
63337
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
63298
63338
|
badExample: `REPORT zfoo.
|
|
63299
63339
|
WRITE 'hello'.`,
|
|
63300
|
-
goodExample: `
|
|
63340
|
+
goodExample: `
|
|
63301
63341
|
START-OF-SELECTION.
|
|
63302
63342
|
WRITE 'hello'.`,
|
|
63303
63343
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.113.
|
|
3
|
+
"version": "2.113.2",
|
|
4
4
|
"description": "abaplint - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"homepage": "https://abaplint.org",
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@abaplint/core": "^2.113.
|
|
41
|
+
"@abaplint/core": "^2.113.2",
|
|
42
42
|
"@types/chai": "^4.3.19",
|
|
43
43
|
"@types/glob": "^8.1.0",
|
|
44
44
|
"@types/minimist": "^1.2.5",
|