@abaplint/cli 2.119.48 → 2.119.50

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.
Files changed (2) hide show
  1. package/build/cli.js +327 -55
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -2940,7 +2940,7 @@ class ExpandMacros {
2940
2940
  }
2941
2941
  }
2942
2942
  }
2943
- handleMacros(statements, file) {
2943
+ handleMacros(statements, file, seen = new Set()) {
2944
2944
  var _a;
2945
2945
  const result = [];
2946
2946
  let containsUnknown = false;
@@ -2958,13 +2958,20 @@ class ExpandMacros {
2958
2958
  });
2959
2959
  }
2960
2960
  result.push(new statement_node_1.StatementNode(new _statement_1.MacroCall(), statement.getColon()).setChildren(this.tokensToNodes(statement.getTokens())));
2961
- const expanded = this.expandContents(macroName, statement);
2962
- const handled = this.handleMacros(expanded, file);
2963
- for (const e of handled.statements) {
2964
- result.push(e);
2961
+ if (!seen.has(macroName.toUpperCase())) {
2962
+ const expanded = this.expandContents(macroName, statement);
2963
+ const nextSeen = new Set(seen).add(macroName.toUpperCase());
2964
+ const handled = this.handleMacros(expanded, file, nextSeen);
2965
+ for (const e of handled.statements) {
2966
+ result.push(e);
2967
+ }
2968
+ if (handled.containsUnknown === true) {
2969
+ containsUnknown = true;
2970
+ }
2965
2971
  }
2966
- if (handled.containsUnknown === true) {
2967
- containsUnknown = true;
2972
+ else {
2973
+ const node = new statement_node_1.StatementNode(new _statement_1.MacroRecursion(), statement.getColon());
2974
+ result.push(node.setChildren(this.tokensToNodes(statement.getTokens())));
2968
2975
  }
2969
2976
  continue;
2970
2977
  }
@@ -3071,6 +3078,69 @@ exports.ExpandMacros = ExpandMacros;
3071
3078
 
3072
3079
  /***/ },
3073
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
+
3074
3144
  /***/ "../core/build/src/abap/2_statements/expressions/_dynamic_access.js"
3075
3145
  /*!**************************************************************************!*\
3076
3146
  !*** ../core/build/src/abap/2_statements/expressions/_dynamic_access.js ***!
@@ -10646,24 +10716,16 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
10646
10716
  exports.TypeStructure = void 0;
10647
10717
  const combi_1 = __webpack_require__(/*! ../combi */ "../core/build/src/abap/2_statements/combi.js");
10648
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");
10649
10721
  class TypeStructure extends combi_1.Expression {
10650
10722
  getRunnable() {
10651
- // todo, add version,
10652
- const hier = (0, combi_1.seq)("HIERARCHY", _1.NamespaceSimpleName);
10653
- const create = (0, combi_1.seq)("CREATE", (0, combi_1.alt)(_1.NamespaceSimpleName, _1.EntityAssociation));
10654
- const update = (0, combi_1.seq)("UPDATE", (0, combi_1.alt)(_1.NamespaceSimpleName, _1.EntityAssociation));
10655
- const readResult = (0, combi_1.seq)("READ RESULT", (0, combi_1.alt)(_1.NamespaceSimpleName, _1.EntityAssociation));
10656
- const readLink = (0, combi_1.seq)("READ LINK", _1.EntityAssociation);
10657
- const action = (0, combi_1.seq)("ACTION IMPORT", _1.Source);
10658
- const permissionsRequest = (0, combi_1.seq)("PERMISSIONS REQUEST", _1.NamespaceSimpleName);
10659
- const evt = (0, combi_1.seq)("EVENT", _1.EventName);
10660
- const failedEarly = (0, combi_1.seq)("FAILED EARLY", _1.NamespaceSimpleName);
10661
- const mappedEarly = (0, combi_1.seq)("MAPPED EARLY", _1.NamespaceSimpleName);
10662
- const reportedEarly = (0, combi_1.seq)("REPORTED EARLY", _1.NamespaceSimpleName);
10663
- const structure = (0, combi_1.seq)("STRUCTURE FOR", (0, combi_1.altPrio)(hier, evt, create, update, action, permissionsRequest, readLink, readResult));
10664
- const response = (0, combi_1.seq)("RESPONSE FOR", (0, combi_1.altPrio)(failedEarly, mappedEarly, reportedEarly));
10665
- const request = (0, combi_1.seq)("REQUEST FOR CHANGE", _1.NamespaceSimpleName);
10666
- 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"));
10667
10729
  }
10668
10730
  }
10669
10731
  exports.TypeStructure = TypeStructure;
@@ -10686,6 +10748,7 @@ const _1 = __webpack_require__(/*! . */ "../core/build/src/abap/2_statements/exp
10686
10748
  const field_chain_1 = __webpack_require__(/*! ./field_chain */ "../core/build/src/abap/2_statements/expressions/field_chain.js");
10687
10749
  const type_table_key_1 = __webpack_require__(/*! ./type_table_key */ "../core/build/src/abap/2_statements/expressions/type_table_key.js");
10688
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");
10689
10752
  class TypeTable extends combi_1.Expression {
10690
10753
  getRunnable() {
10691
10754
  const header = "WITH HEADER LINE";
@@ -10699,7 +10762,9 @@ class TypeTable extends combi_1.Expression {
10699
10762
  // "WITH" is not allowed as a field name in keys
10700
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")));
10701
10764
  const occurs = (0, combi_1.seq)("OCCURS", (0, combi_1.altPrio)(_1.Integer, field_chain_1.FieldChain));
10702
- const derived = (0, combi_1.ver)(version_1.Release.v754, (0, combi_1.seq)("TABLE FOR", (0, combi_1.altPrio)("ACTION IMPORT", "ACTION RESULT", "CREATE", "EVENT", "REPORTED EARLY", "READ IMPORT", "FAILED EARLY", "FAILED", "LOCK", "DETERMINATION", "READ RESULT", "UPDATE", "DELETE"), (0, combi_1.alt)(_1.TypeName, _1.EntityAssociation)), { also: combi_1.AlsoIn.OpenABAP });
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 });
10703
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));
10704
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));
10705
10770
  const typeLine = (0, combi_1.seq)("LINE OF", _1.TypeName, occurs, header);
