@abaplint/cli 2.99.3 → 2.99.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 +29 -11
  2. package/package.json +3 -3
package/build/cli.js CHANGED
@@ -20599,7 +20599,7 @@ class CurrentScope {
20599
20599
  return undefined;
20600
20600
  }
20601
20601
  const typePoolName = name.split("_")[0];
20602
- if (typePoolName.length !== 4) {
20602
+ if (typePoolName.length <= 2 || typePoolName.length > 5) {
20603
20603
  return undefined;
20604
20604
  }
20605
20605
  const typePool = this.reg.getObject("TYPE", typePoolName);
@@ -20616,7 +20616,10 @@ class CurrentScope {
20616
20616
  return undefined;
20617
20617
  }
20618
20618
  const typePoolName = name.split("_")[0];
20619
- if (typePoolName.length !== 4 || new ddic_1.DDIC(this.reg).lookupNoVoid(name) !== undefined) {
20619
+ if (typePoolName.length <= 2 || typePoolName.length > 5) {
20620
+ return undefined;
20621
+ }
20622
+ if (new ddic_1.DDIC(this.reg).lookupNoVoid(name) !== undefined) {
20620
20623
  // this is tricky, it should not do recursion when parsing the type pool itself,
20621
20624
  // think about DTEL ABAP_ENCOD vs TYPE ABAP
20622
20625
  return undefined;
@@ -33921,7 +33924,7 @@ class CharacterType extends _abstract_type_1.AbstractType {
33921
33924
  constructor(length, extra) {
33922
33925
  super(extra);
33923
33926
  if (length <= 0) {
33924
- throw new Error("Bad LENGTH");
33927
+ throw new Error("Bad LENGTH, Character");
33925
33928
  }
33926
33929
  this.length = length;
33927
33930
  }
@@ -34292,7 +34295,7 @@ class FloatingPointType extends _abstract_type_1.AbstractType {
34292
34295
  constructor(length, qualifiedName) {
34293
34296
  super({ qualifiedName: qualifiedName });
34294
34297
  if (length <= 0) {
34295
- throw new Error("Bad LENGTH");
34298
+ throw new Error("Bad LENGTH, Floating Point");
34296
34299
  }
34297
34300
  this.length = length;
34298
34301
  }
@@ -34369,7 +34372,7 @@ class HexType extends _abstract_type_1.AbstractType {
34369
34372
  constructor(length, qualifiedName) {
34370
34373
  super({ qualifiedName: qualifiedName });
34371
34374
  if (length <= 0) {
34372
- throw new Error("Bad LENGTH");
34375
+ throw new Error("Bad LENGTHm, Hex");
34373
34376
  }
34374
34377
  this.length = length;
34375
34378
  }
@@ -34534,7 +34537,7 @@ class NumericType extends _abstract_type_1.AbstractType {
34534
34537
  constructor(length, qualifiedName) {
34535
34538
  super({ qualifiedName: qualifiedName });
34536
34539
  if (length <= 0) {
34537
- throw new Error("Bad LENGTH");
34540
+ throw new Error("Bad LENGTH, Numeric");
34538
34541
  }
34539
34542
  this.length = length;
34540
34543
  }
@@ -34621,10 +34624,10 @@ class PackedType extends _abstract_type_1.AbstractType {
34621
34624
  constructor(length, decimals, extra) {
34622
34625
  super(extra);
34623
34626
  if (length <= 0) {
34624
- throw new Error("Bad LENGTH");
34627
+ throw new Error("Bad LENGTH, Packed");
34625
34628
  }
34626
34629
  else if (decimals < 0) {
34627
- throw new Error("Bad DECIMALS");
34630
+ throw new Error("Bad DECIMALS, Packed");
34628
34631
  }
34629
34632
  this.length = length;
34630
34633
  this.decimals = decimals;
@@ -47555,7 +47558,7 @@ class Registry {
47555
47558
  }
47556
47559
  static abaplintVersion() {
47557
47560
  // magic, see build script "version.sh"
47558
- return "2.99.3";
47561
+ return "2.99.5";
47559
47562
  }
47560
47563
  getDDICReferences() {
47561
47564
  return this.references;
@@ -63718,6 +63721,10 @@ const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./
63718
63721
  const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
63719
63722
  const __1 = __webpack_require__(/*! .. */ "./node_modules/@abaplint/core/build/src/index.js");
63720
63723
  class SelectSingleFullKeyConf extends _basic_rule_config_1.BasicRuleConfig {
63724
+ constructor() {
63725
+ super(...arguments);
63726
+ this.allowPseudo = true;
63727
+ }
63721
63728
  }
63722
63729
  exports.SelectSingleFullKeyConf = SelectSingleFullKeyConf;
63723
63730
  class SelectSingleFullKey {
@@ -63739,6 +63746,14 @@ class SelectSingleFullKey {
63739
63746
  return this;
63740
63747
  }
63741
63748
  getConfig() {
63749
+ if (this.conf === undefined) {
63750
+ this.conf = {
63751
+ allowPseudo: true,
63752
+ };
63753
+ }
63754
+ if (this.conf.allowPseudo === undefined) {
63755
+ this.conf.allowPseudo = true;
63756
+ }
63742
63757
  return this.conf;
63743
63758
  }
63744
63759
  setConfig(conf) {
@@ -63770,7 +63785,11 @@ class SelectSingleFullKey {
63770
63785
  continue;
63771
63786
  }
63772
63787
  const next = statements[i + 1];
63773
- if ((next === null || next === void 0 ? void 0 : next.get()) instanceof __1.Comment && next.concatTokens().includes(this.getMetadata().pseudoComment + "")) {
63788
+ if ((next === null || next === void 0 ? void 0 : next.get()) instanceof __1.Comment
63789
+ && next.concatTokens().includes(this.getMetadata().pseudoComment + "")) {
63790
+ if (this.getConfig().allowPseudo !== true) {
63791
+ issues.push(issue_1.Issue.atStatement(file, s, "Pseudo comment not allowed", this.getMetadata().key, this.getConfig().severity));
63792
+ }
63774
63793
  continue;
63775
63794
  }
63776
63795
  const tabl = this.findReference(databaseTable.getFirstToken().getStart(), syntax.spaghetti, file);
@@ -63779,7 +63798,6 @@ class SelectSingleFullKey {
63779
63798
  continue;
63780
63799
  }
63781
63800
  const keys = table.listKeys(this.reg);
63782
- // const type = table.parseType(this.reg);
63783
63801
  const cond = s.findFirstExpression(__1.Expressions.SQLCond);
63784
63802
  const set = new Set();
63785
63803
  for (const key of keys) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.99.3",
3
+ "version": "2.99.5",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "bin": {
6
6
  "abaplint": "./abaplint"
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "homepage": "https://abaplint.org",
39
39
  "devDependencies": {
40
- "@abaplint/core": "^2.99.3",
40
+ "@abaplint/core": "^2.99.5",
41
41
  "@types/chai": "^4.3.5",
42
42
  "@types/glob": "^7.2.0",
43
43
  "@types/minimist": "^1.2.2",
@@ -54,7 +54,7 @@
54
54
  "mocha": "^10.2.0",
55
55
  "progress": "^2.0.3",
56
56
  "typescript": "^5.0.4",
57
- "webpack": "^5.81.0",
57
+ "webpack": "^5.82.0",
58
58
  "webpack-cli": "^5.0.2",
59
59
  "xml-js": "^1.6.11"
60
60
  },