@abaplint/core 2.102.60 → 2.102.62

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.
@@ -3,6 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Token = void 0;
4
4
  const position_1 = require("../../../position");
5
5
  class Token {
6
+ [Symbol.for("debug.description")]() {
7
+ return `${this.constructor.name} ${this.str}`;
8
+ }
6
9
  constructor(start, str) {
7
10
  this.start = start;
8
11
  this.str = str;
@@ -4,12 +4,16 @@ exports.SQLCompare = void 0;
4
4
  const Expressions = require("../../2_statements/expressions");
5
5
  const nodes_1 = require("../../nodes");
6
6
  const basic_1 = require("../../types/basic");
7
+ const source_1 = require("./source");
7
8
  const sql_source_1 = require("./sql_source");
8
9
  class SQLCompare {
9
10
  runSyntax(node, scope, filename, tables) {
10
11
  var _a;
11
12
  let sourceType;
12
13
  let token;
14
+ for (const s of node.findAllExpressions(Expressions.SimpleSource3)) {
15
+ new source_1.Source().runSyntax(s, scope, filename);
16
+ }
13
17
  for (const s of node.findAllExpressions(Expressions.SQLSource)) {
14
18
  for (const child of s.getChildren()) {
15
19
  if (child instanceof nodes_1.ExpressionNode) {
@@ -23,6 +23,9 @@ class ScopeData {
23
23
  }
24
24
  }
25
25
  class SpaghettiScopeNode extends ScopeData {
26
+ [Symbol.for("debug.description")]() {
27
+ return `SpaghettiSN ${this.identifier.sname} ${this.identifier.stype}`;
28
+ }
26
29
  constructor(identifier, parent) {
27
30
  super();
28
31
  this.identifier = identifier;
@@ -3,6 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TypedIdentifier = void 0;
4
4
  const _identifier_1 = require("../4_file_information/_identifier");
5
5
  class TypedIdentifier extends _identifier_1.Identifier {
6
+ [Symbol.for("debug.description")]() {
7
+ return `${this.constructor.name} ${this.getName()}:${this.getType().constructor.name}`;
8
+ }
6
9
  static from(id, type, meta) {
7
10
  return new TypedIdentifier(id.getToken(), id.getFilename(), type, meta);
8
11
  }
@@ -5,6 +5,9 @@ const _abstract_object_1 = require("./_abstract_object");
5
5
  const xml_utils_1 = require("../xml_utils");
6
6
  const abap_parser_1 = require("../abap/abap_parser");
7
7
  class ABAPObject extends _abstract_object_1.AbstractObject {
8
+ [Symbol.for("debug.description")]() {
9
+ return `${this.constructor.name} ${this.getName()}`;
10
+ }
8
11
  constructor(name) {
9
12
  super(name);
10
13
  this.parsed = [];
@@ -65,7 +65,7 @@ class Registry {
65
65
  }
66
66
  static abaplintVersion() {
67
67
  // magic, see build script "version.sh"
68
- return "2.102.60";
68
+ return "2.102.62";
69
69
  }
70
70
  getDDICReferences() {
71
71
  return this.ddicReferences;
@@ -38,7 +38,7 @@ class CheckSubrc extends _abap_rule_1.ABAPRule {
38
38
 
39
39
  If sy-dbcnt is checked after database statements, it is considered okay.
40
40
 
41
- "SELECT SINGLE @abap_true FROM " is considered as an existence check
41
+ "SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
42
42
 
43
43
  If IS ASSIGNED is checked after assigning, it is considered okay.
44
44
 
@@ -89,6 +89,8 @@ FIND statement with MATCH COUNT is considered okay if subrc is not checked`,
89
89
  else if (config.selectTable === true
90
90
  && statement.get() instanceof Statements.Select
91
91
  && statement.concatTokens().toUpperCase().startsWith("SELECT SINGLE ") === false
92
+ && statement.concatTokens().toUpperCase().startsWith("SELECT COUNT( * ) ") === false
93
+ && statement.concatTokens().toUpperCase().startsWith("SELECT COUNT(*) ") === false
92
94
  && this.isChecked(i, statements) === false
93
95
  && this.checksDbcnt(i, statements) === false) {
94
96
  issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.102.60",
3
+ "version": "2.102.62",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -53,9 +53,9 @@
53
53
  "@microsoft/api-extractor": "^7.38.0",
54
54
  "@types/chai": "^4.3.9",
55
55
  "@types/mocha": "^10.0.3",
56
- "@types/node": "^20.8.7",
56
+ "@types/node": "^20.8.8",
57
57
  "chai": "^4.3.10",
58
- "eslint": "^8.51.0",
58
+ "eslint": "^8.52.0",
59
59
  "mocha": "^10.2.0",
60
60
  "c8": "^8.0.1",
61
61
  "source-map-support": "^0.5.21",