@abaplint/core 2.113.184 → 2.113.186
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.
|
@@ -13,7 +13,7 @@ class Select extends combi_1.Expression {
|
|
|
13
13
|
const where = (0, combi_1.seq)("WHERE", _1.SQLCond);
|
|
14
14
|
const offset = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)("OFFSET", _1.SQLSource));
|
|
15
15
|
const bypass = (0, combi_1.str)("BYPASSING BUFFER");
|
|
16
|
-
const fields = (0, combi_1.ver)(version_1.Version.v750, _1.SQLFields);
|
|
16
|
+
const fields = (0, combi_1.ver)(version_1.Version.v750, _1.SQLFields, version_1.Version.OpenABAP);
|
|
17
17
|
// todo, HINTS cannot be anywhere, need an expression dedicated for strict sql
|
|
18
18
|
const perm = (0, combi_1.per)(_1.SQLFrom, into, _1.SQLForAllEntries, where, _1.SQLOrderBy, sql_up_to_1.SQLUpTo, offset, _1.SQLClient, _1.SQLHaving, bypass, sql_group_by_1.SQLGroupBy, fields, _1.DatabaseConnection, _1.SQLHints);
|
|
19
19
|
const permSingle = (0, combi_1.per)(_1.SQLFrom, (0, combi_1.altPrio)(sql_into_structure_1.SQLIntoStructure, _1.SQLIntoList), where, _1.SQLClient, bypass, sql_group_by_1.SQLGroupBy, fields, _1.DatabaseConnection, _1.SQLHints);
|
|
@@ -7,7 +7,7 @@ const version_1 = require("../../../version");
|
|
|
7
7
|
class ValueBody extends combi_1.Expression {
|
|
8
8
|
getRunnable() {
|
|
9
9
|
const strucOrTab = (0, combi_1.seq)((0, combi_1.optPrio)(_1.Let), (0, combi_1.optPrio)(_1.ValueBase), (0, combi_1.star)(_1.For), (0, combi_1.plusPrio)((0, combi_1.altPrio)(_1.FieldAssignment, _1.ValueBodyLine)));
|
|
10
|
-
const tabdef = (0, combi_1.ver)(version_1.Version.v740sp08, (0, combi_1.altPrio)("OPTIONAL", (0, combi_1.seq)("DEFAULT", _1.Source)));
|
|
10
|
+
const tabdef = (0, combi_1.ver)(version_1.Version.v740sp08, (0, combi_1.altPrio)("OPTIONAL", (0, combi_1.seq)("DEFAULT", _1.Source)), version_1.Version.OpenABAP);
|
|
11
11
|
return (0, combi_1.optPrio)((0, combi_1.altPrio)(strucOrTab, (0, combi_1.seq)(_1.Source, (0, combi_1.optPrio)(tabdef))));
|
|
12
12
|
}
|
|
13
13
|
}
|
package/build/src/registry.js
CHANGED
|
@@ -76,7 +76,9 @@ ENDFORM.`,
|
|
|
76
76
|
continue;
|
|
77
77
|
}
|
|
78
78
|
const prev = statements[i - 1];
|
|
79
|
-
if (prev
|
|
79
|
+
if (prev
|
|
80
|
+
&& prev.get() instanceof Statements.Return
|
|
81
|
+
&& prev.getChildren().length === 2) {
|
|
80
82
|
if (this.conf.allowEmpty === true && statementCounter === 2) {
|
|
81
83
|
continue;
|
|
82
84
|
}
|
|
@@ -87,6 +89,7 @@ ENDFORM.`,
|
|
|
87
89
|
const prevprev = statements[i - 2];
|
|
88
90
|
if (prev && prevprev
|
|
89
91
|
&& prevprev.get() instanceof Statements.Return
|
|
92
|
+
&& prevprev.getChildren().length === 2
|
|
90
93
|
&& prev.get() instanceof Statements.EndIf) {
|
|
91
94
|
const fix = edit_helper_1.EditHelper.deleteStatement(file, prevprev);
|
|
92
95
|
issues.push(issue_1.Issue.atStatement(file, prevprev, message, this.getMetadata().key, this.getConfig().severity, fix));
|