@abaplint/core 2.90.0 → 2.90.1

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.
@@ -8,7 +8,9 @@ const version_1 = require("../../../version");
8
8
  class SQLCompare extends combi_1.Expression {
9
9
  getRunnable() {
10
10
  const val = new _1.SQLSource();
11
- const list = (0, combi_1.seq)((0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WParenLeft), (0, combi_1.tok)(tokens_1.WParenLeftW)), val, (0, combi_1.starPrio)((0, combi_1.seq)(",", val)), ")");
11
+ const listOld = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeft), val, (0, combi_1.starPrio)((0, combi_1.seq)(",", val)), (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenRight), (0, combi_1.tok)(tokens_1.ParenRightW), (0, combi_1.tok)(tokens_1.WParenRightW)));
12
+ const listNew = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), val, (0, combi_1.starPrio)((0, combi_1.seq)(",", val)), (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WParenRight), (0, combi_1.tok)(tokens_1.WParenRightW)));
13
+ const list = (0, combi_1.alt)(listOld, (0, combi_1.ver)(version_1.Version.v740sp02, listNew)); // version is a guess, https://github.com/abaplint/abaplint/issues/2530
12
14
  const subSelect = (0, combi_1.seq)("(", _1.Select, ")");
13
15
  const inn = (0, combi_1.seq)("IN", (0, combi_1.altPrio)(_1.SQLSource, list, subSelect));
14
16
  const between = (0, combi_1.seq)("BETWEEN", _1.SQLSource, "AND", _1.SQLSource);
@@ -17,7 +17,7 @@ class InsertInternal {
17
17
  const fromTo = (0, combi_1.seq)((0, combi_1.opt)(from), (0, combi_1.opt)(to));
18
18
  const foo = (0, combi_1.per)(into, ref, index, assigning);
19
19
  const lines = (0, combi_1.seq)("LINES OF", target, (0, combi_1.opt)(fromTo));
20
- const src = (0, combi_1.alt)((0, combi_1.ver)(version_1.Version.v740sp02, expressions_1.Source), expressions_1.SimpleSource1);
20
+ const src = (0, combi_1.alt)((0, combi_1.ver)(version_1.Version.v740sp02, expressions_1.Source), expressions_1.SimpleSource4);
21
21
  const tab = (0, combi_1.seq)("TABLE", expressions_1.Source);
22
22
  const ret = (0, combi_1.seq)("INSERT", (0, combi_1.altPrio)(tab, (0, combi_1.seq)((0, combi_1.altPrio)(initial, lines, src), foo)));
23
23
  return ret;
@@ -68,7 +68,7 @@ class Registry {
68
68
  }
69
69
  static abaplintVersion() {
70
70
  // magic, see build script "version.sh"
71
- return "2.90.0";
71
+ return "2.90.1";
72
72
  }
73
73
  getDDICReferences() {
74
74
  return this.references;
@@ -114,7 +114,9 @@ class DoubleSpace extends _abap_rule_1.ABAPRule {
114
114
  const issueStartPos = new position_1.Position(prev.getRow(), prev.getCol() + 2);
115
115
  const issueEndPos = new position_1.Position(t.getRow(), t.getCol());
116
116
  const fix = edit_helper_1.EditHelper.deleteRange(file, issueStartPos, issueEndPos);
117
- issues.push(issue_1.Issue.atRange(file, issueStartPos, issueEndPos, this.getMessage(), this.getMetadata().key, this.conf.severity, fix));
117
+ if (this.pragmaInRange(s.getPragmas(), issueStartPos, issueEndPos) === false) {
118
+ issues.push(issue_1.Issue.atRange(file, issueStartPos, issueEndPos, this.getMessage(), this.getMetadata().key, this.conf.severity, fix));
119
+ }
118
120
  }
119
121
  if (this.getConfig().endParen === true
120
122
  && prev.getRow() === t.getRow()
@@ -124,12 +126,23 @@ class DoubleSpace extends _abap_rule_1.ABAPRule {
124
126
  const issueStartPos = new position_1.Position(prev.getEnd().getRow(), prev.getEnd().getCol() + 1);
125
127
  const issueEndPos = new position_1.Position(t.getRow(), t.getCol());
126
128
  const fix = edit_helper_1.EditHelper.deleteRange(file, issueStartPos, issueEndPos);
127
- issues.push(issue_1.Issue.atRange(file, issueStartPos, issueEndPos, this.getMessage(), this.getMetadata().key, this.conf.severity, fix));
129
+ if (this.pragmaInRange(s.getPragmas(), issueStartPos, issueEndPos) === false) {
130
+ issues.push(issue_1.Issue.atRange(file, issueStartPos, issueEndPos, this.getMessage(), this.getMetadata().key, this.conf.severity, fix));
131
+ }
128
132
  }
129
133
  prev = t;
130
134
  }
131
135
  return issues;
132
136
  }
137
+ pragmaInRange(pragmas, start, end) {
138
+ let ret = false;
139
+ for (const p of pragmas) {
140
+ if (p.getStart().isBetween(start, end)) {
141
+ ret = true;
142
+ }
143
+ }
144
+ return ret;
145
+ }
133
146
  checkKeywords(s, file) {
134
147
  const issues = [];
135
148
  let prev = undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.90.0",
3
+ "version": "2.90.1",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -50,7 +50,7 @@
50
50
  "@types/mocha": "^9.1.1",
51
51
  "@types/node": "^17.0.31",
52
52
  "chai": "^4.3.6",
53
- "eslint": "^8.14.0",
53
+ "eslint": "^8.15.0",
54
54
  "mocha": "^10.0.0",
55
55
  "c8": "^7.11.2",
56
56
  "source-map-support": "^0.5.21",