@abaplint/cli 2.114.9 → 2.115.0
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 +181 -9
- package/package.json +2 -2
package/build/cli.js
CHANGED
|
@@ -31175,6 +31175,11 @@ class Concatenate {
|
|
|
31175
31175
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
31176
31176
|
return;
|
|
31177
31177
|
}
|
|
31178
|
+
if (linesMode === true && byteMode === true && type instanceof basic_1.TableType && type.getRowType() instanceof basic_1.StructureType) {
|
|
31179
|
+
const message = "Source row type must not be a structure in BYTE mode";
|
|
31180
|
+
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
31181
|
+
return;
|
|
31182
|
+
}
|
|
31178
31183
|
}
|
|
31179
31184
|
}
|
|
31180
31185
|
for (const s of node.findDirectExpressions(Expressions.SimpleSource3)) {
|
|
@@ -53460,6 +53465,10 @@ class Table extends _abstract_object_1.AbstractObject {
|
|
|
53460
53465
|
&& this.parsedData.dataClass === "USER3") {
|
|
53461
53466
|
return new Types.UnknownType("Data class = USER3 not allowed in cloud");
|
|
53462
53467
|
}
|
|
53468
|
+
if (this.getTableCategory() === TableCategory.Transparent
|
|
53469
|
+
&& this.listKeys(reg).length === 0) {
|
|
53470
|
+
return new Types.UnknownType("Table " + this.getName() + " has no key fields");
|
|
53471
|
+
}
|
|
53463
53472
|
if (this.parsedType) {
|
|
53464
53473
|
return this.parsedType;
|
|
53465
53474
|
}
|
|
@@ -54477,6 +54486,7 @@ exports.WebDynproComponentConfiguration = WebDynproComponentConfiguration;
|
|
|
54477
54486
|
|
|
54478
54487
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
54479
54488
|
exports.WebMIME = void 0;
|
|
54489
|
+
const xml_utils_1 = __webpack_require__(/*! ../xml_utils */ "./node_modules/@abaplint/core/build/src/xml_utils.js");
|
|
54480
54490
|
const _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ "./node_modules/@abaplint/core/build/src/objects/_abstract_object.js");
|
|
54481
54491
|
class WebMIME extends _abstract_object_1.AbstractObject {
|
|
54482
54492
|
getType() {
|
|
@@ -54494,6 +54504,16 @@ class WebMIME extends _abstract_object_1.AbstractObject {
|
|
|
54494
54504
|
this.parse();
|
|
54495
54505
|
return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.description;
|
|
54496
54506
|
}
|
|
54507
|
+
getParameter(name) {
|
|
54508
|
+
var _a;
|
|
54509
|
+
this.parse();
|
|
54510
|
+
return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.params[name.toLowerCase()];
|
|
54511
|
+
}
|
|
54512
|
+
getParameters() {
|
|
54513
|
+
var _a, _b;
|
|
54514
|
+
this.parse();
|
|
54515
|
+
return (_b = (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.params) !== null && _b !== void 0 ? _b : {};
|
|
54516
|
+
}
|
|
54497
54517
|
setDirty() {
|
|
54498
54518
|
this.parsedXML = undefined;
|
|
54499
54519
|
super.setDirty();
|
|
@@ -54507,11 +54527,12 @@ class WebMIME extends _abstract_object_1.AbstractObject {
|
|
|
54507
54527
|
return undefined;
|
|
54508
54528
|
}
|
|
54509
54529
|
parse() {
|
|
54530
|
+
var _a;
|
|
54510
54531
|
if (this.parsedXML) {
|
|
54511
54532
|
return { updated: false, runtime: 0 };
|
|
54512
54533
|
}
|
|
54513
54534
|
const start = Date.now();
|
|
54514
|
-
this.parsedXML = {};
|
|
54535
|
+
this.parsedXML = { params: {} };
|
|
54515
54536
|
const parsed = super.parseRaw2();
|
|
54516
54537
|
if (parsed === undefined
|
|
54517
54538
|
|| parsed.abapGit === undefined
|
|
@@ -54519,6 +54540,9 @@ class WebMIME extends _abstract_object_1.AbstractObject {
|
|
|
54519
54540
|
return { updated: false, runtime: 0 };
|
|
54520
54541
|
}
|
|
54521
54542
|
this.parsedXML.description = parsed.abapGit["asx:abap"]["asx:values"].TEXT;
|
|
54543
|
+
for (const param of (0, xml_utils_1.xmlToArray)((_a = parsed.abapGit["asx:abap"]["asx:values"].PARAMS) === null || _a === void 0 ? void 0 : _a.WWWPARAMS)) {
|
|
54544
|
+
this.parsedXML.params[param.NAME.toLowerCase()] = param.VALUE;
|
|
54545
|
+
}
|
|
54522
54546
|
const end = Date.now();
|
|
54523
54547
|
return { updated: true, runtime: end - start };
|
|
54524
54548
|
}
|
|
@@ -55050,7 +55074,7 @@ class Registry {
|
|
|
55050
55074
|
}
|
|
55051
55075
|
static abaplintVersion() {
|
|
55052
55076
|
// magic, see build script "version.sh"
|
|
55053
|
-
return "2.
|
|
55077
|
+
return "2.115.0";
|
|
55054
55078
|
}
|
|
55055
55079
|
getDDICReferences() {
|
|
55056
55080
|
return this.ddicReferences;
|
|
@@ -65494,6 +65518,76 @@ exports.IdenticalFormNames = IdenticalFormNames;
|
|
|
65494
65518
|
|
|
65495
65519
|
/***/ }),
|
|
65496
65520
|
|
|
65521
|
+
/***/ "./node_modules/@abaplint/core/build/src/rules/identical_move.js":
|
|
65522
|
+
/*!***********************************************************************!*\
|
|
65523
|
+
!*** ./node_modules/@abaplint/core/build/src/rules/identical_move.js ***!
|
|
65524
|
+
\***********************************************************************/
|
|
65525
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
65526
|
+
|
|
65527
|
+
"use strict";
|
|
65528
|
+
|
|
65529
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
65530
|
+
exports.IdenticalMove = exports.IdenticalMoveConf = void 0;
|
|
65531
|
+
const Statements = __webpack_require__(/*! ../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
|
|
65532
|
+
const Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
65533
|
+
const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
|
|
65534
|
+
const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@abaplint/core/build/src/rules/_abap_rule.js");
|
|
65535
|
+
const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
|
|
65536
|
+
const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
|
|
65537
|
+
const objects_1 = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
|
|
65538
|
+
class IdenticalMoveConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
65539
|
+
}
|
|
65540
|
+
exports.IdenticalMoveConf = IdenticalMoveConf;
|
|
65541
|
+
class IdenticalMove extends _abap_rule_1.ABAPRule {
|
|
65542
|
+
constructor() {
|
|
65543
|
+
super(...arguments);
|
|
65544
|
+
this.conf = new IdenticalMoveConf();
|
|
65545
|
+
}
|
|
65546
|
+
getMetadata() {
|
|
65547
|
+
return {
|
|
65548
|
+
key: "identical_move",
|
|
65549
|
+
title: "Identical move",
|
|
65550
|
+
shortDescription: `Moving the same value from left to right or right to left is redundant.`,
|
|
65551
|
+
tags: [_irule_1.RuleTag.SingleFile],
|
|
65552
|
+
badExample: `DATA lv_value TYPE i.
|
|
65553
|
+
lv_value = lv_value.`,
|
|
65554
|
+
goodExample: `DATA lv_value TYPE i.
|
|
65555
|
+
lv_value = 5.`,
|
|
65556
|
+
};
|
|
65557
|
+
}
|
|
65558
|
+
getConfig() {
|
|
65559
|
+
return this.conf;
|
|
65560
|
+
}
|
|
65561
|
+
setConfig(conf) {
|
|
65562
|
+
this.conf = conf;
|
|
65563
|
+
}
|
|
65564
|
+
runParsed(file, obj) {
|
|
65565
|
+
var _a, _b;
|
|
65566
|
+
const issues = [];
|
|
65567
|
+
if (!(obj instanceof objects_1.Class)) {
|
|
65568
|
+
return [];
|
|
65569
|
+
}
|
|
65570
|
+
else if (file !== obj.getMainABAPFile()) {
|
|
65571
|
+
return [];
|
|
65572
|
+
}
|
|
65573
|
+
for (const statement of file.getStatements()) {
|
|
65574
|
+
const statementType = statement.get();
|
|
65575
|
+
if (statementType instanceof Statements.Move) {
|
|
65576
|
+
const source = (_a = statement.findDirectExpression(Expressions.Source)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();
|
|
65577
|
+
const target = (_b = statement.findDirectExpression(Expressions.Target)) === null || _b === void 0 ? void 0 : _b.concatTokens().toUpperCase();
|
|
65578
|
+
if (source === target && source !== undefined) {
|
|
65579
|
+
issues.push(issue_1.Issue.atStatement(file, statement, "Comment between methods in global class implementation", this.getMetadata().key, this.conf.severity));
|
|
65580
|
+
}
|
|
65581
|
+
}
|
|
65582
|
+
}
|
|
65583
|
+
return issues;
|
|
65584
|
+
}
|
|
65585
|
+
}
|
|
65586
|
+
exports.IdenticalMove = IdenticalMove;
|
|
65587
|
+
//# sourceMappingURL=identical_move.js.map
|
|
65588
|
+
|
|
65589
|
+
/***/ }),
|
|
65590
|
+
|
|
65497
65591
|
/***/ "./node_modules/@abaplint/core/build/src/rules/if_in_if.js":
|
|
65498
65592
|
/*!*****************************************************************!*\
|
|
65499
65593
|
!*** ./node_modules/@abaplint/core/build/src/rules/if_in_if.js ***!
|
|
@@ -66427,6 +66521,7 @@ __exportStar(__webpack_require__(/*! ./intf_referencing_clas */ "./node_modules/
|
|
|
66427
66521
|
__exportStar(__webpack_require__(/*! ./invalid_table_index */ "./node_modules/@abaplint/core/build/src/rules/invalid_table_index.js"), exports);
|
|
66428
66522
|
__exportStar(__webpack_require__(/*! ./keep_single_parameter_on_one_line */ "./node_modules/@abaplint/core/build/src/rules/keep_single_parameter_on_one_line.js"), exports);
|
|
66429
66523
|
__exportStar(__webpack_require__(/*! ./keyword_case */ "./node_modules/@abaplint/core/build/src/rules/keyword_case.js"), exports);
|
|
66524
|
+
__exportStar(__webpack_require__(/*! ./identical_move */ "./node_modules/@abaplint/core/build/src/rules/identical_move.js"), exports);
|
|
66430
66525
|
__exportStar(__webpack_require__(/*! ./line_break_multiple_parameters */ "./node_modules/@abaplint/core/build/src/rules/line_break_multiple_parameters.js"), exports);
|
|
66431
66526
|
__exportStar(__webpack_require__(/*! ./line_break_style */ "./node_modules/@abaplint/core/build/src/rules/line_break_style.js"), exports);
|
|
66432
66527
|
__exportStar(__webpack_require__(/*! ./line_length */ "./node_modules/@abaplint/core/build/src/rules/line_length.js"), exports);
|
|
@@ -66452,6 +66547,7 @@ __exportStar(__webpack_require__(/*! ./nesting */ "./node_modules/@abaplint/core
|
|
|
66452
66547
|
__exportStar(__webpack_require__(/*! ./newline_between_methods */ "./node_modules/@abaplint/core/build/src/rules/newline_between_methods.js"), exports);
|
|
66453
66548
|
__exportStar(__webpack_require__(/*! ./no_aliases */ "./node_modules/@abaplint/core/build/src/rules/no_aliases.js"), exports);
|
|
66454
66549
|
__exportStar(__webpack_require__(/*! ./no_chained_assignment */ "./node_modules/@abaplint/core/build/src/rules/no_chained_assignment.js"), exports);
|
|
66550
|
+
__exportStar(__webpack_require__(/*! ./no_comments_between_methods */ "./node_modules/@abaplint/core/build/src/rules/no_comments_between_methods.js"), exports);
|
|
66455
66551
|
__exportStar(__webpack_require__(/*! ./no_external_form_calls */ "./node_modules/@abaplint/core/build/src/rules/no_external_form_calls.js"), exports);
|
|
66456
66552
|
__exportStar(__webpack_require__(/*! ./no_inline_in_optional_branches */ "./node_modules/@abaplint/core/build/src/rules/no_inline_in_optional_branches.js"), exports);
|
|
66457
66553
|
__exportStar(__webpack_require__(/*! ./no_prefixes */ "./node_modules/@abaplint/core/build/src/rules/no_prefixes.js"), exports);
|
|
@@ -69781,6 +69877,81 @@ exports.NoChainedAssignment = NoChainedAssignment;
|
|
|
69781
69877
|
|
|
69782
69878
|
/***/ }),
|
|
69783
69879
|
|
|
69880
|
+
/***/ "./node_modules/@abaplint/core/build/src/rules/no_comments_between_methods.js":
|
|
69881
|
+
/*!************************************************************************************!*\
|
|
69882
|
+
!*** ./node_modules/@abaplint/core/build/src/rules/no_comments_between_methods.js ***!
|
|
69883
|
+
\************************************************************************************/
|
|
69884
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
69885
|
+
|
|
69886
|
+
"use strict";
|
|
69887
|
+
|
|
69888
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
69889
|
+
exports.NoCommentsBetweenMethods = exports.NoCommentsBetweenMethodsConf = void 0;
|
|
69890
|
+
const Statements = __webpack_require__(/*! ../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
|
|
69891
|
+
const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
|
|
69892
|
+
const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@abaplint/core/build/src/rules/_abap_rule.js");
|
|
69893
|
+
const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
|
|
69894
|
+
const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
|
|
69895
|
+
const objects_1 = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
|
|
69896
|
+
const _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js");
|
|
69897
|
+
class NoCommentsBetweenMethodsConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
69898
|
+
}
|
|
69899
|
+
exports.NoCommentsBetweenMethodsConf = NoCommentsBetweenMethodsConf;
|
|
69900
|
+
class NoCommentsBetweenMethods extends _abap_rule_1.ABAPRule {
|
|
69901
|
+
constructor() {
|
|
69902
|
+
super(...arguments);
|
|
69903
|
+
this.conf = new NoCommentsBetweenMethodsConf();
|
|
69904
|
+
}
|
|
69905
|
+
getMetadata() {
|
|
69906
|
+
return {
|
|
69907
|
+
key: "no_comments_between_methods",
|
|
69908
|
+
title: "No comments between methods in global classes",
|
|
69909
|
+
shortDescription: `Its not possible to have comments between methods in global classes.`,
|
|
69910
|
+
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Syntax],
|
|
69911
|
+
};
|
|
69912
|
+
}
|
|
69913
|
+
getConfig() {
|
|
69914
|
+
return this.conf;
|
|
69915
|
+
}
|
|
69916
|
+
setConfig(conf) {
|
|
69917
|
+
this.conf = conf;
|
|
69918
|
+
}
|
|
69919
|
+
runParsed(file, obj) {
|
|
69920
|
+
const issues = [];
|
|
69921
|
+
if (!(obj instanceof objects_1.Class)) {
|
|
69922
|
+
return [];
|
|
69923
|
+
}
|
|
69924
|
+
else if (file !== obj.getMainABAPFile()) {
|
|
69925
|
+
return [];
|
|
69926
|
+
}
|
|
69927
|
+
let inMethod = false;
|
|
69928
|
+
let inClassImpl = false;
|
|
69929
|
+
for (const statement of file.getStatements()) {
|
|
69930
|
+
const statementType = statement.get();
|
|
69931
|
+
if (statementType instanceof Statements.ClassImplementation) {
|
|
69932
|
+
inClassImpl = true;
|
|
69933
|
+
}
|
|
69934
|
+
else if (statementType instanceof Statements.EndClass) {
|
|
69935
|
+
inClassImpl = false;
|
|
69936
|
+
}
|
|
69937
|
+
else if (statementType instanceof Statements.MethodImplementation) {
|
|
69938
|
+
inMethod = true;
|
|
69939
|
+
}
|
|
69940
|
+
else if (statementType instanceof Statements.EndMethod) {
|
|
69941
|
+
inMethod = false;
|
|
69942
|
+
}
|
|
69943
|
+
else if (inClassImpl === true && inMethod === false && statementType instanceof _statement_1.Comment) {
|
|
69944
|
+
issues.push(issue_1.Issue.atStatement(file, statement, "Comment between methods in global class implementation", this.getMetadata().key, this.conf.severity));
|
|
69945
|
+
}
|
|
69946
|
+
}
|
|
69947
|
+
return issues;
|
|
69948
|
+
}
|
|
69949
|
+
}
|
|
69950
|
+
exports.NoCommentsBetweenMethods = NoCommentsBetweenMethods;
|
|
69951
|
+
//# sourceMappingURL=no_comments_between_methods.js.map
|
|
69952
|
+
|
|
69953
|
+
/***/ }),
|
|
69954
|
+
|
|
69784
69955
|
/***/ "./node_modules/@abaplint/core/build/src/rules/no_external_form_calls.js":
|
|
69785
69956
|
/*!*******************************************************************************!*\
|
|
69786
69957
|
!*** ./node_modules/@abaplint/core/build/src/rules/no_external_form_calls.js ***!
|
|
@@ -75680,7 +75851,7 @@ class UncaughtException extends _abap_rule_1.ABAPRule {
|
|
|
75680
75851
|
return this.issues;
|
|
75681
75852
|
}
|
|
75682
75853
|
traverse(n, file) {
|
|
75683
|
-
var _a, _b, _c, _d, _e
|
|
75854
|
+
var _a, _b, _c, _d, _e;
|
|
75684
75855
|
const get = n.get();
|
|
75685
75856
|
if (get instanceof Structures.ClassDefinition
|
|
75686
75857
|
|| get instanceof Structures.Interface) {
|
|
@@ -75695,13 +75866,14 @@ class UncaughtException extends _abap_rule_1.ABAPRule {
|
|
|
75695
75866
|
this.traverse(c, file);
|
|
75696
75867
|
}
|
|
75697
75868
|
this.sinked = previous;
|
|
75698
|
-
for (const
|
|
75699
|
-
|
|
75869
|
+
for (const catchStructure of n.findDirectStructures(Structures.Catch)) {
|
|
75870
|
+
for (const c of catchStructure.getChildren()) {
|
|
75871
|
+
this.traverse(c, file);
|
|
75872
|
+
}
|
|
75700
75873
|
}
|
|
75701
|
-
for (const c of ((
|
|
75874
|
+
for (const c of ((_b = n.findDirectStructure(Structures.Cleanup)) === null || _b === void 0 ? void 0 : _b.getChildren()) || []) {
|
|
75702
75875
|
this.traverse(c, file);
|
|
75703
75876
|
}
|
|
75704
|
-
return;
|
|
75705
75877
|
}
|
|
75706
75878
|
else {
|
|
75707
75879
|
for (const c of n.getChildren()) {
|
|
@@ -75730,10 +75902,10 @@ class UncaughtException extends _abap_rule_1.ABAPRule {
|
|
|
75730
75902
|
let name = undefined;
|
|
75731
75903
|
const concat = n.concatTokens().toUpperCase();
|
|
75732
75904
|
if (concat.startsWith("RAISE EXCEPTION TYPE ")) {
|
|
75733
|
-
name = (
|
|
75905
|
+
name = (_c = n.findFirstExpression(Expressions.ClassName)) === null || _c === void 0 ? void 0 : _c.getFirstToken().getStr().toUpperCase();
|
|
75734
75906
|
}
|
|
75735
75907
|
else if (concat.startsWith("RAISE EXCEPTION NEW ")) {
|
|
75736
|
-
name = (
|
|
75908
|
+
name = (_e = (_d = n.findFirstExpression(Expressions.NewObject)) === null || _d === void 0 ? void 0 : _d.findFirstExpression(Expressions.TypeNameOrInfer)) === null || _e === void 0 ? void 0 : _e.getFirstToken().getStr().toUpperCase();
|
|
75737
75909
|
// todo: else its a normal Source, infer the type from it
|
|
75738
75910
|
}
|
|
75739
75911
|
this.check(name, n, file);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.115.0",
|
|
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.
|
|
41
|
+
"@abaplint/core": "^2.115.0",
|
|
42
42
|
"@types/chai": "^4.3.20",
|
|
43
43
|
"@types/minimist": "^1.2.5",
|
|
44
44
|
"@types/mocha": "^10.0.10",
|