@abaplint/cli 2.109.3 → 2.110.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.
Files changed (2) hide show
  1. package/build/cli.js +88 -9
  2. package/package.json +3 -3
package/build/cli.js CHANGED
@@ -39843,7 +39843,10 @@ const cds_association_1 = __webpack_require__(/*! ./cds_association */ "./node_m
39843
39843
  const cds_join_1 = __webpack_require__(/*! ./cds_join */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_join.js");
39844
39844
  class CDSSelect extends combi_1.Expression {
39845
39845
  getRunnable() {
39846
- return (0, combi_1.seq)("SELECT", (0, combi_1.opt)("DISTINCT"), "FROM", _1.CDSSource, (0, combi_1.opt)(_1.CDSParametersSelect), (0, combi_1.opt)(_1.CDSAs), (0, combi_1.star)(cds_join_1.CDSJoin), (0, combi_1.star)(_1.CDSComposition), (0, combi_1.star)(cds_association_1.CDSAssociation), (0, combi_1.star)(_1.CDSComposition), (0, combi_1.str)("{"), (0, combi_1.plus)(_1.CDSElement), (0, combi_1.star)((0, combi_1.seq)(",", _1.CDSElement)), (0, combi_1.str)("}"), (0, combi_1.opt)(_1.CDSGroupBy), (0, combi_1.opt)(_1.CDSWhere), (0, combi_1.opt)((0, combi_1.seq)("UNION", (0, combi_1.opt)("ALL"), CDSSelect)));
39846
+ const fields = (0, combi_1.opt)((0, combi_1.seq)((0, combi_1.star)((0, combi_1.seq)(_1.CDSElement, ",")), _1.CDSElement));
39847
+ const distinct = (0, combi_1.str)("DISTINCT");
39848
+ const elements = (0, combi_1.seq)((0, combi_1.str)("{"), (0, combi_1.plus)(_1.CDSElement), (0, combi_1.star)((0, combi_1.seq)(",", _1.CDSElement)), (0, combi_1.str)("}"));
39849
+ return (0, combi_1.seq)("SELECT", (0, combi_1.opt)(distinct), (0, combi_1.opt)(fields), "FROM", _1.CDSSource, (0, combi_1.opt)(_1.CDSParametersSelect), (0, combi_1.opt)(_1.CDSAs), (0, combi_1.star)(cds_join_1.CDSJoin), (0, combi_1.star)(_1.CDSComposition), (0, combi_1.star)(cds_association_1.CDSAssociation), (0, combi_1.star)(_1.CDSComposition), (0, combi_1.opt)(elements), (0, combi_1.opt)(_1.CDSGroupBy), (0, combi_1.opt)(_1.CDSWhere), (0, combi_1.opt)((0, combi_1.seq)("UNION", (0, combi_1.opt)("ALL"), CDSSelect)));
39847
39850
  }
39848
39851
  }
39849
39852
  exports.CDSSelect = CDSSelect;
@@ -51774,7 +51777,7 @@ class Registry {
51774
51777
  }
51775
51778
  static abaplintVersion() {
51776
51779
  // magic, see build script "version.sh"
51777
- return "2.109.3";
51780
+ return "2.110.1";
51778
51781
  }
51779
51782
  getDDICReferences() {
51780
51783
  return this.ddicReferences;
@@ -62516,7 +62519,6 @@ __exportStar(__webpack_require__(/*! ./cds_legacy_view */ "./node_modules/@abapl
62516
62519
  __exportStar(__webpack_require__(/*! ./cds_parser_error */ "./node_modules/@abaplint/core/build/src/rules/cds_parser_error.js"), exports);
62517
62520
  __exportStar(__webpack_require__(/*! ./chain_mainly_declarations */ "./node_modules/@abaplint/core/build/src/rules/chain_mainly_declarations.js"), exports);
62518
62521
  __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
62522
  __exportStar(__webpack_require__(/*! ./check_abstract */ "./node_modules/@abaplint/core/build/src/rules/check_abstract.js"), exports);
62521
62523
  __exportStar(__webpack_require__(/*! ./check_comments */ "./node_modules/@abaplint/core/build/src/rules/check_comments.js"), exports);
62522
62524
  __exportStar(__webpack_require__(/*! ./check_ddic */ "./node_modules/@abaplint/core/build/src/rules/check_ddic.js"), exports);
@@ -62578,6 +62580,7 @@ __exportStar(__webpack_require__(/*! ./line_only_punc */ "./node_modules/@abapli
62578
62580
  __exportStar(__webpack_require__(/*! ./local_class_naming */ "./node_modules/@abaplint/core/build/src/rules/local_class_naming.js"), exports);
62579
62581
  __exportStar(__webpack_require__(/*! ./local_testclass_consistency */ "./node_modules/@abaplint/core/build/src/rules/local_testclass_consistency.js"), exports);
62580
62582
  __exportStar(__webpack_require__(/*! ./local_variable_names */ "./node_modules/@abaplint/core/build/src/rules/local_variable_names.js"), exports);
62583
+ __exportStar(__webpack_require__(/*! ./macro_naming */ "./node_modules/@abaplint/core/build/src/rules/macro_naming.js"), exports);
62581
62584
  __exportStar(__webpack_require__(/*! ./main_file_contents */ "./node_modules/@abaplint/core/build/src/rules/main_file_contents.js"), exports);
62582
62585
  __exportStar(__webpack_require__(/*! ./many_parentheses */ "./node_modules/@abaplint/core/build/src/rules/many_parentheses.js"), exports);
62583
62586
  __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 +62658,7 @@ __exportStar(__webpack_require__(/*! ./unnecessary_return */ "./node_modules/@ab
62655
62658
  __exportStar(__webpack_require__(/*! ./unreachable_code */ "./node_modules/@abaplint/core/build/src/rules/unreachable_code.js"), exports);
62656
62659
  __exportStar(__webpack_require__(/*! ./unsecure_fae */ "./node_modules/@abaplint/core/build/src/rules/unsecure_fae.js"), exports);
62657
62660
  __exportStar(__webpack_require__(/*! ./unused_ddic */ "./node_modules/@abaplint/core/build/src/rules/unused_ddic.js"), exports);
62661
+ __exportStar(__webpack_require__(/*! ./unused_macros */ "./node_modules/@abaplint/core/build/src/rules/unused_macros.js"), exports);
62658
62662
  __exportStar(__webpack_require__(/*! ./unused_methods */ "./node_modules/@abaplint/core/build/src/rules/unused_methods.js"), exports);
62659
62663
  __exportStar(__webpack_require__(/*! ./unused_types */ "./node_modules/@abaplint/core/build/src/rules/unused_types.js"), exports);
62660
62664
  __exportStar(__webpack_require__(/*! ./unused_variables */ "./node_modules/@abaplint/core/build/src/rules/unused_variables.js"), exports);
@@ -63991,6 +63995,83 @@ exports.LocalVariableNames = LocalVariableNames;
63991
63995
 
63992
63996
  /***/ }),
63993
63997
 
63998
+ /***/ "./node_modules/@abaplint/core/build/src/rules/macro_naming.js":
63999
+ /*!*********************************************************************!*\
64000
+ !*** ./node_modules/@abaplint/core/build/src/rules/macro_naming.js ***!
64001
+ \*********************************************************************/
64002
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
64003
+
64004
+ "use strict";
64005
+
64006
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
64007
+ exports.MacroNaming = exports.MacroNamingConf = void 0;
64008
+ const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
64009
+ const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@abaplint/core/build/src/rules/_abap_rule.js");
64010
+ const Statements = __webpack_require__(/*! ../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
64011
+ const Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
64012
+ const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
64013
+ const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
64014
+ const objects_1 = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
64015
+ class MacroNamingConf extends _basic_rule_config_1.BasicRuleConfig {
64016
+ constructor() {
64017
+ super(...arguments);
64018
+ /** The pattern for macros, case insensitive */
64019
+ this.pattern = "^_.+$";
64020
+ }
64021
+ }
64022
+ exports.MacroNamingConf = MacroNamingConf;
64023
+ class MacroNaming extends _abap_rule_1.ABAPRule {
64024
+ constructor() {
64025
+ super(...arguments);
64026
+ this.conf = new MacroNamingConf();
64027
+ }
64028
+ getMetadata() {
64029
+ return {
64030
+ key: "macro_naming",
64031
+ title: "Macro naming conventions",
64032
+ shortDescription: `Allows you to enforce a pattern for macro definitions`,
64033
+ extendedInformation: `Use rule "avoid_use" to avoid macros alotogether.`,
64034
+ tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
64035
+ };
64036
+ }
64037
+ getConfig() {
64038
+ return this.conf;
64039
+ }
64040
+ setConfig(conf) {
64041
+ this.conf = conf;
64042
+ }
64043
+ runParsed(file, obj) {
64044
+ const issues = [];
64045
+ const testRegex = new RegExp(this.conf.pattern, "i");
64046
+ if (obj instanceof objects_1.TypePool) {
64047
+ return [];
64048
+ }
64049
+ for (const stat of file.getStatements()) {
64050
+ if (!(stat.get() instanceof Statements.Define)) {
64051
+ continue;
64052
+ }
64053
+ const expr = stat.findDirectExpression(Expressions.MacroName);
64054
+ if (expr === undefined) {
64055
+ continue;
64056
+ }
64057
+ const token = expr.getFirstToken();
64058
+ if (testRegex.exec(token.getStr())) {
64059
+ continue;
64060
+ }
64061
+ else {
64062
+ const message = "Bad macro name naming, expected \"" + this.conf.pattern + "\", got \"" + token.getStr() + "\"";
64063
+ const issue = issue_1.Issue.atToken(file, token, message, this.getMetadata().key, this.conf.severity);
64064
+ issues.push(issue);
64065
+ }
64066
+ }
64067
+ return issues;
64068
+ }
64069
+ }
64070
+ exports.MacroNaming = MacroNaming;
64071
+ //# sourceMappingURL=macro_naming.js.map
64072
+
64073
+ /***/ }),
64074
+
63994
64075
  /***/ "./node_modules/@abaplint/core/build/src/rules/main_file_contents.js":
63995
64076
  /*!***************************************************************************!*\
63996
64077
  !*** ./node_modules/@abaplint/core/build/src/rules/main_file_contents.js ***!
@@ -66906,7 +66987,7 @@ ENDIF.`,
66906
66987
  const children = statementNode.getChildren();
66907
66988
  const sourceString = children[1].concatTokens();
66908
66989
  const targetString = children[3].concatTokens();
66909
- let operator = children[2].concatTokens();
66990
+ let operator = children[2].concatTokens().toUpperCase();
66910
66991
  if (operator === "TO") {
66911
66992
  operator = " = ";
66912
66993
  }
@@ -69140,11 +69221,9 @@ class RFCErrorHandling extends _abap_rule_1.ABAPRule {
69140
69221
  tags: [_irule_1.RuleTag.SingleFile],
69141
69222
  shortDescription: `Checks that exceptions 'system_failure' and 'communication_failure' are handled in RFC calls`,
69142
69223
  extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenrfc_exception.htm`,
69143
- badExample: `
69144
- CALL FUNCTION 'ZRFC'
69224
+ badExample: `CALL FUNCTION 'ZRFC'
69145
69225
  DESTINATION lv_rfc.`,
69146
- goodExample: `
69147
- CALL FUNCTION 'ZRFC'
69226
+ goodExample: `CALL FUNCTION 'ZRFC'
69148
69227
  DESTINATION lv_rfc
69149
69228
  EXCEPTIONS
69150
69229
  system_failure = 1 MESSAGE msg
@@ -71251,7 +71330,7 @@ const objects_1 = __webpack_require__(/*! ../objects */ "./node_modules/@abaplin
71251
71330
  class TypesNamingConf extends _basic_rule_config_1.BasicRuleConfig {
71252
71331
  constructor() {
71253
71332
  super(...arguments);
71254
- /** The pattern for TYPES */
71333
+ /** The pattern for TYPES, case insensitive */
71255
71334
  this.pattern = "^TY_.+$";
71256
71335
  }
71257
71336
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.109.3",
3
+ "version": "2.110.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.109.3",
41
+ "@abaplint/core": "^2.110.1",
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.91.0",
58
+ "webpack": "^5.92.0",
59
59
  "webpack-cli": "^5.1.4",
60
60
  "xml-js": "^1.6.11"
61
61
  },