@abaplint/cli 2.114.0 → 2.114.1
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 +88 -43
- package/package.json +2 -2
package/build/cli.js
CHANGED
|
@@ -20677,33 +20677,21 @@ exports.Identifier = Identifier;
|
|
|
20677
20677
|
/*!************************************************************************************************!*\
|
|
20678
20678
|
!*** ./node_modules/@abaplint/core/build/src/abap/4_file_information/abap_file_information.js ***!
|
|
20679
20679
|
\************************************************************************************************/
|
|
20680
|
-
/***/ ((__unused_webpack_module, exports
|
|
20680
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
20681
20681
|
|
|
20682
20682
|
"use strict";
|
|
20683
20683
|
|
|
20684
20684
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
20685
20685
|
exports.ABAPFileInformation = void 0;
|
|
20686
|
-
const Structures = __webpack_require__(/*! ../3_structures/structures */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js");
|
|
20687
|
-
const Expressions = __webpack_require__(/*! ../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
20688
|
-
const Statements = __webpack_require__(/*! ../2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
|
|
20689
|
-
const _abap_file_information_1 = __webpack_require__(/*! ./_abap_file_information */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/_abap_file_information.js");
|
|
20690
|
-
const _identifier_1 = __webpack_require__(/*! ./_identifier */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/_identifier.js");
|
|
20691
|
-
const Tokens = __webpack_require__(/*! ../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
|
|
20692
|
-
const visibility_1 = __webpack_require__(/*! ./visibility */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js");
|
|
20693
20686
|
class ABAPFileInformation {
|
|
20694
|
-
constructor(
|
|
20695
|
-
this.
|
|
20696
|
-
this.implementations = [];
|
|
20697
|
-
this.interfaces = [];
|
|
20698
|
-
this.classes = [];
|
|
20699
|
-
this.filename = filename;
|
|
20700
|
-
this.parse(structure);
|
|
20687
|
+
constructor(parsed) {
|
|
20688
|
+
this.parsed = parsed;
|
|
20701
20689
|
}
|
|
20702
20690
|
listClassImplementations() {
|
|
20703
|
-
return this.implementations;
|
|
20691
|
+
return this.parsed.implementations;
|
|
20704
20692
|
}
|
|
20705
20693
|
listInterfaceDefinitions() {
|
|
20706
|
-
return this.interfaces;
|
|
20694
|
+
return this.parsed.interfaces;
|
|
20707
20695
|
}
|
|
20708
20696
|
getInterfaceDefinitionByName(name) {
|
|
20709
20697
|
const upper = name.toUpperCase();
|
|
@@ -20715,7 +20703,7 @@ class ABAPFileInformation {
|
|
|
20715
20703
|
return undefined;
|
|
20716
20704
|
}
|
|
20717
20705
|
listClassDefinitions() {
|
|
20718
|
-
return this.classes;
|
|
20706
|
+
return this.parsed.classes;
|
|
20719
20707
|
}
|
|
20720
20708
|
getClassDefinitionByName(name) {
|
|
20721
20709
|
const upper = name.toUpperCase();
|
|
@@ -20736,16 +20724,54 @@ class ABAPFileInformation {
|
|
|
20736
20724
|
return undefined;
|
|
20737
20725
|
}
|
|
20738
20726
|
listFormDefinitions() {
|
|
20739
|
-
return this.forms;
|
|
20727
|
+
return this.parsed.forms;
|
|
20728
|
+
}
|
|
20729
|
+
}
|
|
20730
|
+
exports.ABAPFileInformation = ABAPFileInformation;
|
|
20731
|
+
//# sourceMappingURL=abap_file_information.js.map
|
|
20732
|
+
|
|
20733
|
+
/***/ }),
|
|
20734
|
+
|
|
20735
|
+
/***/ "./node_modules/@abaplint/core/build/src/abap/4_file_information/abap_file_information_parser.js":
|
|
20736
|
+
/*!*******************************************************************************************************!*\
|
|
20737
|
+
!*** ./node_modules/@abaplint/core/build/src/abap/4_file_information/abap_file_information_parser.js ***!
|
|
20738
|
+
\*******************************************************************************************************/
|
|
20739
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
20740
|
+
|
|
20741
|
+
"use strict";
|
|
20742
|
+
|
|
20743
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
20744
|
+
exports.ABAPFileInformationParser = void 0;
|
|
20745
|
+
const Structures = __webpack_require__(/*! ../3_structures/structures */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js");
|
|
20746
|
+
const Expressions = __webpack_require__(/*! ../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
20747
|
+
const Statements = __webpack_require__(/*! ../2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
|
|
20748
|
+
const _identifier_1 = __webpack_require__(/*! ./_identifier */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/_identifier.js");
|
|
20749
|
+
const Tokens = __webpack_require__(/*! ../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
|
|
20750
|
+
const visibility_1 = __webpack_require__(/*! ./visibility */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js");
|
|
20751
|
+
const _abap_file_information_1 = __webpack_require__(/*! ./_abap_file_information */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/_abap_file_information.js");
|
|
20752
|
+
class ABAPFileInformationParser {
|
|
20753
|
+
constructor(filename) {
|
|
20754
|
+
this.filename = filename;
|
|
20740
20755
|
}
|
|
20741
|
-
///////////////////////
|
|
20742
20756
|
parse(structure) {
|
|
20743
|
-
|
|
20757
|
+
const result = {
|
|
20758
|
+
interfaces: [],
|
|
20759
|
+
classes: [],
|
|
20760
|
+
forms: [],
|
|
20761
|
+
implementations: [],
|
|
20762
|
+
};
|
|
20744
20763
|
if (structure === undefined) {
|
|
20745
|
-
return;
|
|
20764
|
+
return result;
|
|
20746
20765
|
}
|
|
20747
|
-
this.parseClasses(structure);
|
|
20748
|
-
this.parseInterfaces(structure);
|
|
20766
|
+
result.classes = this.parseClasses(structure);
|
|
20767
|
+
result.interfaces = this.parseInterfaces(structure);
|
|
20768
|
+
result.implementations = this.parseClassImplementations(structure);
|
|
20769
|
+
result.forms = this.parseForms(structure);
|
|
20770
|
+
return result;
|
|
20771
|
+
}
|
|
20772
|
+
parseClassImplementations(structure) {
|
|
20773
|
+
var _a;
|
|
20774
|
+
const implementations = [];
|
|
20749
20775
|
for (const found of structure.findAllStructures(Structures.ClassImplementation)) {
|
|
20750
20776
|
const methods = [];
|
|
20751
20777
|
for (const method of found.findAllStructures(Structures.Method)) {
|
|
@@ -20755,24 +20781,30 @@ class ABAPFileInformation {
|
|
|
20755
20781
|
}
|
|
20756
20782
|
}
|
|
20757
20783
|
const name = found.findFirstStatement(Statements.ClassImplementation).findFirstExpression(Expressions.ClassName).getFirstToken();
|
|
20758
|
-
|
|
20784
|
+
implementations.push({
|
|
20759
20785
|
name: name.getStr(),
|
|
20760
20786
|
identifier: new _identifier_1.Identifier(name, this.filename),
|
|
20761
20787
|
methods,
|
|
20762
20788
|
});
|
|
20763
20789
|
}
|
|
20790
|
+
return implementations;
|
|
20791
|
+
}
|
|
20792
|
+
parseForms(structure) {
|
|
20793
|
+
const forms = [];
|
|
20764
20794
|
for (const statement of structure.findAllStructures(Structures.Form)) {
|
|
20765
20795
|
// FORMs can contain a dash in the name
|
|
20766
20796
|
const pos = statement.findFirstExpression(Expressions.FormName).getFirstToken().getStart();
|
|
20767
20797
|
const name = statement.findFirstExpression(Expressions.FormName).concatTokens();
|
|
20768
20798
|
const nameToken = new Tokens.Identifier(pos, name);
|
|
20769
|
-
|
|
20799
|
+
forms.push({
|
|
20770
20800
|
name: nameToken.getStr(),
|
|
20771
20801
|
identifier: new _identifier_1.Identifier(nameToken, this.filename),
|
|
20772
20802
|
});
|
|
20773
20803
|
}
|
|
20804
|
+
return forms;
|
|
20774
20805
|
}
|
|
20775
20806
|
parseInterfaces(structure) {
|
|
20807
|
+
const interfaces = [];
|
|
20776
20808
|
for (const found of structure.findDirectStructures(Structures.Interface)) {
|
|
20777
20809
|
const i = found.findFirstStatement(Statements.Interface);
|
|
20778
20810
|
if (i === undefined) {
|
|
@@ -20784,7 +20816,7 @@ class ABAPFileInformation {
|
|
|
20784
20816
|
const aliases = this.parseAliases(found, visibility_1.Visibility.Public);
|
|
20785
20817
|
const constants = this.parseConstants(found, visibility_1.Visibility.Public);
|
|
20786
20818
|
const g = i.findDirectExpression(Expressions.ClassGlobal);
|
|
20787
|
-
|
|
20819
|
+
interfaces.push({
|
|
20788
20820
|
name: interfaceName.getStr(),
|
|
20789
20821
|
identifier: new _identifier_1.Identifier(interfaceName, this.filename),
|
|
20790
20822
|
isLocal: g === undefined,
|
|
@@ -20796,9 +20828,11 @@ class ABAPFileInformation {
|
|
|
20796
20828
|
attributes,
|
|
20797
20829
|
});
|
|
20798
20830
|
}
|
|
20831
|
+
return interfaces;
|
|
20799
20832
|
}
|
|
20800
20833
|
parseClasses(structure) {
|
|
20801
20834
|
var _a;
|
|
20835
|
+
const classes = [];
|
|
20802
20836
|
for (const found of structure.findAllStructures(Structures.ClassDefinition)) {
|
|
20803
20837
|
const className = found.findFirstStatement(Statements.ClassDefinition).findFirstExpression(Expressions.ClassName).getFirstToken();
|
|
20804
20838
|
const methods = this.parseMethodDefinition(found.findFirstStructure(Structures.PublicSection), visibility_1.Visibility.Public);
|
|
@@ -20837,7 +20871,7 @@ class ABAPFileInformation {
|
|
|
20837
20871
|
else if (concat.includes("DURATION MEDIUM")) {
|
|
20838
20872
|
duration = _abap_file_information_1.Duration.medium;
|
|
20839
20873
|
}
|
|
20840
|
-
|
|
20874
|
+
classes.push({
|
|
20841
20875
|
name: className.getStr(),
|
|
20842
20876
|
identifier: new _identifier_1.Identifier(className, this.filename),
|
|
20843
20877
|
isLocal: containsGlobal === undefined,
|
|
@@ -20856,6 +20890,7 @@ class ABAPFileInformation {
|
|
|
20856
20890
|
constants,
|
|
20857
20891
|
});
|
|
20858
20892
|
}
|
|
20893
|
+
return classes;
|
|
20859
20894
|
}
|
|
20860
20895
|
///////////////////
|
|
20861
20896
|
getImplementing(input) {
|
|
@@ -21054,8 +21089,8 @@ class ABAPFileInformation {
|
|
|
21054
21089
|
return ret;
|
|
21055
21090
|
}
|
|
21056
21091
|
}
|
|
21057
|
-
exports.
|
|
21058
|
-
//# sourceMappingURL=
|
|
21092
|
+
exports.ABAPFileInformationParser = ABAPFileInformationParser;
|
|
21093
|
+
//# sourceMappingURL=abap_file_information_parser.js.map
|
|
21059
21094
|
|
|
21060
21095
|
/***/ }),
|
|
21061
21096
|
|
|
@@ -36629,12 +36664,12 @@ class ABAPFile extends _abstract_file_1.AbstractFile {
|
|
|
36629
36664
|
getRaw() {
|
|
36630
36665
|
return this.file.getRaw();
|
|
36631
36666
|
}
|
|
36632
|
-
getInfo() {
|
|
36633
|
-
return this.info;
|
|
36634
|
-
}
|
|
36635
36667
|
getRawRows() {
|
|
36636
36668
|
return this.file.getRawRows();
|
|
36637
36669
|
}
|
|
36670
|
+
getInfo() {
|
|
36671
|
+
return this.info;
|
|
36672
|
+
}
|
|
36638
36673
|
getStructure() {
|
|
36639
36674
|
return this.structure;
|
|
36640
36675
|
}
|
|
@@ -36671,12 +36706,13 @@ exports.ABAPFile = ABAPFile;
|
|
|
36671
36706
|
|
|
36672
36707
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
36673
36708
|
exports.ABAPParser = void 0;
|
|
36674
|
-
const
|
|
36709
|
+
const abap_file_1 = __webpack_require__(/*! ./abap_file */ "./node_modules/@abaplint/core/build/src/abap/abap_file.js");
|
|
36710
|
+
const abap_file_information_1 = __webpack_require__(/*! ./4_file_information/abap_file_information */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/abap_file_information.js");
|
|
36711
|
+
const abap_file_information_parser_1 = __webpack_require__(/*! ./4_file_information/abap_file_information_parser */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/abap_file_information_parser.js");
|
|
36675
36712
|
const lexer_1 = __webpack_require__(/*! ./1_lexer/lexer */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/lexer.js");
|
|
36676
36713
|
const statement_parser_1 = __webpack_require__(/*! ./2_statements/statement_parser */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statement_parser.js");
|
|
36677
36714
|
const structure_parser_1 = __webpack_require__(/*! ./3_structures/structure_parser */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structure_parser.js");
|
|
36678
|
-
const
|
|
36679
|
-
const abap_file_1 = __webpack_require__(/*! ./abap_file */ "./node_modules/@abaplint/core/build/src/abap/abap_file.js");
|
|
36715
|
+
const version_1 = __webpack_require__(/*! ../version */ "./node_modules/@abaplint/core/build/src/version.js");
|
|
36680
36716
|
class ABAPParser {
|
|
36681
36717
|
constructor(version, globalMacros, reg) {
|
|
36682
36718
|
this.version = version ? version : version_1.defaultVersion;
|
|
@@ -36701,7 +36737,9 @@ class ABAPParser {
|
|
|
36701
36737
|
for (const f of statementResult) {
|
|
36702
36738
|
const result = structure_parser_1.StructureParser.run(f);
|
|
36703
36739
|
// 4: file information
|
|
36704
|
-
const
|
|
36740
|
+
const parser = new abap_file_information_parser_1.ABAPFileInformationParser(f.file.getFilename());
|
|
36741
|
+
const parsed = parser.parse(result.node);
|
|
36742
|
+
const info = new abap_file_information_1.ABAPFileInformation(parsed);
|
|
36705
36743
|
output.push(new abap_file_1.ABAPFile(f.file, f.tokens, f.statements, result.node, info));
|
|
36706
36744
|
issues.push(...result.issues);
|
|
36707
36745
|
}
|
|
@@ -49354,6 +49392,8 @@ class FunctionGroup extends _abap_object_1.ABAPObject {
|
|
|
49354
49392
|
super.setDirty();
|
|
49355
49393
|
this.includes = undefined;
|
|
49356
49394
|
this.modules = undefined;
|
|
49395
|
+
this.description = undefined;
|
|
49396
|
+
this.dynpros = undefined;
|
|
49357
49397
|
}
|
|
49358
49398
|
getAllowedNaming() {
|
|
49359
49399
|
return {
|
|
@@ -54949,7 +54989,7 @@ class Registry {
|
|
|
54949
54989
|
}
|
|
54950
54990
|
static abaplintVersion() {
|
|
54951
54991
|
// magic, see build script "version.sh"
|
|
54952
|
-
return "2.114.
|
|
54992
|
+
return "2.114.1";
|
|
54953
54993
|
}
|
|
54954
54994
|
getDDICReferences() {
|
|
54955
54995
|
return this.ddicReferences;
|
|
@@ -57862,6 +57902,10 @@ const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/c
|
|
|
57862
57902
|
const objects_1 = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
|
|
57863
57903
|
const severity_1 = __webpack_require__(/*! ../severity */ "./node_modules/@abaplint/core/build/src/severity.js");
|
|
57864
57904
|
class CheckIncludeConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
57905
|
+
constructor() {
|
|
57906
|
+
super(...arguments);
|
|
57907
|
+
this.allowUnused = false;
|
|
57908
|
+
}
|
|
57865
57909
|
}
|
|
57866
57910
|
exports.CheckIncludeConf = CheckIncludeConf;
|
|
57867
57911
|
class CheckInclude {
|
|
@@ -57889,7 +57933,7 @@ class CheckInclude {
|
|
|
57889
57933
|
}
|
|
57890
57934
|
initialize(reg) {
|
|
57891
57935
|
this.reg = reg;
|
|
57892
|
-
this.graph = new include_graph_1.IncludeGraph(this.reg, this.getConfig().severity || severity_1.Severity.Error);
|
|
57936
|
+
this.graph = new include_graph_1.IncludeGraph(this.reg, this.getConfig().severity || severity_1.Severity.Error, this.getConfig().allowUnused || false);
|
|
57893
57937
|
return this;
|
|
57894
57938
|
}
|
|
57895
57939
|
run(obj) {
|
|
@@ -65855,8 +65899,7 @@ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapstart-of-selectio
|
|
|
65855
65899
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
65856
65900
|
badExample: `REPORT zfoo.
|
|
65857
65901
|
WRITE 'hello'.`,
|
|
65858
|
-
goodExample: `
|
|
65859
|
-
START-OF-SELECTION.
|
|
65902
|
+
goodExample: `START-OF-SELECTION.
|
|
65860
65903
|
WRITE 'hello'.`,
|
|
65861
65904
|
};
|
|
65862
65905
|
}
|
|
@@ -66443,7 +66486,7 @@ class IndexCompletelyContained {
|
|
|
66443
66486
|
key: "index_completely_contained",
|
|
66444
66487
|
title: "Check if database table indexes are completely contained",
|
|
66445
66488
|
shortDescription: `If indexes are completely contained in other indexes, they can be removed to improve performance.`,
|
|
66446
|
-
tags: [_irule_1.RuleTag.Performance],
|
|
66489
|
+
tags: [_irule_1.RuleTag.Performance, _irule_1.RuleTag.SingleFile],
|
|
66447
66490
|
};
|
|
66448
66491
|
}
|
|
66449
66492
|
initialize() {
|
|
@@ -78665,11 +78708,12 @@ class Graph {
|
|
|
78665
78708
|
}
|
|
78666
78709
|
}
|
|
78667
78710
|
class IncludeGraph {
|
|
78668
|
-
constructor(reg, severity = severity_1.Severity.Error) {
|
|
78711
|
+
constructor(reg, severity = severity_1.Severity.Error, allowUnused = false) {
|
|
78669
78712
|
this.reg = reg;
|
|
78670
78713
|
this.issues = [];
|
|
78671
78714
|
this.graph = new Graph();
|
|
78672
78715
|
this.severity = severity;
|
|
78716
|
+
this.allowUnused = allowUnused;
|
|
78673
78717
|
this.build();
|
|
78674
78718
|
}
|
|
78675
78719
|
listMainForInclude(filename) {
|
|
@@ -78693,6 +78737,7 @@ class IncludeGraph {
|
|
|
78693
78737
|
}
|
|
78694
78738
|
const v = this.graph.findVertexByFilename(file.getFilename());
|
|
78695
78739
|
if (v !== undefined
|
|
78740
|
+
&& this.allowUnused === false
|
|
78696
78741
|
&& v.include === true
|
|
78697
78742
|
&& this.listMainForInclude(v.filename).length === 0) {
|
|
78698
78743
|
const f = this.reg.getFileByName(v.filename);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.114.
|
|
3
|
+
"version": "2.114.1",
|
|
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.114.
|
|
41
|
+
"@abaplint/core": "^2.114.1",
|
|
42
42
|
"@types/chai": "^4.3.20",
|
|
43
43
|
"@types/minimist": "^1.2.5",
|
|
44
44
|
"@types/mocha": "^10.0.10",
|