@abaplint/cli 2.102.47 → 2.102.49
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 +156 -25
- package/package.json +6 -6
package/build/cli.js
CHANGED
|
@@ -5236,6 +5236,7 @@ __exportStar(__webpack_require__(/*! ./sql_group_by */ "./node_modules/@abaplint
|
|
|
5236
5236
|
__exportStar(__webpack_require__(/*! ./sql_having */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_having.js"), exports);
|
|
5237
5237
|
__exportStar(__webpack_require__(/*! ./sql_hints */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_hints.js"), exports);
|
|
5238
5238
|
__exportStar(__webpack_require__(/*! ./sql_in */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_in.js"), exports);
|
|
5239
|
+
__exportStar(__webpack_require__(/*! ./sql_into_list */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_into_list.js"), exports);
|
|
5239
5240
|
__exportStar(__webpack_require__(/*! ./sql_into_structure */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_into_structure.js"), exports);
|
|
5240
5241
|
__exportStar(__webpack_require__(/*! ./sql_into_table */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_into_table.js"), exports);
|
|
5241
5242
|
__exportStar(__webpack_require__(/*! ./sql_join */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_join.js"), exports);
|
|
@@ -6721,13 +6722,13 @@ const sql_field_name_1 = __webpack_require__(/*! ./sql_field_name */ "./node_mod
|
|
|
6721
6722
|
const sql_up_to_1 = __webpack_require__(/*! ./sql_up_to */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_up_to.js");
|
|
6722
6723
|
class Select extends combi_1.Expression {
|
|
6723
6724
|
getRunnable() {
|
|
6724
|
-
const into = (0, combi_1.altPrio)(_1.SQLIntoTable, sql_into_structure_1.SQLIntoStructure);
|
|
6725
|
+
const into = (0, combi_1.altPrio)(_1.SQLIntoTable, sql_into_structure_1.SQLIntoStructure, _1.SQLIntoList);
|
|
6725
6726
|
const where = (0, combi_1.seq)("WHERE", _1.SQLCond);
|
|
6726
6727
|
const offset = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)("OFFSET", _1.SQLSource));
|
|
6727
6728
|
const bypass = (0, combi_1.str)("BYPASSING BUFFER");
|
|
6728
6729
|
const fields = (0, combi_1.ver)(version_1.Version.v750, _1.SQLFields);
|
|
6729
6730
|
const perm = (0, combi_1.per)(_1.SQLFrom, into, _1.SQLForAllEntries, where, _1.SQLOrderBy, sql_up_to_1.SQLUpTo, offset, _1.SQLClient, _1.SQLHaving, bypass, sql_group_by_1.SQLGroupBy, fields, _1.DatabaseConnection);
|
|
6730
|
-
const permSingle = (0, combi_1.per)(_1.SQLFrom, sql_into_structure_1.SQLIntoStructure, where, _1.SQLClient, bypass, fields, _1.DatabaseConnection);
|
|
6731
|
+
const permSingle = (0, combi_1.per)(_1.SQLFrom, (0, combi_1.altPrio)(sql_into_structure_1.SQLIntoStructure, _1.SQLIntoList), where, _1.SQLClient, bypass, fields, _1.DatabaseConnection);
|
|
6731
6732
|
const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), sql_field_name_1.SQLFieldName, (0, combi_1.tok)(tokens_1.WParenRightW));
|
|
6732
6733
|
const fieldList = (0, combi_1.optPrio)((0, combi_1.altPrio)(_1.SQLFieldList, paren));
|
|
6733
6734
|
const single = (0, combi_1.seq)("SINGLE", (0, combi_1.optPrio)("FOR UPDATE"), fieldList, permSingle);
|
|
@@ -6767,8 +6768,9 @@ class SelectLoop extends combi_1.Expression {
|
|
|
6767
6768
|
const pack = (0, combi_1.seq)("PACKAGE SIZE", _1.SQLSource);
|
|
6768
6769
|
const tab = (0, combi_1.seq)(_1.SQLIntoTable, (0, combi_1.alt)(pack, (0, combi_1.seq)(_1.SQLFrom, pack), (0, combi_1.seq)(pack, _1.SQLFrom)));
|
|
6769
6770
|
const packTab = (0, combi_1.seq)(pack, _1.SQLIntoTable);
|
|
6770
|
-
const
|
|
6771
|
-
const
|
|
6771
|
+
const into = (0, combi_1.altPrio)(sql_into_structure_1.SQLIntoStructure, _1.SQLIntoList);
|
|
6772
|
+
const perm = (0, combi_1.per)(_1.SQLFrom, where, sql_up_to_1.SQLUpTo, sql_order_by_1.SQLOrderBy, sql_having_1.SQLHaving, _1.SQLClient, bypass, _1.SQLGroupBy, _1.SQLForAllEntries, (0, combi_1.alt)(tab, into, packTab));
|
|
6773
|
+
const strict = (0, combi_1.seq)(_1.SQLFrom, (0, combi_1.ver)(version_1.Version.v750, _1.SQLFields), where, into, sql_up_to_1.SQLUpTo);
|
|
6772
6774
|
const ret = (0, combi_1.seq)("SELECT", (0, combi_1.altPrio)((0, combi_1.seq)((0, combi_1.optPrio)("DISTINCT"), sql_field_list_loop_1.SQLFieldListLoop, perm), strict), (0, combi_1.optPrio)(sql_hints_1.SQLHints));
|
|
6773
6775
|
return ret;
|
|
6774
6776
|
}
|
|
@@ -7750,6 +7752,30 @@ exports.SQLIn = SQLIn;
|
|
|
7750
7752
|
|
|
7751
7753
|
/***/ }),
|
|
7752
7754
|
|
|
7755
|
+
/***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_into_list.js":
|
|
7756
|
+
/*!**********************************************************************************************!*\
|
|
7757
|
+
!*** ./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_into_list.js ***!
|
|
7758
|
+
\**********************************************************************************************/
|
|
7759
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
7760
|
+
|
|
7761
|
+
"use strict";
|
|
7762
|
+
|
|
7763
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7764
|
+
exports.SQLIntoList = void 0;
|
|
7765
|
+
const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
7766
|
+
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
7767
|
+
const paren_left_1 = __webpack_require__(/*! ../../1_lexer/tokens/paren_left */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/paren_left.js");
|
|
7768
|
+
class SQLIntoList extends combi_1.Expression {
|
|
7769
|
+
getRunnable() {
|
|
7770
|
+
const intoList = (0, combi_1.seq)((0, combi_1.altPrio)((0, combi_1.tok)(paren_left_1.WParenLeft), (0, combi_1.tok)(paren_left_1.WParenLeftW)), (0, combi_1.starPrio)((0, combi_1.seq)(_1.SQLTarget, ",")), _1.SQLTarget, ")");
|
|
7771
|
+
return (0, combi_1.seq)("INTO", intoList);
|
|
7772
|
+
}
|
|
7773
|
+
}
|
|
7774
|
+
exports.SQLIntoList = SQLIntoList;
|
|
7775
|
+
//# sourceMappingURL=sql_into_list.js.map
|
|
7776
|
+
|
|
7777
|
+
/***/ }),
|
|
7778
|
+
|
|
7753
7779
|
/***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_into_structure.js":
|
|
7754
7780
|
/*!***************************************************************************************************!*\
|
|
7755
7781
|
!*** ./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_into_structure.js ***!
|
|
@@ -7762,12 +7788,10 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
7762
7788
|
exports.SQLIntoStructure = void 0;
|
|
7763
7789
|
const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
7764
7790
|
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
7765
|
-
const paren_left_1 = __webpack_require__(/*! ../../1_lexer/tokens/paren_left */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/paren_left.js");
|
|
7766
7791
|
class SQLIntoStructure extends combi_1.Expression {
|
|
7767
7792
|
getRunnable() {
|
|
7768
|
-
const intoList = (0, combi_1.seq)((0, combi_1.altPrio)((0, combi_1.tok)(paren_left_1.WParenLeft), (0, combi_1.tok)(paren_left_1.WParenLeftW)), (0, combi_1.starPrio)((0, combi_1.seq)(_1.SQLTarget, ",")), _1.SQLTarget, ")");
|
|
7769
7793
|
const intoSimple = (0, combi_1.seq)((0, combi_1.optPrio)("CORRESPONDING FIELDS OF"), _1.SQLTarget);
|
|
7770
|
-
return (0, combi_1.seq)("INTO",
|
|
7794
|
+
return (0, combi_1.seq)("INTO", intoSimple);
|
|
7771
7795
|
}
|
|
7772
7796
|
}
|
|
7773
7797
|
exports.SQLIntoStructure = SQLIntoStructure;
|
|
@@ -12015,7 +12039,7 @@ const sql_into_structure_1 = __webpack_require__(/*! ../expressions/sql_into_str
|
|
|
12015
12039
|
class FetchNextCursor {
|
|
12016
12040
|
getMatcher() {
|
|
12017
12041
|
const size = (0, combi_1.seq)("PACKAGE SIZE", expressions_1.SQLSourceSimple);
|
|
12018
|
-
const ret = (0, combi_1.seq)("FETCH NEXT CURSOR", expressions_1.SQLSourceSimple, (0, combi_1.alt)(sql_into_structure_1.SQLIntoStructure, expressions_1.SQLIntoTable), (0, combi_1.optPrio)(size));
|
|
12042
|
+
const ret = (0, combi_1.seq)("FETCH NEXT CURSOR", expressions_1.SQLSourceSimple, (0, combi_1.alt)(sql_into_structure_1.SQLIntoStructure, expressions_1.SQLIntoTable, expressions_1.SQLIntoList), (0, combi_1.optPrio)(size));
|
|
12019
12043
|
return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
|
|
12020
12044
|
}
|
|
12021
12045
|
}
|
|
@@ -21829,6 +21853,11 @@ class TypeUtils {
|
|
|
21829
21853
|
return false;
|
|
21830
21854
|
}
|
|
21831
21855
|
}
|
|
21856
|
+
else if (source instanceof basic_1.GenericObjectReferenceType) {
|
|
21857
|
+
if (target instanceof basic_1.ObjectReferenceType) {
|
|
21858
|
+
return false;
|
|
21859
|
+
}
|
|
21860
|
+
}
|
|
21832
21861
|
else if (source instanceof basic_1.ObjectReferenceType) {
|
|
21833
21862
|
if (target instanceof basic_1.XSequenceType
|
|
21834
21863
|
|| target instanceof basic_1.IntegerType
|
|
@@ -25558,6 +25587,7 @@ const sql_for_all_entries_1 = __webpack_require__(/*! ./sql_for_all_entries */ "
|
|
|
25558
25587
|
const _scope_type_1 = __webpack_require__(/*! ../_scope_type */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js");
|
|
25559
25588
|
const sql_source_1 = __webpack_require__(/*! ./sql_source */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/sql_source.js");
|
|
25560
25589
|
const sql_compare_1 = __webpack_require__(/*! ./sql_compare */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/sql_compare.js");
|
|
25590
|
+
const isSimple = /^\w+$/;
|
|
25561
25591
|
class Select {
|
|
25562
25592
|
runSyntax(node, scope, filename, skipImplicitInto = false) {
|
|
25563
25593
|
var _a, _b;
|
|
@@ -25570,10 +25600,7 @@ class Select {
|
|
|
25570
25600
|
throw new Error(`fields missing`);
|
|
25571
25601
|
}
|
|
25572
25602
|
this.checkFields(fields, dbSources, scope);
|
|
25573
|
-
|
|
25574
|
-
// todo, for now these are voided
|
|
25575
|
-
new inline_data_1.InlineData().runSyntax(inline, scope, filename, this.buildType(fields));
|
|
25576
|
-
}
|
|
25603
|
+
this.handleInto(node, scope, filename, fields, dbSources);
|
|
25577
25604
|
const fae = node.findDirectExpression(Expressions.SQLForAllEntries);
|
|
25578
25605
|
if (fae) {
|
|
25579
25606
|
scope.push(_scope_type_1.ScopeType.OpenSQL, "SELECT", token.getStart(), filename);
|
|
@@ -25585,6 +25612,7 @@ class Select {
|
|
|
25585
25612
|
// check implicit into, the target field is implict equal to the table name
|
|
25586
25613
|
if (skipImplicitInto === false
|
|
25587
25614
|
&& node.findDirectExpression(Expressions.SQLIntoTable) === undefined
|
|
25615
|
+
&& node.findDirectExpression(Expressions.SQLIntoList) === undefined
|
|
25588
25616
|
&& node.findDirectExpression(Expressions.SQLIntoStructure) === undefined) {
|
|
25589
25617
|
const fields = (_a = node.findFirstExpression(Expressions.SQLAggregation)) === null || _a === void 0 ? void 0 : _a.concatTokens();
|
|
25590
25618
|
const c = new RegExp(/^count\(\s*\*\s*\)$/, "i");
|
|
@@ -25616,6 +25644,54 @@ class Select {
|
|
|
25616
25644
|
scope.pop(node.getLastToken().getEnd());
|
|
25617
25645
|
}
|
|
25618
25646
|
}
|
|
25647
|
+
handleInto(node, scope, filename, fields, dbSources) {
|
|
25648
|
+
const intoTable = node.findDirectExpression(Expressions.SQLIntoTable);
|
|
25649
|
+
if (intoTable) {
|
|
25650
|
+
const inline = intoTable.findFirstExpression(Expressions.InlineData);
|
|
25651
|
+
if (inline) {
|
|
25652
|
+
new inline_data_1.InlineData().runSyntax(inline, scope, filename, this.buildTableType(fields, dbSources, scope));
|
|
25653
|
+
}
|
|
25654
|
+
}
|
|
25655
|
+
const intoStructure = node.findDirectExpression(Expressions.SQLIntoStructure);
|
|
25656
|
+
if (intoStructure) {
|
|
25657
|
+
for (const inline of intoStructure.findAllExpressions(Expressions.InlineData)) {
|
|
25658
|
+
// todo, for now these are voided
|
|
25659
|
+
new inline_data_1.InlineData().runSyntax(inline, scope, filename, new basic_1.VoidType("SELECT_todo"));
|
|
25660
|
+
}
|
|
25661
|
+
}
|
|
25662
|
+
const intoList = node.findDirectExpression(Expressions.SQLIntoList);
|
|
25663
|
+
if (intoList) {
|
|
25664
|
+
const isDynamic = fields.length === 1 && fields[0].expression.findDirectExpression(Expressions.Dynamic) !== undefined;
|
|
25665
|
+
const targets = intoList.findDirectExpressions(Expressions.SQLTarget);
|
|
25666
|
+
if (targets.length !== fields.length && isDynamic !== true) {
|
|
25667
|
+
throw new Error(`number of fields selected vs list does not match`);
|
|
25668
|
+
}
|
|
25669
|
+
for (let i = 0; i < targets.length; i++) {
|
|
25670
|
+
const target = targets[i];
|
|
25671
|
+
const field = fields[i];
|
|
25672
|
+
const inline = target.findFirstExpression(Expressions.InlineData);
|
|
25673
|
+
if (inline) {
|
|
25674
|
+
if (isDynamic) {
|
|
25675
|
+
throw new Error(`dynamic field list, inlining not possible`);
|
|
25676
|
+
}
|
|
25677
|
+
if (isSimple.test(field.code) && dbSources.length === 1 && dbSources[0] !== undefined) {
|
|
25678
|
+
const dbType = dbSources[0].parseType(scope.getRegistry());
|
|
25679
|
+
let type = new basic_1.VoidType("SELECT_todo");
|
|
25680
|
+
if (dbType instanceof basic_1.StructureType) {
|
|
25681
|
+
type = dbType.getComponentByName(field.code);
|
|
25682
|
+
if (type) {
|
|
25683
|
+
throw new Error(`handleInto, internal error, should be checked earlier`);
|
|
25684
|
+
}
|
|
25685
|
+
}
|
|
25686
|
+
new inline_data_1.InlineData().runSyntax(inline, scope, filename, type);
|
|
25687
|
+
}
|
|
25688
|
+
else {
|
|
25689
|
+
new inline_data_1.InlineData().runSyntax(inline, scope, filename, new basic_1.VoidType("SELECT_todo"));
|
|
25690
|
+
}
|
|
25691
|
+
}
|
|
25692
|
+
}
|
|
25693
|
+
}
|
|
25694
|
+
}
|
|
25619
25695
|
checkFields(fields, dbSources, scope) {
|
|
25620
25696
|
if (dbSources.length > 1) {
|
|
25621
25697
|
return;
|
|
@@ -25632,7 +25708,6 @@ class Select {
|
|
|
25632
25708
|
if (!(type instanceof basic_1.StructureType)) {
|
|
25633
25709
|
throw new Error("checkFields, expected structure, " + type.constructor.name);
|
|
25634
25710
|
}
|
|
25635
|
-
const isSimple = /^\w+$/;
|
|
25636
25711
|
for (const field of fields) {
|
|
25637
25712
|
if (field.code === "*") {
|
|
25638
25713
|
continue;
|
|
@@ -25642,21 +25717,44 @@ class Select {
|
|
|
25642
25717
|
}
|
|
25643
25718
|
}
|
|
25644
25719
|
}
|
|
25645
|
-
|
|
25720
|
+
buildTableType(fields, dbSources, scope) {
|
|
25721
|
+
if (dbSources.length !== 1) {
|
|
25722
|
+
return new basic_1.VoidType("SELECT_todo");
|
|
25723
|
+
}
|
|
25724
|
+
if (dbSources[0] === undefined) {
|
|
25725
|
+
// then its a voided table
|
|
25726
|
+
return new basic_1.VoidType("SELECT_todo");
|
|
25727
|
+
}
|
|
25728
|
+
const dbType = dbSources[0].parseType(scope.getRegistry());
|
|
25729
|
+
if (!(dbType instanceof basic_1.StructureType)) {
|
|
25730
|
+
return new basic_1.VoidType("SELECT_todo");
|
|
25731
|
+
}
|
|
25732
|
+
if (fields.length === 1 && fields[0].code === "*") {
|
|
25733
|
+
return new basic_1.TableType(dbType, { withHeader: false, keyType: basic_1.TableKeyType.default }, undefined);
|
|
25734
|
+
}
|
|
25735
|
+
const allFieldsSimple = fields.every(f => isSimple.test(f.code));
|
|
25736
|
+
if (allFieldsSimple === true) {
|
|
25737
|
+
const components = [];
|
|
25738
|
+
for (const field of fields) {
|
|
25739
|
+
const type = dbType.getComponentByName(field.code);
|
|
25740
|
+
if (type === undefined) {
|
|
25741
|
+
return new basic_1.VoidType("SELECT_todo");
|
|
25742
|
+
}
|
|
25743
|
+
components.push({ name: field.code, type });
|
|
25744
|
+
}
|
|
25745
|
+
return new basic_1.TableType(new basic_1.StructureType(components), { withHeader: false, keyType: basic_1.TableKeyType.default }, undefined);
|
|
25746
|
+
}
|
|
25646
25747
|
return new basic_1.VoidType("SELECT_todo");
|
|
25647
25748
|
}
|
|
25648
25749
|
findFields(node) {
|
|
25649
25750
|
var _a;
|
|
25650
25751
|
let expr = undefined;
|
|
25651
25752
|
const ret = [];
|
|
25652
|
-
expr = node.
|
|
25753
|
+
expr = node.findFirstExpression(Expressions.SQLFieldList);
|
|
25653
25754
|
if (expr === undefined) {
|
|
25654
|
-
expr = node.findDirectExpression(Expressions.
|
|
25755
|
+
expr = node.findDirectExpression(Expressions.SQLFieldListLoop);
|
|
25655
25756
|
}
|
|
25656
|
-
|
|
25657
|
-
node.findDirectExpression(Expressions.SQLFieldName);
|
|
25658
|
-
}
|
|
25659
|
-
for (const field of (expr === null || expr === void 0 ? void 0 : expr.findAllExpressions(Expressions.SQLField)) || []) {
|
|
25757
|
+
for (const field of (expr === null || expr === void 0 ? void 0 : expr.findDirectExpressionsMulti([Expressions.SQLField, Expressions.SQLFieldName])) || []) {
|
|
25660
25758
|
let code = field.concatTokens().toUpperCase();
|
|
25661
25759
|
const as = ((_a = field.findDirectExpression(Expressions.SQLAsName)) === null || _a === void 0 ? void 0 : _a.concatTokens()) || "";
|
|
25662
25760
|
if (as !== "") {
|
|
@@ -33633,6 +33731,20 @@ class ExpressionNode extends _abstract_node_1.AbstractNode {
|
|
|
33633
33731
|
}
|
|
33634
33732
|
return ret;
|
|
33635
33733
|
}
|
|
33734
|
+
findDirectExpressionsMulti(type) {
|
|
33735
|
+
const ret = [];
|
|
33736
|
+
for (const child of this.getChildren()) {
|
|
33737
|
+
if (child instanceof ExpressionNode) {
|
|
33738
|
+
for (const t of type) {
|
|
33739
|
+
if (child.get() instanceof t) {
|
|
33740
|
+
ret.push(child);
|
|
33741
|
+
break;
|
|
33742
|
+
}
|
|
33743
|
+
}
|
|
33744
|
+
}
|
|
33745
|
+
}
|
|
33746
|
+
return ret;
|
|
33747
|
+
}
|
|
33636
33748
|
findDirectTokenByText(text) {
|
|
33637
33749
|
for (const child of this.getChildren()) {
|
|
33638
33750
|
if (child instanceof token_node_1.TokenNode && child.get().getStr().toUpperCase() === text.toUpperCase()) {
|
|
@@ -49033,7 +49145,7 @@ class Registry {
|
|
|
49033
49145
|
}
|
|
49034
49146
|
static abaplintVersion() {
|
|
49035
49147
|
// magic, see build script "version.sh"
|
|
49036
|
-
return "2.102.
|
|
49148
|
+
return "2.102.49";
|
|
49037
49149
|
}
|
|
49038
49150
|
getDDICReferences() {
|
|
49039
49151
|
return this.ddicReferences;
|
|
@@ -51677,6 +51789,7 @@ FIND statement with MATCH COUNT is considered okay if subrc is not checked`,
|
|
|
51677
51789
|
}
|
|
51678
51790
|
else if (config.assign === true
|
|
51679
51791
|
&& statement.get() instanceof Statements.Assign
|
|
51792
|
+
&& this.isSimpleAssign(statement) === false
|
|
51680
51793
|
&& this.isChecked(i, statements) === false) {
|
|
51681
51794
|
issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity));
|
|
51682
51795
|
}
|
|
@@ -51690,6 +51803,16 @@ FIND statement with MATCH COUNT is considered okay if subrc is not checked`,
|
|
|
51690
51803
|
return issues;
|
|
51691
51804
|
}
|
|
51692
51805
|
////////////////
|
|
51806
|
+
isSimpleAssign(statement) {
|
|
51807
|
+
if (statement.getChildren().length === 5) {
|
|
51808
|
+
const source = statement.findDirectExpression(Expressions.AssignSource);
|
|
51809
|
+
if ((source === null || source === void 0 ? void 0 : source.getChildren().length) === 1
|
|
51810
|
+
&& source.findDirectExpression(Expressions.Source) !== undefined) {
|
|
51811
|
+
return true;
|
|
51812
|
+
}
|
|
51813
|
+
}
|
|
51814
|
+
return false;
|
|
51815
|
+
}
|
|
51693
51816
|
isExemptedFind(s) {
|
|
51694
51817
|
// see https://github.com/abaplint/abaplint/issues/2130
|
|
51695
51818
|
return s.concatTokens().toUpperCase().includes(" MATCH COUNT ") === true;
|
|
@@ -60795,7 +60918,7 @@ ENDIF.
|
|
|
60795
60918
|
}
|
|
60796
60919
|
////////////////////
|
|
60797
60920
|
analyzeInto(file, m) {
|
|
60798
|
-
const into = m.findFirstExpression(Expressions.
|
|
60921
|
+
const into = m.findFirstExpression(Expressions.SQLIntoList);
|
|
60799
60922
|
if (into === undefined) {
|
|
60800
60923
|
return [];
|
|
60801
60924
|
}
|
|
@@ -63045,6 +63168,7 @@ ENDIF.`,
|
|
|
63045
63168
|
if (this.conf.selectWithoutInto
|
|
63046
63169
|
&& (sta instanceof Statements.Select || sta instanceof Statements.SelectLoop)
|
|
63047
63170
|
&& staNode.findFirstExpression(Expressions.SQLIntoStructure) === undefined
|
|
63171
|
+
&& staNode.findFirstExpression(Expressions.SQLIntoList) === undefined
|
|
63048
63172
|
&& staNode.findFirstExpression(Expressions.SQLIntoTable) === undefined) {
|
|
63049
63173
|
const concat = (_a = staNode.findFirstExpression(Expressions.SQLFieldList)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();
|
|
63050
63174
|
if (concat !== "COUNT(*)" && concat !== "COUNT( * )") {
|
|
@@ -66968,6 +67092,7 @@ Activates from v750 and up`,
|
|
|
66968
67092
|
const where = expr === null || expr === void 0 ? void 0 : expr.findDirectExpression(Expressions.SQLCond);
|
|
66969
67093
|
const order = expr === null || expr === void 0 ? void 0 : expr.findDirectExpression(Expressions.SQLOrderBy);
|
|
66970
67094
|
const into = (expr === null || expr === void 0 ? void 0 : expr.findDirectExpression(Expressions.SQLIntoStructure))
|
|
67095
|
+
|| (expr === null || expr === void 0 ? void 0 : expr.findDirectExpression(Expressions.SQLIntoList))
|
|
66971
67096
|
|| (expr === null || expr === void 0 ? void 0 : expr.findDirectExpression(Expressions.SQLIntoTable));
|
|
66972
67097
|
if (into === undefined || where === undefined) {
|
|
66973
67098
|
continue;
|
|
@@ -67596,7 +67721,7 @@ class UncaughtException extends _abap_rule_1.ABAPRule {
|
|
|
67596
67721
|
return this.issues;
|
|
67597
67722
|
}
|
|
67598
67723
|
traverse(n, file) {
|
|
67599
|
-
var _a;
|
|
67724
|
+
var _a, _b, _c, _d;
|
|
67600
67725
|
const get = n.get();
|
|
67601
67726
|
if (get instanceof Structures.ClassDefinition
|
|
67602
67727
|
|| get instanceof Structures.Interface) {
|
|
@@ -67607,10 +67732,16 @@ class UncaughtException extends _abap_rule_1.ABAPRule {
|
|
|
67607
67732
|
// note that TRY-CATCH might be arbitrarily nested
|
|
67608
67733
|
const previous = this.sinked ? this.sinked.slice() : undefined;
|
|
67609
67734
|
this.addFromTryStructure(n);
|
|
67610
|
-
for (const c of n.getChildren()) {
|
|
67735
|
+
for (const c of ((_a = n.findDirectStructure(Structures.Body)) === null || _a === void 0 ? void 0 : _a.getChildren()) || []) {
|
|
67611
67736
|
this.traverse(c, file);
|
|
67612
67737
|
}
|
|
67613
67738
|
this.sinked = previous;
|
|
67739
|
+
for (const c of ((_b = n.findDirectStructure(Structures.Catch)) === null || _b === void 0 ? void 0 : _b.getChildren()) || []) {
|
|
67740
|
+
this.traverse(c, file);
|
|
67741
|
+
}
|
|
67742
|
+
for (const c of ((_c = n.findDirectStructure(Structures.Cleanup)) === null || _c === void 0 ? void 0 : _c.getChildren()) || []) {
|
|
67743
|
+
this.traverse(c, file);
|
|
67744
|
+
}
|
|
67614
67745
|
return;
|
|
67615
67746
|
}
|
|
67616
67747
|
else {
|
|
@@ -67640,7 +67771,7 @@ class UncaughtException extends _abap_rule_1.ABAPRule {
|
|
|
67640
67771
|
let name = undefined;
|
|
67641
67772
|
const concat = n.concatTokens().toUpperCase();
|
|
67642
67773
|
if (concat.startsWith("RAISE EXCEPTION TYPE ")) {
|
|
67643
|
-
name = (
|
|
67774
|
+
name = (_d = n.findFirstExpression(Expressions.ClassName)) === null || _d === void 0 ? void 0 : _d.getFirstToken().getStr().toUpperCase();
|
|
67644
67775
|
}
|
|
67645
67776
|
this.check(name, n, file);
|
|
67646
67777
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.102.
|
|
3
|
+
"version": "2.102.49",
|
|
4
4
|
"description": "abaplint - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
},
|
|
39
39
|
"homepage": "https://abaplint.org",
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@abaplint/core": "^2.102.
|
|
41
|
+
"@abaplint/core": "^2.102.49",
|
|
42
42
|
"@types/chai": "^4.3.6",
|
|
43
43
|
"@types/glob": "^7.2.0",
|
|
44
|
-
"@types/minimist": "^1.2.
|
|
45
|
-
"@types/mocha": "^10.0.
|
|
46
|
-
"@types/node": "^20.7.
|
|
44
|
+
"@types/minimist": "^1.2.3",
|
|
45
|
+
"@types/mocha": "^10.0.2",
|
|
46
|
+
"@types/node": "^20.7.1",
|
|
47
47
|
"@types/progress": "^2.0.5",
|
|
48
|
-
"chai": "^4.3.
|
|
48
|
+
"chai": "^4.3.9",
|
|
49
49
|
"chalk": "^5.3.0",
|
|
50
50
|
"eslint": "^8.50.0",
|
|
51
51
|
"glob": "^7.2.3",
|