@abaplint/core 2.114.5 → 2.114.7
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.
package/build/src/registry.js
CHANGED
|
@@ -44,6 +44,7 @@ https://docs.abapopenchecks.org/checks/16/`,
|
|
|
44
44
|
this.conf = conf;
|
|
45
45
|
}
|
|
46
46
|
runParsed(file, obj) {
|
|
47
|
+
var _a, _b;
|
|
47
48
|
const issues = [];
|
|
48
49
|
const ddic = new ddic_1.DDIC(this.reg);
|
|
49
50
|
if (obj instanceof objects_1.Class) {
|
|
@@ -68,10 +69,10 @@ https://docs.abapopenchecks.org/checks/16/`,
|
|
|
68
69
|
rowContent = " " + rowContent;
|
|
69
70
|
}
|
|
70
71
|
let offset = 0;
|
|
71
|
-
if (rows[i - 1].endsWith("\r")) {
|
|
72
|
+
if ((_a = rows[i - 1]) === null || _a === void 0 ? void 0 : _a.endsWith("\r")) {
|
|
72
73
|
offset = -1;
|
|
73
74
|
}
|
|
74
|
-
const startPos = new position_1.Position(i, rows[i - 1].length + 1 + offset);
|
|
75
|
+
const startPos = new position_1.Position(i, ((_b = rows[i - 1]) === null || _b === void 0 ? void 0 : _b.length) + 1 + offset);
|
|
75
76
|
const endPos = new position_1.Position(i + 1, rows[i].length + 1);
|
|
76
77
|
let fix = edit_helper_1.EditHelper.replaceRange(file, startPos, endPos, rowContent);
|
|
77
78
|
if (rows[i - 1] === undefined || rows[i - 1].indexOf("*") === 0 || rows[i - 1].includes(`"`)) {
|
|
@@ -21,7 +21,7 @@ class SQLEscapeHostVariables extends _abap_rule_1.ABAPRule {
|
|
|
21
21
|
return {
|
|
22
22
|
key: "sql_escape_host_variables",
|
|
23
23
|
title: "Escape SQL host variables",
|
|
24
|
-
shortDescription: `Escape SQL host variables, from 740sp05`,
|
|
24
|
+
shortDescription: `Escape SQL host variables, from 740sp05 and in open-abap`,
|
|
25
25
|
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements`,
|
|
26
26
|
tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Syntax],
|
|
27
27
|
badExample: `SELECT * FROM tab INTO TABLE res WHERE field = val.`,
|
|
@@ -41,7 +41,8 @@ class SQLEscapeHostVariables extends _abap_rule_1.ABAPRule {
|
|
|
41
41
|
return [];
|
|
42
42
|
}
|
|
43
43
|
if (this.reg.getConfig().getVersion() < version_1.Version.v740sp02
|
|
44
|
-
&& this.reg.getConfig().getVersion() !== version_1.Version.Cloud
|
|
44
|
+
&& this.reg.getConfig().getVersion() !== version_1.Version.Cloud
|
|
45
|
+
&& this.reg.getConfig().getVersion() !== version_1.Version.OpenABAP) {
|
|
45
46
|
return [];
|
|
46
47
|
}
|
|
47
48
|
for (const s of file.getStatements()) {
|