@abaplint/core 2.102.57 → 2.102.58
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
|
@@ -10,6 +10,10 @@ const syntax_1 = require("../abap/5_syntax/syntax");
|
|
|
10
10
|
const _abap_object_1 = require("../objects/_abap_object");
|
|
11
11
|
const basic_1 = require("../abap/types/basic");
|
|
12
12
|
class SelectAddOrderByConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.skipForAllEntries = false;
|
|
16
|
+
}
|
|
13
17
|
}
|
|
14
18
|
exports.SelectAddOrderByConf = SelectAddOrderByConf;
|
|
15
19
|
class SelectAddOrderBy {
|
|
@@ -41,7 +45,7 @@ If the target is a sorted/hashed table, no issue is reported`,
|
|
|
41
45
|
this.conf = conf;
|
|
42
46
|
}
|
|
43
47
|
run(obj) {
|
|
44
|
-
var _a;
|
|
48
|
+
var _a, _b;
|
|
45
49
|
const issues = [];
|
|
46
50
|
if (!(obj instanceof _abap_object_1.ABAPObject) || obj.getType() === "INTF") {
|
|
47
51
|
return [];
|
|
@@ -55,13 +59,16 @@ If the target is a sorted/hashed table, no issue is reported`,
|
|
|
55
59
|
const selects = stru.findAllStatements(Statements.Select);
|
|
56
60
|
selects.push(...stru.findAllStatements(Statements.SelectLoop));
|
|
57
61
|
for (const s of selects) {
|
|
58
|
-
const
|
|
59
|
-
if (
|
|
62
|
+
const concat = s.concatTokens().toUpperCase();
|
|
63
|
+
if (concat.startsWith("SELECT SINGLE ")) {
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
else if (((_a = this.getConfig()) === null || _a === void 0 ? void 0 : _a.skipForAllEntries) === true && concat.includes(" FOR ALL ENTRIES ")) {
|
|
60
67
|
continue;
|
|
61
68
|
}
|
|
62
69
|
// skip COUNT(*)
|
|
63
70
|
const list = s.findAllExpressions(Expressions.SQLField);
|
|
64
|
-
if (list.length === 1 && ((
|
|
71
|
+
if (list.length === 1 && ((_b = list[0].getFirstChild()) === null || _b === void 0 ? void 0 : _b.get()) instanceof Expressions.SQLAggregation) {
|
|
65
72
|
continue;
|
|
66
73
|
}
|
|
67
74
|
else if (s.findFirstExpression(Expressions.SQLOrderBy)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.102.
|
|
3
|
+
"version": "2.102.58",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
"homepage": "https://abaplint.org",
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@microsoft/api-extractor": "^7.38.0",
|
|
54
|
-
"@types/chai": "^4.3.
|
|
54
|
+
"@types/chai": "^4.3.8",
|
|
55
55
|
"@types/mocha": "^10.0.2",
|
|
56
|
-
"@types/node": "^20.8.
|
|
56
|
+
"@types/node": "^20.8.6",
|
|
57
57
|
"chai": "^4.3.10",
|
|
58
58
|
"eslint": "^8.51.0",
|
|
59
59
|
"mocha": "^10.2.0",
|