@abaplint/cli 2.119.1 → 2.119.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/cli.js +44 -6
- package/package.json +2 -2
package/build/cli.js
CHANGED
|
@@ -8638,7 +8638,9 @@ class SQLFunction extends combi_1.Expression {
|
|
|
8638
8638
|
const dats_add_months = (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)((0, combi_1.regex)(/^dats_add_months$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
8639
8639
|
const ltrim = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)((0, combi_1.regex)(/^ltrim$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
8640
8640
|
const rtrim = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)((0, combi_1.regex)(/^rtrim$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
8641
|
-
|
|
8641
|
+
const right = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)((0, combi_1.regex)(/^right$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
8642
|
+
const left = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)((0, combi_1.regex)(/^left$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
8643
|
+
return (0, combi_1.altPrio)(uuid, abs, ceil, floor, cast, div, mod, coalesce, concat, replace, length, lower, upper, round, concat_with_space, ltrim, rtrim, right, left, substring, dats_is_valid, dats_days_between, dats_add_days, dats_add_months);
|
|
8642
8644
|
}
|
|
8643
8645
|
}
|
|
8644
8646
|
exports.SQLFunction = SQLFunction;
|
|
@@ -23529,6 +23531,8 @@ var ScopeType;
|
|
|
23529
23531
|
(function (ScopeType) {
|
|
23530
23532
|
ScopeType["BuiltIn"] = "_builtin";
|
|
23531
23533
|
ScopeType["Dummy"] = "_dummy";
|
|
23534
|
+
// definitions inside this one are local
|
|
23535
|
+
ScopeType["SelectionEvent"] = "selection_event";
|
|
23532
23536
|
ScopeType["Global"] = "_global";
|
|
23533
23537
|
ScopeType["Program"] = "_program";
|
|
23534
23538
|
ScopeType["TypePool"] = "_type_pool";
|
|
@@ -24010,7 +24014,11 @@ class TypeUtils {
|
|
|
24010
24014
|
}
|
|
24011
24015
|
}
|
|
24012
24016
|
else if (source instanceof basic_1.TableType) {
|
|
24013
|
-
if (
|
|
24017
|
+
if (source.getRowType() instanceof basic_1.AnyType) {
|
|
24018
|
+
// then its a generic table, todo: add top level generic table type?
|
|
24019
|
+
return true;
|
|
24020
|
+
}
|
|
24021
|
+
else if (target instanceof basic_1.TableType) {
|
|
24014
24022
|
const sourceKeyType = source.getOptions().keyType;
|
|
24015
24023
|
const targetKeyType = target.getOptions().keyType;
|
|
24016
24024
|
if (sourceKeyType !== targetKeyType
|
|
@@ -36681,6 +36689,7 @@ const commit_entities_1 = __webpack_require__(/*! ./statements/commit_entities *
|
|
|
36681
36689
|
const _syntax_input_1 = __webpack_require__(/*! ./_syntax_input */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_syntax_input.js");
|
|
36682
36690
|
const assert_error_1 = __webpack_require__(/*! ./assert_error */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/assert_error.js");
|
|
36683
36691
|
const field_group_1 = __webpack_require__(/*! ./statements/field_group */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/field_group.js");
|
|
36692
|
+
const stuff_1 = __webpack_require__(/*! ../../stuff */ "./node_modules/@abaplint/core/build/src/stuff.js");
|
|
36684
36693
|
// -----------------------------------
|
|
36685
36694
|
const map = {};
|
|
36686
36695
|
function addToMap(handler) {
|
|
@@ -36934,6 +36943,9 @@ class SyntaxLogic {
|
|
|
36934
36943
|
updateScopeStructure(node) {
|
|
36935
36944
|
const filename = this.currentFile.getFilename();
|
|
36936
36945
|
const stru = node.get();
|
|
36946
|
+
if (this.scope.getType() === _scope_type_1.ScopeType.SelectionEvent && this.isSelectionEventBoundaryStructure(stru)) {
|
|
36947
|
+
this.scope.pop(node.getFirstToken().getStart());
|
|
36948
|
+
}
|
|
36937
36949
|
const input = {
|
|
36938
36950
|
scope: this.scope,
|
|
36939
36951
|
filename,
|
|
@@ -36973,6 +36985,7 @@ class SyntaxLogic {
|
|
|
36973
36985
|
updateScopeStatement(node) {
|
|
36974
36986
|
const filename = this.currentFile.getFilename();
|
|
36975
36987
|
const s = node.get();
|
|
36988
|
+
this.updateSelectionEventScope(node);
|
|
36976
36989
|
const input = {
|
|
36977
36990
|
scope: this.scope,
|
|
36978
36991
|
filename,
|
|
@@ -37018,6 +37031,27 @@ class SyntaxLogic {
|
|
|
37018
37031
|
}
|
|
37019
37032
|
}
|
|
37020
37033
|
}
|
|
37034
|
+
updateSelectionEventScope(node) {
|
|
37035
|
+
const statement = node.get();
|
|
37036
|
+
if (this.scope.getType() === _scope_type_1.ScopeType.SelectionEvent && this.isSelectionEventBoundary(statement)) {
|
|
37037
|
+
this.scope.pop(node.getFirstToken().getStart());
|
|
37038
|
+
}
|
|
37039
|
+
if (this.opensSelectionEventScope(statement)) {
|
|
37040
|
+
this.scope.push(_scope_type_1.ScopeType.SelectionEvent, statement.constructor.name, node.getFirstToken().getStart(), this.currentFile.getFilename());
|
|
37041
|
+
}
|
|
37042
|
+
}
|
|
37043
|
+
opensSelectionEventScope(statement) {
|
|
37044
|
+
return statement instanceof Statements.AtSelectionScreen;
|
|
37045
|
+
}
|
|
37046
|
+
isSelectionEventBoundary(statement) {
|
|
37047
|
+
return stuff_1.SELECTION_EVENTS.some(event => statement instanceof event)
|
|
37048
|
+
|| statement instanceof Statements.Form
|
|
37049
|
+
|| statement instanceof Statements.FunctionModule;
|
|
37050
|
+
}
|
|
37051
|
+
isSelectionEventBoundaryStructure(structure) {
|
|
37052
|
+
return structure instanceof Structures.ClassDefinition
|
|
37053
|
+
|| structure instanceof Structures.Interface;
|
|
37054
|
+
}
|
|
37021
37055
|
}
|
|
37022
37056
|
exports.SyntaxLogic = SyntaxLogic;
|
|
37023
37057
|
//# sourceMappingURL=syntax.js.map
|
|
@@ -40342,7 +40376,7 @@ class ClassDefinition extends _identifier_1.Identifier {
|
|
|
40342
40376
|
input.scope.addReference(token, undefined, _reference_1.ReferenceType.ObjectOrientedVoidReference, input.filename);
|
|
40343
40377
|
}
|
|
40344
40378
|
else {
|
|
40345
|
-
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, token, name.toUpperCase() + " does not exist"));
|
|
40379
|
+
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, token, "Friend class " + name.toUpperCase() + " does not exist"));
|
|
40346
40380
|
}
|
|
40347
40381
|
result.push(name);
|
|
40348
40382
|
}
|
|
@@ -56143,7 +56177,7 @@ class Registry {
|
|
|
56143
56177
|
}
|
|
56144
56178
|
static abaplintVersion() {
|
|
56145
56179
|
// magic, see build script "version.sh"
|
|
56146
|
-
return "2.119.
|
|
56180
|
+
return "2.119.3";
|
|
56147
56181
|
}
|
|
56148
56182
|
getDDICReferences() {
|
|
56149
56183
|
return this.ddicReferences;
|
|
@@ -68679,6 +68713,7 @@ const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./
|
|
|
68679
68713
|
const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@abaplint/core/build/src/rules/_abap_rule.js");
|
|
68680
68714
|
const Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
68681
68715
|
const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
|
|
68716
|
+
const edit_helper_1 = __webpack_require__(/*! ../edit_helper */ "./node_modules/@abaplint/core/build/src/edit_helper.js");
|
|
68682
68717
|
class KeepSingleParameterCallsOnOneLineConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
68683
68718
|
constructor() {
|
|
68684
68719
|
super(...arguments);
|
|
@@ -68698,7 +68733,7 @@ class KeepSingleParameterCallsOnOneLine extends _abap_rule_1.ABAPRule {
|
|
|
68698
68733
|
title: "Keep single parameters on one line",
|
|
68699
68734
|
shortDescription: `Keep single parameter calls on one line`,
|
|
68700
68735
|
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-single-parameter-calls-on-one-line`,
|
|
68701
|
-
tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
68736
|
+
tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
|
|
68702
68737
|
badExample: `call_method(\n 2 ).`,
|
|
68703
68738
|
goodExample: `call_method( 2 ).`,
|
|
68704
68739
|
};
|
|
@@ -68774,7 +68809,8 @@ class KeepSingleParameterCallsOnOneLine extends _abap_rule_1.ABAPRule {
|
|
|
68774
68809
|
}
|
|
68775
68810
|
}
|
|
68776
68811
|
const message = "Keep single parameter on one line";
|
|
68777
|
-
|
|
68812
|
+
const fix = edit_helper_1.EditHelper.replaceRange(file, c.getFirstToken().getStart(), c.getLastToken().getEnd(), c.concatTokens());
|
|
68813
|
+
return [issue_1.Issue.atToken(file, c.getFirstToken(), message, this.getMetadata().key, this.conf.severity, fix)];
|
|
68778
68814
|
}
|
|
68779
68815
|
return [];
|
|
68780
68816
|
}
|
|
@@ -69865,6 +69901,7 @@ const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/co
|
|
|
69865
69901
|
const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
|
|
69866
69902
|
const Objects = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
|
|
69867
69903
|
const _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
|
|
69904
|
+
const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
|
|
69868
69905
|
const Statements = __webpack_require__(/*! ../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
|
|
69869
69906
|
const Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
69870
69907
|
const position_1 = __webpack_require__(/*! ../position */ "./node_modules/@abaplint/core/build/src/position.js");
|
|
@@ -69882,6 +69919,7 @@ class MainFileContents {
|
|
|
69882
69919
|
key: "main_file_contents",
|
|
69883
69920
|
title: "Main file contents",
|
|
69884
69921
|
shortDescription: `Checks related to report declarations.`,
|
|
69922
|
+
tags: [_irule_1.RuleTag.Syntax],
|
|
69885
69923
|
extendedInformation: `Does not run if the target version is Cloud
|
|
69886
69924
|
|
|
69887
69925
|
* PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.119.
|
|
3
|
+
"version": "2.119.3",
|
|
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.119.
|
|
41
|
+
"@abaplint/core": "^2.119.3",
|
|
42
42
|
"@types/chai": "^4.3.20",
|
|
43
43
|
"@types/minimist": "^1.2.5",
|
|
44
44
|
"@types/mocha": "^10.0.10",
|