@abaplint/cli 2.120.32 → 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 +35 -25
- 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();
|
|
@@ -27746,6 +27751,11 @@ class TypeUtils {
|
|
|
27746
27751
|
return false;
|
|
27747
27752
|
}
|
|
27748
27753
|
}
|
|
27754
|
+
else if (source instanceof basic_1.DateType || source instanceof basic_1.TimeType) {
|
|
27755
|
+
if (target instanceof basic_1.CharacterType || target instanceof basic_1.StringType) {
|
|
27756
|
+
return false;
|
|
27757
|
+
}
|
|
27758
|
+
}
|
|
27749
27759
|
else if (source instanceof basic_1.StringType) {
|
|
27750
27760
|
if (target instanceof basic_1.StructureType && this.structureContainsString(target)) {
|
|
27751
27761
|
return false;
|
|
@@ -27772,6 +27782,11 @@ class TypeUtils {
|
|
|
27772
27782
|
}
|
|
27773
27783
|
return false;
|
|
27774
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
|
+
}
|
|
27775
27790
|
return true;
|
|
27776
27791
|
}
|
|
27777
27792
|
else if (source instanceof basic_1.StructureType) {
|
|
@@ -27796,7 +27811,8 @@ class TypeUtils {
|
|
|
27796
27811
|
}
|
|
27797
27812
|
else if (target instanceof basic_1.VoidType
|
|
27798
27813
|
|| target instanceof basic_1.AnyType
|
|
27799
|
-
|| target instanceof basic_1.DataType
|
|
27814
|
+
|| target instanceof basic_1.DataType
|
|
27815
|
+
|| target instanceof basic_1.UnknownType) {
|
|
27800
27816
|
return true;
|
|
27801
27817
|
}
|
|
27802
27818
|
return false;
|
|
@@ -27807,7 +27823,9 @@ class TypeUtils {
|
|
|
27807
27823
|
}
|
|
27808
27824
|
}
|
|
27809
27825
|
else if (source instanceof basic_1.IntegerType) {
|
|
27810
|
-
if (target instanceof basic_1.StringType
|
|
27826
|
+
if (target instanceof basic_1.StringType
|
|
27827
|
+
|| target instanceof basic_1.DateType
|
|
27828
|
+
|| target instanceof basic_1.CharacterType) {
|
|
27811
27829
|
return false;
|
|
27812
27830
|
}
|
|
27813
27831
|
else if (target instanceof basic_1.Integer8Type || target instanceof basic_1.PackedType) {
|
|
@@ -70053,7 +70071,7 @@ class Registry {
|
|
|
70053
70071
|
}
|
|
70054
70072
|
static abaplintVersion() {
|
|
70055
70073
|
// magic, see build script "version.js"
|
|
70056
|
-
return "2.120.
|
|
70074
|
+
return "2.120.34";
|
|
70057
70075
|
}
|
|
70058
70076
|
getDDICReferences() {
|
|
70059
70077
|
return this.ddicReferences;
|
|
@@ -73257,7 +73275,8 @@ class CDSFieldOrder {
|
|
|
73257
73275
|
}
|
|
73258
73276
|
getAssociationNames(tree) {
|
|
73259
73277
|
const names = new Set();
|
|
73260
|
-
|
|
73278
|
+
const found = [...tree.findAllExpressions(expressions_1.CDSAssociation), ...tree.findAllExpressions(expressions_1.CDSComposition)];
|
|
73279
|
+
for (const assoc of found) {
|
|
73261
73280
|
const relation = assoc.findDirectExpression(expressions_1.CDSRelation);
|
|
73262
73281
|
if (relation === undefined) {
|
|
73263
73282
|
continue;
|
|
@@ -73375,7 +73394,6 @@ const _irule_1 = __webpack_require__(/*! ./_irule */ "../core/build/src/rules/_i
|
|
|
73375
73394
|
const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "../core/build/src/rules/_basic_rule_config.js");
|
|
73376
73395
|
const objects_1 = __webpack_require__(/*! ../objects */ "../core/build/src/objects/index.js");
|
|
73377
73396
|
const expressions_1 = __webpack_require__(/*! ../cds/expressions */ "../core/build/src/cds/expressions/index.js");
|
|
73378
|
-
const cds_name_1 = __webpack_require__(/*! ../cds/expressions/cds_name */ "../core/build/src/cds/expressions/cds_name.js");
|
|
73379
73397
|
class CDSNamingConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
73380
73398
|
constructor() {
|
|
73381
73399
|
super(...arguments);
|
|
@@ -73447,7 +73465,7 @@ https://help.sap.com/docs/SAP_S4HANA_ON-PREMISE/ee6ff9b281d8448f96b4fe6c89f2bdc8
|
|
|
73447
73465
|
if (file === undefined) {
|
|
73448
73466
|
return [];
|
|
73449
73467
|
}
|
|
73450
|
-
const name =
|
|
73468
|
+
const name = o.getDefinitionName();
|
|
73451
73469
|
if (name === undefined) {
|
|
73452
73470
|
return [];
|
|
73453
73471
|
}
|
|
@@ -73464,13 +73482,6 @@ https://help.sap.com/docs/SAP_S4HANA_ON-PREMISE/ee6ff9b281d8448f96b4fe6c89f2bdc8
|
|
|
73464
73482
|
}
|
|
73465
73483
|
return [];
|
|
73466
73484
|
}
|
|
73467
|
-
getCDSName(tree) {
|
|
73468
|
-
const nameNodes = tree.findDirectExpressions(cds_name_1.CDSName);
|
|
73469
|
-
if (nameNodes.length > 0) {
|
|
73470
|
-
return nameNodes[0].getFirstToken().getStr();
|
|
73471
|
-
}
|
|
73472
|
-
return undefined;
|
|
73473
|
-
}
|
|
73474
73485
|
getAllowedPrefixes(tree) {
|
|
73475
73486
|
const root = tree.get();
|
|
73476
73487
|
if (root instanceof expressions_1.CDSExtendView) {
|
|
@@ -88489,17 +88500,19 @@ class NoDynamicStuff extends _abap_rule_1.ABAPRule {
|
|
|
88489
88500
|
extendedInformation: `Dynamic constructs cannot be checked statically, they are not found by
|
|
88490
88501
|
where-used lists and refactorings, and they can introduce injection vulnerabilities.
|
|
88491
88502
|
|
|
88492
|
-
Dynamic tokens containing a literal, eg. CALL METHOD ('
|
|
88493
|
-
|
|
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.
|
|
88494
88505
|
|
|
88495
88506
|
Dynamic SQL is reported by rule dangerous_statement.`,
|
|
88496
88507
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
|
|
88497
88508
|
badExample: `CALL METHOD (lv_class)=>(lv_method).
|
|
88509
|
+
CALL METHOD go_calendar->('RESET_DAY_INFO').
|
|
88498
88510
|
CALL FUNCTION lv_function_module.
|
|
88499
88511
|
CREATE OBJECT ref TYPE (lv_class).
|
|
88500
88512
|
ASSIGN (lv_name) TO <fs>.
|
|
88501
88513
|
SORT tab BY (lv_field).`,
|
|
88502
88514
|
goodExample: `cl_class=>method( ).
|
|
88515
|
+
go_calendar->reset_day_info( ).
|
|
88503
88516
|
CALL FUNCTION 'ZFOO'.
|
|
88504
88517
|
CREATE OBJECT ref TYPE cl_class.
|
|
88505
88518
|
ASSIGN foo TO <fs>.
|
|
@@ -88611,10 +88624,8 @@ SORT tab BY field.`,
|
|
|
88611
88624
|
for (const source of node.findAllExpressions(Expressions.MethodSource)) {
|
|
88612
88625
|
// Dynamic is always a direct child of MethodSource, dynamics further down
|
|
88613
88626
|
// are parameters of the method call and not part of the method name
|
|
88614
|
-
|
|
88615
|
-
|
|
88616
|
-
return true;
|
|
88617
|
-
}
|
|
88627
|
+
if (source.findDirectExpression(Expressions.Dynamic) !== undefined) {
|
|
88628
|
+
return true;
|
|
88618
88629
|
}
|
|
88619
88630
|
}
|
|
88620
88631
|
return false;
|
|
@@ -88625,12 +88636,7 @@ SORT tab BY field.`,
|
|
|
88625
88636
|
return component !== undefined && this.isLiteral(component) === false;
|
|
88626
88637
|
}
|
|
88627
88638
|
hasDynamic(node) {
|
|
88628
|
-
|
|
88629
|
-
if (this.isLiteral(dynamic) === false) {
|
|
88630
|
-
return true;
|
|
88631
|
-
}
|
|
88632
|
-
}
|
|
88633
|
-
return false;
|
|
88639
|
+
return node.findFirstExpression(Expressions.Dynamic) !== undefined;
|
|
88634
88640
|
}
|
|
88635
88641
|
notLiteral(node) {
|
|
88636
88642
|
return node !== undefined && this.isLiteral(node) === false;
|
|
@@ -100627,6 +100633,10 @@ exports.DECLARATION_STUFF = [
|
|
|
100627
100633
|
Statements.DataBegin,
|
|
100628
100634
|
Statements.Constant,
|
|
100629
100635
|
Statements.ConstantBegin,
|
|
100636
|
+
Statements.Static,
|
|
100637
|
+
Statements.StaticBegin,
|
|
100638
|
+
Statements.FieldSymbol,
|
|
100639
|
+
Statements.Ranges,
|
|
100630
100640
|
Statements.Tables,
|
|
100631
100641
|
Statements.Include, // this is not super correct, but anyhow
|
|
100632
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",
|