@abaplint/cli 2.120.33 → 2.120.34
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/cli.js +27 -24
- package/package.json +2 -2
package/build/cli.js
CHANGED
|
@@ -26709,6 +26709,11 @@ class ObjectOriented {
|
|
|
26709
26709
|
if (found) {
|
|
26710
26710
|
return found;
|
|
26711
26711
|
}
|
|
26712
|
+
if (name.includes("~")) {
|
|
26713
|
+
// event of an implemented interface, ie. "if_name~event_name"
|
|
26714
|
+
const [interfaceName, eventName] = name.split("~");
|
|
26715
|
+
return this.searchEvent(this.scope.findInterfaceDefinition(interfaceName), eventName);
|
|
26716
|
+
}
|
|
26712
26717
|
for (const a of def.getAliases() || []) {
|
|
26713
26718
|
if (a.getName().toUpperCase() === name.toUpperCase()) {
|
|
26714
26719
|
const comp = a.getComponent();
|
|
@@ -27777,6 +27782,11 @@ class TypeUtils {
|
|
|
27777
27782
|
}
|
|
27778
27783
|
return false;
|
|
27779
27784
|
}
|
|
27785
|
+
else if (target instanceof basic_1.TableType
|
|
27786
|
+
|| target instanceof basic_1.DataReference
|
|
27787
|
+
|| target instanceof basic_1.ObjectReferenceType) {
|
|
27788
|
+
return false;
|
|
27789
|
+
}
|
|
27780
27790
|
return true;
|
|
27781
27791
|
}
|
|
27782
27792
|
else if (source instanceof basic_1.StructureType) {
|
|
@@ -27801,7 +27811,8 @@ class TypeUtils {
|
|
|
27801
27811
|
}
|
|
27802
27812
|
else if (target instanceof basic_1.VoidType
|
|
27803
27813
|
|| target instanceof basic_1.AnyType
|
|
27804
|
-
|| target instanceof basic_1.DataType
|
|
27814
|
+
|| target instanceof basic_1.DataType
|
|
27815
|
+
|| target instanceof basic_1.UnknownType) {
|
|
27805
27816
|
return true;
|
|
27806
27817
|
}
|
|
27807
27818
|
return false;
|
|
@@ -70060,7 +70071,7 @@ class Registry {
|
|
|
70060
70071
|
}
|
|
70061
70072
|
static abaplintVersion() {
|
|
70062
70073
|
// magic, see build script "version.js"
|
|
70063
|
-
return "2.120.
|
|
70074
|
+
return "2.120.34";
|
|
70064
70075
|
}
|
|
70065
70076
|
getDDICReferences() {
|
|
70066
70077
|
return this.ddicReferences;
|
|
@@ -73264,7 +73275,8 @@ class CDSFieldOrder {
|
|
|
73264
73275
|
}
|
|
73265
73276
|
getAssociationNames(tree) {
|
|
73266
73277
|
const names = new Set();
|
|
73267
|
-
|
|
73278
|
+
const found = [...tree.findAllExpressions(expressions_1.CDSAssociation), ...tree.findAllExpressions(expressions_1.CDSComposition)];
|
|
73279
|
+
for (const assoc of found) {
|
|
73268
73280
|
const relation = assoc.findDirectExpression(expressions_1.CDSRelation);
|
|
73269
73281
|
if (relation === undefined) {
|
|
73270
73282
|
continue;
|
|
@@ -73382,7 +73394,6 @@ const _irule_1 = __webpack_require__(/*! ./_irule */ "../core/build/src/rules/_i
|
|
|
73382
73394
|
const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "../core/build/src/rules/_basic_rule_config.js");
|
|
73383
73395
|
const objects_1 = __webpack_require__(/*! ../objects */ "../core/build/src/objects/index.js");
|
|
73384
73396
|
const expressions_1 = __webpack_require__(/*! ../cds/expressions */ "../core/build/src/cds/expressions/index.js");
|
|
73385
|
-
const cds_name_1 = __webpack_require__(/*! ../cds/expressions/cds_name */ "../core/build/src/cds/expressions/cds_name.js");
|
|
73386
73397
|
class CDSNamingConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
73387
73398
|
constructor() {
|
|
73388
73399
|
super(...arguments);
|
|
@@ -73454,7 +73465,7 @@ https://help.sap.com/docs/SAP_S4HANA_ON-PREMISE/ee6ff9b281d8448f96b4fe6c89f2bdc8
|
|
|
73454
73465
|
if (file === undefined) {
|
|
73455
73466
|
return [];
|
|
73456
73467
|
}
|
|
73457
|
-
const name =
|
|
73468
|
+
const name = o.getDefinitionName();
|
|
73458
73469
|
if (name === undefined) {
|
|
73459
73470
|
return [];
|
|
73460
73471
|
}
|
|
@@ -73471,13 +73482,6 @@ https://help.sap.com/docs/SAP_S4HANA_ON-PREMISE/ee6ff9b281d8448f96b4fe6c89f2bdc8
|
|
|
73471
73482
|
}
|
|
73472
73483
|
return [];
|
|
73473
73484
|
}
|
|
73474
|
-
getCDSName(tree) {
|
|
73475
|
-
const nameNodes = tree.findDirectExpressions(cds_name_1.CDSName);
|
|
73476
|
-
if (nameNodes.length > 0) {
|
|
73477
|
-
return nameNodes[0].getFirstToken().getStr();
|
|
73478
|
-
}
|
|
73479
|
-
return undefined;
|
|
73480
|
-
}
|
|
73481
73485
|
getAllowedPrefixes(tree) {
|
|
73482
73486
|
const root = tree.get();
|
|
73483
73487
|
if (root instanceof expressions_1.CDSExtendView) {
|
|
@@ -88496,17 +88500,19 @@ class NoDynamicStuff extends _abap_rule_1.ABAPRule {
|
|
|
88496
88500
|
extendedInformation: `Dynamic constructs cannot be checked statically, they are not found by
|
|
88497
88501
|
where-used lists and refactorings, and they can introduce injection vulnerabilities.
|
|
88498
88502
|
|
|
88499
|
-
Dynamic tokens containing a literal, eg. CALL METHOD ('
|
|
88500
|
-
|
|
88503
|
+
Dynamic tokens are also reported when containing a literal, eg. CALL METHOD go_calendar->('RESET_DAY_INFO'),
|
|
88504
|
+
the syntax check does not resolve these either, so they behave like any other dynamic token.
|
|
88501
88505
|
|
|
88502
88506
|
Dynamic SQL is reported by rule dangerous_statement.`,
|
|
88503
88507
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
|
|
88504
88508
|
badExample: `CALL METHOD (lv_class)=>(lv_method).
|
|
88509
|
+
CALL METHOD go_calendar->('RESET_DAY_INFO').
|
|
88505
88510
|
CALL FUNCTION lv_function_module.
|
|
88506
88511
|
CREATE OBJECT ref TYPE (lv_class).
|
|
88507
88512
|
ASSIGN (lv_name) TO <fs>.
|
|
88508
88513
|
SORT tab BY (lv_field).`,
|
|
88509
88514
|
goodExample: `cl_class=>method( ).
|
|
88515
|
+
go_calendar->reset_day_info( ).
|
|
88510
88516
|
CALL FUNCTION 'ZFOO'.
|
|
88511
88517
|
CREATE OBJECT ref TYPE cl_class.
|
|
88512
88518
|
ASSIGN foo TO <fs>.
|
|
@@ -88618,10 +88624,8 @@ SORT tab BY field.`,
|
|
|
88618
88624
|
for (const source of node.findAllExpressions(Expressions.MethodSource)) {
|
|
88619
88625
|
// Dynamic is always a direct child of MethodSource, dynamics further down
|
|
88620
88626
|
// are parameters of the method call and not part of the method name
|
|
88621
|
-
|
|
88622
|
-
|
|
88623
|
-
return true;
|
|
88624
|
-
}
|
|
88627
|
+
if (source.findDirectExpression(Expressions.Dynamic) !== undefined) {
|
|
88628
|
+
return true;
|
|
88625
88629
|
}
|
|
88626
88630
|
}
|
|
88627
88631
|
return false;
|
|
@@ -88632,12 +88636,7 @@ SORT tab BY field.`,
|
|
|
88632
88636
|
return component !== undefined && this.isLiteral(component) === false;
|
|
88633
88637
|
}
|
|
88634
88638
|
hasDynamic(node) {
|
|
88635
|
-
|
|
88636
|
-
if (this.isLiteral(dynamic) === false) {
|
|
88637
|
-
return true;
|
|
88638
|
-
}
|
|
88639
|
-
}
|
|
88640
|
-
return false;
|
|
88639
|
+
return node.findFirstExpression(Expressions.Dynamic) !== undefined;
|
|
88641
88640
|
}
|
|
88642
88641
|
notLiteral(node) {
|
|
88643
88642
|
return node !== undefined && this.isLiteral(node) === false;
|
|
@@ -100634,6 +100633,10 @@ exports.DECLARATION_STUFF = [
|
|
|
100634
100633
|
Statements.DataBegin,
|
|
100635
100634
|
Statements.Constant,
|
|
100636
100635
|
Statements.ConstantBegin,
|
|
100636
|
+
Statements.Static,
|
|
100637
|
+
Statements.StaticBegin,
|
|
100638
|
+
Statements.FieldSymbol,
|
|
100639
|
+
Statements.Ranges,
|
|
100637
100640
|
Statements.Tables,
|
|
100638
100641
|
Statements.Include, // this is not super correct, but anyhow
|
|
100639
100642
|
Statements.Parameter,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.120.
|
|
3
|
+
"version": "2.120.34",
|
|
4
4
|
"description": "abaplint - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"homepage": "https://abaplint.org",
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@abaplint/core": "^2.120.
|
|
42
|
+
"@abaplint/core": "^2.120.34",
|
|
43
43
|
"@types/chai": "^4.3.20",
|
|
44
44
|
"@types/minimist": "^1.2.5",
|
|
45
45
|
"@types/mocha": "^10.0.10",
|