@abaplint/cli 2.118.0 → 2.118.2
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 +113 -43
- package/package.json +3 -3
package/build/cli.js
CHANGED
|
@@ -25983,7 +25983,9 @@ const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modu
|
|
|
25983
25983
|
class DatabaseTable {
|
|
25984
25984
|
static runSyntax(node, input) {
|
|
25985
25985
|
const token = node.getFirstToken();
|
|
25986
|
-
const
|
|
25986
|
+
const rawName = token.getStr();
|
|
25987
|
+
const starPrefixed = rawName.startsWith("*");
|
|
25988
|
+
const name = starPrefixed ? rawName.substring(1) : rawName;
|
|
25987
25989
|
if (name === "(") {
|
|
25988
25990
|
// dynamic
|
|
25989
25991
|
return undefined;
|
|
@@ -26202,6 +26204,7 @@ class FieldChain {
|
|
|
26202
26204
|
let context = undefined;
|
|
26203
26205
|
const children = node.getChildren();
|
|
26204
26206
|
context = this.findTop(children[0], input, refType);
|
|
26207
|
+
let prev = children[0].concatTokens();
|
|
26205
26208
|
for (let i = 1; i < children.length; i++) {
|
|
26206
26209
|
const current = children[i];
|
|
26207
26210
|
if (current === undefined) {
|
|
@@ -26242,7 +26245,7 @@ class FieldChain {
|
|
|
26242
26245
|
}
|
|
26243
26246
|
}
|
|
26244
26247
|
else {
|
|
26245
|
-
const message = "
|
|
26248
|
+
const message = prev.toUpperCase() + " is not structured (" + (context === null || context === void 0 ? void 0 : context.constructor.name) + ")";
|
|
26246
26249
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, current.getFirstToken(), message));
|
|
26247
26250
|
return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
26248
26251
|
}
|
|
@@ -26309,6 +26312,7 @@ class FieldChain {
|
|
|
26309
26312
|
}
|
|
26310
26313
|
}
|
|
26311
26314
|
}
|
|
26315
|
+
prev = current.concatTokens();
|
|
26312
26316
|
}
|
|
26313
26317
|
return context;
|
|
26314
26318
|
}
|
|
@@ -26633,6 +26637,70 @@ exports.FSTarget = FSTarget;
|
|
|
26633
26637
|
|
|
26634
26638
|
/***/ },
|
|
26635
26639
|
|
|
26640
|
+
/***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/function_parameters.js"
|
|
26641
|
+
/*!************************************************************************************************!*\
|
|
26642
|
+
!*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/function_parameters.js ***!
|
|
26643
|
+
\************************************************************************************************/
|
|
26644
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
26645
|
+
|
|
26646
|
+
"use strict";
|
|
26647
|
+
|
|
26648
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
26649
|
+
exports.FunctionParameters = void 0;
|
|
26650
|
+
const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
26651
|
+
const source_1 = __webpack_require__(/*! ./source */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js");
|
|
26652
|
+
const target_1 = __webpack_require__(/*! ./target */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js");
|
|
26653
|
+
const field_chain_1 = __webpack_require__(/*! ./field_chain */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/field_chain.js");
|
|
26654
|
+
const _reference_1 = __webpack_require__(/*! ../_reference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js");
|
|
26655
|
+
const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_syntax_input.js");
|
|
26656
|
+
class FunctionParameters {
|
|
26657
|
+
static runSyntax(node, input) {
|
|
26658
|
+
// EXPORTING: process sources in each FunctionExportingParameter
|
|
26659
|
+
for (const param of node.findAllExpressions(Expressions.FunctionExportingParameter)) {
|
|
26660
|
+
const s = param.findDirectExpression(Expressions.Source);
|
|
26661
|
+
if (s) {
|
|
26662
|
+
source_1.Source.runSyntax(s, input);
|
|
26663
|
+
}
|
|
26664
|
+
const s3 = param.findDirectExpression(Expressions.SimpleSource3);
|
|
26665
|
+
if (s3) {
|
|
26666
|
+
source_1.Source.runSyntax(s3, input);
|
|
26667
|
+
}
|
|
26668
|
+
}
|
|
26669
|
+
// IMPORTING / CHANGING / TABLES: process targets in each ParameterT
|
|
26670
|
+
const changingList = node.findExpressionAfterToken("CHANGING");
|
|
26671
|
+
for (const paramList of node.findDirectExpressions(Expressions.ParameterListT)) {
|
|
26672
|
+
for (const param of paramList.findDirectExpressions(Expressions.ParameterT)) {
|
|
26673
|
+
const t = param.findDirectExpression(Expressions.Target);
|
|
26674
|
+
if (t) {
|
|
26675
|
+
target_1.Target.runSyntax(t, input);
|
|
26676
|
+
}
|
|
26677
|
+
if (paramList === changingList && t !== undefined) {
|
|
26678
|
+
// hmm, does this do the scoping correctly? handle constants etc? todo
|
|
26679
|
+
const found = input.scope.findVariable(t.concatTokens());
|
|
26680
|
+
if (found && found.getMeta().includes("read_only" /* IdentifierMeta.ReadOnly */)) {
|
|
26681
|
+
const message = `"${t.concatTokens()}" cannot be modified, it is readonly`;
|
|
26682
|
+
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, t.getFirstToken(), message));
|
|
26683
|
+
}
|
|
26684
|
+
}
|
|
26685
|
+
}
|
|
26686
|
+
}
|
|
26687
|
+
// EXCEPTIONS: process field chains and optional MESSAGE targets
|
|
26688
|
+
for (const exc of node.findAllExpressions(Expressions.ParameterException)) {
|
|
26689
|
+
for (const s of exc.findDirectExpressions(Expressions.SimpleFieldChain)) {
|
|
26690
|
+
field_chain_1.FieldChain.runSyntax(s, input, _reference_1.ReferenceType.DataReadReference);
|
|
26691
|
+
}
|
|
26692
|
+
const t = exc.findDirectExpression(Expressions.Target);
|
|
26693
|
+
if (t) {
|
|
26694
|
+
target_1.Target.runSyntax(t, input);
|
|
26695
|
+
}
|
|
26696
|
+
}
|
|
26697
|
+
}
|
|
26698
|
+
}
|
|
26699
|
+
exports.FunctionParameters = FunctionParameters;
|
|
26700
|
+
//# sourceMappingURL=function_parameters.js.map
|
|
26701
|
+
|
|
26702
|
+
/***/ },
|
|
26703
|
+
|
|
26636
26704
|
/***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/inline_data.js"
|
|
26637
26705
|
/*!****************************************************************************************!*\
|
|
26638
26706
|
!*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/inline_data.js ***!
|
|
@@ -30654,11 +30722,11 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
30654
30722
|
exports.CallFunction = void 0;
|
|
30655
30723
|
const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
30656
30724
|
const source_1 = __webpack_require__(/*! ../expressions/source */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js");
|
|
30657
|
-
const target_1 = __webpack_require__(/*! ../expressions/target */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js");
|
|
30658
30725
|
const field_chain_1 = __webpack_require__(/*! ../expressions/field_chain */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/field_chain.js");
|
|
30659
30726
|
const _reference_1 = __webpack_require__(/*! ../_reference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js");
|
|
30660
30727
|
const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
|
|
30661
30728
|
const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_syntax_input.js");
|
|
30729
|
+
const function_parameters_1 = __webpack_require__(/*! ../expressions/function_parameters */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/function_parameters.js");
|
|
30662
30730
|
class CallFunction {
|
|
30663
30731
|
runSyntax(node, input) {
|
|
30664
30732
|
// todo, lots of work here, similar to receive.ts
|
|
@@ -30676,22 +30744,15 @@ class CallFunction {
|
|
|
30676
30744
|
return;
|
|
30677
30745
|
}
|
|
30678
30746
|
}
|
|
30679
|
-
|
|
30680
|
-
for (const s of node.findAllExpressions(Expressions.Source)) {
|
|
30681
|
-
source_1.Source.runSyntax(s, input);
|
|
30682
|
-
}
|
|
30683
|
-
for (const s of node.findAllExpressions(Expressions.SimpleSource3)) {
|
|
30747
|
+
for (const s of node.findDirectExpressions(Expressions.SimpleSource2)) {
|
|
30684
30748
|
source_1.Source.runSyntax(s, input);
|
|
30685
30749
|
}
|
|
30686
|
-
for (const
|
|
30687
|
-
target_1.Target.runSyntax(t, input);
|
|
30688
|
-
}
|
|
30689
|
-
for (const s of node.findDirectExpressions(Expressions.SimpleSource2)) {
|
|
30750
|
+
for (const s of node.findDirectExpressions(Expressions.Source)) {
|
|
30690
30751
|
source_1.Source.runSyntax(s, input);
|
|
30691
30752
|
}
|
|
30692
|
-
const
|
|
30693
|
-
|
|
30694
|
-
|
|
30753
|
+
const fp = node.findDirectExpression(Expressions.FunctionParameters);
|
|
30754
|
+
if (fp) {
|
|
30755
|
+
function_parameters_1.FunctionParameters.runSyntax(fp, input);
|
|
30695
30756
|
}
|
|
30696
30757
|
}
|
|
30697
30758
|
}
|
|
@@ -33685,6 +33746,15 @@ class Move {
|
|
|
33685
33746
|
target_1.Target.runSyntax(t, input);
|
|
33686
33747
|
}
|
|
33687
33748
|
}
|
|
33749
|
+
if (inline === undefined && firstTarget !== undefined) {
|
|
33750
|
+
// hmm, does this do the scoping correctly? handle constants etc? todo
|
|
33751
|
+
const found = input.scope.findVariable(firstTarget.concatTokens());
|
|
33752
|
+
if (found && found.getMeta().includes("read_only" /* IdentifierMeta.ReadOnly */)) {
|
|
33753
|
+
const message = `"${firstTarget.concatTokens()}" cannot be modified, it is readonly`;
|
|
33754
|
+
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, firstTarget.getFirstToken(), message));
|
|
33755
|
+
return;
|
|
33756
|
+
}
|
|
33757
|
+
}
|
|
33688
33758
|
const source = node.findDirectExpression(Expressions.Source);
|
|
33689
33759
|
let sourceType = source ? source_1.Source.runSyntax(source, input, targetType) : undefined;
|
|
33690
33760
|
if (sourceType === undefined) {
|
|
@@ -55816,7 +55886,7 @@ class Registry {
|
|
|
55816
55886
|
}
|
|
55817
55887
|
static abaplintVersion() {
|
|
55818
55888
|
// magic, see build script "version.sh"
|
|
55819
|
-
return "2.118.
|
|
55889
|
+
return "2.118.2";
|
|
55820
55890
|
}
|
|
55821
55891
|
getDDICReferences() {
|
|
55822
55892
|
return this.ddicReferences;
|
|
@@ -56414,12 +56484,12 @@ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#abap-doc-on
|
|
|
56414
56484
|
issues.push(issue);
|
|
56415
56485
|
}
|
|
56416
56486
|
if (rowText.trim().match(regexEmptyAbapdoc) === null && previousRowsTexts.indexOf(rowText) === previousRowsTexts.length - 1) {
|
|
56417
|
-
const message = "Missing ABAP Doc for method " + method.identifier.getToken().getStr()
|
|
56487
|
+
const message = "Missing ABAP Doc for method " + method.identifier.getToken().getStr();
|
|
56418
56488
|
const issue = issue_1.Issue.atIdentifier(method.identifier, message, this.getMetadata().key, this.conf.severity);
|
|
56419
56489
|
issues.push(issue);
|
|
56420
56490
|
}
|
|
56421
56491
|
if (rowText.trim().match(regexEmptyParameterName) !== null) {
|
|
56422
|
-
const message = "Missing ABAP Doc parameter name for method " + method.identifier.getToken().getStr()
|
|
56492
|
+
const message = "Missing ABAP Doc parameter name for method " + method.identifier.getToken().getStr();
|
|
56423
56493
|
const issue = issue_1.Issue.atIdentifier(method.identifier, message, this.getMetadata().key, this.conf.severity);
|
|
56424
56494
|
issues.push(issue);
|
|
56425
56495
|
}
|
|
@@ -57994,15 +58064,15 @@ class CDSAssociationName {
|
|
|
57994
58064
|
key: "cds_association_name",
|
|
57995
58065
|
title: "CDS Association Name",
|
|
57996
58066
|
shortDescription: `CDS association names should start with an underscore`,
|
|
57997
|
-
extendedInformation: `By convention, CDS association names must start with an underscore character.
|
|
57998
|
-
|
|
58067
|
+
extendedInformation: `By convention, CDS association names must start with an underscore character.
|
|
58068
|
+
|
|
57999
58069
|
https://help.sap.com/docs/abap-cloud/abap-data-models/cds-associations`,
|
|
58000
58070
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Naming],
|
|
58001
|
-
badExample: `define view entity test as select from source
|
|
58002
|
-
association [1..1] to target as Assoc on Assoc.id = source.id
|
|
58071
|
+
badExample: `define view entity test as select from source
|
|
58072
|
+
association [1..1] to target as Assoc on Assoc.id = source.id
|
|
58003
58073
|
{ key id }`,
|
|
58004
|
-
goodExample: `define view entity test as select from source
|
|
58005
|
-
association [1..1] to target as _Assoc on _Assoc.id = source.id
|
|
58074
|
+
goodExample: `define view entity test as select from source
|
|
58075
|
+
association [1..1] to target as _Assoc on _Assoc.id = source.id
|
|
58006
58076
|
{ key id }`,
|
|
58007
58077
|
};
|
|
58008
58078
|
}
|
|
@@ -58150,19 +58220,19 @@ class CDSFieldOrder {
|
|
|
58150
58220
|
title: "CDS Field Order",
|
|
58151
58221
|
shortDescription: `Checks that CDS key fields are listed first and associations last in the field list`,
|
|
58152
58222
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
58153
|
-
badExample: `define view entity test as select from source
|
|
58154
|
-
association [1..1] to target as _Assoc on _Assoc.id = source.id
|
|
58155
|
-
{
|
|
58156
|
-
field1,
|
|
58157
|
-
key id,
|
|
58158
|
-
_Assoc
|
|
58223
|
+
badExample: `define view entity test as select from source
|
|
58224
|
+
association [1..1] to target as _Assoc on _Assoc.id = source.id
|
|
58225
|
+
{
|
|
58226
|
+
field1,
|
|
58227
|
+
key id,
|
|
58228
|
+
_Assoc
|
|
58159
58229
|
}`,
|
|
58160
|
-
goodExample: `define view entity test as select from source
|
|
58161
|
-
association [1..1] to target as _Assoc on _Assoc.id = source.id
|
|
58162
|
-
{
|
|
58163
|
-
key id,
|
|
58164
|
-
field1,
|
|
58165
|
-
_Assoc
|
|
58230
|
+
goodExample: `define view entity test as select from source
|
|
58231
|
+
association [1..1] to target as _Assoc on _Assoc.id = source.id
|
|
58232
|
+
{
|
|
58233
|
+
key id,
|
|
58234
|
+
field1,
|
|
58235
|
+
_Assoc
|
|
58166
58236
|
}`,
|
|
58167
58237
|
};
|
|
58168
58238
|
}
|
|
@@ -58375,13 +58445,13 @@ class CDSNaming {
|
|
|
58375
58445
|
key: "cds_naming",
|
|
58376
58446
|
title: "CDS Naming",
|
|
58377
58447
|
shortDescription: `Checks CDS naming conventions based on the VDM prefix rules`,
|
|
58378
|
-
extendedInformation: `Validates that CDS entity names follow the expected prefix conventions:
|
|
58379
|
-
I_ for interface views, C_ for consumption views, R_ for restricted reuse views,
|
|
58380
|
-
P_ for private views, A_ for remote API views, X_ for view extends,
|
|
58381
|
-
E_ for extension include views, F_ for derivation functions, D_ for abstract entities.
|
|
58382
|
-
|
|
58383
|
-
Names must also start with Z after the prefix (custom namespace).
|
|
58384
|
-
|
|
58448
|
+
extendedInformation: `Validates that CDS entity names follow the expected prefix conventions:
|
|
58449
|
+
I_ for interface views, C_ for consumption views, R_ for restricted reuse views,
|
|
58450
|
+
P_ for private views, A_ for remote API views, X_ for view extends,
|
|
58451
|
+
E_ for extension include views, F_ for derivation functions, D_ for abstract entities.
|
|
58452
|
+
|
|
58453
|
+
Names must also start with Z after the prefix (custom namespace).
|
|
58454
|
+
|
|
58385
58455
|
https://help.sap.com/docs/SAP_S4HANA_ON-PREMISE/ee6ff9b281d8448f96b4fe6c89f2bdc8/8a8cee943ef944fe8936f4cc60ba9bc1.html`,
|
|
58386
58456
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Naming],
|
|
58387
58457
|
badExample: `define view entity ZMY_VIEW as select from source { key id }`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.118.
|
|
3
|
+
"version": "2.118.2",
|
|
4
4
|
"description": "abaplint - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"homepage": "https://abaplint.org",
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@abaplint/core": "^2.118.
|
|
41
|
+
"@abaplint/core": "^2.118.2",
|
|
42
42
|
"@types/chai": "^4.3.20",
|
|
43
43
|
"@types/minimist": "^1.2.5",
|
|
44
44
|
"@types/mocha": "^10.0.10",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"eslint": "^9.39.2",
|
|
51
51
|
"glob": "^11.1.0",
|
|
52
52
|
"json5": "^2.2.3",
|
|
53
|
-
"memfs": "^4.
|
|
53
|
+
"memfs": "^4.57.1",
|
|
54
54
|
"minimist": "^1.2.8",
|
|
55
55
|
"mocha": "^11.7.5",
|
|
56
56
|
"progress": "^2.0.3",
|