@abaplint/cli 2.115.20 → 2.115.22

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 +26 -6
  2. package/package.json +3 -3
package/build/cli.js CHANGED
@@ -3967,7 +3967,7 @@ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/co
3967
3967
  const method_name_1 = __webpack_require__(/*! ./method_name */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_name.js");
3968
3968
  class AbstractMethods extends combi_1.Expression {
3969
3969
  getRunnable() {
3970
- return (0, combi_1.seq)("ABSTRACT METHODS", (0, combi_1.plusPrio)(method_name_1.MethodName));
3970
+ return (0, combi_1.seq)("ABSTRACT METHODS", (0, combi_1.plus)(method_name_1.MethodName));
3971
3971
  }
3972
3972
  }
3973
3973
  exports.AbstractMethods = AbstractMethods;
@@ -14854,7 +14854,7 @@ class InterfaceDef {
14854
14854
  getMatcher() {
14855
14855
  const val = (0, combi_1.seq)(expressions_1.AttributeName, "=", expressions_1.Source);
14856
14856
  const dataValues = (0, combi_1.seq)("DATA VALUES", (0, combi_1.plus)(val));
14857
- const options = (0, combi_1.alt)(expressions_1.AbstractMethods, expressions_1.FinalMethods, "ALL METHODS ABSTRACT", "ALL METHODS FINAL", (0, combi_1.ver)(version_1.Version.v740sp02, "PARTIALLY IMPLEMENTED", version_1.Version.OpenABAP));
14857
+ const options = (0, combi_1.alt)((0, combi_1.seq)(expressions_1.AbstractMethods, (0, combi_1.opt)(expressions_1.FinalMethods)), expressions_1.FinalMethods, "ALL METHODS ABSTRACT", "ALL METHODS FINAL", (0, combi_1.ver)(version_1.Version.v740sp02, "PARTIALLY IMPLEMENTED", version_1.Version.OpenABAP));
14858
14858
  return (0, combi_1.seq)("INTERFACES", expressions_1.InterfaceName, (0, combi_1.opt)(options), (0, combi_1.opt)(dataValues));
14859
14859
  }
14860
14860
  }
@@ -15420,7 +15420,8 @@ class Move {
15420
15420
  const equals = (0, combi_1.altPrio)((0, combi_1.altPrio)(chained, "?="), calcAssign);
15421
15421
  // todo, move "?=" to CAST?
15422
15422
  const eq = (0, combi_1.seq)(expressions_1.Target, equals, expressions_1.Source);
15423
- return (0, combi_1.altPrio)(move, eq);
15423
+ const eqd = (0, combi_1.seq)(expressions_1.Target, equals, expressions_1.Source, expressions_1.Dereference);
15424
+ return (0, combi_1.alt)(move, eq, eqd);
15424
15425
  }
15425
15426
  }
15426
15427
  exports.Move = Move;
@@ -33639,6 +33640,7 @@ const target_1 = __webpack_require__(/*! ../expressions/target */ "./node_module
33639
33640
  const inline_data_1 = __webpack_require__(/*! ../expressions/inline_data */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/inline_data.js");
33640
33641
  const _type_utils_1 = __webpack_require__(/*! ../_type_utils */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_type_utils.js");
33641
33642
  const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_syntax_input.js");
33643
+ const dereference_1 = __webpack_require__(/*! ../expressions/dereference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/dereference.js");
33642
33644
  class Move {
33643
33645
  runSyntax(node, input) {
33644
33646
  const targets = node.findDirectExpressions(Expressions.Target);
@@ -33655,12 +33657,15 @@ class Move {
33655
33657
  }
33656
33658
  }
33657
33659
  const source = node.findDirectExpression(Expressions.Source);
33658
- const sourceType = source ? source_1.Source.runSyntax(source, input, targetType) : undefined;
33660
+ let sourceType = source ? source_1.Source.runSyntax(source, input, targetType) : undefined;
33659
33661
  if (sourceType === undefined) {
33660
33662
  const message = "No source type determined";
33661
33663
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
33662
33664
  return;
33663
33665
  }
33666
+ if (node.findDirectExpression(Expressions.Dereference)) {
33667
+ sourceType = dereference_1.Dereference.runSyntax(node, sourceType, input);
33668
+ }
33664
33669
  if (inline) {
33665
33670
  inline_data_1.InlineData.runSyntax(inline, input, sourceType);
33666
33671
  targetType = sourceType;
@@ -55480,7 +55485,7 @@ class Registry {
55480
55485
  }
55481
55486
  static abaplintVersion() {
55482
55487
  // magic, see build script "version.sh"
55483
- return "2.115.20";
55488
+ return "2.115.22";
55484
55489
  }
55485
55490
  getDDICReferences() {
55486
55491
  return this.ddicReferences;
@@ -65424,6 +65429,7 @@ const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@ab
65424
65429
  const Objects = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
65425
65430
  const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
65426
65431
  const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
65432
+ const objects_1 = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
65427
65433
  class GlobalClassConf extends _basic_rule_config_1.BasicRuleConfig {
65428
65434
  }
65429
65435
  exports.GlobalClassConf = GlobalClassConf;
@@ -65445,7 +65451,9 @@ class GlobalClass extends _abap_rule_1.ABAPRule {
65445
65451
 
65446
65452
  * global classes must be global definitions
65447
65453
 
65448
- * global interfaces must be global definitions`,
65454
+ * global interfaces must be global definitions
65455
+
65456
+ * global FOR TESTING, must have CATEGORY = 05 in the XML`,
65449
65457
  tags: [_irule_1.RuleTag.Syntax],
65450
65458
  };
65451
65459
  }
@@ -65470,6 +65478,18 @@ class GlobalClass extends _abap_rule_1.ABAPRule {
65470
65478
  const issue = issue_1.Issue.atIdentifier(definition.identifier, "Class must be local", this.getMetadata().key, this.conf.severity);
65471
65479
  output.push(issue);
65472
65480
  }
65481
+ if (definition.isGlobal && obj instanceof Objects.Class) {
65482
+ if (definition.isForTesting === true && obj instanceof Objects.Class && obj.getCategory() !== objects_1.ClassCategory.Test) {
65483
+ const message = "Class is marked as FOR TESTING, but CATEGORY is not 05 in the XML";
65484
+ const issue = issue_1.Issue.atIdentifier(definition.identifier, message, this.getMetadata().key, this.conf.severity);
65485
+ output.push(issue);
65486
+ }
65487
+ else if (definition.isForTesting === false && obj instanceof Objects.Class && obj.getCategory() === objects_1.ClassCategory.Test) {
65488
+ const message = "Class has CATEGORY 05 in the XML, but is not marked as FOR TESTING";
65489
+ const issue = issue_1.Issue.atIdentifier(definition.identifier, message, this.getMetadata().key, this.conf.severity);
65490
+ output.push(issue);
65491
+ }
65492
+ }
65473
65493
  }
65474
65494
  for (const impl of file.getInfo().listClassImplementations()) {
65475
65495
  if (file.getFilename().match(/\.clas\.abap$/)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.115.20",
3
+ "version": "2.115.22",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,11 +38,11 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.115.20",
41
+ "@abaplint/core": "^2.115.22",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/minimist": "^1.2.5",
44
44
  "@types/mocha": "^10.0.10",
45
- "@types/node": "^24.10.10",
45
+ "@types/node": "^24.10.12",
46
46
  "@types/progress": "^2.0.7",
47
47
  "chai": "^4.5.0",
48
48
  "p-limit": "^3.1.0",