@@ -11321,7 +11386,7 @@ exports.StatementParser = StatementParser;
11321
11386
  "use strict";
11322
11387
 
11323
11388
  Object.defineProperty(exports, "__esModule", ({ value: true }));
11324
- exports.NativeSQL = exports.MacroContent = exports.MacroCall = exports.Empty = exports.Comment = exports.Unknown = void 0;
11389
+ exports.NativeSQL = exports.MacroRecursion = exports.MacroContent = exports.MacroCall = exports.Empty = exports.Comment = exports.Unknown = void 0;
11325
11390
  class Unknown {
11326
11391
  getMatcher() {
11327
11392
  throw new Error("Unknown Statement, get_matcher");
@@ -11352,6 +11417,12 @@ class MacroContent {
11352
11417
  }
11353
11418
  }
11354
11419
  exports.MacroContent = MacroContent;
11420
+ class MacroRecursion {
11421
+ getMatcher() {
11422
+ throw new Error("MacroRecursion Statement, get_matcher");
11423
+ }
11424
+ }
11425
+ exports.MacroRecursion = MacroRecursion;
11355
11426
  class NativeSQL {
11356
11427
  getMatcher() {
11357
11428
  throw new Error("NativeSQL Statement, get_matcher");
@@ -20424,7 +20495,7 @@ class SubStatement {
20424
20495
  }
20425
20496
  first() {
20426
20497
  const o = new this.obj();
20427
- if (o instanceof _statement_1.MacroCall || o instanceof _statement_1.NativeSQL) {
20498
+ if (o instanceof _statement_1.MacroCall || o instanceof _statement_1.MacroRecursion || o instanceof _statement_1.NativeSQL) {
20428
20499
  return [""];
20429
20500
  }
20430
20501
  return o.getMatcher().first();
@@ -22634,7 +22705,7 @@ const _statement_1 = __webpack_require__(/*! ../../2_statements/statements/_stat
22634
22705
  class Normal {
22635
22706
  getMatcher() {
22636
22707
  // note that the sequence of alternatives here influences performance
22637
- return (0, _combi_1.alt)((0, _combi_1.sta)(Statements.Move), (0, _combi_1.sta)(Statements.Call), (0, _combi_1.sta)(Statements.Data), (0, _combi_1.sub)(Structures.If), (0, _combi_1.sta)(Statements.Clear), (0, _combi_1.sta)(Statements.FieldSymbol), (0, _combi_1.sta)(Statements.CreateObject), (0, _combi_1.sta)(Statements.CallFunction), (0, _combi_1.sta)(_statement_1.MacroCall), (0, _combi_1.sub)(Structures.LoopAtScreen), (0, _combi_1.sub)(Structures.Loop), (0, _combi_1.sub)(Structures.LoopExtract), (0, _combi_1.sta)(Statements.Append), (0, _combi_1.sub)(Structures.Try), (0, _combi_1.sub)(Structures.OnChange), (0, _combi_1.sta)(Statements.ReadTable), (0, _combi_1.sta)(Statements.Assert), (0, _combi_1.sta)(Statements.Return), (0, _combi_1.sta)(Statements.Select), (0, _combi_1.sta)(Statements.Assign), (0, _combi_1.sta)(Statements.InsertInternal), (0, _combi_1.sta)(Statements.DeleteInternal), (0, _combi_1.sta)(Statements.Concatenate), (0, _combi_1.sub)(Structures.Case), (0, _combi_1.sub)(Structures.CaseType), (0, _combi_1.sub)(Structures.Enhancement), (0, _combi_1.sub)(Structures.EnhancementSection), (0, _combi_1.sta)(Statements.AddCorresponding), (0, _combi_1.sta)(Statements.Add), (0, _combi_1.sta)(Statements.AssignLocalCopy), (0, _combi_1.sta)(Statements.AuthorityCheck), (0, _combi_1.sta)(Statements.Back), (0, _combi_1.sta)(Statements.Break), (0, _combi_1.sta)(Statements.BreakId), (0, _combi_1.sta)(Statements.CallDatabase), (0, _combi_1.sta)(Statements.CallDialog), (0, _combi_1.sta)(Statements.CallKernel), (0, _combi_1.sta)(Statements.CallOLE), (0, _combi_1.sta)(Statements.CallScreen), (0, _combi_1.sta)(Statements.ModifyScreen), (0, _combi_1.sta)(Statements.CallSelectionScreen), (0, _combi_1.sta)(Statements.CallTransaction), (0, _combi_1.sta)(Statements.CallTransformation), (0, _combi_1.sta)(Statements.Check), (0, _combi_1.sta)(Statements.ClassDefinitionLoad), (0, _combi_1.sta)(Statements.CloseCursor), (0, _combi_1.sta)(Statements.CloseDataset), (0, _combi_1.sta)(Statements.Collect), (0, _combi_1.sta)(Statements.Commit), (0, _combi_1.sta)(Statements.Communication), (0, _combi_1.sta)(Statements.Compute), (0, _combi_1.sta)(Statements.CallBadi), (0, _combi_1.sta)(Statements.Condense), (0, _combi_1.sta)(Statements.Constant), (0, _combi_1.sta)(Statements.Contexts), (0, _combi_1.sta)(Statements.Continue), (0, _combi_1.sta)(Statements.ConvertText), (0, _combi_1.sta)(Statements.Convert), (0, _combi_1.sta)(Statements.CreateData), (0, _combi_1.sta)(Statements.CreateOLE), (0, _combi_1.sta)(Statements.DeleteCluster), (0, _combi_1.sta)(Statements.DeleteDatabase), (0, _combi_1.sta)(Statements.DeleteDataset), (0, _combi_1.sta)(Statements.DeleteDynpro), (0, _combi_1.sta)(Statements.DeleteMemory), (0, _combi_1.sta)(Statements.DeleteReport), (0, _combi_1.sta)(Statements.DeleteTextpool), (0, _combi_1.sta)(Statements.Demand), (0, _combi_1.sta)(Statements.Describe), (0, _combi_1.sta)(Statements.Detail), (0, _combi_1.sta)(Statements.Divide), (0, _combi_1.sta)(Statements.EditorCall), (0, _combi_1.sta)(Statements.EnhancementPoint), (0, _combi_1.sta)(Statements.Exit), (0, _combi_1.sta)(Statements.ExportDynpro), (0, _combi_1.sta)(Statements.Export), (0, _combi_1.sta)(Statements.Extract), (0, _combi_1.sta)(Statements.FetchNextCursor), (0, _combi_1.sta)(Statements.FieldGroup), (0, _combi_1.sta)(Statements.Fields), (0, _combi_1.sta)(Statements.Find), (0, _combi_1.sta)(Statements.Format), (0, _combi_1.sta)(Statements.FreeMemory), (0, _combi_1.sta)(Statements.FreeObject), (0, _combi_1.sta)(Statements.Free), (0, _combi_1.sta)(Statements.GenerateDynpro), (0, _combi_1.sta)(Statements.GenerateReport), (0, _combi_1.sta)(Statements.GenerateSubroutine), (0, _combi_1.sta)(Statements.GetBadi), (0, _combi_1.sta)(Statements.GetBit), (0, _combi_1.sta)(Statements.GetCursor), (0, _combi_1.sta)(Statements.GetDataset), (0, _combi_1.sta)(Statements.GetLocale), (0, _combi_1.sta)(Statements.GetParameter), (0, _combi_1.sta)(Statements.GetPFStatus), (0, _combi_1.sta)(Statements.GetProperty), (0, _combi_1.sta)(Statements.GetReference), (0, _combi_1.sta)(Statements.GetRunTime), (0, _combi_1.sta)(Statements.GetTime), (0, _combi_1.sta)(Statements.Hide), (0, _combi_1.sta)(Statements.Nodes), (0, _combi_1.sta)(Statements.ImportDynpro), (0, _combi_1.sta)(Statements.ImportNametab), (0, _combi_1.sta)(Statements.MoveCorresponding), (0, _combi_1.sta)(Statements.Import), (0, _combi_1.sta)(Statements.Infotypes), (0, _combi_1.sta)(Statements.Include), // include does not have to be at top level
22708
+ return (0, _combi_1.alt)((0, _combi_1.sta)(Statements.Move), (0, _combi_1.sta)(Statements.Call), (0, _combi_1.sta)(Statements.Data), (0, _combi_1.sub)(Structures.If), (0, _combi_1.sta)(Statements.Clear), (0, _combi_1.sta)(Statements.FieldSymbol), (0, _combi_1.sta)(Statements.CreateObject), (0, _combi_1.sta)(Statements.CallFunction), (0, _combi_1.sta)(_statement_1.MacroCall), (0, _combi_1.sta)(_statement_1.MacroRecursion), (0, _combi_1.sub)(Structures.LoopAtScreen), (0, _combi_1.sub)(Structures.Loop), (0, _combi_1.sub)(Structures.LoopExtract), (0, _combi_1.sta)(Statements.Append), (0, _combi_1.sub)(Structures.Try), (0, _combi_1.sub)(Structures.OnChange), (0, _combi_1.sta)(Statements.ReadTable), (0, _combi_1.sta)(Statements.Assert), (0, _combi_1.sta)(Statements.Return), (0, _combi_1.sta)(Statements.Select), (0, _combi_1.sta)(Statements.Assign), (0, _combi_1.sta)(Statements.InsertInternal), (0, _combi_1.sta)(Statements.DeleteInternal), (0, _combi_1.sta)(Statements.Concatenate), (0, _combi_1.sub)(Structures.Case), (0, _combi_1.sub)(Structures.CaseType), (0, _combi_1.sub)(Structures.Enhancement), (0, _combi_1.sub)(Structures.EnhancementSection), (0, _combi_1.sta)(Statements.AddCorresponding), (0, _combi_1.sta)(Statements.Add), (0, _combi_1.sta)(Statements.AssignLocalCopy), (0, _combi_1.sta)(Statements.AuthorityCheck), (0, _combi_1.sta)(Statements.Back), (0, _combi_1.sta)(Statements.Break), (0, _combi_1.sta)(Statements.BreakId), (0, _combi_1.sta)(Statements.CallDatabase), (0, _combi_1.sta)(Statements.CallDialog), (0, _combi_1.sta)(Statements.CallKernel), (0, _combi_1.sta)(Statements.CallOLE), (0, _combi_1.sta)(Statements.CallScreen), (0, _combi_1.sta)(Statements.ModifyScreen), (0, _combi_1.sta)(Statements.CallSelectionScreen), (0, _combi_1.sta)(Statements.CallTransaction), (0, _combi_1.sta)(Statements.CallTransformation), (0, _combi_1.sta)(Statements.Check), (0, _combi_1.sta)(Statements.ClassDefinitionLoad), (0, _combi_1.sta)(Statements.CloseCursor), (0, _combi_1.sta)(Statements.CloseDataset), (0, _combi_1.sta)(Statements.Collect), (0, _combi_1.sta)(Statements.Commit), (0, _combi_1.sta)(Statements.Communication), (0, _combi_1.sta)(Statements.Compute), (0, _combi_1.sta)(Statements.CallBadi), (0, _combi_1.sta)(Statements.Condense), (0, _combi_1.sta)(Statements.Constant), (0, _combi_1.sta)(Statements.Contexts), (0, _combi_1.sta)(Statements.Continue), (0, _combi_1.sta)(Statements.ConvertText), (0, _combi_1.sta)(Statements.Convert), (0, _combi_1.sta)(Statements.CreateData), (0, _combi_1.sta)(Statements.CreateOLE), (0, _combi_1.sta)(Statements.DeleteCluster), (0, _combi_1.sta)(Statements.DeleteDatabase), (0, _combi_1.sta)(Statements.DeleteDataset), (0, _combi_1.sta)(Statements.DeleteDynpro), (0, _combi_1.sta)(Statements.DeleteMemory), (0, _combi_1.sta)(Statements.DeleteReport), (0, _combi_1.sta)(Statements.DeleteTextpool), (0, _combi_1.sta)(Statements.Demand), (0, _combi_1.sta)(Statements.Describe), (0, _combi_1.sta)(Statements.Detail), (0, _combi_1.sta)(Statements.Divide), (0, _combi_1.sta)(Statements.EditorCall), (0, _combi_1.sta)(Statements.EnhancementPoint), (0, _combi_1.sta)(Statements.Exit), (0, _combi_1.sta)(Statements.ExportDynpro), (0, _combi_1.sta)(Statements.Export), (0, _combi_1.sta)(Statements.Extract), (0, _combi_1.sta)(Statements.FetchNextCursor), (0, _combi_1.sta)(Statements.FieldGroup), (0, _combi_1.sta)(Statements.Fields), (0, _combi_1.sta)(Statements.Find), (0, _combi_1.sta)(Statements.Format), (0, _combi_1.sta)(Statements.FreeMemory), (0, _combi_1.sta)(Statements.FreeObject), (0, _combi_1.sta)(Statements.Free), (0, _combi_1.sta)(Statements.GenerateDynpro), (0, _combi_1.sta)(Statements.GenerateReport), (0, _combi_1.sta)(Statements.GenerateSubroutine), (0, _combi_1.sta)(Statements.GetBadi), (0, _combi_1.sta)(Statements.GetBit), (0, _combi_1.sta)(Statements.GetCursor), (0, _combi_1.sta)(Statements.GetDataset), (0, _combi_1.sta)(Statements.GetLocale), (0, _combi_1.sta)(Statements.GetParameter), (0, _combi_1.sta)(Statements.GetPFStatus), (0, _combi_1.sta)(Statements.GetProperty), (0, _combi_1.sta)(Statements.GetReference), (0, _combi_1.sta)(Statements.GetRunTime), (0, _combi_1.sta)(Statements.GetTime), (0, _combi_1.sta)(Statements.Hide), (0, _combi_1.sta)(Statements.Nodes), (0, _combi_1.sta)(Statements.ImportDynpro), (0, _combi_1.sta)(Statements.ImportNametab), (0, _combi_1.sta)(Statements.MoveCorresponding), (0, _combi_1.sta)(Statements.Import), (0, _combi_1.sta)(Statements.Infotypes), (0, _combi_1.sta)(Statements.Include), // include does not have to be at top level
22638
22709
  (0, _combi_1.sta)(Statements.InsertDatabase), (0, _combi_1.sta)(Statements.InsertReport), (0, _combi_1.sta)(Statements.InsertTextpool), (0, _combi_1.sta)(Statements.InsertFieldGroup), (0, _combi_1.sta)(Statements.InterfaceLoad), (0, _combi_1.sta)(Statements.Leave), (0, _combi_1.sta)(Statements.LoadReport), (0, _combi_1.sta)(Statements.Local), (0, _combi_1.sta)(Statements.With), (0, _combi_1.sta)(Statements.LogPoint), (0, _combi_1.sta)(Statements.Message), (0, _combi_1.sta)(Statements.MergeDatabase), (0, _combi_1.sta)(Statements.ModifyLine), (0, _combi_1.sta)(Statements.ModifyDatabase), (0, _combi_1.sta)(Statements.ModifyInternal), (0, _combi_1.sta)(Statements.Multiply), (0, _combi_1.sta)(Statements.NewLine), (0, _combi_1.sta)(Statements.NewPage), (0, _combi_1.sta)(Statements.OpenCursor), (0, _combi_1.sta)(Statements.OpenDataset), (0, _combi_1.sta)(Statements.Overlay), (0, _combi_1.sta)(Statements.Pack), (0, _combi_1.sta)(Statements.Perform), (0, _combi_1.sta)(Statements.FormDefinition), (0, _combi_1.sta)(Statements.Position), (0, _combi_1.sta)(Statements.Put), (0, _combi_1.sta)(Statements.PrintControl), (0, _combi_1.sta)(Statements.RaiseEvent), (0, _combi_1.sta)(Statements.RaiseEntityEvent), (0, _combi_1.sta)(Statements.Raise), (0, _combi_1.sta)(Statements.Ranges), (0, _combi_1.sta)(Statements.ReadDataset), (0, _combi_1.sta)(Statements.ReadLine), (0, _combi_1.sta)(Statements.ReadReport), (0, _combi_1.sta)(Statements.ReadTextpool), (0, _combi_1.sta)(Statements.Receive), (0, _combi_1.sta)(Statements.RefreshControl), (0, _combi_1.sta)(Statements.Refresh), (0, _combi_1.sta)(Statements.Reject), (0, _combi_1.sta)(Statements.Replace), (0, _combi_1.sta)(Statements.Reserve), (0, _combi_1.sta)(Statements.Resume), (0, _combi_1.sta)(Statements.Retry), (0, _combi_1.sta)(Statements.Rollback), (0, _combi_1.sta)(Statements.Scan), (0, _combi_1.sta)(Statements.ScrollList), (0, _combi_1.sta)(Statements.Search), (0, _combi_1.sta)(Statements.SetBit), (0, _combi_1.sta)(Statements.SetBlank), (0, _combi_1.sta)(Statements.SetCountry), (0, _combi_1.sta)(Statements.SetCursor), (0, _combi_1.sta)(Statements.SetDataset), (0, _combi_1.sta)(Statements.SetExtendedCheck), (0, _combi_1.sta)(Statements.SetHandler), (0, _combi_1.sta)(Statements.SetLanguage), (0, _combi_1.sta)(Statements.SetLeft), (0, _combi_1.sta)(Statements.SetLocale), (0, _combi_1.sta)(Statements.SetMargin), (0, _combi_1.sta)(Statements.SetParameter), (0, _combi_1.sta)(Statements.SetPFStatus), (0, _combi_1.sta)(Statements.SetProperty), (0, _combi_1.sta)(Statements.SetRunTime), (0, _combi_1.sta)(Statements.SetScreen), (0, _combi_1.sta)(Statements.SetTitlebar), (0, _combi_1.sta)(Statements.SetUserCommand), (0, _combi_1.sta)(Statements.SetUpdateTask), (0, _combi_1.sta)(Statements.Shift), (0, _combi_1.sta)(Statements.Skip), (0, _combi_1.sta)(Statements.SortDataset), (0, _combi_1.sta)(Statements.Sort), (0, _combi_1.sta)(Statements.Static), (0, _combi_1.sta)(Statements.Split), (0, _combi_1.sta)(Statements.Stop), (0, _combi_1.sta)(Statements.Submit), (0, _combi_1.sta)(Statements.Summary), (0, _combi_1.sta)(Statements.SubtractCorresponding), (0, _combi_1.sta)(Statements.Subtract), (0, _combi_1.sta)(Statements.SuppressDialog), (0, _combi_1.sta)(Statements.Supply), (0, _combi_1.sta)(Statements.Sum), (0, _combi_1.sta)(Statements.SyntaxCheck), (0, _combi_1.sta)(Statements.SystemCall), (0, _combi_1.sta)(Statements.Tables), (0, _combi_1.sta)(Statements.Transfer), (0, _combi_1.sta)(Statements.Translate), (0, _combi_1.sta)(Statements.Type), (0, _combi_1.sta)(Statements.TypePools), (0, _combi_1.sta)(Statements.Uline), (0, _combi_1.sta)(Statements.Unassign), (0, _combi_1.sta)(Statements.Unpack), (0, _combi_1.sta)(Statements.UpdateDatabase), (0, _combi_1.sta)(Statements.Wait), (0, _combi_1.sta)(Statements.Window), (0, _combi_1.sta)(Statements.Write), (0, _combi_1.sta)(Statements.CommitEntities), (0, _combi_1.sta)(Statements.GetPermissions), (0, _combi_1.sta)(Statements.SetLocks), (0, _combi_1.sta)(Statements.ModifyEntities), (0, _combi_1.sta)(Statements.ReadEntities), (0, _combi_1.sta)(Statements.RollbackEntities), (0, _combi_1.sta)(Statements.Module), // todo, should be dynpro specific
22639
22710
  (0, _combi_1.sta)(Statements.Field), // todo, should be dynpro specific
22640
22711
  (0, _combi_1.sub)(Structures.Chain), // todo, should be dynpro specific
@@ -28361,25 +28432,12 @@ class BasicTypes {
28361
28432
  return name.includes("\\") || name.includes("~");
28362
28433
  }
28363
28434
  isRAPTableFor(text) {
28364
- return text.startsWith("TYPE TABLE FOR ACTION IMPORT ")
28365
- || text.startsWith("TYPE TABLE FOR ACTION RESULT ")
28366
- || text.startsWith("TYPE TABLE FOR CREATE ")
28367
- || text.startsWith("TYPE TABLE FOR DELETE ")
28368
- || text.startsWith("TYPE TABLE FOR DETERMINATION ")
28369
- || text.startsWith("TYPE TABLE FOR EVENT ")
28370
- || text.startsWith("TYPE TABLE FOR FAILED ")
28371
- || text.startsWith("TYPE TABLE FOR FAILED EARLY ")
28372
- || text.startsWith("TYPE TABLE FOR LOCK ")
28373
- || text.startsWith("TYPE TABLE FOR READ ")
28374
- || text.startsWith("TYPE TABLE FOR READ IMPORT ")
28375
- || text.startsWith("TYPE TABLE FOR READ RESULT ")
28376
- || text.startsWith("TYPE TABLE FOR REPORTED EARLY ")
28377
- || text.startsWith("TYPE TABLE FOR UPDATE ");
28435
+ return text.startsWith("TYPE TABLE FOR ");
28378
28436
  }
28379
28437
  isRAPTypeStructure(text) {
28380
28438
  return text.startsWith("TYPE STRUCTURE FOR ")
28381
28439
  || text.startsWith("TYPE RESPONSE FOR ")
28382
- || text.startsWith("TYPE REQUEST FOR CHANGE ");
28440
+ || text.startsWith("TYPE REQUEST FOR ");
28383
28441
  }
28384
28442
  // todo, rewrite this method
28385
28443
  resolveTypeChain(expr) {
@@ -67930,7 +67988,7 @@ class Registry {
67930
67988
  }
67931
67989
  static abaplintVersion() {
67932
67990
  // magic, see build script "version.js"
67933
- return "2.119.48";
67991
+ return "2.119.50";
67934
67992
  }
67935
67993
  getDDICReferences() {
67936
67994
  return this.ddicReferences;
@@ -69900,6 +69958,8 @@ TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md
69900
69958
 
69901
69959
  BREAK points`,
69902
69960
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
69961
+ badExample: `DESCRIBE TABLE items LINES count.`,
69962
+ goodExample: `count = lines( items ).`,
69903
69963
  };
69904
69964
  }
69905
69965
  getDescription(statement) {
@@ -72426,6 +72486,14 @@ class ClassAttributeNames extends _abap_rule_1.ABAPRule {
72426
72486
  title: "Class attributes naming",
72427
72487
  shortDescription: `Allows you to enforce a pattern, such as a prefix, for class variable names.`,
72428
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.`,
72429
72497
  };
72430
72498
  }
72431
72499
  getDescription(actual, expected) {
@@ -73146,6 +73214,14 @@ This only applies to global classes.
73146
73214
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
73147
73215
  https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abeninstance_constructor_guidl.htm`,
73148
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.`,
73149
73225
  };
73150
73226
  }
73151
73227
  getMessage() {
@@ -73590,6 +73666,8 @@ class DangerousStatement extends _abap_rule_1.ABAPRule {
73590
73666
  extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
73591
73667
  dynamic SQL can potentially create SQL injection problems`,
73592
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).`,
73593
73671
  };
73594
73672
  }
73595
73673
  getDescription(statement) {
@@ -73748,6 +73826,17 @@ class DbOperationInLoop extends _abap_rule_1.ABAPRule {
73748
73826
  title: "Database operation in loop",
73749
73827
  shortDescription: `Database operation in LOOP/DO/WHILE`,
73750
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.`,
73751
73840
  };
73752
73841
  }
73753
73842
  getConfig() {
@@ -78134,6 +78223,12 @@ Use RETURN to leave procesing blocks instead.`,
78134
78223
  https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
78135
78224
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#check-vs-return`,
78136
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( ).`,
78137
78232
  };
78138
78233
  }
78139
78234
  getConfig() {
@@ -78916,6 +79011,10 @@ class FormTablesObsolete extends _abap_rule_1.ABAPRule {
78916
79011
  shortDescription: `Checks for TABLES parameters in forms.`,
78917
79012
  extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapform_tables.htm`,
78918
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.`,
78919
79018
  };
78920
79019
  }
78921
79020
  getMessage() {
@@ -79282,6 +79381,10 @@ class FunctionModuleRecommendations extends _abap_rule_1.ABAPRule {
79282
79381
  shortDescription: `Suggests replacements for various function modules`,
79283
79382
  extendedInformation: `https://docs.abapopenchecks.org/checks/53/`,
79284
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( ).`,
79285
79388
  };
79286
79389
  }
79287
79390
  getConfig() {
@@ -81431,6 +81534,7 @@ __exportStar(__webpack_require__(/*! ./no_chained_assignment */ "../core/build/s
81431
81534
  __exportStar(__webpack_require__(/*! ./no_comments_between_methods */ "../core/build/src/rules/no_comments_between_methods.js"), exports);
81432
81535
  __exportStar(__webpack_require__(/*! ./no_external_form_calls */ "../core/build/src/rules/no_external_form_calls.js"), exports);
81433
81536
  __exportStar(__webpack_require__(/*! ./no_inline_in_optional_branches */ "../core/build/src/rules/no_inline_in_optional_branches.js"), exports);
81537
+ __exportStar(__webpack_require__(/*! ./no_macros */ "../core/build/src/rules/no_macros.js"), exports);
81434
81538
  __exportStar(__webpack_require__(/*! ./no_prefixes */ "../core/build/src/rules/no_prefixes.js"), exports);
81435
81539
  __exportStar(__webpack_require__(/*! ./no_public_attributes */ "../core/build/src/rules/no_public_attributes.js"), exports);
81436
81540
  __exportStar(__webpack_require__(/*! ./no_yoda_conditions */ "../core/build/src/rules/no_yoda_conditions.js"), exports);
@@ -82636,6 +82740,9 @@ class LineLength extends _abap_rule_1.ABAPRule {
82636
82740
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length
82637
82741
  https://docs.abapopenchecks.org/checks/04/`,
82638
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'.`,
82639
82746
  };
82640
82747
  }
82641
82748
  getConfig() {
@@ -82813,6 +82920,10 @@ class LocalClassNaming extends _abap_rule_1.ABAPRule {
82813
82920
  title: "Local class naming conventions",
82814
82921
  shortDescription: `Allows you to enforce a pattern, such as a prefix, for local class names.`,
82815
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.`,
82816
82927
  };
82817
82928
  }
82818
82929
  getDescription(expected, actual) {
@@ -84384,6 +84495,12 @@ class MethodParameterNames {
84384
84495
  title: "Method parameter naming conventions",
84385
84496
  shortDescription: `Allows you to enforce a pattern, such as a prefix, for method parameter names`,
84386
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.`,
84387
84504
  };
84388
84505
  }
84389
84506
  getDescription(expected, actual) {
@@ -85261,6 +85378,13 @@ class NoAliases extends _abap_rule_1.ABAPRule {
85261
85378
  title: "No ALIASES",
85262
85379
  shortDescription: `Detects use of the ALIAS statement`,
85263
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.`,
85264
85388
  };
85265
85389
  }
85266
85390
  getConfig() {
@@ -85465,8 +85589,22 @@ class NoCommentsBetweenMethods extends _abap_rule_1.ABAPRule {
85465
85589
  return {
85466
85590
  key: "no_comments_between_methods",
85467
85591
  title: "No comments between methods in global classes",
85468
- shortDescription: `Its not possible to have comments between methods in global classes.`,
85592
+ shortDescription: `It's not possible to have comments between methods in global classes.`,
85469
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.`,
85470
85608
  };
85471
85609
  }
85472
85610
  getConfig() {
@@ -85788,6 +85926,98 @@ exports.NoInlineInOptionalBranches = NoInlineInOptionalBranches;
85788
85926
 
85789
85927
  /***/ },
85790
85928
 
85929
+ /***/ "../core/build/src/rules/no_macros.js"
85930
+ /*!********************************************!*\
85931
+ !*** ../core/build/src/rules/no_macros.js ***!
85932
+ \********************************************/
85933
+ (__unused_webpack_module, exports, __webpack_require__) {
85934
+
85935
+ "use strict";
85936
+
85937
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
85938
+ if (k2 === undefined) k2 = k;
85939
+ var desc = Object.getOwnPropertyDescriptor(m, k);
85940
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
85941
+ desc = { enumerable: true, get: function() { return m[k]; } };
85942
+ }
85943
+ Object.defineProperty(o, k2, desc);
85944
+ }) : (function(o, m, k, k2) {
85945
+ if (k2 === undefined) k2 = k;
85946
+ o[k2] = m[k];
85947
+ }));
85948
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
85949
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
85950
+ }) : function(o, v) {
85951
+ o["default"] = v;
85952
+ });
85953
+ var __importStar = (this && this.__importStar) || (function () {
85954
+ var ownKeys = function(o) {
85955
+ ownKeys = Object.getOwnPropertyNames || function (o) {
85956
+ var ar = [];
85957
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
85958
+ return ar;
85959
+ };
85960
+ return ownKeys(o);
85961
+ };
85962
+ return function (mod) {
85963
+ if (mod && mod.__esModule) return mod;
85964
+ var result = {};
85965
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
85966
+ __setModuleDefault(result, mod);
85967
+ return result;
85968
+ };
85969
+ })();
85970
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
85971
+ exports.NoMacros = exports.NoMacrosConf = void 0;
85972
+ const issue_1 = __webpack_require__(/*! ../issue */ "../core/build/src/issue.js");
85973
+ const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "../core/build/src/rules/_abap_rule.js");
85974
+ const Statements = __importStar(__webpack_require__(/*! ../abap/2_statements/statements */ "../core/build/src/abap/2_statements/statements/index.js"));
85975
+ const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "../core/build/src/rules/_basic_rule_config.js");
85976
+ const _irule_1 = __webpack_require__(/*! ./_irule */ "../core/build/src/rules/_irule.js");
85977
+ class NoMacrosConf extends _basic_rule_config_1.BasicRuleConfig {
85978
+ }
85979
+ exports.NoMacrosConf = NoMacrosConf;
85980
+ class NoMacros extends _abap_rule_1.ABAPRule {
85981
+ constructor() {
85982
+ super(...arguments);
85983
+ this.conf = new NoMacrosConf();
85984
+ }
85985
+ getMetadata() {
85986
+ return {
85987
+ key: "no_macros",
85988
+ title: "No macros",
85989
+ shortDescription: `Checks that macros are not used`,
85990
+ extendedInformation: `Macros reduce readability and are difficult to debug, use methods or form routines instead.
85991
+
85992
+ https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abenmacros_guidl.htm`,
85993
+ tags: [_irule_1.RuleTag.SingleFile],
85994
+ badExample: `DEFINE _macro.
85995
+ WRITE 'hello'.
85996
+ END-OF-DEFINITION.`,
85997
+ goodExample: `WRITE 'hello'.`,
85998
+ };
85999
+ }
86000
+ getConfig() {
86001
+ return this.conf;
86002
+ }
86003
+ setConfig(conf) {
86004
+ this.conf = conf;
86005
+ }
86006
+ runParsed(file) {
86007
+ const issues = [];
86008
+ for (const stat of file.getStatements()) {
86009
+ if (stat.get() instanceof Statements.Define) {
86010
+ issues.push(issue_1.Issue.atStatement(file, stat, "Do not define macros", this.getMetadata().key, this.conf.severity));
86011
+ }
86012
+ }
86013
+ return issues;
86014
+ }
86015
+ }
86016
+ exports.NoMacros = NoMacros;
86017
+ //# sourceMappingURL=no_macros.js.map
86018
+
86019
+ /***/ },
86020
+
85791
86021
  /***/ "../core/build/src/rules/no_prefixes.js"
85792
86022
  /*!**********************************************!*\
85793
86023
  !*** ../core/build/src/rules/no_prefixes.js ***!
@@ -86081,6 +86311,14 @@ class NoPublicAttributes extends _abap_rule_1.ABAPRule {
86081
86311
  Exceptions are excluded from this rule.`,
86082
86312
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#members-private-by-default-protected-only-if-needed`,
86083
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.`,
86084
86322
  };
86085
86323
  }
86086
86324
  getDescription(name) {
@@ -87750,19 +87988,23 @@ See recognized syntax at https://syntax.abaplint.org`,
87750
87988
  if (obj instanceof _abap_object_1.ABAPObject) {
87751
87989
  for (const file of obj.getABAPFiles()) {
87752
87990
  for (const statement of file.getStatements()) {
87753
- if (!(statement.get() instanceof _statement_1.Unknown)) {
87754
- continue;
87755
- }
87756
- if (statement.getTokens().length > statement_parser_1.STATEMENT_MAX_TOKENS) {
87757
- const message = "Statement too long, refactor statement";
87758
- const issue = issue_1.Issue.atToken(file, statement.getTokens()[0], message, this.getMetadata().key, this.conf.severity);
87759
- issues.push(issue);
87991
+ if (statement.get() instanceof _statement_1.Unknown) {
87992
+ if (statement.getTokens().length > statement_parser_1.STATEMENT_MAX_TOKENS) {
87993
+ const message = "Statement too long, refactor statement";
87994
+ const issue = issue_1.Issue.atToken(file, statement.getTokens()[0], message, this.getMetadata().key, this.conf.severity);
87995
+ issues.push(issue);
87996
+ }
87997
+ else {
87998
+ const tok = statement.getFirstToken();
87999
+ const message = "Statement does not exist in ABAP " + this.reg.getConfig().getRelease().name + " (or a parser error), \"" + tok.getStr() + "\"";
88000
+ const issue = issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity);
88001
+ issues.push(issue);
88002
+ }
87760
88003
  }
87761
- else {
88004
+ else if (statement.get() instanceof _statement_1.MacroRecursion) {
87762
88005
  const tok = statement.getFirstToken();
87763
- const message = "Statement does not exist in ABAP" + this.reg.getConfig().getRelease().name + "(or a parser error), \"" + tok.getStr() + "\"";
87764
- const issue = issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity);
87765
- issues.push(issue);
88006
+ const message = "Macro recursion detected involving \"" + tok.getStr() + "\"";
88007
+ issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity));
87766
88008
  }
87767
88009
  }
87768
88010
  if (this.reg.getConfig().getRelease() === version_1.Release.v700) {
@@ -89393,6 +89635,14 @@ class PrefixIsCurrentClass extends _abap_rule_1.ABAPRule {
89393
89635
  // eslint-disable-next-line max-len
89394
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`,
89395
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.`,
89396
89646
  };
89397
89647
  }
89398
89648
  getConfig() {
@@ -91995,6 +92245,12 @@ class StaticCallViaInstance extends _abap_rule_1.ABAPRule {
91995
92245
  shortDescription: `Static method call via instance variable`,
91996
92246
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-call-static-methods-through-instance-variables`,
91997
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.`,
91998
92254
  };
91999
92255
  }
92000
92256
  getConfig() {
@@ -99033,6 +99289,21 @@ function loadConfig(filename) {
99033
99289
  base: path.dirname(f) === process.cwd() ? "." : path.dirname(f),
99034
99290
  };
99035
99291
  }
99292
+ function formatNullable(value) {
99293
+ return value === null ? "n/a" : value.toString();
99294
+ }
99295
+ function outputSyntaxConfig(config) {
99296
+ const release = config.getRelease();
99297
+ const releaseDetails = [
99298
+ `SAP_BASIS ${formatNullable(release.abap)}`,
99299
+ `kernel ${formatNullable(release.kernel)}`,
99300
+ `on-premise ${formatNullable(release.op)}`,
99301
+ `cloud ${formatNullable(release.cloud)}`,
99302
+ `CE ${formatNullable(release.ce)}`,
99303
+ ].join(", ");
99304
+ process.stderr.write(`ABAP release: ${release.name} (${releaseDetails})\n`);
99305
+ process.stderr.write(`ABAP language version: ${config.getLanguageVersion()}\n`);
99306
+ }
99036
99307
  async function loadDependencies(config, compress, bar, base) {
99037
99308
  let files = [];
99038
99309
  const deps = config.get().dependencies || [];
@@ -99127,6 +99398,7 @@ async function run(arg) {
99127
99398
  let loaded = [];
99128
99399
  let deps = [];
99129
99400
  const { config, base } = loadConfig(arg.configFilename);
99401
+ outputSyntaxConfig(config);
99130
99402
  try {
99131
99403
  if (config.get().global.files === undefined) {
99132
99404
  throw "Error: Update abaplint configuration file to latest format";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.119.48",
3
+ "version": "2.119.50",
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.48",
42
+ "@abaplint/core": "^2.119.50",
43
43
  "@types/chai": "^4.3.20",
44
44
  "@types/minimist": "^1.2.5",
45
45
  "@types/mocha": "^10.0.10",