@abaplint/cli 2.99.4 → 2.99.6

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 +46 -11
  2. package/package.json +4 -4
package/build/cli.js CHANGED
@@ -33924,7 +33924,7 @@ class CharacterType extends _abstract_type_1.AbstractType {
33924
33924
  constructor(length, extra) {
33925
33925
  super(extra);
33926
33926
  if (length <= 0) {
33927
- throw new Error("Bad LENGTH");
33927
+ throw new Error("Bad LENGTH, Character");
33928
33928
  }
33929
33929
  this.length = length;
33930
33930
  }
@@ -34295,7 +34295,7 @@ class FloatingPointType extends _abstract_type_1.AbstractType {
34295
34295
  constructor(length, qualifiedName) {
34296
34296
  super({ qualifiedName: qualifiedName });
34297
34297
  if (length <= 0) {
34298
- throw new Error("Bad LENGTH");
34298
+ throw new Error("Bad LENGTH, Floating Point");
34299
34299
  }
34300
34300
  this.length = length;
34301
34301
  }
@@ -34372,7 +34372,7 @@ class HexType extends _abstract_type_1.AbstractType {
34372
34372
  constructor(length, qualifiedName) {
34373
34373
  super({ qualifiedName: qualifiedName });
34374
34374
  if (length <= 0) {
34375
- throw new Error("Bad LENGTH");
34375
+ throw new Error("Bad LENGTHm, Hex");
34376
34376
  }
34377
34377
  this.length = length;
34378
34378
  }
@@ -34537,7 +34537,7 @@ class NumericType extends _abstract_type_1.AbstractType {
34537
34537
  constructor(length, qualifiedName) {
34538
34538
  super({ qualifiedName: qualifiedName });
34539
34539
  if (length <= 0) {
34540
- throw new Error("Bad LENGTH");
34540
+ throw new Error("Bad LENGTH, Numeric");
34541
34541
  }
34542
34542
  this.length = length;
34543
34543
  }
@@ -34624,10 +34624,10 @@ class PackedType extends _abstract_type_1.AbstractType {
34624
34624
  constructor(length, decimals, extra) {
34625
34625
  super(extra);
34626
34626
  if (length <= 0) {
34627
- throw new Error("Bad LENGTH");
34627
+ throw new Error("Bad LENGTH, Packed");
34628
34628
  }
34629
34629
  else if (decimals < 0) {
34630
- throw new Error("Bad DECIMALS");
34630
+ throw new Error("Bad DECIMALS, Packed");
34631
34631
  }
34632
34632
  this.length = length;
34633
34633
  this.decimals = decimals;
@@ -37739,9 +37739,10 @@ class Config {
37739
37739
  return new Config(JSON.stringify(config));
37740
37740
  }
37741
37741
  getEnabledRules() {
37742
+ var _a;
37742
37743
  const rules = [];
37743
37744
  for (const rule of artifacts_rules_1.ArtifactsRules.getRules()) {
37744
- const ruleConfig = this.config["rules"][rule.getMetadata().key];
37745
+ const ruleConfig = (_a = this.config["rules"]) === null || _a === void 0 ? void 0 : _a[rule.getMetadata().key];
37745
37746
  const ruleExists = ruleConfig !== undefined;
37746
37747
  if (ruleExists) {
37747
37748
  if (ruleConfig === false) { // "rule": false
@@ -45096,6 +45097,7 @@ class RenameDataElement {
45096
45097
  changes = changes.concat(helper.renameDDICCodeReferences(obj, oldName, newName));
45097
45098
  changes = changes.concat(helper.renameDDICTABLReferences(obj, oldName, newName));
45098
45099
  changes = changes.concat(helper.renameDDICTTYPReferences(obj, oldName, newName));
45100
+ changes = changes.concat(helper.renameDDICAUTHReferences(obj, oldName, newName));
45099
45101
  return {
45100
45102
  documentChanges: changes,
45101
45103
  };
@@ -45565,6 +45567,21 @@ class RenamerHelper {
45565
45567
  }
45566
45568
  return changes;
45567
45569
  }
45570
+ renameDDICAUTHReferences(obj, oldName, newName) {
45571
+ const changes = [];
45572
+ const used = this.reg.getDDICReferences().listWhereUsed(obj);
45573
+ for (const u of used) {
45574
+ if (u.type !== "AUTH") {
45575
+ continue;
45576
+ }
45577
+ const tabl = this.reg.getObject(u.type, u.name);
45578
+ if (tabl === undefined) {
45579
+ continue;
45580
+ }
45581
+ changes.push(...this.buildXMLFileEdits(tabl, "ROLLNAME", oldName, newName));
45582
+ }
45583
+ return changes;
45584
+ }
45568
45585
  buildXMLFileEdits(object, xmlTag, oldName, newName) {
45569
45586
  const changes = [];
45570
45587
  const xml = object.getXMLFile();
@@ -47558,7 +47575,7 @@ class Registry {
47558
47575
  }
47559
47576
  static abaplintVersion() {
47560
47577
  // magic, see build script "version.sh"
47561
- return "2.99.4";
47578
+ return "2.99.6";
47562
47579
  }
47563
47580
  getDDICReferences() {
47564
47581
  return this.references;
@@ -49847,10 +49864,12 @@ class CheckComments extends _abap_rule_1.ABAPRule {
49847
49864
  shortDescription: `
49848
49865
  Various checks for comment usage.`,
49849
49866
  extendedInformation: `
49850
- * End of line comments. Comments starting with "#EC" or "##" are ignored
49867
+ Detects end of line comments. Comments starting with "#EC" or "##" are ignored
49851
49868
 
49852
49869
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#put-comments-before-the-statement-they-relate-to`,
49853
49870
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
49871
+ badExample: `WRITE 2. " descriptive comment`,
49872
+ goodExample: `" descriptive comment\nWRITE 2.`,
49854
49873
  };
49855
49874
  }
49856
49875
  getDescription(issueType) {
@@ -63721,6 +63740,10 @@ const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./
63721
63740
  const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
63722
63741
  const __1 = __webpack_require__(/*! .. */ "./node_modules/@abaplint/core/build/src/index.js");
63723
63742
  class SelectSingleFullKeyConf extends _basic_rule_config_1.BasicRuleConfig {
63743
+ constructor() {
63744
+ super(...arguments);
63745
+ this.allowPseudo = true;
63746
+ }
63724
63747
  }
63725
63748
  exports.SelectSingleFullKeyConf = SelectSingleFullKeyConf;
63726
63749
  class SelectSingleFullKey {
@@ -63742,6 +63765,14 @@ class SelectSingleFullKey {
63742
63765
  return this;
63743
63766
  }
63744
63767
  getConfig() {
63768
+ if (this.conf === undefined) {
63769
+ this.conf = {
63770
+ allowPseudo: true,
63771
+ };
63772
+ }
63773
+ if (this.conf.allowPseudo === undefined) {
63774
+ this.conf.allowPseudo = true;
63775
+ }
63745
63776
  return this.conf;
63746
63777
  }
63747
63778
  setConfig(conf) {
@@ -63773,7 +63804,11 @@ class SelectSingleFullKey {
63773
63804
  continue;
63774
63805
  }
63775
63806
  const next = statements[i + 1];
63776
- if ((next === null || next === void 0 ? void 0 : next.get()) instanceof __1.Comment && next.concatTokens().includes(this.getMetadata().pseudoComment + "")) {
63807
+ if ((next === null || next === void 0 ? void 0 : next.get()) instanceof __1.Comment
63808
+ && next.concatTokens().includes(this.getMetadata().pseudoComment + "")) {
63809
+ if (this.getConfig().allowPseudo !== true) {
63810
+ issues.push(issue_1.Issue.atStatement(file, s, "Pseudo comment not allowed", this.getMetadata().key, this.getConfig().severity));
63811
+ }
63777
63812
  continue;
63778
63813
  }
63779
63814
  const tabl = this.findReference(databaseTable.getFirstToken().getStart(), syntax.spaghetti, file);
@@ -63782,7 +63817,6 @@ class SelectSingleFullKey {
63782
63817
  continue;
63783
63818
  }
63784
63819
  const keys = table.listKeys(this.reg);
63785
- // const type = table.parseType(this.reg);
63786
63820
  const cond = s.findFirstExpression(__1.Expressions.SQLCond);
63787
63821
  const set = new Set();
63788
63822
  for (const key of keys) {
@@ -66049,6 +66083,7 @@ ENDIF.`,
66049
66083
  && !(statement.get() instanceof Statements.DataEnd)
66050
66084
  && !(statement.get() instanceof Statements.Type)
66051
66085
  && !(statement.get() instanceof Statements.Form)
66086
+ && !(statement.get() instanceof Statements.Tables)
66052
66087
  && !(statement.get() instanceof Statements.TypeEnd)
66053
66088
  && !(statement.get() instanceof Statements.Constant)
66054
66089
  && !(statement.get() instanceof Statements.ConstantEnd)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.99.4",
3
+ "version": "2.99.6",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "bin": {
6
6
  "abaplint": "./abaplint"
@@ -37,12 +37,12 @@
37
37
  },
38
38
  "homepage": "https://abaplint.org",
39
39
  "devDependencies": {
40
- "@abaplint/core": "^2.99.4",
40
+ "@abaplint/core": "^2.99.6",
41
41
  "@types/chai": "^4.3.5",
42
42
  "@types/glob": "^7.2.0",
43
43
  "@types/minimist": "^1.2.2",
44
44
  "@types/mocha": "^10.0.1",
45
- "@types/node": "^18.16.3",
45
+ "@types/node": "^20.0.0",
46
46
  "@types/progress": "^2.0.5",
47
47
  "chai": "^4.3.7",
48
48
  "chalk": "^5.2.0",
@@ -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
  },