@abaplint/core 2.91.1 → 2.91.4
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/abaplint.d.ts
CHANGED
|
@@ -1325,6 +1325,7 @@ declare class DDIC {
|
|
|
1325
1325
|
lookupDomain(name: string, parent?: string): ILookupResult;
|
|
1326
1326
|
lookupDataElement(name: string | undefined): ILookupResult;
|
|
1327
1327
|
lookupTableOrView(name: string | undefined): ILookupResult;
|
|
1328
|
+
/** this method only looks up the object, does not parse the type */
|
|
1328
1329
|
lookupTableOrView2(name: string | undefined): Table | DataDefinition | View | undefined;
|
|
1329
1330
|
lookupTable(name: string | undefined): AbstractType;
|
|
1330
1331
|
private lookupView;
|
|
@@ -2740,9 +2741,9 @@ declare interface IFunctionModuleParameter {
|
|
|
2740
2741
|
declare interface IGlobalConfig {
|
|
2741
2742
|
/** input files, glob format */
|
|
2742
2743
|
files: string;
|
|
2743
|
-
skipGeneratedGatewayClasses
|
|
2744
|
-
skipGeneratedPersistentClasses
|
|
2745
|
-
skipGeneratedFunctionGroups
|
|
2744
|
+
skipGeneratedGatewayClasses?: boolean;
|
|
2745
|
+
skipGeneratedPersistentClasses?: boolean;
|
|
2746
|
+
skipGeneratedFunctionGroups?: boolean;
|
|
2746
2747
|
/** Clone and parse dependencies specified in .apack-manifest.xml if it is present */
|
|
2747
2748
|
useApackDependencies?: boolean;
|
|
2748
2749
|
/** Do not report any issues for includes without main programs */
|
package/build/src/ddic.js
CHANGED
|
@@ -209,9 +209,9 @@ class Table extends _abstract_object_1.AbstractObject {
|
|
|
209
209
|
});
|
|
210
210
|
}
|
|
211
211
|
if (field.CHECKTABLE) {
|
|
212
|
-
const lookup = ddic.
|
|
213
|
-
if (lookup
|
|
214
|
-
references.push({ object: lookup
|
|
212
|
+
const lookup = ddic.lookupTableOrView2(field.CHECKTABLE);
|
|
213
|
+
if (lookup) {
|
|
214
|
+
references.push({ object: lookup });
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
217
|
}
|
package/build/src/registry.js
CHANGED
|
@@ -36,6 +36,11 @@ class SelectPerformance {
|
|
|
36
36
|
|
|
37
37
|
SELECT *: not reported if using INTO/APPENDING CORRESPONDING FIELDS OF`,
|
|
38
38
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Performance],
|
|
39
|
+
badExample: `SELECT field1, field2 FROM table
|
|
40
|
+
INTO @DATA(structure) UP TO 1 ROWS ORDER BY field3 DESCENDING.
|
|
41
|
+
ENDSELECT.`,
|
|
42
|
+
goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
|
|
43
|
+
INTO TABLE @DATA(table) ORDER BY field3 DESCENDING`,
|
|
39
44
|
};
|
|
40
45
|
}
|
|
41
46
|
initialize(reg) {
|
|
@@ -15,6 +15,8 @@ class SelectionScreenNamingConf extends _naming_rule_config_1.NamingRuleConfig {
|
|
|
15
15
|
this.parameter = "^P_.+$";
|
|
16
16
|
/** The pattern for selection-screen select-options */
|
|
17
17
|
this.selectOption = "^S_.+$";
|
|
18
|
+
/** The pattern for selection-screen screen elements */
|
|
19
|
+
this.screenElement = "^SC_.+$";
|
|
18
20
|
}
|
|
19
21
|
}
|
|
20
22
|
exports.SelectionScreenNamingConf = SelectionScreenNamingConf;
|
|
@@ -49,15 +51,20 @@ class SelectionScreenNaming extends _abap_rule_1.ABAPRule {
|
|
|
49
51
|
}
|
|
50
52
|
let parameterCheckDisabled = false;
|
|
51
53
|
let selectOptionDisabled = false;
|
|
54
|
+
let screenElementDisabled = false;
|
|
52
55
|
if (this.conf.parameter === undefined || this.conf.parameter.length === 0) {
|
|
53
56
|
parameterCheckDisabled = true;
|
|
54
57
|
}
|
|
55
58
|
if (this.conf.selectOption === undefined || this.conf.selectOption.length === 0) {
|
|
56
59
|
selectOptionDisabled = true;
|
|
57
60
|
}
|
|
61
|
+
if (this.conf.screenElement === undefined || this.conf.screenElement.length === 0) {
|
|
62
|
+
screenElementDisabled = true;
|
|
63
|
+
}
|
|
58
64
|
for (const stat of file.getStatements()) {
|
|
59
65
|
if ((stat.get() instanceof statements_1.Parameter && !parameterCheckDisabled)
|
|
60
|
-
|| (stat.get() instanceof statements_1.SelectOption && !selectOptionDisabled)
|
|
66
|
+
|| (stat.get() instanceof statements_1.SelectOption && !selectOptionDisabled)
|
|
67
|
+
|| (stat.get() instanceof statements_1.SelectionScreen && !screenElementDisabled)) {
|
|
61
68
|
const fieldNode = this.getFieldForStatementNode(stat);
|
|
62
69
|
const regex = new RegExp(this.getPatternForStatement(stat.get()), "i");
|
|
63
70
|
if (fieldNode && name_validator_1.NameValidator.violatesRule(fieldNode.getFirstToken().getStr(), regex, this.conf)) {
|
|
@@ -75,6 +82,9 @@ class SelectionScreenNaming extends _abap_rule_1.ABAPRule {
|
|
|
75
82
|
else if (statement instanceof statements_1.SelectOption) {
|
|
76
83
|
pattern = this.conf.selectOption;
|
|
77
84
|
}
|
|
85
|
+
else if (statement instanceof statements_1.SelectionScreen) {
|
|
86
|
+
pattern = this.conf.screenElement;
|
|
87
|
+
}
|
|
78
88
|
return pattern;
|
|
79
89
|
}
|
|
80
90
|
getFieldForStatementNode(statNode) {
|
|
@@ -84,6 +94,9 @@ class SelectionScreenNaming extends _abap_rule_1.ABAPRule {
|
|
|
84
94
|
else if (statNode.get() instanceof statements_1.SelectOption) {
|
|
85
95
|
return statNode.findFirstExpression(expressions_1.FieldSub);
|
|
86
96
|
}
|
|
97
|
+
else if (statNode.get() instanceof statements_1.SelectionScreen) {
|
|
98
|
+
return statNode.findFirstExpression(expressions_1.InlineField);
|
|
99
|
+
}
|
|
87
100
|
else {
|
|
88
101
|
return undefined;
|
|
89
102
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.91.
|
|
3
|
+
"version": "2.91.4",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
},
|
|
46
46
|
"homepage": "https://abaplint.org",
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@microsoft/api-extractor": "^7.
|
|
48
|
+
"@microsoft/api-extractor": "^7.25.0",
|
|
49
49
|
"@types/chai": "^4.3.1",
|
|
50
50
|
"@types/mocha": "^9.1.1",
|
|
51
|
-
"@types/node": "^
|
|
51
|
+
"@types/node": "^18.0.0",
|
|
52
52
|
"chai": "^4.3.6",
|
|
53
53
|
"eslint": "^8.17.0",
|
|
54
54
|
"mocha": "^10.0.0",
|