@abaplint/core 2.91.0 → 2.91.3
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;
|
|
@@ -22,6 +22,7 @@ class TypeUtils {
|
|
|
22
22
|
else if (type instanceof basic_1.StringType
|
|
23
23
|
|| type instanceof basic_1.AnyType
|
|
24
24
|
|| type instanceof basic_1.CharacterType
|
|
25
|
+
|| type instanceof basic_1.SimpleType
|
|
25
26
|
|| type instanceof basic_1.CLikeType
|
|
26
27
|
|| type instanceof basic_1.DateType
|
|
27
28
|
|| type instanceof basic_1.CSequenceType
|
|
@@ -55,6 +56,7 @@ class TypeUtils {
|
|
|
55
56
|
|| type instanceof basic_1.UnknownType
|
|
56
57
|
|| type instanceof basic_1.NumericType
|
|
57
58
|
|| type instanceof basic_1.IntegerType
|
|
59
|
+
|| type instanceof basic_1.SimpleType
|
|
58
60
|
|| type instanceof basic_1.FloatType
|
|
59
61
|
|| type instanceof basic_1.FloatingPointType
|
|
60
62
|
|| type instanceof basic_1.DecFloatType
|
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
|
@@ -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.3",
|
|
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": "^17.0.
|
|
51
|
+
"@types/node": "^17.0.41",
|
|
52
52
|
"chai": "^4.3.6",
|
|
53
53
|
"eslint": "^8.17.0",
|
|
54
54
|
"mocha": "^10.0.0",
|