@abaplint/cli 2.119.49 → 2.119.51
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 +181 -35
- package/package.json +2 -2
package/build/cli.js
CHANGED
|
@@ -3078,6 +3078,69 @@ exports.ExpandMacros = ExpandMacros;
|
|
|
3078
3078
|
|
|
3079
3079
|
/***/ },
|
|
3080
3080
|
|
|
3081
|
+
/***/ "../core/build/src/abap/2_statements/expressions/_derived_types.js"
|
|
3082
|
+
/*!*************************************************************************!*\
|
|
3083
|
+
!*** ../core/build/src/abap/2_statements/expressions/_derived_types.js ***!
|
|
3084
|
+
\*************************************************************************/
|
|
3085
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
3086
|
+
|
|
3087
|
+
"use strict";
|
|
3088
|
+
|
|
3089
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3090
|
+
exports.commonDerivedTypes = commonDerivedTypes;
|
|
3091
|
+
exports.derivedTypesAlt = derivedTypesAlt;
|
|
3092
|
+
const combi_1 = __webpack_require__(/*! ../combi */ "../core/build/src/abap/2_statements/combi.js");
|
|
3093
|
+
const _1 = __webpack_require__(/*! . */ "../core/build/src/abap/2_statements/expressions/index.js");
|
|
3094
|
+
const version_1 = __webpack_require__(/*! ../../../version */ "../core/build/src/version.js");
|
|
3095
|
+
function commonDerivedTypes() {
|
|
3096
|
+
const entity = (0, combi_1.alt)(_1.TypeName, _1.EntityAssociation);
|
|
3097
|
+
// more-specific keyword phrases (e.g. "FAILED LATE") must precede less-specific ones ("FAILED")
|
|
3098
|
+
return [
|
|
3099
|
+
(0, combi_1.ver)(version_1.Release.v774, (0, combi_1.seq)("FAILED LATE", entity)),
|
|
3100
|
+
(0, combi_1.ver)(version_1.Release.v774, (0, combi_1.seq)("MAPPED LATE", entity)),
|
|
3101
|
+
(0, combi_1.ver)(version_1.Release.v774, (0, combi_1.seq)("REPORTED LATE", entity)),
|
|
3102
|
+
(0, combi_1.ver)(version_1.Release.v777, (0, combi_1.seq)("FAILED EARLY", entity)),
|
|
3103
|
+
(0, combi_1.ver)(version_1.Release.v777, (0, combi_1.seq)("MAPPED EARLY", entity)),
|
|
3104
|
+
(0, combi_1.ver)(version_1.Release.v777, (0, combi_1.seq)("REPORTED EARLY", entity)),
|
|
3105
|
+
(0, combi_1.ver)(version_1.Release.v776, (0, combi_1.seq)("FAILED", entity)),
|
|
3106
|
+
(0, combi_1.ver)(version_1.Release.v776, (0, combi_1.seq)("MAPPED", entity)),
|
|
3107
|
+
(0, combi_1.ver)(version_1.Release.v776, (0, combi_1.seq)("REPORTED", entity)),
|
|
3108
|
+
(0, combi_1.ver)(version_1.Release.v773, (0, combi_1.seq)("FUNCTION IMPORT", entity)),
|
|
3109
|
+
(0, combi_1.ver)(version_1.Release.v773, (0, combi_1.seq)("FUNCTION RESULT", entity)),
|
|
3110
|
+
(0, combi_1.ver)(version_1.Release.v773, (0, combi_1.seq)("ACTION RESULT", entity)),
|
|
3111
|
+
(0, combi_1.ver)(version_1.Release.v781, (0, combi_1.seq)("INSTANCE AUTHORIZATION KEY", entity)),
|
|
3112
|
+
(0, combi_1.ver)(version_1.Release.v781, (0, combi_1.seq)("INSTANCE AUTHORIZATION REQUEST", entity)),
|
|
3113
|
+
(0, combi_1.ver)(version_1.Release.v781, (0, combi_1.seq)("INSTANCE AUTHORIZATION RESULT", entity)),
|
|
3114
|
+
(0, combi_1.ver)(version_1.Release.v781, (0, combi_1.seq)("INSTANCE FEATURES KEY", entity)),
|
|
3115
|
+
(0, combi_1.ver)(version_1.Release.v781, (0, combi_1.seq)("INSTANCE FEATURES REQUEST", entity)),
|
|
3116
|
+
(0, combi_1.ver)(version_1.Release.v781, (0, combi_1.seq)("INSTANCE FEATURES RESULT", entity)),
|
|
3117
|
+
(0, combi_1.ver)(version_1.Release.v780, (0, combi_1.seq)("AUTHORIZATION RESULT", entity)),
|
|
3118
|
+
(0, combi_1.ver)(version_1.Release.v781, (0, combi_1.seq)("AUTHORIZATION KEY", entity)),
|
|
3119
|
+
(0, combi_1.ver)(version_1.Release.v776, (0, combi_1.seq)("FEATURES RESULT", entity)),
|
|
3120
|
+
(0, combi_1.ver)(version_1.Release.v776, (0, combi_1.seq)("FEATURES KEY", entity)),
|
|
3121
|
+
(0, combi_1.ver)(version_1.Release.v780, (0, combi_1.seq)("PERMISSIONS KEY", entity)),
|
|
3122
|
+
(0, combi_1.seq)("READ IMPORT", entity),
|
|
3123
|
+
(0, combi_1.seq)("READ RESULT", entity),
|
|
3124
|
+
(0, combi_1.ver)(version_1.Release.v915, (0, combi_1.seq)("READ CHANGES", entity)),
|
|
3125
|
+
(0, combi_1.seq)("CREATE", entity),
|
|
3126
|
+
(0, combi_1.seq)("DELETE", entity),
|
|
3127
|
+
(0, combi_1.seq)("UPDATE", entity),
|
|
3128
|
+
(0, combi_1.ver)(version_1.Release.v777, (0, combi_1.seq)("LOCK", entity)),
|
|
3129
|
+
(0, combi_1.ver)(version_1.Release.v775, (0, combi_1.seq)("KEY OF", entity)),
|
|
3130
|
+
(0, combi_1.ver)(version_1.Release.v776, (0, combi_1.seq)("DETERMINATION", entity)),
|
|
3131
|
+
(0, combi_1.ver)(version_1.Release.v776, (0, combi_1.seq)("VALIDATION", entity)),
|
|
3132
|
+
(0, combi_1.ver)(version_1.Release.v778, (0, combi_1.seq)("CHANGE", entity)),
|
|
3133
|
+
];
|
|
3134
|
+
}
|
|
3135
|
+
function derivedTypesAlt(...extra) {
|
|
3136
|
+
const all = [...extra, ...commonDerivedTypes()];
|
|
3137
|
+
const [first, second, ...rest] = all;
|
|
3138
|
+
return (0, combi_1.altPrio)(first, second, ...rest);
|
|
3139
|
+
}
|
|
3140
|
+
//# sourceMappingURL=_derived_types.js.map
|
|
3141
|
+
|
|
3142
|
+
/***/ },
|
|
3143
|
+
|
|
3081
3144
|
/***/ "../core/build/src/abap/2_statements/expressions/_dynamic_access.js"
|
|
3082
3145
|
/*!**************************************************************************!*\
|
|
3083
3146
|
!*** ../core/build/src/abap/2_statements/expressions/_dynamic_access.js ***!
|
|
@@ -10653,24 +10716,16 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
10653
10716
|
exports.TypeStructure = void 0;
|
|
10654
10717
|
const combi_1 = __webpack_require__(/*! ../combi */ "../core/build/src/abap/2_statements/combi.js");
|
|
10655
10718
|
const _1 = __webpack_require__(/*! . */ "../core/build/src/abap/2_statements/expressions/index.js");
|
|
10719
|
+
const version_1 = __webpack_require__(/*! ../../../version */ "../core/build/src/version.js");
|
|
10720
|
+
const _derived_types_1 = __webpack_require__(/*! ./_derived_types */ "../core/build/src/abap/2_statements/expressions/_derived_types.js");
|
|
10656
10721
|
class TypeStructure extends combi_1.Expression {
|
|
10657
10722
|
getRunnable() {
|
|
10658
|
-
|
|
10659
|
-
const
|
|
10660
|
-
const
|
|
10661
|
-
const
|
|
10662
|
-
const
|
|
10663
|
-
|
|
10664
|
-
const action = (0, combi_1.seq)("ACTION IMPORT", _1.Source);
|
|
10665
|
-
const permissionsRequest = (0, combi_1.seq)("PERMISSIONS REQUEST", _1.NamespaceSimpleName);
|
|
10666
|
-
const evt = (0, combi_1.seq)("EVENT", _1.EventName);
|
|
10667
|
-
const failedEarly = (0, combi_1.seq)("FAILED EARLY", _1.NamespaceSimpleName);
|
|
10668
|
-
const mappedEarly = (0, combi_1.seq)("MAPPED EARLY", _1.NamespaceSimpleName);
|
|
10669
|
-
const reportedEarly = (0, combi_1.seq)("REPORTED EARLY", _1.NamespaceSimpleName);
|
|
10670
|
-
const structure = (0, combi_1.seq)("STRUCTURE FOR", (0, combi_1.altPrio)(hier, evt, create, update, action, permissionsRequest, readLink, readResult));
|
|
10671
|
-
const response = (0, combi_1.seq)("RESPONSE FOR", (0, combi_1.altPrio)(failedEarly, mappedEarly, reportedEarly));
|
|
10672
|
-
const request = (0, combi_1.seq)("REQUEST FOR CHANGE", _1.NamespaceSimpleName);
|
|
10673
|
-
return (0, combi_1.seq)("TYPE", (0, combi_1.altPrio)(structure, response, request));
|
|
10723
|
+
const entity = (0, combi_1.alt)(_1.TypeName, _1.EntityAssociation);
|
|
10724
|
+
const derivedTypes = (0, _derived_types_1.derivedTypesAlt)((0, combi_1.ver)(version_1.Release.v779, (0, combi_1.seq)("FUNCTION REQUEST", entity)), (0, combi_1.ver)(version_1.Release.v779, (0, combi_1.seq)("ACTION REQUEST", entity)), (0, combi_1.seq)("ACTION IMPORT", _1.Source), (0, combi_1.ver)(version_1.Release.v781, (0, combi_1.seq)("GLOBAL AUTHORIZATION REQUEST", entity)), (0, combi_1.ver)(version_1.Release.v781, (0, combi_1.seq)("GLOBAL AUTHORIZATION RESULT", entity)), (0, combi_1.ver)(version_1.Release.v781, (0, combi_1.seq)("GLOBAL FEATURES REQUEST", entity)), (0, combi_1.ver)(version_1.Release.v781, (0, combi_1.seq)("GLOBAL FEATURES RESULT", entity)), (0, combi_1.ver)(version_1.Release.v780, (0, combi_1.seq)("AUTHORIZATION REQUEST", entity)), (0, combi_1.ver)(version_1.Release.v776, (0, combi_1.seq)("FEATURES REQUEST", entity)), (0, combi_1.seq)("PERMISSIONS REQUEST", _1.NamespaceSimpleName), (0, combi_1.ver)(version_1.Release.v780, (0, combi_1.seq)("PERMISSIONS RESULT", entity)), (0, combi_1.seq)("READ LINK", _1.EntityAssociation), (0, combi_1.seq)("HIERARCHY", _1.NamespaceSimpleName), (0, combi_1.seq)("EVENT", _1.EventName));
|
|
10725
|
+
const structure = (0, combi_1.ver)(version_1.Release.v774, (0, combi_1.seq)("STRUCTURE FOR", derivedTypes));
|
|
10726
|
+
const response = (0, combi_1.ver)(version_1.Release.v776, (0, combi_1.seq)("RESPONSE FOR", (0, combi_1.altPrio)((0, combi_1.seq)("FAILED EARLY", _1.NamespaceSimpleName), (0, combi_1.seq)("FAILED LATE", _1.NamespaceSimpleName), (0, combi_1.seq)("FAILED", _1.NamespaceSimpleName), (0, combi_1.seq)("MAPPED EARLY", _1.NamespaceSimpleName), (0, combi_1.seq)("MAPPED LATE", _1.NamespaceSimpleName), (0, combi_1.seq)("MAPPED", _1.NamespaceSimpleName), (0, combi_1.seq)("REPORTED EARLY", _1.NamespaceSimpleName), (0, combi_1.seq)("REPORTED LATE", _1.NamespaceSimpleName), (0, combi_1.seq)("REPORTED", _1.NamespaceSimpleName))));
|
|
10727
|
+
const request = (0, combi_1.ver)(version_1.Release.v778, (0, combi_1.seq)("REQUEST FOR", (0, combi_1.alt)("CHANGE", "DELETE"), _1.NamespaceSimpleName));
|
|
10728
|
+
return (0, combi_1.seq)("TYPE", (0, combi_1.altPrio)(structure, response, request), (0, combi_1.optPrio)("VALUE IS INITIAL"));
|
|
10674
10729
|
}
|
|
10675
10730
|
}
|
|
10676
10731
|
exports.TypeStructure = TypeStructure;
|
|
@@ -10693,6 +10748,7 @@ const _1 = __webpack_require__(/*! . */ "../core/build/src/abap/2_statements/exp
|
|
|
10693
10748
|
const field_chain_1 = __webpack_require__(/*! ./field_chain */ "../core/build/src/abap/2_statements/expressions/field_chain.js");
|
|
10694
10749
|
const type_table_key_1 = __webpack_require__(/*! ./type_table_key */ "../core/build/src/abap/2_statements/expressions/type_table_key.js");
|
|
10695
10750
|
const version_1 = __webpack_require__(/*! ../../../version */ "../core/build/src/version.js");
|
|
10751
|
+
const _derived_types_1 = __webpack_require__(/*! ./_derived_types */ "../core/build/src/abap/2_statements/expressions/_derived_types.js");
|
|
10696
10752
|
class TypeTable extends combi_1.Expression {
|
|
10697
10753
|
getRunnable() {
|
|
10698
10754
|
const header = "WITH HEADER LINE";
|
|
@@ -10706,7 +10762,9 @@ class TypeTable extends combi_1.Expression {
|
|
|
10706
10762
|
// "WITH" is not allowed as a field name in keys
|
|
10707
10763
|
const typetable = (0, combi_1.alt)(generic, (0, combi_1.seq)(normal1, (0, combi_1.alt)((0, combi_1.opt)((0, combi_1.per)(header, initial, (0, combi_1.plusPrio)(type_table_key_1.TypeTableKey))), (0, combi_1.seq)((0, combi_1.plus)(type_table_key_1.TypeTableKey), (0, combi_1.optPrio)(initial))), (0, combi_1.optPrio)("VALUE IS INITIAL")));
|
|
10708
10764
|
const occurs = (0, combi_1.seq)("OCCURS", (0, combi_1.altPrio)(_1.Integer, field_chain_1.FieldChain));
|
|
10709
|
-
const
|
|
10765
|
+
const entity = (0, combi_1.alt)(_1.TypeName, _1.EntityAssociation);
|
|
10766
|
+
const derivedTypes = (0, _derived_types_1.derivedTypesAlt)((0, combi_1.ver)(version_1.Release.v773, (0, combi_1.seq)("ACTION IMPORT", entity)), (0, combi_1.seq)("READ LINK", entity), (0, combi_1.seq)("EVENT", entity));
|
|
10767
|
+
const derived = (0, combi_1.ver)(version_1.Release.v770, (0, combi_1.seq)("TABLE FOR", derivedTypes, (0, combi_1.optPrio)("VALUE IS INITIAL")), { also: combi_1.AlsoIn.OpenABAP });
|
|
10710
10768
|
const oldType = (0, combi_1.seq)((0, combi_1.opt)("REF TO"), _1.TypeName, (0, combi_1.alt)((0, combi_1.seq)(occurs, (0, combi_1.opt)(header)), header));
|
|
10711
10769
|
const oldLike = (0, combi_1.seq)((0, combi_1.opt)("REF TO"), field_chain_1.FieldChain, (0, combi_1.alt)((0, combi_1.seq)(occurs, (0, combi_1.opt)(header)), header));
|
|
10712
10770
|
const typeLine = (0, combi_1.seq)("LINE OF", _1.TypeName, occurs, header);
|
|
@@ -28374,25 +28432,12 @@ class BasicTypes {
|
|
|
28374
28432
|
return name.includes("\\") || name.includes("~");
|
|
28375
28433
|
}
|
|
28376
28434
|
isRAPTableFor(text) {
|
|
28377
|
-
return text.startsWith("TYPE TABLE FOR
|
|
28378
|
-
|| text.startsWith("TYPE TABLE FOR ACTION RESULT ")
|
|
28379
|
-
|| text.startsWith("TYPE TABLE FOR CREATE ")
|
|
28380
|
-
|| text.startsWith("TYPE TABLE FOR DELETE ")
|
|
28381
|
-
|| text.startsWith("TYPE TABLE FOR DETERMINATION ")
|
|
28382
|
-
|| text.startsWith("TYPE TABLE FOR EVENT ")
|
|
28383
|
-
|| text.startsWith("TYPE TABLE FOR FAILED ")
|
|
28384
|
-
|| text.startsWith("TYPE TABLE FOR FAILED EARLY ")
|
|
28385
|
-
|| text.startsWith("TYPE TABLE FOR LOCK ")
|
|
28386
|
-
|| text.startsWith("TYPE TABLE FOR READ ")
|
|
28387
|
-
|| text.startsWith("TYPE TABLE FOR READ IMPORT ")
|
|
28388
|
-
|| text.startsWith("TYPE TABLE FOR READ RESULT ")
|
|
28389
|
-
|| text.startsWith("TYPE TABLE FOR REPORTED EARLY ")
|
|
28390
|
-
|| text.startsWith("TYPE TABLE FOR UPDATE ");
|
|
28435
|
+
return text.startsWith("TYPE TABLE FOR ");
|
|
28391
28436
|
}
|
|
28392
28437
|
isRAPTypeStructure(text) {
|
|
28393
28438
|
return text.startsWith("TYPE STRUCTURE FOR ")
|
|
28394
28439
|
|| text.startsWith("TYPE RESPONSE FOR ")
|
|
28395
|
-
|| text.startsWith("TYPE REQUEST FOR
|
|
28440
|
+
|| text.startsWith("TYPE REQUEST FOR ");
|
|
28396
28441
|
}
|
|
28397
28442
|
// todo, rewrite this method
|
|
28398
28443
|
resolveTypeChain(expr) {
|
|
@@ -67943,7 +67988,7 @@ class Registry {
|
|
|
67943
67988
|
}
|
|
67944
67989
|
static abaplintVersion() {
|
|
67945
67990
|
// magic, see build script "version.js"
|
|
67946
|
-
return "2.119.
|
|
67991
|
+
return "2.119.51";
|
|
67947
67992
|
}
|
|
67948
67993
|
getDDICReferences() {
|
|
67949
67994
|
return this.ddicReferences;
|
|
@@ -69913,6 +69958,8 @@ TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md
|
|
|
69913
69958
|
|
|
69914
69959
|
BREAK points`,
|
|
69915
69960
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
69961
|
+
badExample: `DESCRIBE TABLE items LINES count.`,
|
|
69962
|
+
goodExample: `count = lines( items ).`,
|
|
69916
69963
|
};
|
|
69917
69964
|
}
|
|
69918
69965
|
getDescription(statement) {
|
|
@@ -72439,6 +72486,14 @@ class ClassAttributeNames extends _abap_rule_1.ABAPRule {
|
|
|
72439
72486
|
title: "Class attributes naming",
|
|
72440
72487
|
shortDescription: `Allows you to enforce a pattern, such as a prefix, for class variable names.`,
|
|
72441
72488
|
tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
|
|
72489
|
+
badExample: `CLASS zcl_foo DEFINITION PUBLIC.
|
|
72490
|
+
PUBLIC SECTION.
|
|
72491
|
+
DATA counter TYPE i.
|
|
72492
|
+
ENDCLASS.`,
|
|
72493
|
+
goodExample: `CLASS zcl_foo DEFINITION PUBLIC.
|
|
72494
|
+
PUBLIC SECTION.
|
|
72495
|
+
DATA mv_counter TYPE i.
|
|
72496
|
+
ENDCLASS.`,
|
|
72442
72497
|
};
|
|
72443
72498
|
}
|
|
72444
72499
|
getDescription(actual, expected) {
|
|
@@ -73159,6 +73214,14 @@ This only applies to global classes.
|
|
|
73159
73214
|
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
|
|
73160
73215
|
https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abeninstance_constructor_guidl.htm`,
|
|
73161
73216
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
73217
|
+
badExample: `CLASS zcl_foo DEFINITION PUBLIC CREATE PRIVATE.
|
|
73218
|
+
PRIVATE SECTION.
|
|
73219
|
+
METHODS constructor.
|
|
73220
|
+
ENDCLASS.`,
|
|
73221
|
+
goodExample: `CLASS zcl_foo DEFINITION PUBLIC CREATE PRIVATE.
|
|
73222
|
+
PUBLIC SECTION.
|
|
73223
|
+
METHODS constructor.
|
|
73224
|
+
ENDCLASS.`,
|
|
73162
73225
|
};
|
|
73163
73226
|
}
|
|
73164
73227
|
getMessage() {
|
|
@@ -73603,6 +73666,8 @@ class DangerousStatement extends _abap_rule_1.ABAPRule {
|
|
|
73603
73666
|
extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
|
|
73604
73667
|
dynamic SQL can potentially create SQL injection problems`,
|
|
73605
73668
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
|
|
73669
|
+
badExample: `SELECT * FROM (lv_table_name) INTO TABLE @DATA(lt_rows).`,
|
|
73670
|
+
goodExample: `SELECT * FROM zknown_table INTO TABLE @DATA(lt_rows).`,
|
|
73606
73671
|
};
|
|
73607
73672
|
}
|
|
73608
73673
|
getDescription(statement) {
|
|
@@ -73761,6 +73826,17 @@ class DbOperationInLoop extends _abap_rule_1.ABAPRule {
|
|
|
73761
73826
|
title: "Database operation in loop",
|
|
73762
73827
|
shortDescription: `Database operation in LOOP/DO/WHILE`,
|
|
73763
73828
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Performance],
|
|
73829
|
+
badExample: `LOOP AT lt_items INTO DATA(ls_item).
|
|
73830
|
+
SELECT SINGLE name FROM zcustomer INTO @DATA(lv_name) WHERE id = @ls_item-customer_id.
|
|
73831
|
+
ENDLOOP.`,
|
|
73832
|
+
goodExample: `ASSERT lines( lt_items ) > 0.
|
|
73833
|
+
SELECT id, name FROM zcustomer INTO TABLE @DATA(lt_customers)
|
|
73834
|
+
FOR ALL ENTRIES IN @lt_items
|
|
73835
|
+
WHERE id = @lt_items-customer_id.
|
|
73836
|
+
|
|
73837
|
+
LOOP AT lt_items INTO DATA(ls_item).
|
|
73838
|
+
READ TABLE lt_customers INTO DATA(ls_customer) WITH KEY id = ls_item-customer_id.
|
|
73839
|
+
ENDLOOP.`,
|
|
73764
73840
|
};
|
|
73765
73841
|
}
|
|
73766
73842
|
getConfig() {
|
|
@@ -78147,6 +78223,12 @@ Use RETURN to leave procesing blocks instead.`,
|
|
|
78147
78223
|
https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
|
|
78148
78224
|
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#check-vs-return`,
|
|
78149
78225
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
|
|
78226
|
+
badExample: `CHECK is_valid = abap_true.
|
|
78227
|
+
do_something( ).`,
|
|
78228
|
+
goodExample: `IF is_valid = abap_false.
|
|
78229
|
+
RETURN.
|
|
78230
|
+
ENDIF.
|
|
78231
|
+
do_something( ).`,
|
|
78150
78232
|
};
|
|
78151
78233
|
}
|
|
78152
78234
|
getConfig() {
|
|
@@ -78929,6 +79011,10 @@ class FormTablesObsolete extends _abap_rule_1.ABAPRule {
|
|
|
78929
79011
|
shortDescription: `Checks for TABLES parameters in forms.`,
|
|
78930
79012
|
extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapform_tables.htm`,
|
|
78931
79013
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
79014
|
+
badExample: `FORM update_items TABLES items.
|
|
79015
|
+
ENDFORM.`,
|
|
79016
|
+
goodExample: `FORM update_items CHANGING items TYPE ty_items.
|
|
79017
|
+
ENDFORM.`,
|
|
78932
79018
|
};
|
|
78933
79019
|
}
|
|
78934
79020
|
getMessage() {
|
|
@@ -79295,6 +79381,10 @@ class FunctionModuleRecommendations extends _abap_rule_1.ABAPRule {
|
|
|
79295
79381
|
shortDescription: `Suggests replacements for various function modules`,
|
|
79296
79382
|
extendedInformation: `https://docs.abapopenchecks.org/checks/53/`,
|
|
79297
79383
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
79384
|
+
badExample: `CALL FUNCTION 'GUID_CREATE'
|
|
79385
|
+
IMPORTING
|
|
79386
|
+
ev_guid_32 = guid.`,
|
|
79387
|
+
goodExample: `guid = cl_system_uuid=>create_uuid_c32_static( ).`,
|
|
79298
79388
|
};
|
|
79299
79389
|
}
|
|
79300
79390
|
getConfig() {
|
|
@@ -82650,6 +82740,9 @@ class LineLength extends _abap_rule_1.ABAPRule {
|
|
|
82650
82740
|
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length
|
|
82651
82741
|
https://docs.abapopenchecks.org/checks/04/`,
|
|
82652
82742
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
82743
|
+
badExample: "DATA long_text TYPE string VALUE 'this line keeps going until it is longer than the configured maximum'.",
|
|
82744
|
+
goodExample: `DATA long_text TYPE string.
|
|
82745
|
+
long_text = 'split long expressions across multiple lines'.`,
|
|
82653
82746
|
};
|
|
82654
82747
|
}
|
|
82655
82748
|
getConfig() {
|
|
@@ -82827,6 +82920,10 @@ class LocalClassNaming extends _abap_rule_1.ABAPRule {
|
|
|
82827
82920
|
title: "Local class naming conventions",
|
|
82828
82921
|
shortDescription: `Allows you to enforce a pattern, such as a prefix, for local class names.`,
|
|
82829
82922
|
tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
|
|
82923
|
+
badExample: `CLASS helper DEFINITION.
|
|
82924
|
+
ENDCLASS.`,
|
|
82925
|
+
goodExample: `CLASS lcl_helper DEFINITION.
|
|
82926
|
+
ENDCLASS.`,
|
|
82830
82927
|
};
|
|
82831
82928
|
}
|
|
82832
82929
|
getDescription(expected, actual) {
|
|
@@ -84398,6 +84495,12 @@ class MethodParameterNames {
|
|
|
84398
84495
|
title: "Method parameter naming conventions",
|
|
84399
84496
|
shortDescription: `Allows you to enforce a pattern, such as a prefix, for method parameter names`,
|
|
84400
84497
|
tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
|
|
84498
|
+
badExample: `METHODS get_name
|
|
84499
|
+
IMPORTING customer TYPE string
|
|
84500
|
+
RETURNING VALUE(name) TYPE string.`,
|
|
84501
|
+
goodExample: `METHODS get_name
|
|
84502
|
+
IMPORTING iv_customer TYPE string
|
|
84503
|
+
RETURNING VALUE(rv_name) TYPE string.`,
|
|
84401
84504
|
};
|
|
84402
84505
|
}
|
|
84403
84506
|
getDescription(expected, actual) {
|
|
@@ -85275,6 +85378,13 @@ class NoAliases extends _abap_rule_1.ABAPRule {
|
|
|
85275
85378
|
title: "No ALIASES",
|
|
85276
85379
|
shortDescription: `Detects use of the ALIAS statement`,
|
|
85277
85380
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
85381
|
+
badExample: `INTERFACE lif_foo.
|
|
85382
|
+
METHODS long_method_name.
|
|
85383
|
+
ALIASES short FOR long_method_name.
|
|
85384
|
+
ENDINTERFACE.`,
|
|
85385
|
+
goodExample: `INTERFACE lif_foo.
|
|
85386
|
+
METHODS long_method_name.
|
|
85387
|
+
ENDINTERFACE.`,
|
|
85278
85388
|
};
|
|
85279
85389
|
}
|
|
85280
85390
|
getConfig() {
|
|
@@ -85479,8 +85589,22 @@ class NoCommentsBetweenMethods extends _abap_rule_1.ABAPRule {
|
|
|
85479
85589
|
return {
|
|
85480
85590
|
key: "no_comments_between_methods",
|
|
85481
85591
|
title: "No comments between methods in global classes",
|
|
85482
|
-
shortDescription: `
|
|
85592
|
+
shortDescription: `It's not possible to have comments between methods in global classes.`,
|
|
85483
85593
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Syntax],
|
|
85594
|
+
badExample: `CLASS zcl_foo IMPLEMENTATION.
|
|
85595
|
+
METHOD first.
|
|
85596
|
+
ENDMETHOD.
|
|
85597
|
+
" comment
|
|
85598
|
+
METHOD second.
|
|
85599
|
+
ENDMETHOD.
|
|
85600
|
+
ENDCLASS.`,
|
|
85601
|
+
goodExample: `CLASS zcl_foo IMPLEMENTATION.
|
|
85602
|
+
METHOD first.
|
|
85603
|
+
ENDMETHOD.
|
|
85604
|
+
|
|
85605
|
+
METHOD second.
|
|
85606
|
+
ENDMETHOD.
|
|
85607
|
+
ENDCLASS.`,
|
|
85484
85608
|
};
|
|
85485
85609
|
}
|
|
85486
85610
|
getConfig() {
|
|
@@ -86187,6 +86311,14 @@ class NoPublicAttributes extends _abap_rule_1.ABAPRule {
|
|
|
86187
86311
|
Exceptions are excluded from this rule.`,
|
|
86188
86312
|
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#members-private-by-default-protected-only-if-needed`,
|
|
86189
86313
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
86314
|
+
badExample: `CLASS zcl_foo DEFINITION PUBLIC.
|
|
86315
|
+
PUBLIC SECTION.
|
|
86316
|
+
DATA counter TYPE i.
|
|
86317
|
+
ENDCLASS.`,
|
|
86318
|
+
goodExample: `CLASS zcl_foo DEFINITION PUBLIC.
|
|
86319
|
+
PRIVATE SECTION.
|
|
86320
|
+
DATA counter TYPE i.
|
|
86321
|
+
ENDCLASS.`,
|
|
86190
86322
|
};
|
|
86191
86323
|
}
|
|
86192
86324
|
getDescription(name) {
|
|
@@ -87864,7 +87996,7 @@ See recognized syntax at https://syntax.abaplint.org`,
|
|
|
87864
87996
|
}
|
|
87865
87997
|
else {
|
|
87866
87998
|
const tok = statement.getFirstToken();
|
|
87867
|
-
const message = "Statement does not exist in
|
|
87999
|
+
const message = "Statement does not exist in the configured ABAP version(or a parser error), \"" + tok.getStr() + "\"";
|
|
87868
88000
|
const issue = issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity);
|
|
87869
88001
|
issues.push(issue);
|
|
87870
88002
|
}
|
|
@@ -89503,6 +89635,14 @@ class PrefixIsCurrentClass extends _abap_rule_1.ABAPRule {
|
|
|
89503
89635
|
// eslint-disable-next-line max-len
|
|
89504
89636
|
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-self-reference-me-when-calling-an-instance-attribute-or-method`,
|
|
89505
89637
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
|
|
89638
|
+
badExample: `METHOD run.
|
|
89639
|
+
zcl_current=>helper( ).
|
|
89640
|
+
me->do_work( ).
|
|
89641
|
+
ENDMETHOD.`,
|
|
89642
|
+
goodExample: `METHOD run.
|
|
89643
|
+
helper( ).
|
|
89644
|
+
do_work( ).
|
|
89645
|
+
ENDMETHOD.`,
|
|
89506
89646
|
};
|
|
89507
89647
|
}
|
|
89508
89648
|
getConfig() {
|
|
@@ -92105,6 +92245,12 @@ class StaticCallViaInstance extends _abap_rule_1.ABAPRule {
|
|
|
92105
92245
|
shortDescription: `Static method call via instance variable`,
|
|
92106
92246
|
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-call-static-methods-through-instance-variables`,
|
|
92107
92247
|
tags: [_irule_1.RuleTag.Styleguide],
|
|
92248
|
+
badExample: `METHOD run.
|
|
92249
|
+
NEW lcl_helper( )->static_method( ).
|
|
92250
|
+
ENDMETHOD.`,
|
|
92251
|
+
goodExample: `METHOD run.
|
|
92252
|
+
lcl_helper=>static_method( ).
|
|
92253
|
+
ENDMETHOD.`,
|
|
92108
92254
|
};
|
|
92109
92255
|
}
|
|
92110
92256
|
getConfig() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.119.
|
|
3
|
+
"version": "2.119.51",
|
|
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.119.
|
|
42
|
+
"@abaplint/core": "^2.119.51",
|
|
43
43
|
"@types/chai": "^4.3.20",
|
|
44
44
|
"@types/minimist": "^1.2.5",
|
|
45
45
|
"@types/mocha": "^10.0.10",
|