@abaplint/cli 2.109.3 → 2.110.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 +83 -7
- package/package.json +3 -3
package/build/cli.js
CHANGED
|
@@ -51774,7 +51774,7 @@ class Registry {
|
|
|
51774
51774
|
}
|
|
51775
51775
|
static abaplintVersion() {
|
|
51776
51776
|
// magic, see build script "version.sh"
|
|
51777
|
-
return "2.
|
|
51777
|
+
return "2.110.0";
|
|
51778
51778
|
}
|
|
51779
51779
|
getDDICReferences() {
|
|
51780
51780
|
return this.ddicReferences;
|
|
@@ -62516,7 +62516,6 @@ __exportStar(__webpack_require__(/*! ./cds_legacy_view */ "./node_modules/@abapl
|
|
|
62516
62516
|
__exportStar(__webpack_require__(/*! ./cds_parser_error */ "./node_modules/@abaplint/core/build/src/rules/cds_parser_error.js"), exports);
|
|
62517
62517
|
__exportStar(__webpack_require__(/*! ./chain_mainly_declarations */ "./node_modules/@abaplint/core/build/src/rules/chain_mainly_declarations.js"), exports);
|
|
62518
62518
|
__exportStar(__webpack_require__(/*! ./change_if_to_case */ "./node_modules/@abaplint/core/build/src/rules/change_if_to_case.js"), exports);
|
|
62519
|
-
__exportStar(__webpack_require__(/*! ./unused_macros */ "./node_modules/@abaplint/core/build/src/rules/unused_macros.js"), exports);
|
|
62520
62519
|
__exportStar(__webpack_require__(/*! ./check_abstract */ "./node_modules/@abaplint/core/build/src/rules/check_abstract.js"), exports);
|
|
62521
62520
|
__exportStar(__webpack_require__(/*! ./check_comments */ "./node_modules/@abaplint/core/build/src/rules/check_comments.js"), exports);
|
|
62522
62521
|
__exportStar(__webpack_require__(/*! ./check_ddic */ "./node_modules/@abaplint/core/build/src/rules/check_ddic.js"), exports);
|
|
@@ -62578,6 +62577,7 @@ __exportStar(__webpack_require__(/*! ./line_only_punc */ "./node_modules/@abapli
|
|
|
62578
62577
|
__exportStar(__webpack_require__(/*! ./local_class_naming */ "./node_modules/@abaplint/core/build/src/rules/local_class_naming.js"), exports);
|
|
62579
62578
|
__exportStar(__webpack_require__(/*! ./local_testclass_consistency */ "./node_modules/@abaplint/core/build/src/rules/local_testclass_consistency.js"), exports);
|
|
62580
62579
|
__exportStar(__webpack_require__(/*! ./local_variable_names */ "./node_modules/@abaplint/core/build/src/rules/local_variable_names.js"), exports);
|
|
62580
|
+
__exportStar(__webpack_require__(/*! ./macro_naming */ "./node_modules/@abaplint/core/build/src/rules/macro_naming.js"), exports);
|
|
62581
62581
|
__exportStar(__webpack_require__(/*! ./main_file_contents */ "./node_modules/@abaplint/core/build/src/rules/main_file_contents.js"), exports);
|
|
62582
62582
|
__exportStar(__webpack_require__(/*! ./many_parentheses */ "./node_modules/@abaplint/core/build/src/rules/many_parentheses.js"), exports);
|
|
62583
62583
|
__exportStar(__webpack_require__(/*! ./max_one_method_parameter_per_line */ "./node_modules/@abaplint/core/build/src/rules/max_one_method_parameter_per_line.js"), exports);
|
|
@@ -62655,6 +62655,7 @@ __exportStar(__webpack_require__(/*! ./unnecessary_return */ "./node_modules/@ab
|
|
|
62655
62655
|
__exportStar(__webpack_require__(/*! ./unreachable_code */ "./node_modules/@abaplint/core/build/src/rules/unreachable_code.js"), exports);
|
|
62656
62656
|
__exportStar(__webpack_require__(/*! ./unsecure_fae */ "./node_modules/@abaplint/core/build/src/rules/unsecure_fae.js"), exports);
|
|
62657
62657
|
__exportStar(__webpack_require__(/*! ./unused_ddic */ "./node_modules/@abaplint/core/build/src/rules/unused_ddic.js"), exports);
|
|
62658
|
+
__exportStar(__webpack_require__(/*! ./unused_macros */ "./node_modules/@abaplint/core/build/src/rules/unused_macros.js"), exports);
|
|
62658
62659
|
__exportStar(__webpack_require__(/*! ./unused_methods */ "./node_modules/@abaplint/core/build/src/rules/unused_methods.js"), exports);
|
|
62659
62660
|
__exportStar(__webpack_require__(/*! ./unused_types */ "./node_modules/@abaplint/core/build/src/rules/unused_types.js"), exports);
|
|
62660
62661
|
__exportStar(__webpack_require__(/*! ./unused_variables */ "./node_modules/@abaplint/core/build/src/rules/unused_variables.js"), exports);
|
|
@@ -63991,6 +63992,83 @@ exports.LocalVariableNames = LocalVariableNames;
|
|
|
63991
63992
|
|
|
63992
63993
|
/***/ }),
|
|
63993
63994
|
|
|
63995
|
+
/***/ "./node_modules/@abaplint/core/build/src/rules/macro_naming.js":
|
|
63996
|
+
/*!*********************************************************************!*\
|
|
63997
|
+
!*** ./node_modules/@abaplint/core/build/src/rules/macro_naming.js ***!
|
|
63998
|
+
\*********************************************************************/
|
|
63999
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
64000
|
+
|
|
64001
|
+
"use strict";
|
|
64002
|
+
|
|
64003
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
64004
|
+
exports.MacroNaming = exports.MacroNamingConf = void 0;
|
|
64005
|
+
const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
|
|
64006
|
+
const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@abaplint/core/build/src/rules/_abap_rule.js");
|
|
64007
|
+
const Statements = __webpack_require__(/*! ../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
|
|
64008
|
+
const Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
64009
|
+
const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
|
|
64010
|
+
const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
|
|
64011
|
+
const objects_1 = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
|
|
64012
|
+
class MacroNamingConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
64013
|
+
constructor() {
|
|
64014
|
+
super(...arguments);
|
|
64015
|
+
/** The pattern for macros, case insensitive */
|
|
64016
|
+
this.pattern = "^_.+$";
|
|
64017
|
+
}
|
|
64018
|
+
}
|
|
64019
|
+
exports.MacroNamingConf = MacroNamingConf;
|
|
64020
|
+
class MacroNaming extends _abap_rule_1.ABAPRule {
|
|
64021
|
+
constructor() {
|
|
64022
|
+
super(...arguments);
|
|
64023
|
+
this.conf = new MacroNamingConf();
|
|
64024
|
+
}
|
|
64025
|
+
getMetadata() {
|
|
64026
|
+
return {
|
|
64027
|
+
key: "macro_naming",
|
|
64028
|
+
title: "Macro naming conventions",
|
|
64029
|
+
shortDescription: `Allows you to enforce a pattern for macro definitions`,
|
|
64030
|
+
extendedInformation: `Use rule "avoid_use" to avoid macros alotogether.`,
|
|
64031
|
+
tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
|
|
64032
|
+
};
|
|
64033
|
+
}
|
|
64034
|
+
getConfig() {
|
|
64035
|
+
return this.conf;
|
|
64036
|
+
}
|
|
64037
|
+
setConfig(conf) {
|
|
64038
|
+
this.conf = conf;
|
|
64039
|
+
}
|
|
64040
|
+
runParsed(file, obj) {
|
|
64041
|
+
const issues = [];
|
|
64042
|
+
const testRegex = new RegExp(this.conf.pattern, "i");
|
|
64043
|
+
if (obj instanceof objects_1.TypePool) {
|
|
64044
|
+
return [];
|
|
64045
|
+
}
|
|
64046
|
+
for (const stat of file.getStatements()) {
|
|
64047
|
+
if (!(stat.get() instanceof Statements.Define)) {
|
|
64048
|
+
continue;
|
|
64049
|
+
}
|
|
64050
|
+
const expr = stat.findDirectExpression(Expressions.MacroName);
|
|
64051
|
+
if (expr === undefined) {
|
|
64052
|
+
continue;
|
|
64053
|
+
}
|
|
64054
|
+
const token = expr.getFirstToken();
|
|
64055
|
+
if (testRegex.exec(token.getStr())) {
|
|
64056
|
+
continue;
|
|
64057
|
+
}
|
|
64058
|
+
else {
|
|
64059
|
+
const message = "Bad macro name naming, expected \"" + this.conf.pattern + "\", got \"" + token.getStr() + "\"";
|
|
64060
|
+
const issue = issue_1.Issue.atToken(file, token, message, this.getMetadata().key, this.conf.severity);
|
|
64061
|
+
issues.push(issue);
|
|
64062
|
+
}
|
|
64063
|
+
}
|
|
64064
|
+
return issues;
|
|
64065
|
+
}
|
|
64066
|
+
}
|
|
64067
|
+
exports.MacroNaming = MacroNaming;
|
|
64068
|
+
//# sourceMappingURL=macro_naming.js.map
|
|
64069
|
+
|
|
64070
|
+
/***/ }),
|
|
64071
|
+
|
|
63994
64072
|
/***/ "./node_modules/@abaplint/core/build/src/rules/main_file_contents.js":
|
|
63995
64073
|
/*!***************************************************************************!*\
|
|
63996
64074
|
!*** ./node_modules/@abaplint/core/build/src/rules/main_file_contents.js ***!
|
|
@@ -69140,11 +69218,9 @@ class RFCErrorHandling extends _abap_rule_1.ABAPRule {
|
|
|
69140
69218
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
69141
69219
|
shortDescription: `Checks that exceptions 'system_failure' and 'communication_failure' are handled in RFC calls`,
|
|
69142
69220
|
extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenrfc_exception.htm`,
|
|
69143
|
-
badExample: `
|
|
69144
|
-
CALL FUNCTION 'ZRFC'
|
|
69221
|
+
badExample: `CALL FUNCTION 'ZRFC'
|
|
69145
69222
|
DESTINATION lv_rfc.`,
|
|
69146
|
-
goodExample: `
|
|
69147
|
-
CALL FUNCTION 'ZRFC'
|
|
69223
|
+
goodExample: `CALL FUNCTION 'ZRFC'
|
|
69148
69224
|
DESTINATION lv_rfc
|
|
69149
69225
|
EXCEPTIONS
|
|
69150
69226
|
system_failure = 1 MESSAGE msg
|
|
@@ -71251,7 +71327,7 @@ const objects_1 = __webpack_require__(/*! ../objects */ "./node_modules/@abaplin
|
|
|
71251
71327
|
class TypesNamingConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
71252
71328
|
constructor() {
|
|
71253
71329
|
super(...arguments);
|
|
71254
|
-
/** The pattern for TYPES */
|
|
71330
|
+
/** The pattern for TYPES, case insensitive */
|
|
71255
71331
|
this.pattern = "^TY_.+$";
|
|
71256
71332
|
}
|
|
71257
71333
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.110.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.110.0",
|
|
42
42
|
"@types/chai": "^4.3.16",
|
|
43
43
|
"@types/glob": "^8.1.0",
|
|
44
44
|
"@types/minimist": "^1.2.5",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"mocha": "^10.4.0",
|
|
56
56
|
"progress": "^2.0.3",
|
|
57
57
|
"typescript": "^5.4.5",
|
|
58
|
-
"webpack": "^5.
|
|
58
|
+
"webpack": "^5.92.0",
|
|
59
59
|
"webpack-cli": "^5.1.4",
|
|
60
60
|
"xml-js": "^1.6.11"
|
|
61
61
|
},
|