@abaplint/cli 2.101.4 → 2.101.5

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 +22 -6
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -25923,7 +25923,6 @@ const source_1 = __webpack_require__(/*! ./source */ "./node_modules/@abaplint/c
25923
25923
  const _type_utils_1 = __webpack_require__(/*! ../_type_utils */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_type_utils.js");
25924
25924
  class StringTemplate {
25925
25925
  runSyntax(node, scope, filename) {
25926
- var _a;
25927
25926
  const typeUtils = new _type_utils_1.TypeUtils(scope);
25928
25927
  for (const templateSource of node.findAllExpressions(Expressions.StringTemplateSource)) {
25929
25928
  const s = templateSource.findDirectExpression(Expressions.Source);
@@ -25934,9 +25933,22 @@ class StringTemplate {
25934
25933
  else if (typeUtils.isCharLike(type) === false && typeUtils.isHexLike(type) === false) {
25935
25934
  throw new Error("Not character like, " + type.constructor.name);
25936
25935
  }
25937
- for (const formatSource of ((_a = templateSource.findDirectExpression(Expressions.StringTemplateFormatting)) === null || _a === void 0 ? void 0 : _a.findAllExpressions(Expressions.Source)) || []) {
25936
+ const format = templateSource.findDirectExpression(Expressions.StringTemplateFormatting);
25937
+ const formatConcat = format === null || format === void 0 ? void 0 : format.concatTokens();
25938
+ for (const formatSource of (format === null || format === void 0 ? void 0 : format.findAllExpressions(Expressions.Source)) || []) {
25938
25939
  new source_1.Source().runSyntax(formatSource, scope, filename);
25939
25940
  }
25941
+ if ((formatConcat === null || formatConcat === void 0 ? void 0 : formatConcat.includes("ALPHA = "))
25942
+ && !(type instanceof basic_1.UnknownType)
25943
+ && !(type instanceof basic_1.VoidType)
25944
+ && !(type instanceof basic_1.StringType)
25945
+ && !(type instanceof basic_1.CLikeType)
25946
+ && !(type instanceof basic_1.CharacterType)
25947
+ && !(type instanceof basic_1.NumericGenericType)
25948
+ && !(type instanceof basic_1.NumericType)
25949
+ && !(type instanceof basic_1.AnyType)) {
25950
+ throw new Error("Cannot apply ALPHA to this type");
25951
+ }
25940
25952
  }
25941
25953
  return new basic_1.StringType({ qualifiedName: "STRING" });
25942
25954
  }
@@ -48014,7 +48026,7 @@ class Registry {
48014
48026
  }
48015
48027
  static abaplintVersion() {
48016
48028
  // magic, see build script "version.sh"
48017
- return "2.101.4";
48029
+ return "2.101.5";
48018
48030
  }
48019
48031
  getDDICReferences() {
48020
48032
  return this.ddicReferences;
@@ -60447,14 +60459,18 @@ class ModifyOnlyOwnDBTables {
60447
60459
  }
60448
60460
  const concat = databaseTable.concatTokens().toUpperCase();
60449
60461
  if (regExp.test(concat) === false) {
60450
- // must contain a ReferenceType.TableVoidReference
60462
+ // must contain a ReferenceType.TableVoidReference or a ReferenceType.TableReference if its a dependency
60451
60463
  if (spaghetti === undefined) {
60452
60464
  spaghetti = new syntax_1.SyntaxLogic(this.reg, obj).run().spaghetti;
60453
60465
  }
60454
60466
  const start = databaseTable.getFirstToken().getStart();
60455
60467
  const scope = spaghetti.lookupPosition(start, file.getFilename());
60456
- const found = scope === null || scope === void 0 ? void 0 : scope.findTableVoidReference(start);
60457
- if (found) {
60468
+ const found1 = scope === null || scope === void 0 ? void 0 : scope.findTableVoidReference(start);
60469
+ if (found1) {
60470
+ output.push(issue_1.Issue.atStatement(file, s, this.getMetadata().title, this.getMetadata().key, this.getConfig().severity));
60471
+ }
60472
+ const found2 = scope === null || scope === void 0 ? void 0 : scope.findTableReference(start);
60473
+ if (found2) {
60458
60474
  output.push(issue_1.Issue.atStatement(file, s, this.getMetadata().title, this.getMetadata().key, this.getConfig().severity));
60459
60475
  }
60460
60476
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.101.4",
3
+ "version": "2.101.5",
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.101.4",
41
+ "@abaplint/core": "^2.101.5",
42
42
  "@types/chai": "^4.3.5",
43
43
  "@types/glob": "^7.2.0",
44
44
  "@types/minimist": "^1.2.2",