@abaplint/cli 2.102.47 → 2.102.48

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 -4
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -21829,6 +21829,11 @@ class TypeUtils {
21829
21829
  return false;
21830
21830
  }
21831
21831
  }
21832
+ else if (source instanceof basic_1.GenericObjectReferenceType) {
21833
+ if (target instanceof basic_1.ObjectReferenceType) {
21834
+ return false;
21835
+ }
21836
+ }
21832
21837
  else if (source instanceof basic_1.ObjectReferenceType) {
21833
21838
  if (target instanceof basic_1.XSequenceType
21834
21839
  || target instanceof basic_1.IntegerType
@@ -49033,7 +49038,7 @@ class Registry {
49033
49038
  }
49034
49039
  static abaplintVersion() {
49035
49040
  // magic, see build script "version.sh"
49036
- return "2.102.47";
49041
+ return "2.102.48";
49037
49042
  }
49038
49043
  getDDICReferences() {
49039
49044
  return this.ddicReferences;
@@ -51677,6 +51682,7 @@ FIND statement with MATCH COUNT is considered okay if subrc is not checked`,
51677
51682
  }
51678
51683
  else if (config.assign === true
51679
51684
  && statement.get() instanceof Statements.Assign
51685
+ && this.isSimpleAssign(statement) === false
51680
51686
  && this.isChecked(i, statements) === false) {
51681
51687
  issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity));
51682
51688
  }
@@ -51690,6 +51696,16 @@ FIND statement with MATCH COUNT is considered okay if subrc is not checked`,
51690
51696
  return issues;
51691
51697
  }
51692
51698
  ////////////////
51699
+ isSimpleAssign(statement) {
51700
+ if (statement.getChildren().length === 5) {
51701
+ const source = statement.findDirectExpression(Expressions.AssignSource);
51702
+ if ((source === null || source === void 0 ? void 0 : source.getChildren().length) === 1
51703
+ && source.findDirectExpression(Expressions.Source) !== undefined) {
51704
+ return true;
51705
+ }
51706
+ }
51707
+ return false;
51708
+ }
51693
51709
  isExemptedFind(s) {
51694
51710
  // see https://github.com/abaplint/abaplint/issues/2130
51695
51711
  return s.concatTokens().toUpperCase().includes(" MATCH COUNT ") === true;
@@ -67596,7 +67612,7 @@ class UncaughtException extends _abap_rule_1.ABAPRule {
67596
67612
  return this.issues;
67597
67613
  }
67598
67614
  traverse(n, file) {
67599
- var _a;
67615
+ var _a, _b, _c, _d;
67600
67616
  const get = n.get();
67601
67617
  if (get instanceof Structures.ClassDefinition
67602
67618
  || get instanceof Structures.Interface) {
@@ -67607,10 +67623,16 @@ class UncaughtException extends _abap_rule_1.ABAPRule {
67607
67623
  // note that TRY-CATCH might be arbitrarily nested
67608
67624
  const previous = this.sinked ? this.sinked.slice() : undefined;
67609
67625
  this.addFromTryStructure(n);
67610
- for (const c of n.getChildren()) {
67626
+ for (const c of ((_a = n.findDirectStructure(Structures.Body)) === null || _a === void 0 ? void 0 : _a.getChildren()) || []) {
67611
67627
  this.traverse(c, file);
67612
67628
  }
67613
67629
  this.sinked = previous;
67630
+ for (const c of ((_b = n.findDirectStructure(Structures.Catch)) === null || _b === void 0 ? void 0 : _b.getChildren()) || []) {
67631
+ this.traverse(c, file);
67632
+ }
67633
+ for (const c of ((_c = n.findDirectStructure(Structures.Cleanup)) === null || _c === void 0 ? void 0 : _c.getChildren()) || []) {
67634
+ this.traverse(c, file);
67635
+ }
67614
67636
  return;
67615
67637
  }
67616
67638
  else {
@@ -67640,7 +67662,7 @@ class UncaughtException extends _abap_rule_1.ABAPRule {
67640
67662
  let name = undefined;
67641
67663
  const concat = n.concatTokens().toUpperCase();
67642
67664
  if (concat.startsWith("RAISE EXCEPTION TYPE ")) {
67643
- name = (_a = n.findFirstExpression(Expressions.ClassName)) === null || _a === void 0 ? void 0 : _a.getFirstToken().getStr().toUpperCase();
67665
+ name = (_d = n.findFirstExpression(Expressions.ClassName)) === null || _d === void 0 ? void 0 : _d.getFirstToken().getStr().toUpperCase();
67644
67666
  }
67645
67667
  this.check(name, n, file);
67646
67668
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.102.47",
3
+ "version": "2.102.48",
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.102.47",
41
+ "@abaplint/core": "^2.102.48",
42
42
  "@types/chai": "^4.3.6",
43
43
  "@types/glob": "^7.2.0",
44
44
  "@types/minimist": "^1.2.2",