@abaplint/transpiler-cli 2.10.21 → 2.10.23

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/bundle.js CHANGED
@@ -3262,7 +3262,7 @@ class Color extends combi_1.Expression {
3262
3262
  const texts = (0, combi_1.altPrio)("COL_BACKGROUND", "COL_HEADING", "COL_NORMAL", "COL_TOTAL", "COL_KEY", "COL_POSITIVE", "COL_NEGATIVE", "COL_GROUP");
3263
3263
  const value = (0, combi_1.alt)(eq, (0, combi_1.altPrio)("ON", "OFF", (0, combi_1.altPrio)(integers, texts)));
3264
3264
  const toggle = (0, combi_1.altPrio)("ON", "OFF");
3265
- return (0, combi_1.seq)("COLOR", value, (0, combi_1.opt)(toggle));
3265
+ return (0, combi_1.seq)("COLOR", (0, combi_1.opt)((0, combi_1.seq)(value, (0, combi_1.opt)(toggle))));
3266
3266
  }
3267
3267
  }
3268
3268
  exports.Color = Color;
@@ -3753,11 +3753,13 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
3753
3753
  exports.DataDefinition = void 0;
3754
3754
  const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
3755
3755
  const Expressions = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
3756
+ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
3756
3757
  class DataDefinition extends combi_1.Expression {
3757
3758
  getRunnable() {
3758
3759
  const simple = (0, combi_1.opt)((0, combi_1.per)("READ-ONLY", Expressions.Type, Expressions.Length, Expressions.Decimals, Expressions.Value));
3759
3760
  const table = (0, combi_1.seq)(Expressions.TypeTable, (0, combi_1.optPrio)("READ-ONLY"));
3760
- return (0, combi_1.seq)(Expressions.DefinitionName, (0, combi_1.optPrio)(Expressions.ConstantFieldLength), (0, combi_1.alt)(simple, table, Expressions.TypeStructure));
3761
+ const boxed = (0, combi_1.ver)(version_1.Version.v702, "BOXED");
3762
+ return (0, combi_1.seq)(Expressions.DefinitionName, (0, combi_1.optPrio)(Expressions.ConstantFieldLength), (0, combi_1.alt)(simple, table, Expressions.TypeStructure), (0, combi_1.optPrio)(boxed));
3761
3763
  }
3762
3764
  }
3763
3765
  exports.DataDefinition = DataDefinition;
@@ -4226,7 +4228,7 @@ class FieldSymbol extends combi_1.Expression {
4226
4228
  getRunnable() {
4227
4229
  // todo, this only allows one dash in the name
4228
4230
  const dashes = (0, combi_1.seq)((0, combi_1.regex)(/^<[\w\/%$\*]+$/), (0, combi_1.tok)(tokens_1.Dash), (0, combi_1.regex)(/^[\w\/%$\*]+>$/));
4229
- return (0, combi_1.altPrio)((0, combi_1.regex)(/^<[\w\/%$\*]+>$/), dashes);
4231
+ return (0, combi_1.altPrio)((0, combi_1.regex)(/^<[\w\/%$\*\?]+>$/), dashes);
4230
4232
  }
4231
4233
  }
4232
4234
  exports.FieldSymbol = FieldSymbol;
@@ -7492,7 +7494,7 @@ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src
7492
7494
  class SQLHints extends combi_1.Expression {
7493
7495
  getRunnable() {
7494
7496
  const type = (0, combi_1.altPrio)("ORACLE", "ADABAS", "AS400", "DB2", "HDB", "MSSQLNT", "SYBASE", "DB6");
7495
- const ret = (0, combi_1.seq)("%_HINTS", (0, combi_1.plus)((0, combi_1.seq)(type, _1.Constant)));
7497
+ const ret = (0, combi_1.seq)("%_HINTS", (0, combi_1.plus)((0, combi_1.seq)(type, (0, combi_1.alt)(_1.Constant, _1.FieldSub))));
7496
7498
  return ret;
7497
7499
  }
7498
7500
  }
@@ -7848,7 +7850,7 @@ class StringTemplateFormatting extends combi_1.Expression {
7848
7850
  getRunnable() {
7849
7851
  // https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapcompute_string_format_options.htm
7850
7852
  const alphaOptions = (0, combi_1.altPrio)("OUT", "RAW", "IN", _1.Source);
7851
- const alignOptions = (0, combi_1.altPrio)("LEFT", "RIGHT", "CENTER", _1.Source);
7853
+ const alignOptions = (0, combi_1.altPrio)("LEFT", "RIGHT", "CENTER", _1.Source, dynamic_1.Dynamic);
7852
7854
  const dateTimeOptions = (0, combi_1.altPrio)("RAW", "ISO", "USER", "ENVIRONMENT", _1.Source, dynamic_1.Dynamic);
7853
7855
  const timeStampOptions = (0, combi_1.altPrio)("SPACE", "ISO", "USER", "ENVIRONMENT", _1.Source);
7854
7856
  const numberOptions = (0, combi_1.altPrio)("RAW", "USER", "ENVIRONMENT", _1.Source, dynamic_1.Dynamic);
@@ -8786,8 +8788,12 @@ class StatementParser {
8786
8788
  else {
8787
8789
  wa.statements[i] = new nodes_1.StatementNode(new _statement_1.NativeSQL()).setChildren(this.tokensToNodes(statement.getTokens()));
8788
8790
  if (statement.concatTokens().toUpperCase().endsWith("ENDMETHOD.")) {
8789
- // yea, this is not completely correct
8790
- wa.statements[i] = new nodes_1.StatementNode(new Statements.EndMethod()).setChildren(this.tokensToNodes(statement.getTokens()));
8791
+ const tokens = statement.getTokens();
8792
+ const startTokens = this.tokensToNodes(tokens.slice(tokens.length - 2, tokens.length));
8793
+ const endTokens = this.tokensToNodes(tokens.slice(0, tokens.length - 2));
8794
+ wa.statements[i] = new nodes_1.StatementNode(new _statement_1.NativeSQL()).setChildren(endTokens);
8795
+ const item = new nodes_1.StatementNode(new Statements.EndMethod()).setChildren(startTokens);
8796
+ wa.statements.splice(i + 1, 0, item);
8791
8797
  sql = false;
8792
8798
  }
8793
8799
  }
@@ -9654,6 +9660,31 @@ exports.CallSelectionScreen = CallSelectionScreen;
9654
9660
 
9655
9661
  /***/ }),
9656
9662
 
9663
+ /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/call_subscreen.js":
9664
+ /*!**********************************************************************************************!*\
9665
+ !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/statements/call_subscreen.js ***!
9666
+ \**********************************************************************************************/
9667
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9668
+
9669
+ "use strict";
9670
+
9671
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
9672
+ exports.CallSubscreen = void 0;
9673
+ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
9674
+ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
9675
+ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
9676
+ class CallSubscreen {
9677
+ getMatcher() {
9678
+ const including = (0, combi_1.seq)("INCLUDING", expressions_1.Source, expressions_1.Source);
9679
+ const ret = (0, combi_1.seq)("CALL SUBSCREEN", expressions_1.Source, (0, combi_1.optPrio)(including));
9680
+ return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
9681
+ }
9682
+ }
9683
+ exports.CallSubscreen = CallSubscreen;
9684
+ //# sourceMappingURL=call_subscreen.js.map
9685
+
9686
+ /***/ }),
9687
+
9657
9688
  /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/call_transaction.js":
9658
9689
  /*!************************************************************************************************!*\
9659
9690
  !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/statements/call_transaction.js ***!
@@ -9803,6 +9834,28 @@ exports.CatchSystemExceptions = CatchSystemExceptions;
9803
9834
 
9804
9835
  /***/ }),
9805
9836
 
9837
+ /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/chain.js":
9838
+ /*!*************************************************************************************!*\
9839
+ !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/statements/chain.js ***!
9840
+ \*************************************************************************************/
9841
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9842
+
9843
+ "use strict";
9844
+
9845
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
9846
+ exports.Chain = void 0;
9847
+ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
9848
+ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
9849
+ class Chain {
9850
+ getMatcher() {
9851
+ return (0, combi_1.verNot)(version_1.Version.Cloud, "CHAIN");
9852
+ }
9853
+ }
9854
+ exports.Chain = Chain;
9855
+ //# sourceMappingURL=chain.js.map
9856
+
9857
+ /***/ }),
9858
+
9806
9859
  /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/check.js":
9807
9860
  /*!*************************************************************************************!*\
9808
9861
  !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/statements/check.js ***!
@@ -11115,6 +11168,28 @@ exports.ElseIf = ElseIf;
11115
11168
 
11116
11169
  /***/ }),
11117
11170
 
11171
+ /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/end_chain.js":
11172
+ /*!*****************************************************************************************!*\
11173
+ !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/statements/end_chain.js ***!
11174
+ \*****************************************************************************************/
11175
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11176
+
11177
+ "use strict";
11178
+
11179
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
11180
+ exports.EndChain = void 0;
11181
+ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
11182
+ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
11183
+ class EndChain {
11184
+ getMatcher() {
11185
+ return (0, combi_1.verNot)(version_1.Version.Cloud, "ENDCHAIN");
11186
+ }
11187
+ }
11188
+ exports.EndChain = EndChain;
11189
+ //# sourceMappingURL=end_chain.js.map
11190
+
11191
+ /***/ }),
11192
+
11118
11193
  /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/end_enhancement.js":
11119
11194
  /*!***********************************************************************************************!*\
11120
11195
  !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/statements/end_enhancement.js ***!
@@ -11933,6 +12008,30 @@ exports.FetchNextCursor = FetchNextCursor;
11933
12008
 
11934
12009
  /***/ }),
11935
12010
 
12011
+ /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/field.js":
12012
+ /*!*************************************************************************************!*\
12013
+ !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/statements/field.js ***!
12014
+ \*************************************************************************************/
12015
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12016
+
12017
+ "use strict";
12018
+
12019
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
12020
+ exports.Field = void 0;
12021
+ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
12022
+ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
12023
+ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
12024
+ class Field {
12025
+ getMatcher() {
12026
+ const ret = (0, combi_1.seq)("FIELD", expressions_1.FieldChain, (0, combi_1.opt)((0, combi_1.seq)("MODULE", expressions_1.FormName, (0, combi_1.opt)((0, combi_1.alt)("ON INPUT", "ON REQUEST")))));
12027
+ return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
12028
+ }
12029
+ }
12030
+ exports.Field = Field;
12031
+ //# sourceMappingURL=field.js.map
12032
+
12033
+ /***/ }),
12034
+
11936
12035
  /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/field_group.js":
11937
12036
  /*!*******************************************************************************************!*\
11938
12037
  !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/statements/field_group.js ***!
@@ -12567,7 +12666,7 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
12567
12666
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
12568
12667
  class GetProperty {
12569
12668
  getMatcher() {
12570
- const ret = (0, combi_1.seq)("GET PROPERTY OF", expressions_1.FieldSub, expressions_1.Source, "=", expressions_1.Source, (0, combi_1.opt)("NO FLUSH"), (0, combi_1.opt)(expressions_1.OLEExporting));
12669
+ const ret = (0, combi_1.seq)("GET PROPERTY OF", expressions_1.FieldSub, expressions_1.Source, "=", expressions_1.Source, (0, combi_1.opt)("NO FLUSH"), (0, combi_1.opt)("QUEUEONLY"), (0, combi_1.opt)(expressions_1.OLEExporting));
12571
12670
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
12572
12671
  }
12573
12672
  }
@@ -13130,6 +13229,7 @@ __exportStar(__webpack_require__(/*! ./endfunction */ "./node_modules/@abaplint/
13130
13229
  __exportStar(__webpack_require__(/*! ./retry */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/retry.js"), exports);
13131
13230
  __exportStar(__webpack_require__(/*! ./authority_check */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/authority_check.js"), exports);
13132
13231
  __exportStar(__webpack_require__(/*! ./set_parameter */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_parameter.js"), exports);
13232
+ __exportStar(__webpack_require__(/*! ./field */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/field.js"), exports);
13133
13233
  __exportStar(__webpack_require__(/*! ./get_cursor */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/get_cursor.js"), exports);
13134
13234
  __exportStar(__webpack_require__(/*! ./call_kernel */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/call_kernel.js"), exports);
13135
13235
  __exportStar(__webpack_require__(/*! ./call_transaction */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/call_transaction.js"), exports);
@@ -13139,6 +13239,9 @@ __exportStar(__webpack_require__(/*! ./uline */ "./node_modules/@abaplint/core/b
13139
13239
  __exportStar(__webpack_require__(/*! ./data_begin */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/data_begin.js"), exports);
13140
13240
  __exportStar(__webpack_require__(/*! ./data_end */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/data_end.js"), exports);
13141
13241
  __exportStar(__webpack_require__(/*! ./type_begin */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/type_begin.js"), exports);
13242
+ __exportStar(__webpack_require__(/*! ./process_after_input */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/process_after_input.js"), exports);
13243
+ __exportStar(__webpack_require__(/*! ./process_before_output */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/process_before_output.js"), exports);
13244
+ __exportStar(__webpack_require__(/*! ./process_on_value_request */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/process_on_value_request.js"), exports);
13142
13245
  __exportStar(__webpack_require__(/*! ./type_end */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/type_end.js"), exports);
13143
13246
  __exportStar(__webpack_require__(/*! ./raise_event */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/raise_event.js"), exports);
13144
13247
  __exportStar(__webpack_require__(/*! ./cleanup */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/cleanup.js"), exports);
@@ -13152,6 +13255,9 @@ __exportStar(__webpack_require__(/*! ./end_test_seam */ "./node_modules/@abaplin
13152
13255
  __exportStar(__webpack_require__(/*! ./delete_memory */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/delete_memory.js"), exports);
13153
13256
  __exportStar(__webpack_require__(/*! ./provide */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/provide.js"), exports);
13154
13257
  __exportStar(__webpack_require__(/*! ./endexec */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endexec.js"), exports);
13258
+ __exportStar(__webpack_require__(/*! ./chain */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/chain.js"), exports);
13259
+ __exportStar(__webpack_require__(/*! ./end_chain */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/end_chain.js"), exports);
13260
+ __exportStar(__webpack_require__(/*! ./call_subscreen */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/call_subscreen.js"), exports);
13155
13261
  __exportStar(__webpack_require__(/*! ./sort_dataset */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/sort_dataset.js"), exports);
13156
13262
  __exportStar(__webpack_require__(/*! ./get_permissions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/get_permissions.js"), exports);
13157
13263
  __exportStar(__webpack_require__(/*! ./set_locks */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_locks.js"), exports);
@@ -13463,7 +13569,7 @@ class Leave {
13463
13569
  getMatcher() {
13464
13570
  const retu = (0, combi_1.seq)(expressions_1.AndReturn, "TO SCREEN", expressions_1.Source);
13465
13571
  const transaction = (0, combi_1.seq)("TO TRANSACTION", expressions_1.Source, (0, combi_1.opt)("AND SKIP FIRST SCREEN"));
13466
- const ret = (0, combi_1.seq)("LEAVE", (0, combi_1.opt)((0, combi_1.alt)("TO CURRENT TRANSACTION", (0, combi_1.seq)((0, combi_1.opt)("TO"), "LIST-PROCESSING", (0, combi_1.opt)(retu)), "LIST-PROCESSING", "SCREEN", transaction, "PROGRAM", (0, combi_1.seq)("TO SCREEN", expressions_1.Source))));
13572
+ const ret = (0, combi_1.seq)("LEAVE", (0, combi_1.opt)((0, combi_1.alt)((0, combi_1.seq)("TO CURRENT TRANSACTION", (0, combi_1.opt)("AND SKIP FIRST SCREEN")), (0, combi_1.seq)((0, combi_1.opt)("TO"), "LIST-PROCESSING", (0, combi_1.opt)(retu)), "LIST-PROCESSING", "SCREEN", transaction, "PROGRAM", (0, combi_1.seq)("TO SCREEN", expressions_1.Source))));
13467
13573
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
13468
13574
  }
13469
13575
  }
@@ -13770,15 +13876,17 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
13770
13876
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
13771
13877
  class ModifyEntities {
13772
13878
  getMatcher() {
13773
- const fieldsWith = (0, combi_1.seq)("FIELDS (", (0, combi_1.plus)(expressions_1.SimpleName), ") WITH", expressions_1.Source);
13774
- const operation = (0, combi_1.alt)((0, combi_1.seq)("UPDATE SET FIELDS WITH", expressions_1.Source), (0, combi_1.seq)("CREATE SET FIELDS WITH", expressions_1.Source), (0, combi_1.seq)("UPDATE", fieldsWith), (0, combi_1.seq)("DELETE FROM", expressions_1.Source), (0, combi_1.seq)("EXECUTE", expressions_1.SimpleName, "FROM", expressions_1.Source), (0, combi_1.seq)("CREATE", (0, combi_1.optPrio)("AUTO FILL CID"), fieldsWith));
13879
+ const withh = (0, combi_1.seq)("WITH", expressions_1.Source);
13880
+ const fieldsWith = (0, combi_1.seq)("FIELDS (", (0, combi_1.plus)(expressions_1.SimpleName), ")", withh);
13881
+ const by = (0, combi_1.seq)("BY", expressions_1.AssociationName);
13882
+ const operation = (0, combi_1.alt)((0, combi_1.seq)("UPDATE SET FIELDS WITH", expressions_1.Source), (0, combi_1.seq)("CREATE SET FIELDS WITH", expressions_1.Source), (0, combi_1.seq)("UPDATE", fieldsWith), (0, combi_1.seq)("DELETE FROM", expressions_1.Source), (0, combi_1.seq)("CREATE", (0, combi_1.opt)(by), "FROM", expressions_1.Source), (0, combi_1.seq)("EXECUTE", expressions_1.SimpleName, "FROM", expressions_1.Source), (0, combi_1.seq)("CREATE", (0, combi_1.opt)(by), (0, combi_1.optPrio)("AUTO FILL CID"), (0, combi_1.altPrio)(withh, fieldsWith)));
13775
13883
  const failed = (0, combi_1.seq)("FAILED", expressions_1.Target);
13776
13884
  const result = (0, combi_1.seq)("RESULT", expressions_1.Target);
13777
13885
  const mapped = (0, combi_1.seq)("MAPPED", expressions_1.Target);
13778
13886
  const reported = (0, combi_1.seq)("REPORTED", expressions_1.Target);
13779
13887
  const from = (0, combi_1.seq)("FROM", expressions_1.Source);
13780
13888
  const execute = (0, combi_1.seq)("EXECUTE", expressions_1.NamespaceSimpleName);
13781
- const entities = (0, combi_1.seq)("ENTITIES OF", expressions_1.NamespaceSimpleName, (0, combi_1.opt)("IN LOCAL MODE"), (0, combi_1.plusPrio)((0, combi_1.seq)("ENTITY", expressions_1.SimpleName, operation)), (0, combi_1.optPrio)((0, combi_1.per)(failed, result, mapped, reported)));
13889
+ const entities = (0, combi_1.seq)("ENTITIES OF", expressions_1.NamespaceSimpleName, (0, combi_1.opt)("IN LOCAL MODE"), (0, combi_1.plusPrio)((0, combi_1.seq)("ENTITY", expressions_1.SimpleName, (0, combi_1.plus)(operation))), (0, combi_1.optPrio)((0, combi_1.per)(failed, result, mapped, reported)));
13782
13890
  const entity = (0, combi_1.seq)("ENTITY", expressions_1.NamespaceSimpleName, execute, from, mapped, failed, reported);
13783
13891
  return (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("MODIFY", (0, combi_1.alt)(entities, entity)));
13784
13892
  }
@@ -13846,8 +13954,9 @@ class ModifyLine {
13846
13954
  const index = (0, combi_1.seq)("INDEX", expressions_1.Source);
13847
13955
  const page = (0, combi_1.seq)("OF PAGE", expressions_1.Source);
13848
13956
  const ocp = (0, combi_1.str)("OF CURRENT PAGE");
13849
- const lineFormat = (0, combi_1.seq)("LINE FORMAT", (0, combi_1.per)("INPUT OFF", "INVERSE", "RESET", "INTENSIFIED", expressions_1.Color));
13850
13957
  const intensified = (0, combi_1.seq)("INTENSIFIED", onOff);
13958
+ const intensifiedOpt = (0, combi_1.seq)("INTENSIFIED", (0, combi_1.opt)(onOff));
13959
+ const lineFormat = (0, combi_1.seq)("LINE FORMAT", (0, combi_1.per)("INPUT OFF", "INVERSE", "RESET", intensifiedOpt, expressions_1.Color));
13851
13960
  const options = (0, combi_1.per)(index, value, format, page, lineFormat, lineValue, ocp, intensified, expressions_1.Color);
13852
13961
  const ret = (0, combi_1.seq)("MODIFY", (0, combi_1.altPrio)("CURRENT LINE", (0, combi_1.seq)("LINE", expressions_1.Source)), (0, combi_1.opt)(options));
13853
13962
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
@@ -13897,7 +14006,7 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
13897
14006
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
13898
14007
  class Module {
13899
14008
  getMatcher() {
13900
- const ret = (0, combi_1.seq)("MODULE", expressions_1.FormName, (0, combi_1.opt)((0, combi_1.alt)("INPUT", "OUTPUT")));
14009
+ const ret = (0, combi_1.seq)("MODULE", expressions_1.FormName, (0, combi_1.opt)((0, combi_1.alt)("INPUT", "OUTPUT", "ON CHAIN-REQUEST")));
13901
14010
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
13902
14011
  }
13903
14012
  }
@@ -14360,6 +14469,72 @@ exports.Private = Private;
14360
14469
 
14361
14470
  /***/ }),
14362
14471
 
14472
+ /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/process_after_input.js":
14473
+ /*!***************************************************************************************************!*\
14474
+ !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/statements/process_after_input.js ***!
14475
+ \***************************************************************************************************/
14476
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
14477
+
14478
+ "use strict";
14479
+
14480
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
14481
+ exports.ProcessAfterInput = void 0;
14482
+ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
14483
+ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
14484
+ class ProcessAfterInput {
14485
+ getMatcher() {
14486
+ return (0, combi_1.verNot)(version_1.Version.Cloud, "PROCESS AFTER INPUT");
14487
+ }
14488
+ }
14489
+ exports.ProcessAfterInput = ProcessAfterInput;
14490
+ //# sourceMappingURL=process_after_input.js.map
14491
+
14492
+ /***/ }),
14493
+
14494
+ /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/process_before_output.js":
14495
+ /*!*****************************************************************************************************!*\
14496
+ !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/statements/process_before_output.js ***!
14497
+ \*****************************************************************************************************/
14498
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
14499
+
14500
+ "use strict";
14501
+
14502
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
14503
+ exports.ProcessBeforeOutput = void 0;
14504
+ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
14505
+ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
14506
+ class ProcessBeforeOutput {
14507
+ getMatcher() {
14508
+ return (0, combi_1.verNot)(version_1.Version.Cloud, "PROCESS BEFORE OUTPUT");
14509
+ }
14510
+ }
14511
+ exports.ProcessBeforeOutput = ProcessBeforeOutput;
14512
+ //# sourceMappingURL=process_before_output.js.map
14513
+
14514
+ /***/ }),
14515
+
14516
+ /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/process_on_value_request.js":
14517
+ /*!********************************************************************************************************!*\
14518
+ !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/statements/process_on_value_request.js ***!
14519
+ \********************************************************************************************************/
14520
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
14521
+
14522
+ "use strict";
14523
+
14524
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
14525
+ exports.ProcessOnValueRequest = void 0;
14526
+ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
14527
+ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
14528
+ class ProcessOnValueRequest {
14529
+ getMatcher() {
14530
+ return (0, combi_1.verNot)(version_1.Version.Cloud, "PROCESS ON VALUE-REQUEST");
14531
+ }
14532
+ }
14533
+ exports.ProcessOnValueRequest = ProcessOnValueRequest;
14534
+ //# sourceMappingURL=process_on_value_request.js.map
14535
+
14536
+ /***/ }),
14537
+
14363
14538
  /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/program.js":
14364
14539
  /*!***************************************************************************************!*\
14365
14540
  !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/statements/program.js ***!
@@ -14628,7 +14803,8 @@ class ReadEntities {
14628
14803
  const from = (0, combi_1.seq)("FROM", expressions_1.Source);
14629
14804
  const fields = (0, combi_1.seq)("FIELDS", (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.plus)(expressions_1.SimpleName), (0, combi_1.tok)(tokens_1.WParenRightW), "WITH", expressions_1.Source);
14630
14805
  const all = (0, combi_1.seq)("ALL FIELDS WITH", expressions_1.Source);
14631
- const s = (0, combi_1.seq)("READ ENTITIES OF", expressions_1.NamespaceSimpleName, (0, combi_1.opt)("IN LOCAL MODE"), "ENTITY", expressions_1.SimpleName, (0, combi_1.opt)((0, combi_1.seq)("BY", expressions_1.AssociationName)), (0, combi_1.alt)(fields, from, all), (0, combi_1.optPrio)((0, combi_1.seq)("RESULT", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("LINK", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("FAILED", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("REPORTED", expressions_1.Target)));
14806
+ const entity = (0, combi_1.seq)("ENTITY", expressions_1.SimpleName, (0, combi_1.opt)((0, combi_1.seq)("BY", expressions_1.AssociationName)), (0, combi_1.alt)(fields, from, all), (0, combi_1.optPrio)((0, combi_1.seq)("RESULT", expressions_1.Target)));
14807
+ const s = (0, combi_1.seq)("READ ENTITIES OF", expressions_1.NamespaceSimpleName, (0, combi_1.opt)("IN LOCAL MODE"), (0, combi_1.plus)(entity), (0, combi_1.optPrio)((0, combi_1.seq)("LINK", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("FAILED", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("REPORTED", expressions_1.Target)));
14632
14808
  return (0, combi_1.ver)(version_1.Version.v754, s);
14633
14809
  }
14634
14810
  }
@@ -15114,7 +15290,7 @@ class ScrollList {
15114
15290
  const line = (0, combi_1.seq)("LINE", expressions_1.Source);
15115
15291
  const column = (0, combi_1.seq)("TO COLUMN", expressions_1.Source);
15116
15292
  const to = (0, combi_1.seq)("TO", (0, combi_1.alt)("FIRST PAGE", "LAST PAGE", (0, combi_1.seq)("PAGE", expressions_1.Source)));
15117
- const ret = (0, combi_1.seq)("SCROLL LIST", (0, combi_1.per)(index, (0, combi_1.alt)(to, "BACKWARD", "FORWARD"), (0, combi_1.alt)("LEFT", "RIGHT"), column, line));
15293
+ const ret = (0, combi_1.seq)("SCROLL LIST", (0, combi_1.per)(index, (0, combi_1.alt)(to, "BACKWARD", "FORWARD"), (0, combi_1.seq)((0, combi_1.alt)("LEFT", "RIGHT"), (0, combi_1.opt)((0, combi_1.seq)("BY", expressions_1.Source, "PLACES"))), column, line));
15118
15294
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
15119
15295
  }
15120
15296
  }
@@ -16274,7 +16450,7 @@ class SystemCall {
16274
16450
  getMatcher() {
16275
16451
  const anyy = (0, combi_1.regex)(/^.+$/);
16276
16452
  const objmgr = (0, combi_1.seq)("OBJMGR CLONE", source_1.Source, "TO", target_1.Target);
16277
- const did = (0, combi_1.seq)(anyy, "DID", source_1.Source, "PARAMETERS", source_1.Source, source_1.Source, source_1.Source);
16453
+ const did = (0, combi_1.seq)(anyy, "DID", source_1.Source, "PARAMETERS", (0, combi_1.plus)(source_1.Source));
16278
16454
  const ret = (0, combi_1.seq)("SYSTEM-CALL", (0, combi_1.altPrio)(objmgr, did, (0, combi_1.plus)(anyy)));
16279
16455
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
16280
16456
  }
@@ -16956,7 +17132,7 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
16956
17132
  class While {
16957
17133
  getMatcher() {
16958
17134
  const vary = (0, combi_1.seq)("VARY", expressions_1.Target, "FROM", expressions_1.Source, "NEXT", expressions_1.Source);
16959
- return (0, combi_1.seq)("WHILE", expressions_1.Cond, (0, combi_1.opt)(vary));
17135
+ return (0, combi_1.seq)("WHILE", expressions_1.Cond, (0, combi_1.star)(vary));
16960
17136
  }
16961
17137
  }
16962
17138
  exports.While = While;
@@ -17107,6 +17283,9 @@ class StructureParser {
17107
17283
  else if (filename.endsWith(".intf.abap")) {
17108
17284
  return new Structures.InterfaceGlobal();
17109
17285
  }
17286
+ else if (filename.match(/\.screen\_\d+\.abap$/i)) {
17287
+ return new Structures.DynproLogic();
17288
+ }
17110
17289
  else {
17111
17290
  // todo, add a special structure for TYPE-POOLS
17112
17291
  return new Structures.Any();
@@ -17696,6 +17875,28 @@ exports.CatchSystemExceptions = CatchSystemExceptions;
17696
17875
 
17697
17876
  /***/ }),
17698
17877
 
17878
+ /***/ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/chain.js":
17879
+ /*!*************************************************************************************!*\
17880
+ !*** ./node_modules/@abaplint/core/build/src/abap/3_structures/structures/chain.js ***!
17881
+ \*************************************************************************************/
17882
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
17883
+
17884
+ "use strict";
17885
+
17886
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
17887
+ exports.Chain = void 0;
17888
+ const Statements = __webpack_require__(/*! ../../2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
17889
+ const _combi_1 = __webpack_require__(/*! ./_combi */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/_combi.js");
17890
+ class Chain {
17891
+ getMatcher() {
17892
+ return (0, _combi_1.beginEnd)((0, _combi_1.sta)(Statements.Chain), (0, _combi_1.star)((0, _combi_1.alt)((0, _combi_1.sta)(Statements.Field), (0, _combi_1.sta)(Statements.Module))), (0, _combi_1.sta)(Statements.EndChain));
17893
+ }
17894
+ }
17895
+ exports.Chain = Chain;
17896
+ //# sourceMappingURL=chain.js.map
17897
+
17898
+ /***/ }),
17899
+
17699
17900
  /***/ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/class_data.js":
17700
17901
  /*!******************************************************************************************!*\
17701
17902
  !*** ./node_modules/@abaplint/core/build/src/abap/3_structures/structures/class_data.js ***!
@@ -17910,6 +18111,32 @@ exports.Do = Do;
17910
18111
 
17911
18112
  /***/ }),
17912
18113
 
18114
+ /***/ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/dynpro_logic.js":
18115
+ /*!********************************************************************************************!*\
18116
+ !*** ./node_modules/@abaplint/core/build/src/abap/3_structures/structures/dynpro_logic.js ***!
18117
+ \********************************************************************************************/
18118
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
18119
+
18120
+ "use strict";
18121
+
18122
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
18123
+ exports.DynproLogic = void 0;
18124
+ const Statements = __webpack_require__(/*! ../../2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
18125
+ const _combi_1 = __webpack_require__(/*! ./_combi */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/_combi.js");
18126
+ const chain_1 = __webpack_require__(/*! ./chain */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/chain.js");
18127
+ class DynproLogic {
18128
+ getMatcher() {
18129
+ const pai = (0, _combi_1.star)((0, _combi_1.alt)((0, _combi_1.sta)(Statements.Module), (0, _combi_1.sta)(Statements.Field), (0, _combi_1.sta)(Statements.CallSubscreen), (0, _combi_1.sub)(chain_1.Chain)));
18130
+ const pbo = (0, _combi_1.star)((0, _combi_1.alt)((0, _combi_1.sta)(Statements.Module), (0, _combi_1.sta)(Statements.Field), (0, _combi_1.sta)(Statements.CallSubscreen)));
18131
+ const pov = (0, _combi_1.star)((0, _combi_1.sta)(Statements.Field));
18132
+ return (0, _combi_1.seq)((0, _combi_1.sta)(Statements.ProcessBeforeOutput), pbo, (0, _combi_1.sta)(Statements.ProcessAfterInput), pai, (0, _combi_1.opt)((0, _combi_1.seq)((0, _combi_1.sta)(Statements.ProcessOnValueRequest), pov)));
18133
+ }
18134
+ }
18135
+ exports.DynproLogic = DynproLogic;
18136
+ //# sourceMappingURL=dynpro_logic.js.map
18137
+
18138
+ /***/ }),
18139
+
17913
18140
  /***/ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/else.js":
17914
18141
  /*!************************************************************************************!*\
17915
18142
  !*** ./node_modules/@abaplint/core/build/src/abap/3_structures/structures/else.js ***!
@@ -18125,9 +18352,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
18125
18352
  };
18126
18353
  Object.defineProperty(exports, "__esModule", ({ value: true }));
18127
18354
  __exportStar(__webpack_require__(/*! ./any */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/any.js"), exports);
18128
- __exportStar(__webpack_require__(/*! ./at */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/at.js"), exports);
18129
18355
  __exportStar(__webpack_require__(/*! ./at_first */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/at_first.js"), exports);
18130
18356
  __exportStar(__webpack_require__(/*! ./at_last */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/at_last.js"), exports);
18357
+ __exportStar(__webpack_require__(/*! ./at */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/at.js"), exports);
18131
18358
  __exportStar(__webpack_require__(/*! ./body */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/body.js"), exports);
18132
18359
  __exportStar(__webpack_require__(/*! ./case_type */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/case_type.js"), exports);
18133
18360
  __exportStar(__webpack_require__(/*! ./case */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/case.js"), exports);
@@ -18136,13 +18363,14 @@ __exportStar(__webpack_require__(/*! ./catch */ "./node_modules/@abaplint/core/b
18136
18363
  __exportStar(__webpack_require__(/*! ./class_data */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/class_data.js"), exports);
18137
18364
  __exportStar(__webpack_require__(/*! ./class_definition */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/class_definition.js"), exports);
18138
18365
  __exportStar(__webpack_require__(/*! ./class_global */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/class_global.js"), exports);
18366
+ __exportStar(__webpack_require__(/*! ./chain */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/chain.js"), exports);
18139
18367
  __exportStar(__webpack_require__(/*! ./class_implementation */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/class_implementation.js"), exports);
18140
18368
  __exportStar(__webpack_require__(/*! ./cleanup */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/cleanup.js"), exports);
18141
18369
  __exportStar(__webpack_require__(/*! ./constants */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/constants.js"), exports);
18142
18370
  __exportStar(__webpack_require__(/*! ./data */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/data.js"), exports);
18143
18371
  __exportStar(__webpack_require__(/*! ./define */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/define.js"), exports);
18144
18372
  __exportStar(__webpack_require__(/*! ./do */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/do.js"), exports);
18145
- __exportStar(__webpack_require__(/*! ./type_mesh */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/type_mesh.js"), exports);
18373
+ __exportStar(__webpack_require__(/*! ./dynpro_logic */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/dynpro_logic.js"), exports);
18146
18374
  __exportStar(__webpack_require__(/*! ./else */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/else.js"), exports);
18147
18375
  __exportStar(__webpack_require__(/*! ./elseif */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/elseif.js"), exports);
18148
18376
  __exportStar(__webpack_require__(/*! ./enhancement_section */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/enhancement_section.js"), exports);
@@ -18170,6 +18398,7 @@ __exportStar(__webpack_require__(/*! ./test_injection */ "./node_modules/@abapli
18170
18398
  __exportStar(__webpack_require__(/*! ./test_seam */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/test_seam.js"), exports);
18171
18399
  __exportStar(__webpack_require__(/*! ./try */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/try.js"), exports);
18172
18400
  __exportStar(__webpack_require__(/*! ./type_enum */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/type_enum.js"), exports);
18401
+ __exportStar(__webpack_require__(/*! ./type_mesh */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/type_mesh.js"), exports);
18173
18402
  __exportStar(__webpack_require__(/*! ./types */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/types.js"), exports);
18174
18403
  __exportStar(__webpack_require__(/*! ./when_type */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/when_type.js"), exports);
18175
18404
  __exportStar(__webpack_require__(/*! ./when */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/when.js"), exports);
@@ -24757,6 +24986,7 @@ const component_compare_1 = __webpack_require__(/*! ./component_compare */ "./no
24757
24986
  const inline_data_1 = __webpack_require__(/*! ./inline_data */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/inline_data.js");
24758
24987
  const fstarget_1 = __webpack_require__(/*! ./fstarget */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/fstarget.js");
24759
24988
  const target_1 = __webpack_require__(/*! ./target */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js");
24989
+ const source_1 = __webpack_require__(/*! ./source */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js");
24760
24990
  class LoopGroupBy {
24761
24991
  runSyntax(node, input) {
24762
24992
  for (const t of node.findAllExpressions(Expressions.Target)) {
@@ -24771,6 +25001,9 @@ class LoopGroupBy {
24771
25001
  for (const t of node.findAllExpressions(Expressions.FSTarget)) {
24772
25002
  new fstarget_1.FSTarget().runSyntax(t, input, new basic_1.VoidType("todoGroupBy"));
24773
25003
  }
25004
+ for (const t of node.findDirectExpressions(Expressions.Source)) {
25005
+ new source_1.Source().runSyntax(t, input, new basic_1.VoidType("todoGroupBy"));
25006
+ }
24774
25007
  for (const c of node.findDirectExpressions(Expressions.LoopGroupByComponent)) {
24775
25008
  for (const t of c.findDirectExpressions(Expressions.ComponentCompareSingle)) {
24776
25009
  new component_compare_1.ComponentCompare().runSyntax(t, input);
@@ -26380,7 +26613,12 @@ class Source {
26380
26613
  return foundType;
26381
26614
  }
26382
26615
  case "EXACT":
26383
- return this.determineType(node, input, targetType);
26616
+ {
26617
+ const foundType = this.determineType(node, input, targetType);
26618
+ new Source().runSyntax(node.findDirectExpression(Expressions.Source), input, foundType);
26619
+ this.addIfInferred(node, input, foundType);
26620
+ return foundType;
26621
+ }
26384
26622
  case "VALUE":
26385
26623
  {
26386
26624
  const foundType = this.determineType(node, input, targetType);
@@ -29443,6 +29681,30 @@ exports.DeleteInternal = DeleteInternal;
29443
29681
 
29444
29682
  /***/ }),
29445
29683
 
29684
+ /***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/delete_memory.js":
29685
+ /*!*****************************************************************************************!*\
29686
+ !*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/delete_memory.js ***!
29687
+ \*****************************************************************************************/
29688
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
29689
+
29690
+ "use strict";
29691
+
29692
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
29693
+ exports.DeleteMemory = void 0;
29694
+ const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
29695
+ const source_1 = __webpack_require__(/*! ../expressions/source */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js");
29696
+ class DeleteMemory {
29697
+ runSyntax(node, input) {
29698
+ for (const s of node.findDirectExpressions(Expressions.Source)) {
29699
+ new source_1.Source().runSyntax(s, input);
29700
+ }
29701
+ }
29702
+ }
29703
+ exports.DeleteMemory = DeleteMemory;
29704
+ //# sourceMappingURL=delete_memory.js.map
29705
+
29706
+ /***/ }),
29707
+
29446
29708
  /***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/delete_report.js":
29447
29709
  /*!*****************************************************************************************!*\
29448
29710
  !*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/delete_report.js ***!
@@ -33559,6 +33821,7 @@ const statics_1 = __webpack_require__(/*! ./structures/statics */ "./node_module
33559
33821
  const constants_1 = __webpack_require__(/*! ./structures/constants */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/constants.js");
33560
33822
  const class_definition_1 = __webpack_require__(/*! ../types/class_definition */ "./node_modules/@abaplint/core/build/src/abap/types/class_definition.js");
33561
33823
  const interface_definition_1 = __webpack_require__(/*! ../types/interface_definition */ "./node_modules/@abaplint/core/build/src/abap/types/interface_definition.js");
33824
+ const delete_memory_1 = __webpack_require__(/*! ./statements/delete_memory */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/delete_memory.js");
33562
33825
  const perform_1 = __webpack_require__(/*! ./statements/perform */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/perform.js");
33563
33826
  const type_1 = __webpack_require__(/*! ./statements/type */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/type.js");
33564
33827
  const constant_1 = __webpack_require__(/*! ./statements/constant */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/constant.js");
@@ -33813,6 +34076,7 @@ if (Object.keys(map).length === 0) {
33813
34076
  addToMap(new modify_internal_1.ModifyInternal());
33814
34077
  addToMap(new read_textpool_1.ReadTextpool());
33815
34078
  addToMap(new editor_call_1.EditorCall());
34079
+ addToMap(new delete_memory_1.DeleteMemory());
33816
34080
  }
33817
34081
  // -----------------------------------
33818
34082
  class SyntaxLogic {
@@ -34325,13 +34589,13 @@ class FlowGraph {
34325
34589
  this.label = label;
34326
34590
  }
34327
34591
  toDigraph() {
34328
- return `digraph G {
34329
- labelloc="t";
34330
- label="${this.label}";
34331
- graph [fontname = "helvetica"];
34332
- node [fontname = "helvetica", shape="box"];
34333
- edge [fontname = "helvetica"];
34334
- ${this.toTextEdges()}
34592
+ return `digraph G {
34593
+ labelloc="t";
34594
+ label="${this.label}";
34595
+ graph [fontname = "helvetica"];
34596
+ node [fontname = "helvetica", shape="box"];
34597
+ edge [fontname = "helvetica"];
34598
+ ${this.toTextEdges()}
34335
34599
  }`;
34336
34600
  }
34337
34601
  listSources(node) {
@@ -34665,6 +34929,7 @@ class StatementFlow {
34665
34929
  || type instanceof Structures.With
34666
34930
  || type instanceof Structures.Provide
34667
34931
  || type instanceof Structures.Select
34932
+ || type instanceof Structures.EnhancementSection
34668
34933
  || type instanceof Structures.LoopAtScreen
34669
34934
  || type instanceof Structures.Do) {
34670
34935
  const loopName = StatementFlow.buildName(n.getFirstStatement());
@@ -39418,8 +39683,8 @@ class CDSCase extends combi_1.Expression {
39418
39683
  getRunnable() {
39419
39684
  const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.optPrio)((0, combi_1.seq)(".", _1.CDSName)));
39420
39685
  const value = (0, combi_1.alt)(name, _1.CDSString, _1.CDSFunction, CDSCase, _1.CDSCast, _1.CDSArithmetics);
39421
- const simple = (0, combi_1.seq)("CASE", (0, combi_1.alt)(name, _1.CDSFunction), (0, combi_1.plus)((0, combi_1.seq)("WHEN", value, "THEN", value)), "ELSE", value, "END");
39422
- const complex = (0, combi_1.seq)("CASE", (0, combi_1.plus)((0, combi_1.seq)("WHEN", _1.CDSCondition, "THEN", value)), (0, combi_1.opt)((0, combi_1.seq)("ELSE", value)), "END");
39686
+ const simple = (0, combi_1.seq)("CASE", (0, combi_1.alt)(name, _1.CDSFunction), (0, combi_1.plusPrio)((0, combi_1.seq)("WHEN", value, "THEN", value)), "ELSE", value, "END");
39687
+ const complex = (0, combi_1.seq)("CASE", (0, combi_1.plusPrio)((0, combi_1.seq)("WHEN", _1.CDSCondition, "THEN", value)), (0, combi_1.opt)((0, combi_1.seq)("ELSE", value)), "END");
39423
39688
  return (0, combi_1.altPrio)(simple, complex);
39424
39689
  }
39425
39690
  }
@@ -40643,6 +40908,7 @@ class DDIC {
40643
40908
  case "DEC": // 1 <= len <= 31
40644
40909
  case "D16F": // 1 <= len <= 31
40645
40910
  case "D16D":
40911
+ case "D34D":
40646
40912
  case "D34F": // 1 <= len <= 31
40647
40913
  case "DF16_DEC": // 1 <= len <= 31
40648
40914
  case "DF34_DEC": // 1 <= len <= 31
@@ -40665,6 +40931,7 @@ class DDIC {
40665
40931
  return new Types.CharacterType(5, extra);
40666
40932
  case "UNIT": // 2 <= len <= 3
40667
40933
  return new Types.CharacterType(3, extra);
40934
+ case "UTCL":
40668
40935
  case "UTCLONG":
40669
40936
  return new Types.CharacterType(27, extra);
40670
40937
  case "NUMC": // 1 <= len <= 255
@@ -40724,7 +40991,7 @@ class DDIC {
40724
40991
  case "VARC":
40725
40992
  return new Types.UnknownType(input.text + " is an obsolete data type", input.infoText);
40726
40993
  default:
40727
- return new Types.UnknownType(input.text + " unknown", input.infoText);
40994
+ return new Types.UnknownType(input.text + " unknown basic ddic type", input.infoText);
40728
40995
  }
40729
40996
  }
40730
40997
  }
@@ -42751,13 +43018,13 @@ class Help {
42751
43018
  /////////////////////////////////////////////////
42752
43019
  static dumpABAP(file, reg, textDocument, position) {
42753
43020
  let content = "";
42754
- content = `
42755
- <a href="#_tokens" rel="no-refresh">Tokens</a> |
42756
- <a href="#_statements" rel="no-refresh">Statements</a> |
42757
- <a href="#_structure" rel="no-refresh">Structure</a> |
42758
- <a href="#_files" rel="no-refresh">Files</a> |
42759
- <a href="#_info" rel="no-refresh">Info Dump</a>
42760
- <hr>
43021
+ content = `
43022
+ <a href="#_tokens" rel="no-refresh">Tokens</a> |
43023
+ <a href="#_statements" rel="no-refresh">Statements</a> |
43024
+ <a href="#_structure" rel="no-refresh">Structure</a> |
43025
+ <a href="#_files" rel="no-refresh">Files</a> |
43026
+ <a href="#_info" rel="no-refresh">Info Dump</a>
43027
+ <hr>
42761
43028
  ` +
42762
43029
  "<tt>" + textDocument.uri + " (" +
42763
43030
  (position.line + 1) + ", " +
@@ -42912,9 +43179,9 @@ class Help {
42912
43179
  return ret + "</ul>";
42913
43180
  }
42914
43181
  static tokens(file) {
42915
- let inner = `<table><tr><td><b>String</b></td><td><b>Type</b></td>
42916
- <td><b>Row</b></td><td><b>Column</b></td>
42917
- <td><b>vRow</b></td><td><b>vColumn</b></td>
43182
+ let inner = `<table><tr><td><b>String</b></td><td><b>Type</b></td>
43183
+ <td><b>Row</b></td><td><b>Column</b></td>
43184
+ <td><b>vRow</b></td><td><b>vColumn</b></td>
42918
43185
  </tr>`;
42919
43186
  for (const token of file.getTokens()) {
42920
43187
  const tStart = token.getStart();
@@ -45291,6 +45558,37 @@ exports.CDSMetadataExtension = CDSMetadataExtension;
45291
45558
 
45292
45559
  /***/ }),
45293
45560
 
45561
+ /***/ "./node_modules/@abaplint/core/build/src/objects/cds_type.js":
45562
+ /*!*******************************************************************!*\
45563
+ !*** ./node_modules/@abaplint/core/build/src/objects/cds_type.js ***!
45564
+ \*******************************************************************/
45565
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
45566
+
45567
+ "use strict";
45568
+
45569
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
45570
+ exports.CDSType = void 0;
45571
+ const _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ "./node_modules/@abaplint/core/build/src/objects/_abstract_object.js");
45572
+ class CDSType extends _abstract_object_1.AbstractObject {
45573
+ getType() {
45574
+ return "DRTY";
45575
+ }
45576
+ getAllowedNaming() {
45577
+ return {
45578
+ maxLength: 30,
45579
+ allowNamespace: true,
45580
+ };
45581
+ }
45582
+ getDescription() {
45583
+ // todo
45584
+ return undefined;
45585
+ }
45586
+ }
45587
+ exports.CDSType = CDSType;
45588
+ //# sourceMappingURL=cds_type.js.map
45589
+
45590
+ /***/ }),
45591
+
45294
45592
  /***/ "./node_modules/@abaplint/core/build/src/objects/change_document.js":
45295
45593
  /*!**************************************************************************!*\
45296
45594
  !*** ./node_modules/@abaplint/core/build/src/objects/change_document.js ***!
@@ -47642,6 +47940,7 @@ __exportStar(__webpack_require__(/*! ./business_function_set_assignment */ "./no
47642
47940
  __exportStar(__webpack_require__(/*! ./business_object_model */ "./node_modules/@abaplint/core/build/src/objects/business_object_model.js"), exports);
47643
47941
  __exportStar(__webpack_require__(/*! ./business_object_type */ "./node_modules/@abaplint/core/build/src/objects/business_object_type.js"), exports);
47644
47942
  __exportStar(__webpack_require__(/*! ./cds_metadata_extension */ "./node_modules/@abaplint/core/build/src/objects/cds_metadata_extension.js"), exports);
47943
+ __exportStar(__webpack_require__(/*! ./cds_type */ "./node_modules/@abaplint/core/build/src/objects/cds_type.js"), exports);
47645
47944
  __exportStar(__webpack_require__(/*! ./change_document */ "./node_modules/@abaplint/core/build/src/objects/change_document.js"), exports);
47646
47945
  __exportStar(__webpack_require__(/*! ./chapter_of_book_structure */ "./node_modules/@abaplint/core/build/src/objects/chapter_of_book_structure.js"), exports);
47647
47946
  __exportStar(__webpack_require__(/*! ./checkpoint_group */ "./node_modules/@abaplint/core/build/src/objects/checkpoint_group.js"), exports);
@@ -49305,6 +49604,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
49305
49604
  exports.Program = void 0;
49306
49605
  const _abap_object_1 = __webpack_require__(/*! ./_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
49307
49606
  const _dynpros_1 = __webpack_require__(/*! ./_dynpros */ "./node_modules/@abaplint/core/build/src/objects/_dynpros.js");
49607
+ const xml_utils_1 = __webpack_require__(/*! ../xml_utils */ "./node_modules/@abaplint/core/build/src/xml_utils.js");
49308
49608
  class Program extends _abap_object_1.ABAPObject {
49309
49609
  getType() {
49310
49610
  return "PROG";
@@ -49317,8 +49617,9 @@ class Program extends _abap_object_1.ABAPObject {
49317
49617
  return [main];
49318
49618
  }
49319
49619
  getDescription() {
49320
- // todo
49321
- return undefined;
49620
+ var _a;
49621
+ this.parseXML();
49622
+ return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.description;
49322
49623
  }
49323
49624
  getAllowedNaming() {
49324
49625
  return {
@@ -49344,6 +49645,7 @@ class Program extends _abap_object_1.ABAPObject {
49344
49645
  }
49345
49646
  ////////////////////////////
49346
49647
  parseXML() {
49648
+ var _a, _b, _c;
49347
49649
  if (this.parsedXML !== undefined) {
49348
49650
  return;
49349
49651
  }
@@ -49353,15 +49655,23 @@ class Program extends _abap_object_1.ABAPObject {
49353
49655
  this.parsedXML = {
49354
49656
  isInclude: false,
49355
49657
  isModulePool: false,
49658
+ description: undefined,
49356
49659
  dynpros: [],
49357
49660
  };
49358
49661
  return;
49359
49662
  }
49663
+ let description = "";
49664
+ for (const t of (0, xml_utils_1.xmlToArray)((_c = (_b = (_a = parsed.abapGit) === null || _a === void 0 ? void 0 : _a["asx:abap"]["asx:values"]) === null || _b === void 0 ? void 0 : _b.TPOOL) === null || _c === void 0 ? void 0 : _c.item)) {
49665
+ if ((t === null || t === void 0 ? void 0 : t.ID) === "R") {
49666
+ description = t.ENTRY ? (0, xml_utils_1.unescape)(t.ENTRY) : "";
49667
+ }
49668
+ }
49360
49669
  const dynpros = (0, _dynpros_1.parseDynpros)(parsed);
49361
49670
  this.parsedXML = {
49362
49671
  isInclude: file ? file.getRaw().includes("<SUBC>I</SUBC>") : false,
49363
49672
  isModulePool: file ? file.getRaw().includes("<SUBC>M</SUBC>") : false,
49364
49673
  dynpros: dynpros,
49674
+ description: description,
49365
49675
  };
49366
49676
  }
49367
49677
  }
@@ -51152,6 +51462,11 @@ class Transaction extends _abstract_object_1.AbstractObject {
51152
51462
  allowNamespace: true,
51153
51463
  };
51154
51464
  }
51465
+ getCInfo() {
51466
+ var _a;
51467
+ this.parse();
51468
+ return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.cinfo;
51469
+ }
51155
51470
  getProgramName() {
51156
51471
  var _a;
51157
51472
  this.parse();
@@ -51163,7 +51478,7 @@ class Transaction extends _abstract_object_1.AbstractObject {
51163
51478
  return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.description;
51164
51479
  }
51165
51480
  parse() {
51166
- var _a, _b;
51481
+ var _a, _b, _c;
51167
51482
  if (this.parsedXML) {
51168
51483
  return { updated: false, runtime: 0 };
51169
51484
  }
@@ -51177,6 +51492,7 @@ class Transaction extends _abstract_object_1.AbstractObject {
51177
51492
  }
51178
51493
  this.parsedXML.description = (_a = parsed.abapGit["asx:abap"]["asx:values"].TSTCT) === null || _a === void 0 ? void 0 : _a.TTEXT;
51179
51494
  this.parsedXML.programName = (_b = parsed.abapGit["asx:abap"]["asx:values"].TSTC) === null || _b === void 0 ? void 0 : _b.PGMNA;
51495
+ this.parsedXML.cinfo = (_c = parsed.abapGit["asx:abap"]["asx:values"].TSTC) === null || _c === void 0 ? void 0 : _c.CINFO;
51180
51496
  const end = Date.now();
51181
51497
  return { updated: true, runtime: end - start };
51182
51498
  }
@@ -51821,6 +52137,7 @@ const Statements = __webpack_require__(/*! ../abap/2_statements/statements */ ".
51821
52137
  const Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
51822
52138
  const _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js");
51823
52139
  const virtual_position_1 = __webpack_require__(/*! ../virtual_position */ "./node_modules/@abaplint/core/build/src/virtual_position.js");
52140
+ const structures_1 = __webpack_require__(/*! ../abap/3_structures/structures */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js");
51824
52141
  // todo, will break if there is multiple statements per line?
51825
52142
  class Indent {
51826
52143
  constructor(options) {
@@ -51849,11 +52166,13 @@ class Indent {
51849
52166
  }
51850
52167
  // returns list of expected indentation for each line/statement?
51851
52168
  getExpectedIndents(file) {
52169
+ var _a;
51852
52170
  const ret = [];
51853
52171
  const init = 1;
51854
52172
  const stack = new Stack();
51855
52173
  let indent = init;
51856
52174
  let parentIsEvent = false;
52175
+ const isDynpro = ((_a = file.getStructure()) === null || _a === void 0 ? void 0 : _a.get()) instanceof structures_1.DynproLogic;
51857
52176
  let previousStatement = undefined;
51858
52177
  for (const statement of file.getStatements()) {
51859
52178
  if (statement.getFirstToken().getStart() instanceof virtual_position_1.VirtualPosition) {
@@ -51891,6 +52210,9 @@ class Indent {
51891
52210
  || type instanceof Statements.AtPF
51892
52211
  || type instanceof Statements.Initialization
51893
52212
  || type instanceof Statements.AtUserCommand
52213
+ || type instanceof Statements.ProcessAfterInput
52214
+ || type instanceof Statements.ProcessBeforeOutput
52215
+ || type instanceof Statements.ProcessOnValueRequest
51894
52216
  || type instanceof Statements.TopOfPage
51895
52217
  || type instanceof Statements.Get
51896
52218
  || type instanceof Statements.EndOfSelection
@@ -51900,7 +52222,7 @@ class Indent {
51900
52222
  }
51901
52223
  else if (type instanceof Statements.Form
51902
52224
  || (type instanceof Statements.Include && parentIsEvent)
51903
- || type instanceof Statements.Module
52225
+ || (type instanceof Statements.Module && isDynpro === false)
51904
52226
  || type instanceof Statements.ClassImplementation
51905
52227
  || type instanceof Statements.ClassDefinition) {
51906
52228
  indent = init;
@@ -51945,7 +52267,7 @@ class Indent {
51945
52267
  ret.push(indent);
51946
52268
  if (type instanceof Statements.If
51947
52269
  || type instanceof Statements.While
51948
- || type instanceof Statements.Module
52270
+ || (type instanceof Statements.Module && isDynpro === false)
51949
52271
  || type instanceof Statements.SelectLoop
51950
52272
  || type instanceof Statements.FunctionModule
51951
52273
  || type instanceof Statements.Interface
@@ -51955,6 +52277,9 @@ class Indent {
51955
52277
  || type instanceof Statements.AtLast
51956
52278
  || type instanceof Statements.ExecSQL
51957
52279
  || type instanceof Statements.Catch
52280
+ || type instanceof Statements.ProcessAfterInput
52281
+ || type instanceof Statements.ProcessBeforeOutput
52282
+ || type instanceof Statements.ProcessOnValueRequest
51958
52283
  || type instanceof Statements.Define
51959
52284
  || type instanceof Statements.When
51960
52285
  || type instanceof Statements.WhenType
@@ -52172,7 +52497,7 @@ class Registry {
52172
52497
  }
52173
52498
  static abaplintVersion() {
52174
52499
  // magic, see build script "version.sh"
52175
- return "2.113.70";
52500
+ return "2.113.82";
52176
52501
  }
52177
52502
  getDDICReferences() {
52178
52503
  return this.ddicReferences;
@@ -52491,10 +52816,10 @@ class SevenBitAscii {
52491
52816
  key: "7bit_ascii",
52492
52817
  title: "Check for 7bit ascii",
52493
52818
  shortDescription: `Only allow characters from the 7bit ASCII set.`,
52494
- extendedInformation: `https://docs.abapopenchecks.org/checks/05/
52495
-
52496
- https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
52497
-
52819
+ extendedInformation: `https://docs.abapopenchecks.org/checks/05/
52820
+
52821
+ https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
52822
+
52498
52823
  Checkes files with extensions ".abap" and ".asddls"`,
52499
52824
  tags: [_irule_1.RuleTag.SingleFile],
52500
52825
  badExample: `WRITE '뽑'.`,
@@ -52700,10 +53025,10 @@ class Abapdoc extends _abap_rule_1.ABAPRule {
52700
53025
  key: "abapdoc",
52701
53026
  title: "Check abapdoc",
52702
53027
  shortDescription: `Various checks regarding abapdoc.`,
52703
- extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
52704
-
52705
- Plus class and interface definitions.
52706
-
53028
+ extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
53029
+
53030
+ Plus class and interface definitions.
53031
+
52707
53032
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#abap-doc-only-for-public-apis`,
52708
53033
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
52709
53034
  };
@@ -52840,27 +53165,27 @@ class AddTestAttributes extends _abap_rule_1.ABAPRule {
52840
53165
  title: "Add test attributes for tests classes with test methods",
52841
53166
  shortDescription: `Add test attributes DURATION and RISK LEVEL for tests classes with test methods`,
52842
53167
  tags: [_irule_1.RuleTag.SingleFile],
52843
- badExample: `CLASS ltcl_test1 DEFINITION FINAL FOR TESTING.
52844
- PUBLIC SECTION.
52845
- PROTECTED SECTION.
52846
- PRIVATE SECTION.
52847
- METHODS test FOR TESTING RAISING cx_static_check.
52848
- ENDCLASS.
52849
-
52850
- CLASS ltcl_test1 IMPLEMENTATION.
52851
- METHOD test.
52852
- ENDMETHOD.
53168
+ badExample: `CLASS ltcl_test1 DEFINITION FINAL FOR TESTING.
53169
+ PUBLIC SECTION.
53170
+ PROTECTED SECTION.
53171
+ PRIVATE SECTION.
53172
+ METHODS test FOR TESTING RAISING cx_static_check.
53173
+ ENDCLASS.
53174
+
53175
+ CLASS ltcl_test1 IMPLEMENTATION.
53176
+ METHOD test.
53177
+ ENDMETHOD.
52853
53178
  ENDCLASS.`,
52854
- goodExample: `CLASS ltcl_test2 DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
52855
- PUBLIC SECTION.
52856
- PROTECTED SECTION.
52857
- PRIVATE SECTION.
52858
- METHODS test FOR TESTING RAISING cx_static_check.
52859
- ENDCLASS.
52860
-
52861
- CLASS ltcl_test2 IMPLEMENTATION.
52862
- METHOD test.
52863
- ENDMETHOD.
53179
+ goodExample: `CLASS ltcl_test2 DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
53180
+ PUBLIC SECTION.
53181
+ PROTECTED SECTION.
53182
+ PRIVATE SECTION.
53183
+ METHODS test FOR TESTING RAISING cx_static_check.
53184
+ ENDCLASS.
53185
+
53186
+ CLASS ltcl_test2 IMPLEMENTATION.
53187
+ METHOD test.
53188
+ ENDMETHOD.
52864
53189
  ENDCLASS.`,
52865
53190
  };
52866
53191
  }
@@ -52946,49 +53271,49 @@ class AlignParameters extends _abap_rule_1.ABAPRule {
52946
53271
  key: "align_parameters",
52947
53272
  title: "Align Parameters",
52948
53273
  shortDescription: `Checks for vertially aligned parameters`,
52949
- extendedInformation: `Checks:
52950
- * function module calls
52951
- * method calls
52952
- * VALUE constructors
52953
- * NEW constructors
52954
- * RAISE EXCEPTION statements
52955
- * CREATE OBJECT statements
52956
- * RAISE EVENT statements
52957
-
52958
- https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
52959
-
52960
- Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
52961
-
52962
- If parameters are on the same row, no issues are reported, see
53274
+ extendedInformation: `Checks:
53275
+ * function module calls
53276
+ * method calls
53277
+ * VALUE constructors
53278
+ * NEW constructors
53279
+ * RAISE EXCEPTION statements
53280
+ * CREATE OBJECT statements
53281
+ * RAISE EVENT statements
53282
+
53283
+ https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
53284
+
53285
+ Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
53286
+
53287
+ If parameters are on the same row, no issues are reported, see
52963
53288
  https://rules.abaplint.org/max_one_method_parameter_per_line/ for splitting parameters to lines`,
52964
53289
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
52965
- badExample: `CALL FUNCTION 'FOOBAR'
52966
- EXPORTING
52967
- foo = 2
52968
- parameter = 3.
52969
-
52970
- foobar( moo = 1
52971
- param = 1 ).
52972
-
52973
- foo = VALUE #(
52974
- foo = bar
53290
+ badExample: `CALL FUNCTION 'FOOBAR'
53291
+ EXPORTING
53292
+ foo = 2
53293
+ parameter = 3.
53294
+
53295
+ foobar( moo = 1
53296
+ param = 1 ).
53297
+
53298
+ foo = VALUE #(
53299
+ foo = bar
52975
53300
  moo = 2 ).`,
52976
- goodExample: `CALL FUNCTION 'FOOBAR'
52977
- EXPORTING
52978
- foo = 2
52979
- parameter = 3.
52980
-
52981
- foobar( moo = 1
52982
- param = 1 ).
52983
-
52984
- foo = VALUE #(
52985
- foo = bar
52986
- moo = 2 ).
52987
-
52988
- DATA(sdf) = VALUE type(
52989
- common_val = 2
52990
- another_common = 5
52991
- ( row_value = 4
53301
+ goodExample: `CALL FUNCTION 'FOOBAR'
53302
+ EXPORTING
53303
+ foo = 2
53304
+ parameter = 3.
53305
+
53306
+ foobar( moo = 1
53307
+ param = 1 ).
53308
+
53309
+ foo = VALUE #(
53310
+ foo = bar
53311
+ moo = 2 ).
53312
+
53313
+ DATA(sdf) = VALUE type(
53314
+ common_val = 2
53315
+ another_common = 5
53316
+ ( row_value = 4
52992
53317
  value_foo = 5 ) ).`,
52993
53318
  };
52994
53319
  }
@@ -53422,37 +53747,37 @@ class AlignTypeExpressions extends _abap_rule_1.ABAPRule {
53422
53747
  key: "align_type_expressions",
53423
53748
  title: "Align TYPE expressions",
53424
53749
  shortDescription: `Align TYPE expressions in statements`,
53425
- extendedInformation: `
53426
- Currently works for METHODS + BEGIN OF
53427
-
53428
- If BEGIN OF has an INCLUDE TYPE its ignored
53429
-
53430
- Also note that clean ABAP does not recommend aligning TYPE clauses:
53750
+ extendedInformation: `
53751
+ Currently works for METHODS + BEGIN OF
53752
+
53753
+ If BEGIN OF has an INCLUDE TYPE its ignored
53754
+
53755
+ Also note that clean ABAP does not recommend aligning TYPE clauses:
53431
53756
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-align-type-clauses`,
53432
53757
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix],
53433
- badExample: `
53434
- TYPES: BEGIN OF foo,
53435
- bar TYPE i,
53436
- foobar TYPE i,
53437
- END OF foo.
53438
-
53439
- INTERFACE lif.
53440
- METHODS bar
53441
- IMPORTING
53442
- foo TYPE i
53443
- foobar TYPE i.
53758
+ badExample: `
53759
+ TYPES: BEGIN OF foo,
53760
+ bar TYPE i,
53761
+ foobar TYPE i,
53762
+ END OF foo.
53763
+
53764
+ INTERFACE lif.
53765
+ METHODS bar
53766
+ IMPORTING
53767
+ foo TYPE i
53768
+ foobar TYPE i.
53444
53769
  ENDINTERFACE.`,
53445
- goodExample: `
53446
- TYPES: BEGIN OF foo,
53447
- bar TYPE i,
53448
- foobar TYPE i,
53449
- END OF foo.
53450
-
53451
- INTERFACE lif.
53452
- METHODS bar
53453
- IMPORTING
53454
- foo TYPE i
53455
- foobar TYPE i.
53770
+ goodExample: `
53771
+ TYPES: BEGIN OF foo,
53772
+ bar TYPE i,
53773
+ foobar TYPE i,
53774
+ END OF foo.
53775
+
53776
+ INTERFACE lif.
53777
+ METHODS bar
53778
+ IMPORTING
53779
+ foo TYPE i
53780
+ foobar TYPE i.
53456
53781
  ENDINTERFACE.`,
53457
53782
  };
53458
53783
  }
@@ -53731,16 +54056,16 @@ class AmbiguousStatement extends _abap_rule_1.ABAPRule {
53731
54056
  return {
53732
54057
  key: "ambiguous_statement",
53733
54058
  title: "Check for ambigious statements",
53734
- shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
53735
- Add "TABLE" keyword or "@" for escaping SQL variables
53736
-
54059
+ shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
54060
+ Add "TABLE" keyword or "@" for escaping SQL variables
54061
+
53737
54062
  Only works if the target version is 740sp05 or above`,
53738
54063
  tags: [_irule_1.RuleTag.SingleFile],
53739
- badExample: `DELETE foo FROM bar.
54064
+ badExample: `DELETE foo FROM bar.
53740
54065
  MODIFY foo FROM bar.`,
53741
- goodExample: `DELETE foo FROM @bar.
53742
- DELETE TABLE itab FROM 2.
53743
- MODIFY zfoo FROM @wa.
54066
+ goodExample: `DELETE foo FROM @bar.
54067
+ DELETE TABLE itab FROM 2.
54068
+ MODIFY zfoo FROM @wa.
53744
54069
  MODIFY TABLE foo FROM bar.`,
53745
54070
  };
53746
54071
  }
@@ -53845,16 +54170,16 @@ class AvoidUse extends _abap_rule_1.ABAPRule {
53845
54170
  key: "avoid_use",
53846
54171
  title: "Avoid use of certain statements",
53847
54172
  shortDescription: `Detects usage of certain statements.`,
53848
- extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
53849
-
53850
- Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
53851
-
53852
- STATICS: use CLASS-DATA instead
53853
-
53854
- DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
53855
-
53856
- TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
53857
-
54173
+ extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
54174
+
54175
+ Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
54176
+
54177
+ STATICS: use CLASS-DATA instead
54178
+
54179
+ DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
54180
+
54181
+ TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
54182
+
53858
54183
  BREAK points`,
53859
54184
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
53860
54185
  };
@@ -53986,11 +54311,11 @@ class BeginEndNames extends _abap_rule_1.ABAPRule {
53986
54311
  title: "Check BEGIN END names",
53987
54312
  shortDescription: `Check BEGIN OF and END OF names match, plus there must be statements between BEGIN and END`,
53988
54313
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
53989
- badExample: `DATA: BEGIN OF stru,
53990
- field TYPE i,
54314
+ badExample: `DATA: BEGIN OF stru,
54315
+ field TYPE i,
53991
54316
  END OF structure_not_the_same.`,
53992
- goodExample: `DATA: BEGIN OF stru,
53993
- field TYPE i,
54317
+ goodExample: `DATA: BEGIN OF stru,
54318
+ field TYPE i,
53994
54319
  END OF stru.`,
53995
54320
  };
53996
54321
  }
@@ -54087,20 +54412,20 @@ class BeginSingleInclude extends _abap_rule_1.ABAPRule {
54087
54412
  title: "BEGIN contains single INCLUDE",
54088
54413
  shortDescription: `Finds TYPE BEGIN with just one INCLUDE TYPE, and DATA with single INCLUDE STRUCTURE`,
54089
54414
  tags: [_irule_1.RuleTag.SingleFile],
54090
- badExample: `TYPES: BEGIN OF dummy1.
54091
- INCLUDE TYPE dselc.
54092
- TYPES: END OF dummy1.
54093
-
54094
- DATA BEGIN OF foo.
54095
- INCLUDE STRUCTURE syst.
54096
- DATA END OF foo.
54097
-
54098
- STATICS BEGIN OF bar.
54099
- INCLUDE STRUCTURE syst.
54415
+ badExample: `TYPES: BEGIN OF dummy1.
54416
+ INCLUDE TYPE dselc.
54417
+ TYPES: END OF dummy1.
54418
+
54419
+ DATA BEGIN OF foo.
54420
+ INCLUDE STRUCTURE syst.
54421
+ DATA END OF foo.
54422
+
54423
+ STATICS BEGIN OF bar.
54424
+ INCLUDE STRUCTURE syst.
54100
54425
  STATICS END OF bar.`,
54101
- goodExample: `DATA BEGIN OF foo.
54102
- DATA field TYPE i.
54103
- INCLUDE STRUCTURE dselc.
54426
+ goodExample: `DATA BEGIN OF foo.
54427
+ DATA field TYPE i.
54428
+ INCLUDE STRUCTURE dselc.
54104
54429
  DATA END OF foo.`,
54105
54430
  };
54106
54431
  }
@@ -54190,9 +54515,9 @@ class CallTransactionAuthorityCheck extends _abap_rule_1.ABAPRule {
54190
54515
  extendedInformation: `https://docs.abapopenchecks.org/checks/54/`,
54191
54516
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
54192
54517
  badExample: `CALL TRANSACTION 'FOO'.`,
54193
- goodExample: `TRY.
54194
- CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
54195
- CATCH cx_sy_authorization_error.
54518
+ goodExample: `TRY.
54519
+ CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
54520
+ CATCH cx_sy_authorization_error.
54196
54521
  ENDTRY.`,
54197
54522
  };
54198
54523
  }
@@ -54257,10 +54582,10 @@ class CDSCommentStyle {
54257
54582
  key: "cds_comment_style",
54258
54583
  title: "CDS Comment Style",
54259
54584
  shortDescription: `Check for obsolete comment style`,
54260
- extendedInformation: `Check for obsolete comment style
54261
-
54262
- Comments starting with "--" are considered obsolete
54263
-
54585
+ extendedInformation: `Check for obsolete comment style
54586
+
54587
+ Comments starting with "--" are considered obsolete
54588
+
54264
54589
  https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abencds_general_syntax_rules.htm`,
54265
54590
  tags: [_irule_1.RuleTag.SingleFile],
54266
54591
  badExample: "-- this is a comment",
@@ -54326,10 +54651,10 @@ class CDSLegacyView {
54326
54651
  key: "cds_legacy_view",
54327
54652
  title: "CDS Legacy View",
54328
54653
  shortDescription: `Identify CDS Legacy Views`,
54329
- extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
54330
-
54331
- https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
54332
-
54654
+ extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
54655
+
54656
+ https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
54657
+
54333
54658
  v755 and up`,
54334
54659
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Upport],
54335
54660
  };
@@ -54484,10 +54809,10 @@ class ChainMainlyDeclarations extends _abap_rule_1.ABAPRule {
54484
54809
  key: "chain_mainly_declarations",
54485
54810
  title: "Chain mainly declarations",
54486
54811
  shortDescription: `Chain mainly declarations, allows chaining for the configured statements, reports errors for other statements.`,
54487
- extendedInformation: `
54488
- https://docs.abapopenchecks.org/checks/23/
54489
-
54490
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
54812
+ extendedInformation: `
54813
+ https://docs.abapopenchecks.org/checks/23/
54814
+
54815
+ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
54491
54816
  `,
54492
54817
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
54493
54818
  badExample: `CALL METHOD: bar.`,
@@ -54663,17 +54988,17 @@ class ChangeIfToCase extends _abap_rule_1.ABAPRule {
54663
54988
  title: "Change IF to CASE",
54664
54989
  shortDescription: `Finds IF constructs that can be changed to CASE`,
54665
54990
  // eslint-disable-next-line max-len
54666
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
54667
-
54991
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
54992
+
54668
54993
  If the first comparison is a boolean compare, no issue is reported.`,
54669
54994
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
54670
- badExample: `IF l_fcat-fieldname EQ 'FOO'.
54671
- ELSEIF l_fcat-fieldname = 'BAR'
54672
- OR l_fcat-fieldname = 'MOO'.
54995
+ badExample: `IF l_fcat-fieldname EQ 'FOO'.
54996
+ ELSEIF l_fcat-fieldname = 'BAR'
54997
+ OR l_fcat-fieldname = 'MOO'.
54673
54998
  ENDIF.`,
54674
- goodExample: `CASE l_fcat-fieldname.
54675
- WHEN 'FOO'.
54676
- WHEN 'BAR' OR 'MOO'.
54999
+ goodExample: `CASE l_fcat-fieldname.
55000
+ WHEN 'FOO'.
55001
+ WHEN 'BAR' OR 'MOO'.
54677
55002
  ENDCASE.`,
54678
55003
  };
54679
55004
  }
@@ -54810,8 +55135,8 @@ class CheckAbstract extends _abap_rule_1.ABAPRule {
54810
55135
  return {
54811
55136
  key: "check_abstract",
54812
55137
  title: "Check abstract methods and classes",
54813
- shortDescription: `Checks abstract methods and classes:
54814
- - class defined as abstract and final,
55138
+ shortDescription: `Checks abstract methods and classes:
55139
+ - class defined as abstract and final,
54815
55140
  - non-abstract class contains abstract methods`,
54816
55141
  extendedInformation: `If a class defines only constants, use an interface instead`,
54817
55142
  tags: [_irule_1.RuleTag.SingleFile],
@@ -54892,11 +55217,11 @@ class CheckComments extends _abap_rule_1.ABAPRule {
54892
55217
  return {
54893
55218
  key: "check_comments",
54894
55219
  title: "Check Comments",
54895
- shortDescription: `
55220
+ shortDescription: `
54896
55221
  Various checks for comment usage.`,
54897
- extendedInformation: `
54898
- Detects end of line comments. Comments starting with "#EC" or "##" are ignored
54899
-
55222
+ extendedInformation: `
55223
+ Detects end of line comments. Comments starting with "#EC" or "##" are ignored
55224
+
54900
55225
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#put-comments-before-the-statement-they-relate-to`,
54901
55226
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
54902
55227
  badExample: `WRITE 2. " descriptive comment`,
@@ -55058,9 +55383,9 @@ class CheckInclude {
55058
55383
  key: "check_include",
55059
55384
  title: "Check INCLUDEs",
55060
55385
  shortDescription: `Checks INCLUDE statements`,
55061
- extendedInformation: `
55062
- * Reports unused includes
55063
- * Errors if the includes are not found
55386
+ extendedInformation: `
55387
+ * Reports unused includes
55388
+ * Errors if the includes are not found
55064
55389
  * Error if including a main program`,
55065
55390
  tags: [_irule_1.RuleTag.Syntax],
55066
55391
  };
@@ -55136,14 +55461,14 @@ class CheckSubrc extends _abap_rule_1.ABAPRule {
55136
55461
  key: "check_subrc",
55137
55462
  title: "Check sy-subrc",
55138
55463
  shortDescription: `Check sy-subrc`,
55139
- extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
55140
-
55141
- If sy-dbcnt is checked after database statements, it is considered okay.
55142
-
55143
- "SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
55144
-
55145
- If IS ASSIGNED is checked after assigning, it is considered okay.
55146
-
55464
+ extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
55465
+
55466
+ If sy-dbcnt is checked after database statements, it is considered okay.
55467
+
55468
+ "SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
55469
+
55470
+ If IS ASSIGNED is checked after assigning, it is considered okay.
55471
+
55147
55472
  FIND statement with MATCH COUNT is considered okay if subrc is not checked`,
55148
55473
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
55149
55474
  pseudoComment: "EC CI_SUBRC",
@@ -55713,17 +56038,17 @@ class ClassicExceptionsOverlap extends _abap_rule_1.ABAPRule {
55713
56038
  shortDescription: `Find overlapping classic exceptions`,
55714
56039
  extendedInformation: `When debugging its typically good to know exactly which exception is caught`,
55715
56040
  tags: [_irule_1.RuleTag.SingleFile],
55716
- badExample: `CALL FUNCTION 'SOMETHING'
55717
- EXCEPTIONS
55718
- system_failure = 1 MESSAGE lv_message
55719
- communication_failure = 1 MESSAGE lv_message
55720
- resource_failure = 1
56041
+ badExample: `CALL FUNCTION 'SOMETHING'
56042
+ EXCEPTIONS
56043
+ system_failure = 1 MESSAGE lv_message
56044
+ communication_failure = 1 MESSAGE lv_message
56045
+ resource_failure = 1
55721
56046
  OTHERS = 1.`,
55722
- goodExample: `CALL FUNCTION 'SOMETHING'
55723
- EXCEPTIONS
55724
- system_failure = 1 MESSAGE lv_message
55725
- communication_failure = 2 MESSAGE lv_message
55726
- resource_failure = 3
56047
+ goodExample: `CALL FUNCTION 'SOMETHING'
56048
+ EXCEPTIONS
56049
+ system_failure = 1 MESSAGE lv_message
56050
+ communication_failure = 2 MESSAGE lv_message
56051
+ resource_failure = 3
55727
56052
  OTHERS = 4.`,
55728
56053
  };
55729
56054
  }
@@ -55981,7 +56306,7 @@ class CommentedCode extends _abap_rule_1.ABAPRule {
55981
56306
  key: "commented_code",
55982
56307
  title: "Find commented code",
55983
56308
  shortDescription: `Detects usage of commented out code.`,
55984
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it
56309
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it
55985
56310
  https://docs.abapopenchecks.org/checks/14/`,
55986
56311
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
55987
56312
  badExample: `* WRITE 'hello world'.`,
@@ -56214,10 +56539,10 @@ class ConstructorVisibilityPublic {
56214
56539
  key: "constructor_visibility_public",
56215
56540
  title: "Check constructor visibility is public",
56216
56541
  shortDescription: `Constructor must be placed in the public section, even if the class is not CREATE PUBLIC.`,
56217
- extendedInformation: `
56218
- This only applies to global classes.
56219
-
56220
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
56542
+ extendedInformation: `
56543
+ This only applies to global classes.
56544
+
56545
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
56221
56546
  https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abeninstance_constructor_guidl.htm`,
56222
56547
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
56223
56548
  };
@@ -56292,8 +56617,8 @@ class ContainsTab extends _abap_rule_1.ABAPRule {
56292
56617
  key: "contains_tab",
56293
56618
  title: "Code contains tab",
56294
56619
  shortDescription: `Checks for usage of tabs (enable to enforce spaces)`,
56295
- extendedInformation: `
56296
- https://docs.abapopenchecks.org/checks/09/
56620
+ extendedInformation: `
56621
+ https://docs.abapopenchecks.org/checks/09/
56297
56622
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
56298
56623
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
56299
56624
  badExample: `\tWRITE 'hello world'.`,
@@ -56380,10 +56705,10 @@ class CyclicOO {
56380
56705
  key: "cyclic_oo",
56381
56706
  title: "Cyclic OO",
56382
56707
  shortDescription: `Finds cyclic/circular OO references`,
56383
- extendedInformation: `Runs for global INTF + CLAS objects
56384
-
56385
- Objects must be without syntax errors for this rule to take effect
56386
-
56708
+ extendedInformation: `Runs for global INTF + CLAS objects
56709
+
56710
+ Objects must be without syntax errors for this rule to take effect
56711
+
56387
56712
  References in testclass includes are ignored`,
56388
56713
  };
56389
56714
  }
@@ -56626,7 +56951,7 @@ class DangerousStatement extends _abap_rule_1.ABAPRule {
56626
56951
  key: "dangerous_statement",
56627
56952
  title: "Dangerous statement",
56628
56953
  shortDescription: `Detects potentially dangerous statements`,
56629
- extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
56954
+ extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
56630
56955
  dynamic SQL can potentially create SQL injection problems`,
56631
56956
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
56632
56957
  };
@@ -56833,13 +57158,13 @@ class DefinitionsTop extends _abap_rule_1.ABAPRule {
56833
57158
  shortDescription: `Checks that definitions are placed at the beginning of METHODs, FORMs and FUNCTIONs.`,
56834
57159
  extendedInformation: `https://docs.abapopenchecks.org/checks/17/`,
56835
57160
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
56836
- badExample: `FROM foo.
56837
- WRITE 'hello'.
56838
- DATA int TYPE i.
57161
+ badExample: `FROM foo.
57162
+ WRITE 'hello'.
57163
+ DATA int TYPE i.
56839
57164
  ENDFORM.`,
56840
- goodExample: `FROM foo.
56841
- DATA int TYPE i.
56842
- WRITE 'hello'.
57165
+ goodExample: `FROM foo.
57166
+ DATA int TYPE i.
57167
+ WRITE 'hello'.
56843
57168
  ENDFORM.`,
56844
57169
  };
56845
57170
  }
@@ -57258,32 +57583,32 @@ exports.DoubleSpace = DoubleSpace;
57258
57583
  Object.defineProperty(exports, "__esModule", ({ value: true }));
57259
57584
  exports.Downport = exports.DownportConf = void 0;
57260
57585
  /* eslint-disable max-len */
57261
- const Statements = __webpack_require__(/*! ../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
57586
+ const crypto = __webpack_require__(/*! crypto */ "crypto");
57587
+ const tokens_1 = __webpack_require__(/*! ../abap/1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
57262
57588
  const Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
57263
- const Structures = __webpack_require__(/*! ../abap/3_structures/structures */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js");
57264
- const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
57265
- const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
57266
- const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
57589
+ const Statements = __webpack_require__(/*! ../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
57590
+ const statements_1 = __webpack_require__(/*! ../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
57267
57591
  const _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js");
57268
- const nodes_1 = __webpack_require__(/*! ../abap/nodes */ "./node_modules/@abaplint/core/build/src/abap/nodes/index.js");
57269
- const edit_helper_1 = __webpack_require__(/*! ../edit_helper */ "./node_modules/@abaplint/core/build/src/edit_helper.js");
57270
- const position_1 = __webpack_require__(/*! ../position */ "./node_modules/@abaplint/core/build/src/position.js");
57271
- const virtual_position_1 = __webpack_require__(/*! ../virtual_position */ "./node_modules/@abaplint/core/build/src/virtual_position.js");
57272
- const _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
57273
- const version_1 = __webpack_require__(/*! ../version */ "./node_modules/@abaplint/core/build/src/version.js");
57274
- const registry_1 = __webpack_require__(/*! ../registry */ "./node_modules/@abaplint/core/build/src/registry.js");
57275
- const syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js");
57592
+ const Structures = __webpack_require__(/*! ../abap/3_structures/structures */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js");
57593
+ const _builtin_1 = __webpack_require__(/*! ../abap/5_syntax/_builtin */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_builtin.js");
57276
57594
  const _reference_1 = __webpack_require__(/*! ../abap/5_syntax/_reference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js");
57595
+ const _scope_type_1 = __webpack_require__(/*! ../abap/5_syntax/_scope_type */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js");
57596
+ const syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js");
57597
+ const nodes_1 = __webpack_require__(/*! ../abap/nodes */ "./node_modules/@abaplint/core/build/src/abap/nodes/index.js");
57277
57598
  const _typed_identifier_1 = __webpack_require__(/*! ../abap/types/_typed_identifier */ "./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js");
57278
57599
  const basic_1 = __webpack_require__(/*! ../abap/types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
57279
57600
  const config_1 = __webpack_require__(/*! ../config */ "./node_modules/@abaplint/core/build/src/config.js");
57280
- const tokens_1 = __webpack_require__(/*! ../abap/1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
57281
- const include_graph_1 = __webpack_require__(/*! ../utils/include_graph */ "./node_modules/@abaplint/core/build/src/utils/include_graph.js");
57601
+ const edit_helper_1 = __webpack_require__(/*! ../edit_helper */ "./node_modules/@abaplint/core/build/src/edit_helper.js");
57602
+ const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
57282
57603
  const objects_1 = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
57283
- const _builtin_1 = __webpack_require__(/*! ../abap/5_syntax/_builtin */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_builtin.js");
57284
- const _scope_type_1 = __webpack_require__(/*! ../abap/5_syntax/_scope_type */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js");
57285
- const statements_1 = __webpack_require__(/*! ../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
57286
- const crypto = __webpack_require__(/*! crypto */ "crypto");
57604
+ const _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
57605
+ const position_1 = __webpack_require__(/*! ../position */ "./node_modules/@abaplint/core/build/src/position.js");
57606
+ const registry_1 = __webpack_require__(/*! ../registry */ "./node_modules/@abaplint/core/build/src/registry.js");
57607
+ const include_graph_1 = __webpack_require__(/*! ../utils/include_graph */ "./node_modules/@abaplint/core/build/src/utils/include_graph.js");
57608
+ const version_1 = __webpack_require__(/*! ../version */ "./node_modules/@abaplint/core/build/src/version.js");
57609
+ const virtual_position_1 = __webpack_require__(/*! ../virtual_position */ "./node_modules/@abaplint/core/build/src/virtual_position.js");
57610
+ const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
57611
+ const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
57287
57612
  // todo: refactor each sub-rule to new classes?
57288
57613
  // todo: add configuration
57289
57614
  class DownportConf extends _basic_rule_config_1.BasicRuleConfig {
@@ -57381,39 +57706,39 @@ class Downport {
57381
57706
  key: "downport",
57382
57707
  title: "Downport statement",
57383
57708
  shortDescription: `Downport functionality`,
57384
- extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with
57385
- a higher level language version. If successful, various rules are applied to downport the statement.
57386
- Target downport version is always v702, thus rule is only enabled if target version is v702.
57387
-
57388
- Current rules:
57389
- * NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/
57390
- * DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/
57391
- * FIELD-SYMBOL() definitions are outlined
57392
- * CONV is outlined
57393
- * COND is outlined
57394
- * REDUCE is outlined
57395
- * SWITCH is outlined
57396
- * FILTER is outlined
57397
- * APPEND expression is outlined
57398
- * INSERT expression is outlined
57399
- * EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/
57400
- * CAST changed to ?=
57401
- * LOOP AT method_call( ) is outlined
57402
- * VALUE # with structure fields
57403
- * VALUE # with internal table lines
57404
- * Table Expressions are outlined
57405
- * SELECT INTO @DATA definitions are outlined
57406
- * Some occurrences of string template formatting option ALPHA changed to function module call
57407
- * SELECT/INSERT/MODIFY/DELETE/UPDATE "," in field list removed, "@" in source/targets removed
57408
- * PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods
57409
- * RAISE EXCEPTION ... MESSAGE
57410
- * Moving with +=, -=, /=, *=, &&= is expanded
57411
- * line_exists and line_index is downported to READ TABLE
57412
- * ENUMs, but does not nessesarily give the correct type and value
57413
- * MESSAGE with non simple source
57414
-
57415
- Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.
57416
-
57709
+ extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with
57710
+ a higher level language version. If successful, various rules are applied to downport the statement.
57711
+ Target downport version is always v702, thus rule is only enabled if target version is v702.
57712
+
57713
+ Current rules:
57714
+ * NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/
57715
+ * DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/
57716
+ * FIELD-SYMBOL() definitions are outlined
57717
+ * CONV is outlined
57718
+ * COND is outlined
57719
+ * REDUCE is outlined
57720
+ * SWITCH is outlined
57721
+ * FILTER is outlined
57722
+ * APPEND expression is outlined
57723
+ * INSERT expression is outlined
57724
+ * EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/
57725
+ * CAST changed to ?=
57726
+ * LOOP AT method_call( ) is outlined
57727
+ * VALUE # with structure fields
57728
+ * VALUE # with internal table lines
57729
+ * Table Expressions are outlined
57730
+ * SELECT INTO @DATA definitions are outlined
57731
+ * Some occurrences of string template formatting option ALPHA changed to function module call
57732
+ * SELECT/INSERT/MODIFY/DELETE/UPDATE "," in field list removed, "@" in source/targets removed
57733
+ * PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods
57734
+ * RAISE EXCEPTION ... MESSAGE
57735
+ * Moving with +=, -=, /=, *=, &&= is expanded
57736
+ * line_exists and line_index is downported to READ TABLE
57737
+ * ENUMs, but does not nessesarily give the correct type and value
57738
+ * MESSAGE with non simple source
57739
+
57740
+ Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.
57741
+
57417
57742
  Make sure to test the downported code, it might not always be completely correct.`,
57418
57743
  tags: [_irule_1.RuleTag.Downport, _irule_1.RuleTag.Quickfix],
57419
57744
  };
@@ -57792,7 +58117,7 @@ Make sure to test the downported code, it might not always be completely correct
57792
58117
  return undefined;
57793
58118
  }
57794
58119
  //////////////////////////////////////////
57795
- /** removes @'s */
58120
+ /** removes @'s and commas */
57796
58121
  downportSQLExtras(low, high, lowFile, highSyntax) {
57797
58122
  if (!(low.get() instanceof _statement_1.Unknown)) {
57798
58123
  return undefined;
@@ -57836,7 +58161,7 @@ Make sure to test the downported code, it might not always be completely correct
57836
58161
  }
57837
58162
  }
57838
58163
  }
57839
- for (const fieldList of high.findAllExpressionsMulti([Expressions.SQLFieldList, Expressions.SQLFieldListLoop], true)) {
58164
+ for (const fieldList of high.findAllExpressionsMulti([Expressions.SQLFieldList, Expressions.SQLFieldListLoop, Expressions.SQLOrderBy], true)) {
57840
58165
  for (const token of fieldList.getDirectTokens()) {
57841
58166
  if (token.getStr() === ",") {
57842
58167
  addFix(token);
@@ -57991,10 +58316,10 @@ Make sure to test the downported code, it might not always be completely correct
57991
58316
  const fieldName = f.concatTokens();
57992
58317
  fieldDefinition += indentation + " " + fieldName + " TYPE " + tableName + "-" + fieldName + ",\n";
57993
58318
  }
57994
- fieldDefinition = `DATA: BEGIN OF ${name},
58319
+ fieldDefinition = `DATA: BEGIN OF ${name},
57995
58320
  ${fieldDefinition}${indentation} END OF ${name}.`;
57996
58321
  }
57997
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
58322
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
57998
58323
  ${indentation}`);
57999
58324
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
58000
58325
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -58053,12 +58378,12 @@ ${indentation}`);
58053
58378
  }
58054
58379
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58055
58380
  const name = ((_g = inlineData.findFirstExpression(Expressions.TargetField)) === null || _g === void 0 ? void 0 : _g.concatTokens()) || "error";
58056
- let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
58057
- ${fieldDefinitions}${indentation} END OF ${uniqueName}.
58058
- ${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.
58381
+ let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
58382
+ ${fieldDefinitions}${indentation} END OF ${uniqueName}.
58383
+ ${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.
58059
58384
  ${indentation}`);
58060
58385
  if (fieldDefinitions === "") {
58061
- fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.
58386
+ fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.
58062
58387
  ${indentation}`);
58063
58388
  }
58064
58389
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
@@ -58126,7 +58451,7 @@ ${indentation}`);
58126
58451
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58127
58452
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
58128
58453
  const firstToken = high.getFirstToken();
58129
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
58454
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
58130
58455
  ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
58131
58456
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
58132
58457
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -58180,7 +58505,7 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
58180
58505
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58181
58506
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
58182
58507
  const firstToken = high.getFirstToken();
58183
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
58508
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
58184
58509
  ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
58185
58510
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
58186
58511
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -58222,14 +58547,14 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
58222
58547
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
58223
58548
  const firstToken = high.getFirstToken();
58224
58549
  // note that the tabix restore should be done before throwing the exception
58225
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.
58226
- ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
58227
- ${indentation}${tabixBackup} = sy-tabix.
58228
- ${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.
58229
- ${indentation}sy-tabix = ${tabixBackup}.
58230
- ${indentation}IF sy-subrc <> 0.
58231
- ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
58232
- ${indentation}ENDIF.
58550
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.
58551
+ ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
58552
+ ${indentation}${tabixBackup} = sy-tabix.
58553
+ ${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.
58554
+ ${indentation}sy-tabix = ${tabixBackup}.
58555
+ ${indentation}IF sy-subrc <> 0.
58556
+ ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
58557
+ ${indentation}ENDIF.
58233
58558
  ${indentation}`);
58234
58559
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, startToken.getStart(), tableExpression.getLastToken().getEnd(), uniqueName);
58235
58560
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -58286,7 +58611,7 @@ ${indentation}`);
58286
58611
  const className = classNames[0].concatTokens();
58287
58612
  const targetName = (_b = target.findFirstExpression(Expressions.TargetField)) === null || _b === void 0 ? void 0 : _b.concatTokens();
58288
58613
  const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
58289
- const code = ` DATA ${targetName} TYPE REF TO ${className}.
58614
+ const code = ` DATA ${targetName} TYPE REF TO ${className}.
58290
58615
  ${indentation}CATCH ${className} INTO ${targetName}.`;
58291
58616
  const fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getStart(), node.getEnd(), code);
58292
58617
  return issue_1.Issue.atToken(lowFile, node.getFirstToken(), "Outline DATA", this.getMetadata().key, this.conf.severity, fix);
@@ -58448,16 +58773,16 @@ ${indentation}CATCH ${className} INTO ${targetName}.`;
58448
58773
  const uniqueName1 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58449
58774
  const uniqueName2 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58450
58775
  const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
58451
- let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
58452
- ${indentation}${uniqueName1}-msgid = ${id}.
58776
+ let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
58777
+ ${indentation}${uniqueName1}-msgid = ${id}.
58453
58778
  ${indentation}${uniqueName1}-msgno = ${number}.\n`;
58454
58779
  if (withs.length > 0) {
58455
- abap += `${indentation}${uniqueName1}-attr1 = 'IF_T100_DYN_MSG~MSGV1'.
58456
- ${indentation}${uniqueName1}-attr2 = 'IF_T100_DYN_MSG~MSGV2'.
58457
- ${indentation}${uniqueName1}-attr3 = 'IF_T100_DYN_MSG~MSGV3'.
58780
+ abap += `${indentation}${uniqueName1}-attr1 = 'IF_T100_DYN_MSG~MSGV1'.
58781
+ ${indentation}${uniqueName1}-attr2 = 'IF_T100_DYN_MSG~MSGV2'.
58782
+ ${indentation}${uniqueName1}-attr3 = 'IF_T100_DYN_MSG~MSGV3'.
58458
58783
  ${indentation}${uniqueName1}-attr4 = 'IF_T100_DYN_MSG~MSGV4'.\n`;
58459
58784
  }
58460
- abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
58785
+ abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
58461
58786
  ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`;
58462
58787
  if (withs.length > 0) {
58463
58788
  abap += `${indentation}${uniqueName2}->if_t100_dyn_msg~msgty = 'E'.\n`;
@@ -58569,10 +58894,10 @@ ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`
58569
58894
  let code = "";
58570
58895
  if (sourceRef.findFirstExpression(Expressions.TableExpression)) {
58571
58896
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58572
- code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).
58573
- IF sy-subrc <> 0.
58574
- RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
58575
- ENDIF.
58897
+ code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).
58898
+ IF sy-subrc <> 0.
58899
+ RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
58900
+ ENDIF.
58576
58901
  GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
58577
58902
  }
58578
58903
  else {
@@ -58661,20 +58986,20 @@ GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
58661
58986
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58662
58987
  const uniqueFS = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58663
58988
  const uniqueNameIndex = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58664
- code += ` items LIKE ${loopSourceName},
58665
- END OF ${groupTargetName}type.
58666
- DATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.
58667
- DATA ${uniqueName} LIKE LINE OF ${groupTargetName}tab.
58989
+ code += ` items LIKE ${loopSourceName},
58990
+ END OF ${groupTargetName}type.
58991
+ DATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.
58992
+ DATA ${uniqueName} LIKE LINE OF ${groupTargetName}tab.
58668
58993
  LOOP AT ${loopSourceName} ${(_l = high.findFirstExpression(Expressions.LoopTarget)) === null || _l === void 0 ? void 0 : _l.concatTokens()}.\n`;
58669
58994
  if (groupIndexName !== undefined) {
58670
58995
  code += `DATA(${uniqueNameIndex}) = sy-tabix.\n`;
58671
58996
  }
58672
- code += `READ TABLE ${groupTargetName}tab ASSIGNING FIELD-SYMBOL(<${uniqueFS}>) WITH KEY ${condition}.
58997
+ code += `READ TABLE ${groupTargetName}tab ASSIGNING FIELD-SYMBOL(<${uniqueFS}>) WITH KEY ${condition}.
58673
58998
  IF sy-subrc = 0.\n`;
58674
58999
  if (groupCountName !== undefined) {
58675
59000
  code += ` <${uniqueFS}>-${groupCountName} = <${uniqueFS}>-${groupCountName} + 1.\n`;
58676
59001
  }
58677
- code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
59002
+ code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
58678
59003
  ELSE.\n`;
58679
59004
  code += ` CLEAR ${uniqueName}.\n`;
58680
59005
  for (const c of group.findAllExpressions(Expressions.LoopGroupByComponent)) {
@@ -58695,8 +59020,8 @@ ELSE.\n`;
58695
59020
  }
58696
59021
  code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE ${uniqueName}-items.\n`;
58697
59022
  code += ` INSERT ${uniqueName} INTO TABLE ${groupTargetName}tab.\n`;
58698
- code += `ENDIF.
58699
- ENDLOOP.
59023
+ code += `ENDIF.
59024
+ ENDLOOP.
58700
59025
  LOOP AT ${groupTargetName}tab ${groupTarget}.`;
58701
59026
  let fix = edit_helper_1.EditHelper.replaceRange(lowFile, high.getFirstToken().getStart(), high.getLastToken().getEnd(), code);
58702
59027
  for (const l of ((_m = highFile.getStructure()) === null || _m === void 0 ? void 0 : _m.findAllStructures(Structures.Loop)) || []) {
@@ -58868,7 +59193,7 @@ LOOP AT ${groupTargetName}tab ${groupTarget}.`;
58868
59193
  const enumName = (_b = high.findExpressionAfterToken("ENUM")) === null || _b === void 0 ? void 0 : _b.concatTokens();
58869
59194
  const structureName = (_c = high.findExpressionAfterToken("STRUCTURE")) === null || _c === void 0 ? void 0 : _c.concatTokens();
58870
59195
  // all ENUMS are char like?
58871
- let code = `TYPES ${enumName} TYPE string.
59196
+ let code = `TYPES ${enumName} TYPE string.
58872
59197
  CONSTANTS: BEGIN OF ${structureName},\n`;
58873
59198
  let count = 1;
58874
59199
  for (const e of enumStructure.findDirectStatements(Statements.TypeEnum).concat(enumStructure.findDirectStatements(Statements.Type))) {
@@ -58912,14 +59237,14 @@ CONSTANTS: BEGIN OF ${structureName},\n`;
58912
59237
  const tabixBackup = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58913
59238
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
58914
59239
  // restore tabix before exeption
58915
- const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.
58916
- ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
58917
- ${indentation}${tabixBackup} = sy-tabix.
58918
- ${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.
58919
- ${indentation}sy-tabix = ${tabixBackup}.
58920
- ${indentation}IF sy-subrc <> 0.
58921
- ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
58922
- ${indentation}ENDIF.
59240
+ const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.
59241
+ ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
59242
+ ${indentation}${tabixBackup} = sy-tabix.
59243
+ ${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.
59244
+ ${indentation}sy-tabix = ${tabixBackup}.
59245
+ ${indentation}IF sy-subrc <> 0.
59246
+ ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59247
+ ${indentation}ENDIF.
58923
59248
  ${indentation}${uniqueName}`;
58924
59249
  const start = target.getFirstToken().getStart();
58925
59250
  const end = (_a = tableExpression.findDirectTokenByText("]")) === null || _a === void 0 ? void 0 : _a.getEnd();
@@ -58999,11 +59324,11 @@ ${indentation}${uniqueName}`;
58999
59324
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
59000
59325
  const source = (_b = child.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens();
59001
59326
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59002
- const code = `DATA ${uniqueName} TYPE string.
59003
- ${indentation}CALL FUNCTION '${functionName}'
59004
- ${indentation} EXPORTING
59005
- ${indentation} input = ${source}
59006
- ${indentation} IMPORTING
59327
+ const code = `DATA ${uniqueName} TYPE string.
59328
+ ${indentation}CALL FUNCTION '${functionName}'
59329
+ ${indentation} EXPORTING
59330
+ ${indentation} input = ${source}
59331
+ ${indentation} IMPORTING
59007
59332
  ${indentation} output = ${uniqueName}.\n`;
59008
59333
  const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), code);
59009
59334
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, child.getFirstToken().getStart(), child.getLastToken().getEnd(), uniqueName);
@@ -59036,24 +59361,33 @@ ${indentation} output = ${uniqueName}.\n`;
59036
59361
  return issue_1.Issue.atToken(lowFile, high.getFirstToken(), "Outline LOOP input", this.getMetadata().key, this.conf.severity, fix);
59037
59362
  }
59038
59363
  outlineLoopTarget(node, lowFile, highSyntax) {
59039
- var _a, _b, _c, _d, _e, _f, _g;
59364
+ var _a, _b, _c, _d, _e, _f;
59040
59365
  // also allows outlining of voided types
59041
59366
  if (!(node.get() instanceof Statements.Loop)) {
59042
59367
  return undefined;
59043
59368
  }
59044
- const sourceName = (_a = node.findDirectExpression(Expressions.SimpleSource2)) === null || _a === void 0 ? void 0 : _a.concatTokens();
59369
+ const source = node.findDirectExpression(Expressions.SimpleSource2);
59370
+ if (source === undefined) {
59371
+ return undefined;
59372
+ }
59373
+ const sourceName = source === null || source === void 0 ? void 0 : source.concatTokens();
59045
59374
  if (sourceName === undefined) {
59046
59375
  return undefined;
59047
59376
  }
59377
+ let foundType = undefined;
59378
+ const spag = highSyntax.spaghetti.lookupPosition(source.getFirstToken().getStart(), lowFile.getFilename());
59379
+ if (spag) {
59380
+ foundType = spag.findVariable(source.concatTokens());
59381
+ }
59048
59382
  const concat = node.concatTokens().toUpperCase();
59049
59383
  if (concat.includes(" GROUP BY ") || concat.startsWith("LOOP AT GROUP ")) {
59050
59384
  return undefined;
59051
59385
  }
59052
59386
  const isReference = concat.includes(" REFERENCE INTO ");
59053
59387
  const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
59054
- const dataTarget = (_c = (_b = node.findDirectExpression(Expressions.LoopTarget)) === null || _b === void 0 ? void 0 : _b.findDirectExpression(Expressions.Target)) === null || _c === void 0 ? void 0 : _c.findDirectExpression(Expressions.InlineData);
59388
+ const dataTarget = (_b = (_a = node.findDirectExpression(Expressions.LoopTarget)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(Expressions.Target)) === null || _b === void 0 ? void 0 : _b.findDirectExpression(Expressions.InlineData);
59055
59389
  if (dataTarget) {
59056
- const targetName = ((_d = dataTarget.findDirectExpression(Expressions.TargetField)) === null || _d === void 0 ? void 0 : _d.concatTokens()) || "DOWNPORT_ERROR";
59390
+ const targetName = ((_c = dataTarget.findDirectExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || "DOWNPORT_ERROR";
59057
59391
  let code = `DATA ${targetName} LIKE LINE OF ${sourceName}.\n${indentation}`;
59058
59392
  if (isReference) {
59059
59393
  const likeName = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
@@ -59064,10 +59398,15 @@ ${indentation} output = ${uniqueName}.\n`;
59064
59398
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
59065
59399
  return issue_1.Issue.atToken(lowFile, node.getFirstToken(), "Outline LOOP data target", this.getMetadata().key, this.conf.severity, fix);
59066
59400
  }
59067
- const fsTarget = (_f = (_e = node.findDirectExpression(Expressions.LoopTarget)) === null || _e === void 0 ? void 0 : _e.findDirectExpression(Expressions.FSTarget)) === null || _f === void 0 ? void 0 : _f.findDirectExpression(Expressions.InlineFS);
59401
+ const fsTarget = (_e = (_d = node.findDirectExpression(Expressions.LoopTarget)) === null || _d === void 0 ? void 0 : _d.findDirectExpression(Expressions.FSTarget)) === null || _e === void 0 ? void 0 : _e.findDirectExpression(Expressions.InlineFS);
59068
59402
  if (fsTarget) {
59069
- const targetName = ((_g = fsTarget.findDirectExpression(Expressions.TargetFieldSymbol)) === null || _g === void 0 ? void 0 : _g.concatTokens()) || "DOWNPORT_ERROR";
59070
- const code = `FIELD-SYMBOLS ${targetName} LIKE LINE OF ${sourceName}.\n${indentation}`;
59403
+ const targetName = ((_f = fsTarget.findDirectExpression(Expressions.TargetFieldSymbol)) === null || _f === void 0 ? void 0 : _f.concatTokens()) || "DOWNPORT_ERROR";
59404
+ let type = `LIKE LINE OF ${sourceName}`;
59405
+ const f = foundType === null || foundType === void 0 ? void 0 : foundType.getType();
59406
+ if (f instanceof basic_1.TableType && f.getRowType() instanceof basic_1.AnyType) {
59407
+ type = "TYPE ANY";
59408
+ }
59409
+ const code = `FIELD-SYMBOLS ${targetName} ${type}.\n${indentation}`;
59071
59410
  const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), code);
59072
59411
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, fsTarget.getFirstToken().getStart(), fsTarget.getLastToken().getEnd(), targetName);
59073
59412
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -60315,12 +60654,12 @@ class EasyToFindMessages {
60315
60654
  key: "easy_to_find_messages",
60316
60655
  title: "Easy to find messages",
60317
60656
  shortDescription: `Make messages easy to find`,
60318
- extendedInformation: `All messages must be statically referenced exactly once
60319
-
60320
- Only MESSAGE and RAISE statments are counted as static references
60321
-
60322
- Also see rule "message_exists"
60323
-
60657
+ extendedInformation: `All messages must be statically referenced exactly once
60658
+
60659
+ Only MESSAGE and RAISE statments are counted as static references
60660
+
60661
+ Also see rule "message_exists"
60662
+
60324
60663
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#make-messages-easy-to-find`,
60325
60664
  tags: [_irule_1.RuleTag.Styleguide],
60326
60665
  };
@@ -60401,13 +60740,13 @@ class EmptyEvent extends _abap_rule_1.ABAPRule {
60401
60740
  shortDescription: `Empty selection screen or list processing event block`,
60402
60741
  extendedInformation: ``,
60403
60742
  tags: [_irule_1.RuleTag.SingleFile],
60404
- badExample: `
60405
- INITIALIZATION.
60406
- WRITE 'hello'.
60743
+ badExample: `
60744
+ INITIALIZATION.
60745
+ WRITE 'hello'.
60407
60746
  END-OF-SELECTION.`,
60408
- goodExample: `
60409
- START-OF-SELECTION.
60410
- PERFORM sdf.
60747
+ goodExample: `
60748
+ START-OF-SELECTION.
60749
+ PERFORM sdf.
60411
60750
  COMMIT WORK.`,
60412
60751
  };
60413
60752
  }
@@ -60499,8 +60838,8 @@ class EmptyLineinStatement extends _abap_rule_1.ABAPRule {
60499
60838
  key: "empty_line_in_statement",
60500
60839
  title: "Find empty lines in statements",
60501
60840
  shortDescription: `Checks that statements do not contain empty lines.`,
60502
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
60503
-
60841
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
60842
+
60504
60843
  https://docs.abapopenchecks.org/checks/41/`,
60505
60844
  tags: [_irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
60506
60845
  badExample: `WRITE\n\nhello.`,
@@ -60676,13 +61015,13 @@ class EmptyStructure extends _abap_rule_1.ABAPRule {
60676
61015
  shortDescription: `Checks that the code does not contain empty blocks.`,
60677
61016
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-empty-if-branches`,
60678
61017
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
60679
- badExample: `IF foo = bar.
60680
- ENDIF.
60681
-
60682
- DO 2 TIMES.
61018
+ badExample: `IF foo = bar.
61019
+ ENDIF.
61020
+
61021
+ DO 2 TIMES.
60683
61022
  ENDDO.`,
60684
- goodExample: `LOOP AT itab WHERE qty = 0 OR date > sy-datum.
60685
- ENDLOOP.
61023
+ goodExample: `LOOP AT itab WHERE qty = 0 OR date > sy-datum.
61024
+ ENDLOOP.
60686
61025
  result = xsdbool( sy-subrc = 0 ).`,
60687
61026
  };
60688
61027
  }
@@ -60824,10 +61163,10 @@ class ExitOrCheck extends _abap_rule_1.ABAPRule {
60824
61163
  return {
60825
61164
  key: "exit_or_check",
60826
61165
  title: "Find EXIT or CHECK outside loops",
60827
- shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
61166
+ shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
60828
61167
  Use RETURN to leave procesing blocks instead.`,
60829
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
60830
- https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
61168
+ extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
61169
+ https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
60831
61170
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#check-vs-return`,
60832
61171
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
60833
61172
  };
@@ -60910,12 +61249,12 @@ class ExpandMacros extends _abap_rule_1.ABAPRule {
60910
61249
  key: "expand_macros",
60911
61250
  title: "Expand Macros",
60912
61251
  shortDescription: `Allows expanding macro calls with quick fixes`,
60913
- extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
60914
-
61252
+ extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
61253
+
60915
61254
  Note that macros/DEFINE cannot be used in the ABAP Cloud programming model`,
60916
- badExample: `DEFINE _hello.
60917
- WRITE 'hello'.
60918
- END-OF-DEFINITION.
61255
+ badExample: `DEFINE _hello.
61256
+ WRITE 'hello'.
61257
+ END-OF-DEFINITION.
60919
61258
  _hello.`,
60920
61259
  goodExample: `WRITE 'hello'.`,
60921
61260
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
@@ -61002,7 +61341,7 @@ class Exporting extends _abap_rule_1.ABAPRule {
61002
61341
  shortDescription: `Detects EXPORTING statements which can be omitted.`,
61003
61342
  badExample: `call_method( EXPORTING foo = bar ).`,
61004
61343
  goodExample: `call_method( foo = bar ).`,
61005
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-optional-keyword-exporting
61344
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-optional-keyword-exporting
61006
61345
  https://docs.abapopenchecks.org/checks/30/`,
61007
61346
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
61008
61347
  };
@@ -61100,7 +61439,7 @@ class ForbiddenIdentifier extends _abap_rule_1.ABAPRule {
61100
61439
  key: "forbidden_identifier",
61101
61440
  title: "Forbidden Identifier",
61102
61441
  shortDescription: `Forbid use of specified identifiers, list of regex.`,
61103
- extendedInformation: `Used in the transpiler to find javascript keywords in ABAP identifiers,
61442
+ extendedInformation: `Used in the transpiler to find javascript keywords in ABAP identifiers,
61104
61443
  https://github.com/abaplint/transpiler/blob/bda94b8b56e2b7f2f87be2168f12361aa530220e/packages/transpiler/src/validation.ts#L44`,
61105
61444
  tags: [_irule_1.RuleTag.SingleFile],
61106
61445
  };
@@ -61342,8 +61681,8 @@ class ForbiddenVoidType {
61342
61681
  key: "forbidden_void_type",
61343
61682
  title: "Forbidden Void Types",
61344
61683
  shortDescription: `Avoid usage of specified void types.`,
61345
- extendedInformation: `Inspiration:
61346
- BOOLEAN, BOOLE_D, CHAR01, CHAR1, CHAR10, CHAR12, CHAR128, CHAR2, CHAR20, CHAR4, CHAR70,
61684
+ extendedInformation: `Inspiration:
61685
+ BOOLEAN, BOOLE_D, CHAR01, CHAR1, CHAR10, CHAR12, CHAR128, CHAR2, CHAR20, CHAR4, CHAR70,
61347
61686
  DATS, TIMS, DATUM, FLAG, INT4, NUMC3, NUMC4, SAP_BOOL, TEXT25, TEXT80, X255, XFELD`,
61348
61687
  };
61349
61688
  }
@@ -61586,9 +61925,9 @@ class FullyTypeITabs extends _abap_rule_1.ABAPRule {
61586
61925
  key: "fully_type_itabs",
61587
61926
  title: "Fully type internal tables",
61588
61927
  shortDescription: `No implict table types or table keys`,
61589
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-the-right-table-type
61928
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-the-right-table-type
61590
61929
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key`,
61591
- badExample: `DATA lt_foo TYPE TABLE OF ty.
61930
+ badExample: `DATA lt_foo TYPE TABLE OF ty.
61592
61931
  DATA lt_bar TYPE STANDARD TABLE OF ty.`,
61593
61932
  goodExample: `DATA lt_foo TYPE STANDARD TABLE OF ty WITH EMPTY KEY.`,
61594
61933
  tags: [_irule_1.RuleTag.SingleFile],
@@ -61773,26 +62112,26 @@ class FunctionalWriting extends _abap_rule_1.ABAPRule {
61773
62112
  key: "functional_writing",
61774
62113
  title: "Use functional writing",
61775
62114
  shortDescription: `Detects usage of call method when functional style calls can be used.`,
61776
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-calls
62115
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-calls
61777
62116
  https://docs.abapopenchecks.org/checks/07/`,
61778
62117
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
61779
- badExample: `CALL METHOD zcl_class=>method( ).
61780
- CALL METHOD cl_abap_typedescr=>describe_by_name
61781
- EXPORTING
61782
- p_name = 'NAME'
61783
- RECEIVING
61784
- p_descr_ref = lr_typedescr
61785
- EXCEPTIONS
61786
- type_not_found = 1
62118
+ badExample: `CALL METHOD zcl_class=>method( ).
62119
+ CALL METHOD cl_abap_typedescr=>describe_by_name
62120
+ EXPORTING
62121
+ p_name = 'NAME'
62122
+ RECEIVING
62123
+ p_descr_ref = lr_typedescr
62124
+ EXCEPTIONS
62125
+ type_not_found = 1
61787
62126
  OTHERS = 2.`,
61788
- goodExample: `zcl_class=>method( ).
61789
- cl_abap_typedescr=>describe_by_name(
61790
- EXPORTING
61791
- p_name = 'NAME'
61792
- RECEIVING
61793
- p_descr_ref = lr_typedescr
61794
- EXCEPTIONS
61795
- type_not_found = 1
62127
+ goodExample: `zcl_class=>method( ).
62128
+ cl_abap_typedescr=>describe_by_name(
62129
+ EXPORTING
62130
+ p_name = 'NAME'
62131
+ RECEIVING
62132
+ p_descr_ref = lr_typedescr
62133
+ EXCEPTIONS
62134
+ type_not_found = 1
61796
62135
  OTHERS = 2 ).`,
61797
62136
  };
61798
62137
  }
@@ -61903,14 +62242,14 @@ class GlobalClass extends _abap_rule_1.ABAPRule {
61903
62242
  key: "global_class",
61904
62243
  title: "Global class checks",
61905
62244
  shortDescription: `Checks related to global classes`,
61906
- extendedInformation: `* global classes must be in own files
61907
-
61908
- * file names must match class name
61909
-
61910
- * file names must match interface name
61911
-
61912
- * global classes must be global definitions
61913
-
62245
+ extendedInformation: `* global classes must be in own files
62246
+
62247
+ * file names must match class name
62248
+
62249
+ * file names must match interface name
62250
+
62251
+ * global classes must be global definitions
62252
+
61914
62253
  * global interfaces must be global definitions`,
61915
62254
  tags: [_irule_1.RuleTag.Syntax],
61916
62255
  };
@@ -62009,21 +62348,21 @@ class IdenticalConditions extends _abap_rule_1.ABAPRule {
62009
62348
  return {
62010
62349
  key: "identical_conditions",
62011
62350
  title: "Identical conditions",
62012
- shortDescription: `Find identical conditions in IF + CASE + WHILE etc
62013
-
62351
+ shortDescription: `Find identical conditions in IF + CASE + WHILE etc
62352
+
62014
62353
  Prerequsites: code is pretty printed with identical cAsE`,
62015
62354
  tags: [_irule_1.RuleTag.SingleFile],
62016
- badExample: `IF foo = bar OR 1 = a OR foo = bar.
62017
- ENDIF.
62018
- CASE bar.
62019
- WHEN '1'.
62020
- WHEN 'A' OR '1'.
62355
+ badExample: `IF foo = bar OR 1 = a OR foo = bar.
62356
+ ENDIF.
62357
+ CASE bar.
62358
+ WHEN '1'.
62359
+ WHEN 'A' OR '1'.
62021
62360
  ENDCASE.`,
62022
- goodExample: `IF foo = bar OR 1 = a.
62023
- ENDIF.
62024
- CASE bar.
62025
- WHEN '1'.
62026
- WHEN 'A'.
62361
+ goodExample: `IF foo = bar OR 1 = a.
62362
+ ENDIF.
62363
+ CASE bar.
62364
+ WHEN '1'.
62365
+ WHEN 'A'.
62027
62366
  ENDCASE.`,
62028
62367
  };
62029
62368
  }
@@ -62157,23 +62496,23 @@ class IdenticalContents extends _abap_rule_1.ABAPRule {
62157
62496
  key: "identical_contents",
62158
62497
  title: "Identical contents",
62159
62498
  shortDescription: `Find identical contents in blocks inside IFs, both in the beginning and in the end.`,
62160
- extendedInformation: `
62161
- Prerequsites: code is pretty printed with identical cAsE
62162
-
62499
+ extendedInformation: `
62500
+ Prerequsites: code is pretty printed with identical cAsE
62501
+
62163
62502
  Chained statments are ignored`,
62164
62503
  tags: [_irule_1.RuleTag.SingleFile],
62165
- badExample: `IF foo = bar.
62166
- WRITE 'bar'.
62167
- WRITE 'world'.
62168
- ELSE.
62169
- WRITE 'foo'.
62170
- WRITE 'world'.
62504
+ badExample: `IF foo = bar.
62505
+ WRITE 'bar'.
62506
+ WRITE 'world'.
62507
+ ELSE.
62508
+ WRITE 'foo'.
62509
+ WRITE 'world'.
62171
62510
  ENDIF.`,
62172
- goodExample: `IF foo = bar.
62173
- WRITE 'bar'.
62174
- ELSE.
62175
- WRITE 'foo'.
62176
- ENDIF.
62511
+ goodExample: `IF foo = bar.
62512
+ WRITE 'bar'.
62513
+ ELSE.
62514
+ WRITE 'foo'.
62515
+ ENDIF.
62177
62516
  WRITE 'world'.`,
62178
62517
  };
62179
62518
  }
@@ -62281,12 +62620,12 @@ class IdenticalDescriptions {
62281
62620
  key: "identical_descriptions",
62282
62621
  title: "Identical descriptions",
62283
62622
  shortDescription: `Searches for objects with the same type and same description`,
62284
- extendedInformation: `Case insensitive
62285
-
62286
- Only checks the master language descriptions
62287
-
62288
- Dependencies are skipped
62289
-
62623
+ extendedInformation: `Case insensitive
62624
+
62625
+ Only checks the master language descriptions
62626
+
62627
+ Dependencies are skipped
62628
+
62290
62629
  Works for: INTF, CLAS, DOMA, DTEL, FUNC in same FUGR`,
62291
62630
  tags: [],
62292
62631
  };
@@ -62460,43 +62799,43 @@ class IfInIf extends _abap_rule_1.ABAPRule {
62460
62799
  key: "if_in_if",
62461
62800
  title: "IF in IF",
62462
62801
  shortDescription: `Detects nested ifs which can be refactored.`,
62463
- extendedInformation: `
62464
- Directly nested IFs without ELSE can be refactored to a single condition using AND.
62465
-
62466
- ELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.
62467
-
62468
- https://docs.abapopenchecks.org/checks/01/
62802
+ extendedInformation: `
62803
+ Directly nested IFs without ELSE can be refactored to a single condition using AND.
62804
+
62805
+ ELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.
62806
+
62807
+ https://docs.abapopenchecks.org/checks/01/
62469
62808
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low`,
62470
- badExample: `IF condition1.
62471
- IF condition2.
62472
- ...
62473
- ENDIF.
62474
- ENDIF.
62475
-
62476
- IF condition1.
62477
- ...
62478
- ELSE.
62479
- IF condition2.
62480
- ...
62481
- ENDIF.
62809
+ badExample: `IF condition1.
62810
+ IF condition2.
62811
+ ...
62812
+ ENDIF.
62813
+ ENDIF.
62814
+
62815
+ IF condition1.
62816
+ ...
62817
+ ELSE.
62818
+ IF condition2.
62819
+ ...
62820
+ ENDIF.
62482
62821
  ENDIF.`,
62483
- goodExample: `IF ( condition1 ) AND ( condition2 ).
62484
- ...
62485
- ENDIF.
62486
-
62487
- IF condition1.
62488
- ...
62489
- ELSEIF condition2.
62490
- ...
62491
- ENDIF.
62492
-
62493
- CASE variable.
62494
- WHEN value1.
62495
- ...
62496
- WHEN value2.
62497
- IF condition2.
62498
- ...
62499
- ENDIF.
62822
+ goodExample: `IF ( condition1 ) AND ( condition2 ).
62823
+ ...
62824
+ ENDIF.
62825
+
62826
+ IF condition1.
62827
+ ...
62828
+ ELSEIF condition2.
62829
+ ...
62830
+ ENDIF.
62831
+
62832
+ CASE variable.
62833
+ WHEN value1.
62834
+ ...
62835
+ WHEN value2.
62836
+ IF condition2.
62837
+ ...
62838
+ ENDIF.
62500
62839
  ENDCASE.`,
62501
62840
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
62502
62841
  };
@@ -62681,9 +63020,9 @@ class ImplementMethods extends _abap_rule_1.ABAPRule {
62681
63020
  for (const i of ((_a = file.getStructure()) === null || _a === void 0 ? void 0 : _a.findAllStatements(Statements.ClassImplementation)) || []) {
62682
63021
  const name = (_b = i.findFirstExpression(Expressions.ClassName)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr().toUpperCase();
62683
63022
  if (name === impl.identifier.getName().toUpperCase()) {
62684
- return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
62685
- METHOD ${methodName.toLowerCase()}.
62686
- RETURN. " todo, implement method
63023
+ return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
63024
+ METHOD ${methodName.toLowerCase()}.
63025
+ RETURN. " todo, implement method
62687
63026
  ENDMETHOD.`);
62688
63027
  }
62689
63028
  }
@@ -62862,14 +63201,14 @@ class ImplicitStartOfSelection extends _abap_rule_1.ABAPRule {
62862
63201
  key: "implicit_start_of_selection",
62863
63202
  title: "Implicit START-OF-SELECTION",
62864
63203
  shortDescription: `Add explicit selection screen event handling`,
62865
- extendedInformation: `Only runs for executable programs
62866
-
63204
+ extendedInformation: `Only runs for executable programs
63205
+
62867
63206
  https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapstart-of-selection.htm`,
62868
63207
  tags: [_irule_1.RuleTag.SingleFile],
62869
- badExample: `REPORT zfoo.
63208
+ badExample: `REPORT zfoo.
62870
63209
  WRITE 'hello'.`,
62871
- goodExample: `
62872
- START-OF-SELECTION.
63210
+ goodExample: `
63211
+ START-OF-SELECTION.
62873
63212
  WRITE 'hello'.`,
62874
63213
  };
62875
63214
  }
@@ -62974,19 +63313,19 @@ class InStatementIndentation extends _abap_rule_1.ABAPRule {
62974
63313
  key: "in_statement_indentation",
62975
63314
  title: "In-statement indentation",
62976
63315
  shortDescription: "Checks alignment within statements which span multiple lines.",
62977
- extendedInformation: `Lines following the first line should be indented once (2 spaces).
62978
-
62979
- For block declaration statements, lines after the first should be indented an additional time (default: +2 spaces)
63316
+ extendedInformation: `Lines following the first line should be indented once (2 spaces).
63317
+
63318
+ For block declaration statements, lines after the first should be indented an additional time (default: +2 spaces)
62980
63319
  to distinguish them better from code within the block.`,
62981
- badExample: `IF 1 = 1
62982
- AND 2 = 2.
62983
- WRITE 'hello' &&
62984
- 'world'.
63320
+ badExample: `IF 1 = 1
63321
+ AND 2 = 2.
63322
+ WRITE 'hello' &&
63323
+ 'world'.
62985
63324
  ENDIF.`,
62986
- goodExample: `IF 1 = 1
62987
- AND 2 = 2.
62988
- WRITE 'hello' &&
62989
- 'world'.
63325
+ goodExample: `IF 1 = 1
63326
+ AND 2 = 2.
63327
+ WRITE 'hello' &&
63328
+ 'world'.
62990
63329
  ENDIF.`,
62991
63330
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
62992
63331
  };
@@ -63013,7 +63352,9 @@ ENDIF.`,
63013
63352
  }
63014
63353
  }
63015
63354
  for (const s of file.getStatements()) {
63016
- if (s.get() instanceof _statement_1.Comment || s.get() instanceof _statement_1.Unknown) {
63355
+ if (s.get() instanceof _statement_1.Comment
63356
+ || s.get() instanceof _statement_1.Unknown
63357
+ || s.get() instanceof _statement_1.NativeSQL) {
63017
63358
  continue;
63018
63359
  }
63019
63360
  const tokens = s.getTokens();
@@ -63110,23 +63451,23 @@ class Indentation extends _abap_rule_1.ABAPRule {
63110
63451
  title: "Indentation",
63111
63452
  shortDescription: `Checks indentation`,
63112
63453
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
63113
- badExample: `CLASS lcl DEFINITION.
63114
- PRIVATE SECTION.
63115
- METHODS constructor.
63116
- ENDCLASS.
63117
-
63118
- CLASS lcl IMPLEMENTATION.
63119
- METHOD constructor.
63120
- ENDMETHOD.
63454
+ badExample: `CLASS lcl DEFINITION.
63455
+ PRIVATE SECTION.
63456
+ METHODS constructor.
63457
+ ENDCLASS.
63458
+
63459
+ CLASS lcl IMPLEMENTATION.
63460
+ METHOD constructor.
63461
+ ENDMETHOD.
63121
63462
  ENDCLASS.`,
63122
- goodExample: `CLASS lcl DEFINITION.
63123
- PRIVATE SECTION.
63124
- METHODS constructor.
63125
- ENDCLASS.
63126
-
63127
- CLASS lcl IMPLEMENTATION.
63128
- METHOD constructor.
63129
- ENDMETHOD.
63463
+ goodExample: `CLASS lcl DEFINITION.
63464
+ PRIVATE SECTION.
63465
+ METHODS constructor.
63466
+ ENDCLASS.
63467
+
63468
+ CLASS lcl IMPLEMENTATION.
63469
+ METHOD constructor.
63470
+ ENDMETHOD.
63130
63471
  ENDCLASS.`,
63131
63472
  };
63132
63473
  }
@@ -63530,9 +63871,9 @@ class IntfReferencingClas {
63530
63871
  key: "intf_referencing_clas",
63531
63872
  title: "INTF referencing CLAS",
63532
63873
  shortDescription: `Interface contains references to class`,
63533
- extendedInformation: `Only global interfaces are checked.
63534
- Only first level references are checked.
63535
- Exception class references are ignored.
63874
+ extendedInformation: `Only global interfaces are checked.
63875
+ Only first level references are checked.
63876
+ Exception class references are ignored.
63536
63877
  Void references are ignored.`,
63537
63878
  };
63538
63879
  }
@@ -63617,9 +63958,9 @@ class InvalidTableIndex extends _abap_rule_1.ABAPRule {
63617
63958
  title: "Invalid Table Index",
63618
63959
  shortDescription: `Issues error for constant table index zero, as ABAP starts from 1`,
63619
63960
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
63620
- badExample: `DATA(first) = table[ 0 ].
63961
+ badExample: `DATA(first) = table[ 0 ].
63621
63962
  READ TABLE gt_stack ASSIGNING <ls_stack> INDEX 0.`,
63622
- goodExample: `DATA(first) = table[ 1 ].
63963
+ goodExample: `DATA(first) = table[ 1 ].
63623
63964
  READ TABLE gt_stack ASSIGNING <ls_stack> INDEX 1.`,
63624
63965
  };
63625
63966
  }
@@ -64221,8 +64562,8 @@ class LineBreakStyle {
64221
64562
  return {
64222
64563
  key: "line_break_style",
64223
64564
  title: "Makes sure line breaks are consistent in the ABAP code",
64224
- shortDescription: `Enforces LF as newlines in ABAP files
64225
-
64565
+ shortDescription: `Enforces LF as newlines in ABAP files
64566
+
64226
64567
  abapGit does not work with CRLF`,
64227
64568
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
64228
64569
  };
@@ -64291,7 +64632,7 @@ class LineLength extends _abap_rule_1.ABAPRule {
64291
64632
  key: "line_length",
64292
64633
  title: "Line length",
64293
64634
  shortDescription: `Detects lines exceeding the provided maximum length.`,
64294
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length
64635
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length
64295
64636
  https://docs.abapopenchecks.org/checks/04/`,
64296
64637
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
64297
64638
  };
@@ -64362,7 +64703,7 @@ class LineOnlyPunc extends _abap_rule_1.ABAPRule {
64362
64703
  key: "line_only_punc",
64363
64704
  title: "Line containing only punctuation",
64364
64705
  shortDescription: `Detects lines containing only punctuation.`,
64365
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#close-brackets-at-line-end
64706
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#close-brackets-at-line-end
64366
64707
  https://docs.abapopenchecks.org/checks/16/`,
64367
64708
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
64368
64709
  badExample: "zcl_class=>method(\n).",
@@ -64625,15 +64966,15 @@ class LocalVariableNames extends _abap_rule_1.ABAPRule {
64625
64966
  return {
64626
64967
  key: "local_variable_names",
64627
64968
  title: "Local variable naming conventions",
64628
- shortDescription: `
64629
- Allows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols.
64969
+ shortDescription: `
64970
+ Allows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols.
64630
64971
  Regexes are case-insensitive.`,
64631
64972
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
64632
- badExample: `FORM bar.
64633
- DATA foo.
64973
+ badExample: `FORM bar.
64974
+ DATA foo.
64634
64975
  ENDFORM.`,
64635
- goodExample: `FORM bar.
64636
- DATA lv_foo.
64976
+ goodExample: `FORM bar.
64977
+ DATA lv_foo.
64637
64978
  ENDFORM.`,
64638
64979
  };
64639
64980
  }
@@ -64785,9 +65126,9 @@ class MacroNaming extends _abap_rule_1.ABAPRule {
64785
65126
  shortDescription: `Allows you to enforce a pattern for macro definitions`,
64786
65127
  extendedInformation: `Use rule "avoid_use" to avoid macros altogether.`,
64787
65128
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
64788
- badExample: `DEFINE something.
65129
+ badExample: `DEFINE something.
64789
65130
  END-OF-DEFINITION.`,
64790
- goodExample: `DEFINE _something.
65131
+ goodExample: `DEFINE _something.
64791
65132
  END-OF-DEFINITION.`,
64792
65133
  };
64793
65134
  }
@@ -64860,10 +65201,10 @@ class MainFileContents {
64860
65201
  key: "main_file_contents",
64861
65202
  title: "Main file contents",
64862
65203
  shortDescription: `Checks related to report declarations.`,
64863
- extendedInformation: `Does not run if the target version is Cloud
64864
-
64865
- * PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
64866
- * TYPEs must begin with "TYPE-POOL <name>."
65204
+ extendedInformation: `Does not run if the target version is Cloud
65205
+
65206
+ * PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
65207
+ * TYPEs must begin with "TYPE-POOL <name>."
64867
65208
  `,
64868
65209
  };
64869
65210
  }
@@ -64979,17 +65320,17 @@ class ManyParentheses extends _abap_rule_1.ABAPRule {
64979
65320
  title: "Too many parentheses",
64980
65321
  shortDescription: `Searches for expressions where extra parentheses can safely be removed`,
64981
65322
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
64982
- badExample: `
64983
- IF ( destination IS INITIAL ).
64984
- ENDIF.
64985
- IF foo = boo AND ( bar = lar AND moo = loo ).
64986
- ENDIF.
65323
+ badExample: `
65324
+ IF ( destination IS INITIAL ).
65325
+ ENDIF.
65326
+ IF foo = boo AND ( bar = lar AND moo = loo ).
65327
+ ENDIF.
64987
65328
  `,
64988
- goodExample: `
64989
- IF destination IS INITIAL.
64990
- ENDIF.
64991
- IF foo = boo AND bar = lar AND moo = loo.
64992
- ENDIF.
65329
+ goodExample: `
65330
+ IF destination IS INITIAL.
65331
+ ENDIF.
65332
+ IF foo = boo AND bar = lar AND moo = loo.
65333
+ ENDIF.
64993
65334
  `,
64994
65335
  };
64995
65336
  }
@@ -65163,14 +65504,14 @@ class MaxOneMethodParameterPerLine extends _abap_rule_1.ABAPRule {
65163
65504
  title: "Max one method parameter definition per line",
65164
65505
  shortDescription: `Keep max one method parameter description per line`,
65165
65506
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace],
65166
- badExample: `
65167
- METHODS apps_scope_token
65168
- IMPORTING
65507
+ badExample: `
65508
+ METHODS apps_scope_token
65509
+ IMPORTING
65169
65510
  body TYPE bodyapps_scope_token client_id TYPE str.`,
65170
- goodExample: `
65171
- METHODS apps_scope_token
65172
- IMPORTING
65173
- body TYPE bodyapps_scope_token
65511
+ goodExample: `
65512
+ METHODS apps_scope_token
65513
+ IMPORTING
65514
+ body TYPE bodyapps_scope_token
65174
65515
  client_id TYPE str.`,
65175
65516
  };
65176
65517
  }
@@ -65235,11 +65576,11 @@ class MaxOneStatement extends _abap_rule_1.ABAPRule {
65235
65576
  key: "max_one_statement",
65236
65577
  title: "Max one statement per line",
65237
65578
  shortDescription: `Checks that each line contains only a single statement.`,
65238
- extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
65239
-
65240
- Does not report anything for chained statements.
65241
-
65242
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line
65579
+ extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
65580
+
65581
+ Does not report anything for chained statements.
65582
+
65583
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line
65243
65584
  https://docs.abapopenchecks.org/checks/11/`,
65244
65585
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
65245
65586
  badExample: `WRITE foo. WRITE bar.`,
@@ -65577,8 +65918,8 @@ class MethodLength {
65577
65918
  key: "method_length",
65578
65919
  title: "Method/Form Length",
65579
65920
  shortDescription: `Checks relating to method/form length.`,
65580
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
65581
-
65921
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
65922
+
65582
65923
  Abstract methods without statements are considered okay.`,
65583
65924
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
65584
65925
  };
@@ -65683,20 +66024,20 @@ class MethodOverwritesBuiltIn extends _abap_rule_1.ABAPRule {
65683
66024
  key: "method_overwrites_builtin",
65684
66025
  title: "Method name overwrites builtin function",
65685
66026
  shortDescription: `Checks Method names that overwrite builtin SAP functions`,
65686
- extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
65687
-
65688
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
65689
-
66027
+ extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
66028
+
66029
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
66030
+
65690
66031
  Interface method names are ignored`,
65691
66032
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
65692
- badExample: `CLASS lcl DEFINITION.
65693
- PUBLIC SECTION.
65694
- METHODS matches.
65695
- ENDCLASS.
65696
-
65697
- CLASS lcl IMPLEMENTATION.
65698
- METHOD matches.
65699
- ENDMETHOD.
66033
+ badExample: `CLASS lcl DEFINITION.
66034
+ PUBLIC SECTION.
66035
+ METHODS matches.
66036
+ ENDCLASS.
66037
+
66038
+ CLASS lcl IMPLEMENTATION.
66039
+ METHOD matches.
66040
+ ENDMETHOD.
65700
66041
  ENDCLASS.`,
65701
66042
  };
65702
66043
  }
@@ -65887,12 +66228,12 @@ class MixReturning extends _abap_rule_1.ABAPRule {
65887
66228
  // eslint-disable-next-line max-len
65888
66229
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-either-returning-or-exporting-or-changing-but-not-a-combination`,
65889
66230
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
65890
- badExample: `CLASS lcl DEFINITION.
65891
- PUBLIC SECTION.
65892
- METHODS
65893
- foobar
65894
- EXPORTING foo TYPE i
65895
- RETURNING VALUE(rv_string) TYPE string.
66231
+ badExample: `CLASS lcl DEFINITION.
66232
+ PUBLIC SECTION.
66233
+ METHODS
66234
+ foobar
66235
+ EXPORTING foo TYPE i
66236
+ RETURNING VALUE(rv_string) TYPE string.
65896
66237
  ENDCLASS.`,
65897
66238
  };
65898
66239
  }
@@ -66272,7 +66613,7 @@ class Nesting extends _abap_rule_1.ABAPRule {
66272
66613
  key: "nesting",
66273
66614
  title: "Check nesting depth",
66274
66615
  shortDescription: `Checks for methods exceeding a maximum nesting depth`,
66275
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low
66616
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low
66276
66617
  https://docs.abapopenchecks.org/checks/74/`,
66277
66618
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
66278
66619
  };
@@ -66515,7 +66856,7 @@ class NoChainedAssignment extends _abap_rule_1.ABAPRule {
66515
66856
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-chain-assignments`,
66516
66857
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
66517
66858
  badExample: `var1 = var2 = var3.`,
66518
- goodExample: `var2 = var3.
66859
+ goodExample: `var2 = var3.
66519
66860
  var1 = var2.`,
66520
66861
  };
66521
66862
  }
@@ -66574,8 +66915,8 @@ class NoExternalFormCalls extends _abap_rule_1.ABAPRule {
66574
66915
  key: "no_external_form_calls",
66575
66916
  title: "No external FORM calls",
66576
66917
  shortDescription: `Detect external form calls`,
66577
- badExample: `PERFORM foo IN PROGRAM bar.
66578
-
66918
+ badExample: `PERFORM foo IN PROGRAM bar.
66919
+
66579
66920
  PERFORM foo(bar).`,
66580
66921
  tags: [_irule_1.RuleTag.SingleFile],
66581
66922
  };
@@ -66636,17 +66977,17 @@ class NoInlineInOptionalBranches extends _abap_rule_1.ABAPRule {
66636
66977
  key: "no_inline_in_optional_branches",
66637
66978
  title: "Don't declare inline in optional branches",
66638
66979
  shortDescription: `Don't declare inline in optional branches`,
66639
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
66640
-
66641
- Considered optional branches:
66642
- * inside IF/ELSEIF/ELSE
66643
- * inside LOOP
66644
- * inside WHILE
66645
- * inside CASE/WHEN, CASE TYPE OF
66646
- * inside DO
66647
- * inside SELECT loops
66648
-
66649
- Not considered optional branches:
66980
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
66981
+
66982
+ Considered optional branches:
66983
+ * inside IF/ELSEIF/ELSE
66984
+ * inside LOOP
66985
+ * inside WHILE
66986
+ * inside CASE/WHEN, CASE TYPE OF
66987
+ * inside DO
66988
+ * inside SELECT loops
66989
+
66990
+ Not considered optional branches:
66650
66991
  * TRY/CATCH/CLEANUP`,
66651
66992
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
66652
66993
  };
@@ -66746,12 +67087,12 @@ class NoPrefixes extends _abap_rule_1.ABAPRule {
66746
67087
  key: "no_prefixes",
66747
67088
  title: "No Prefixes",
66748
67089
  shortDescription: `Dont use hungarian notation`,
66749
- extendedInformation: `
66750
- Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
66751
- allowing all types to become voided, abaplint will then provide less precise syntax errors.
66752
-
66753
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
66754
-
67090
+ extendedInformation: `
67091
+ Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
67092
+ allowing all types to become voided, abaplint will then provide less precise syntax errors.
67093
+
67094
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
67095
+
66755
67096
  https://github.com/SAP/styleguides/blob/main/clean-abap/sub-sections/AvoidEncodings.md`,
66756
67097
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
66757
67098
  badExample: `DATA lv_foo TYPE i.`,
@@ -66930,7 +67271,7 @@ class NoPublicAttributes extends _abap_rule_1.ABAPRule {
66930
67271
  return {
66931
67272
  key: "no_public_attributes",
66932
67273
  title: "No public attributes",
66933
- shortDescription: `Checks that classes and interfaces don't contain any public attributes.
67274
+ shortDescription: `Checks that classes and interfaces don't contain any public attributes.
66934
67275
  Exceptions are excluded from this rule.`,
66935
67276
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#members-private-by-default-protected-only-if-needed`,
66936
67277
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
@@ -67031,13 +67372,13 @@ class NoYodaConditions extends _abap_rule_1.ABAPRule {
67031
67372
  key: "no_yoda_conditions",
67032
67373
  title: "No Yoda conditions",
67033
67374
  shortDescription: `Finds Yoda conditions and reports issues`,
67034
- extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
67035
-
67375
+ extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
67376
+
67036
67377
  Conditions with operators CP, NP, CS, NS, CA, NA, CO, CN are ignored`,
67037
67378
  tags: [_irule_1.RuleTag.SingleFile],
67038
- badExample: `IF 0 <> sy-subrc.
67379
+ badExample: `IF 0 <> sy-subrc.
67039
67380
  ENDIF.`,
67040
- goodExample: `IF sy-subrc <> 0.
67381
+ goodExample: `IF sy-subrc <> 0.
67041
67382
  ENDIF.`,
67042
67383
  };
67043
67384
  }
@@ -67138,8 +67479,8 @@ class NROBConsistency {
67138
67479
  key: "nrob_consistency",
67139
67480
  title: "Number range consistency",
67140
67481
  shortDescription: `Consistency checks for number ranges`,
67141
- extendedInformation: `Issue reported if percentage warning is over 50%
67142
-
67482
+ extendedInformation: `Issue reported if percentage warning is over 50%
67483
+
67143
67484
  Issue reported if the referenced domain is not found(taking error namespace into account)`,
67144
67485
  tags: [_irule_1.RuleTag.SingleFile],
67145
67486
  };
@@ -67416,58 +67757,58 @@ class ObsoleteStatement extends _abap_rule_1.ABAPRule {
67416
67757
  title: "Obsolete statements",
67417
67758
  shortDescription: `Checks for usages of certain obsolete statements`,
67418
67759
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
67419
- extendedInformation: `
67420
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
67421
-
67422
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
67423
-
67424
- SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
67425
-
67426
- IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
67427
-
67428
- WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
67429
-
67430
- FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
67431
-
67432
- TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
67433
-
67434
- LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
67435
-
67436
- COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
67437
-
67438
- OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
67439
-
67440
- PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
67441
-
67442
- RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
67443
-
67444
- PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
67445
-
67446
- MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
67447
-
67448
- SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
67449
- SELECT COUNT(*) is considered okay
67450
-
67451
- FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
67452
-
67453
- SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
67454
-
67455
- CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
67456
-
67457
- POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
67458
-
67459
- OCCURENCES: check for OCCURENCES vs OCCURRENCES
67460
-
67760
+ extendedInformation: `
67761
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
67762
+
67763
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
67764
+
67765
+ SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
67766
+
67767
+ IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
67768
+
67769
+ WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
67770
+
67771
+ FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
67772
+
67773
+ TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
67774
+
67775
+ LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
67776
+
67777
+ COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
67778
+
67779
+ OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
67780
+
67781
+ PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
67782
+
67783
+ RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
67784
+
67785
+ PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
67786
+
67787
+ MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
67788
+
67789
+ SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
67790
+ SELECT COUNT(*) is considered okay
67791
+
67792
+ FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
67793
+
67794
+ SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
67795
+
67796
+ CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
67797
+
67798
+ POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
67799
+
67800
+ OCCURENCES: check for OCCURENCES vs OCCURRENCES
67801
+
67461
67802
  CLIENT SPECIFIED, from 754: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abapselect_client_obsolete.htm`,
67462
- badExample: `REFRESH itab.
67463
-
67464
- COMPUTE foo = 2 + 2.
67465
-
67466
- MULTIPLY lv_foo BY 2.
67467
-
67468
- INTERFACE intf LOAD.
67469
-
67470
- IF foo IS SUPPLIED.
67803
+ badExample: `REFRESH itab.
67804
+
67805
+ COMPUTE foo = 2 + 2.
67806
+
67807
+ MULTIPLY lv_foo BY 2.
67808
+
67809
+ INTERFACE intf LOAD.
67810
+
67811
+ IF foo IS SUPPLIED.
67471
67812
  ENDIF.`,
67472
67813
  };
67473
67814
  }
@@ -67807,9 +68148,9 @@ class OmitParameterName {
67807
68148
  key: "omit_parameter_name",
67808
68149
  title: "Omit parameter name",
67809
68150
  shortDescription: `Omit the parameter name in single parameter calls`,
67810
- extendedInformation: `
67811
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
67812
-
68151
+ extendedInformation: `
68152
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
68153
+
67813
68154
  EXPORTING must already be omitted for this rule to take effect, https://rules.abaplint.org/exporting/`,
67814
68155
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
67815
68156
  badExample: `method( param = 2 ).`,
@@ -68015,20 +68356,20 @@ class OmitReceiving extends _abap_rule_1.ABAPRule {
68015
68356
  shortDescription: `Omit RECEIVING`,
68016
68357
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-receiving`,
68017
68358
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
68018
- badExample: `
68019
- upload_pack(
68020
- EXPORTING
68021
- io_client = lo_client
68022
- iv_url = iv_url
68023
- iv_deepen_level = iv_deepen_level
68024
- it_hashes = lt_hashes
68025
- RECEIVING
68359
+ badExample: `
68360
+ upload_pack(
68361
+ EXPORTING
68362
+ io_client = lo_client
68363
+ iv_url = iv_url
68364
+ iv_deepen_level = iv_deepen_level
68365
+ it_hashes = lt_hashes
68366
+ RECEIVING
68026
68367
  rt_objects = et_objects ).`,
68027
- goodExample: `
68028
- et_objects = upload_pack(
68029
- io_client = lo_client
68030
- iv_url = iv_url
68031
- iv_deepen_level = iv_deepen_level
68368
+ goodExample: `
68369
+ et_objects = upload_pack(
68370
+ io_client = lo_client
68371
+ iv_url = iv_url
68372
+ iv_deepen_level = iv_deepen_level
68032
68373
  it_hashes = lt_hashes ).`,
68033
68374
  };
68034
68375
  }
@@ -68092,8 +68433,8 @@ class Parser702Chaining extends _abap_rule_1.ABAPRule {
68092
68433
  return {
68093
68434
  key: "parser_702_chaining",
68094
68435
  title: "Parser Error, bad chanining on 702",
68095
- shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
68096
- this rule finds these and reports errors.
68436
+ shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
68437
+ this rule finds these and reports errors.
68097
68438
  Only active on target version 702 and below.`,
68098
68439
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
68099
68440
  };
@@ -68173,8 +68514,8 @@ class ParserError {
68173
68514
  return {
68174
68515
  key: "parser_error",
68175
68516
  title: "Parser error",
68176
- shortDescription: `Checks for syntax not recognized by abaplint.
68177
-
68517
+ shortDescription: `Checks for syntax not recognized by abaplint.
68518
+
68178
68519
  See recognized syntax at https://syntax.abaplint.org`,
68179
68520
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
68180
68521
  };
@@ -68259,7 +68600,7 @@ class ParserMissingSpace extends _abap_rule_1.ABAPRule {
68259
68600
  return {
68260
68601
  key: "parser_missing_space",
68261
68602
  title: "Parser Error, missing space",
68262
- shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.
68603
+ shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.
68263
68604
  This rule makes sure the spaces are consistently required across the language.`,
68264
68605
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
68265
68606
  badExample: `IF ( foo = 'bar').`,
@@ -68682,25 +69023,25 @@ class PreferInline {
68682
69023
  key: "prefer_inline",
68683
69024
  title: "Prefer Inline Declarations",
68684
69025
  shortDescription: `Prefer inline to up-front declarations.`,
68685
- extendedInformation: `EXPERIMENTAL
68686
-
68687
- Activates if language version is v740sp02 or above.
68688
-
68689
- Variables must be local(METHOD or FORM).
68690
-
68691
- No generic or void typed variables. No syntax errors.
68692
-
68693
- First position used must be a full/pure write.
68694
-
68695
- Move statment is not a cast(?=)
68696
-
69026
+ extendedInformation: `EXPERIMENTAL
69027
+
69028
+ Activates if language version is v740sp02 or above.
69029
+
69030
+ Variables must be local(METHOD or FORM).
69031
+
69032
+ No generic or void typed variables. No syntax errors.
69033
+
69034
+ First position used must be a full/pure write.
69035
+
69036
+ Move statment is not a cast(?=)
69037
+
68697
69038
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-inline-to-up-front-declarations`,
68698
69039
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Experimental, _irule_1.RuleTag.Quickfix],
68699
- badExample: `DATA foo TYPE i.
68700
- foo = 2.
68701
- DATA percentage TYPE decfloat34.
69040
+ badExample: `DATA foo TYPE i.
69041
+ foo = 2.
69042
+ DATA percentage TYPE decfloat34.
68702
69043
  percentage = ( comment_number / abs_statement_number ) * 100.`,
68703
- goodExample: `DATA(foo) = 2.
69044
+ goodExample: `DATA(foo) = 2.
68704
69045
  DATA(percentage) = CONV decfloat34( comment_number / abs_statement_number ) * 100.`,
68705
69046
  };
68706
69047
  }
@@ -68914,18 +69255,18 @@ class PreferIsNot extends _abap_rule_1.ABAPRule {
68914
69255
  key: "prefer_is_not",
68915
69256
  title: "Prefer IS NOT to NOT IS",
68916
69257
  shortDescription: `Prefer IS NOT to NOT IS`,
68917
- extendedInformation: `
68918
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
68919
-
69258
+ extendedInformation: `
69259
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
69260
+
68920
69261
  "if not is_valid( )." examples are skipped`,
68921
69262
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
68922
- goodExample: `IF variable IS NOT INITIAL.
68923
- IF variable NP 'TODO*'.
68924
- IF variable <> 42.
69263
+ goodExample: `IF variable IS NOT INITIAL.
69264
+ IF variable NP 'TODO*'.
69265
+ IF variable <> 42.
68925
69266
  IF variable CO 'hello'.`,
68926
- badExample: `IF NOT variable IS INITIAL.
68927
- IF NOT variable CP 'TODO*'.
68928
- IF NOT variable = 42.
69267
+ badExample: `IF NOT variable IS INITIAL.
69268
+ IF NOT variable CP 'TODO*'.
69269
+ IF NOT variable = 42.
68929
69270
  IF NOT variable CA 'hello'.`,
68930
69271
  };
68931
69272
  }
@@ -69113,14 +69454,14 @@ class PreferRaiseExceptionNew extends _abap_rule_1.ABAPRule {
69113
69454
  key: "prefer_raise_exception_new",
69114
69455
  title: "Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE",
69115
69456
  shortDescription: `Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE`,
69116
- extendedInformation: `
69117
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
69118
-
69457
+ extendedInformation: `
69458
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
69459
+
69119
69460
  From 752 and up`,
69120
69461
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
69121
69462
  goodExample: `RAISE EXCEPTION NEW cx_generation_error( previous = exception ).`,
69122
- badExample: `RAISE EXCEPTION TYPE cx_generation_error
69123
- EXPORTING
69463
+ badExample: `RAISE EXCEPTION TYPE cx_generation_error
69464
+ EXPORTING
69124
69465
  previous = exception.`,
69125
69466
  };
69126
69467
  }
@@ -69198,12 +69539,12 @@ class PreferReturningToExporting extends _abap_rule_1.ABAPRule {
69198
69539
  key: "prefer_returning_to_exporting",
69199
69540
  title: "Prefer RETURNING to EXPORTING",
69200
69541
  shortDescription: `Prefer RETURNING to EXPORTING. Generic types cannot be RETURNING.`,
69201
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting
69542
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting
69202
69543
  https://docs.abapopenchecks.org/checks/44/`,
69203
69544
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
69204
- badExample: `CLASS lcl DEFINITION.
69205
- PUBLIC SECTION.
69206
- METHODS test EXPORTING ev_foo TYPE i.
69545
+ badExample: `CLASS lcl DEFINITION.
69546
+ PUBLIC SECTION.
69547
+ METHODS test EXPORTING ev_foo TYPE i.
69207
69548
  ENDCLASS.`,
69208
69549
  };
69209
69550
  }
@@ -69299,8 +69640,8 @@ class PreferXsdbool extends _abap_rule_1.ABAPRule {
69299
69640
  key: "prefer_xsdbool",
69300
69641
  title: "Prefer xsdbool over boolc",
69301
69642
  shortDescription: `Prefer xsdbool over boolc`,
69302
- extendedInformation: `Activates if language version is v740sp08 or above.
69303
-
69643
+ extendedInformation: `Activates if language version is v740sp08 or above.
69644
+
69304
69645
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
69305
69646
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
69306
69647
  badExample: `DATA(sdf) = boolc( 1 = 2 ).`,
@@ -69372,9 +69713,9 @@ class PreferredCompareOperator extends _abap_rule_1.ABAPRule {
69372
69713
  title: "Preferred compare operator",
69373
69714
  shortDescription: `Configure undesired operator variants`,
69374
69715
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
69375
- badExample: `IF foo EQ bar.
69716
+ badExample: `IF foo EQ bar.
69376
69717
  ENDIF.`,
69377
- goodExample: `IF foo = bar.
69718
+ goodExample: `IF foo = bar.
69378
69719
  ENDIF.`,
69379
69720
  };
69380
69721
  }
@@ -69598,26 +69939,26 @@ class ReduceProceduralCode extends _abap_rule_1.ABAPRule {
69598
69939
  key: "reduce_procedural_code",
69599
69940
  title: "Reduce procedural code",
69600
69941
  shortDescription: `Checks FORM and FUNCTION-MODULE have few statements`,
69601
- extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
69602
-
69603
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
69604
-
69942
+ extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
69943
+
69944
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
69945
+
69605
69946
  Comments are not counted as statements.`,
69606
69947
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
69607
- badExample: `FORM foo.
69608
- DATA lv_bar TYPE i.
69609
- lv_bar = 2 + 2.
69610
- IF lv_bar = 4.
69611
- WRITE 'hello world'.
69612
- ENDIF.
69613
- DATA lv_bar TYPE i.
69614
- lv_bar = 2 + 2.
69615
- IF lv_bar = 4.
69616
- WRITE 'hello world'.
69617
- ENDIF.
69948
+ badExample: `FORM foo.
69949
+ DATA lv_bar TYPE i.
69950
+ lv_bar = 2 + 2.
69951
+ IF lv_bar = 4.
69952
+ WRITE 'hello world'.
69953
+ ENDIF.
69954
+ DATA lv_bar TYPE i.
69955
+ lv_bar = 2 + 2.
69956
+ IF lv_bar = 4.
69957
+ WRITE 'hello world'.
69958
+ ENDIF.
69618
69959
  ENDFORM.`,
69619
- goodExample: `FORM foo.
69620
- NEW zcl_global_class( )->run_logic( ).
69960
+ goodExample: `FORM foo.
69961
+ NEW zcl_global_class( )->run_logic( ).
69621
69962
  ENDFORM.`,
69622
69963
  };
69623
69964
  }
@@ -69861,10 +70202,10 @@ class RemoveDescriptions {
69861
70202
  return {
69862
70203
  key: "remove_descriptions",
69863
70204
  title: "Remove descriptions",
69864
- shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
69865
-
69866
- Class descriptions are required, see rule description_empty.
69867
-
70205
+ shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
70206
+
70207
+ Class descriptions are required, see rule description_empty.
70208
+
69868
70209
  Consider using ABAP Doc for documentation.`,
69869
70210
  tags: [],
69870
70211
  };
@@ -69989,14 +70330,14 @@ class RFCErrorHandling extends _abap_rule_1.ABAPRule {
69989
70330
  tags: [_irule_1.RuleTag.SingleFile],
69990
70331
  shortDescription: `Checks that exceptions 'system_failure' and 'communication_failure' are handled in RFC calls`,
69991
70332
  extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenrfc_exception.htm`,
69992
- badExample: `CALL FUNCTION 'ZRFC'
70333
+ badExample: `CALL FUNCTION 'ZRFC'
69993
70334
  DESTINATION lv_rfc.`,
69994
- goodExample: `CALL FUNCTION 'ZRFC'
69995
- DESTINATION lv_rfc
69996
- EXCEPTIONS
69997
- system_failure = 1 MESSAGE msg
69998
- communication_failure = 2 MESSAGE msg
69999
- resource_failure = 3
70335
+ goodExample: `CALL FUNCTION 'ZRFC'
70336
+ DESTINATION lv_rfc
70337
+ EXCEPTIONS
70338
+ system_failure = 1 MESSAGE msg
70339
+ communication_failure = 2 MESSAGE msg
70340
+ resource_failure = 3
70000
70341
  OTHERS = 4.`,
70001
70342
  };
70002
70343
  }
@@ -70080,11 +70421,11 @@ class SelectAddOrderBy {
70080
70421
  key: "select_add_order_by",
70081
70422
  title: "SELECT add ORDER BY",
70082
70423
  shortDescription: `SELECTs add ORDER BY clause`,
70083
- extendedInformation: `
70084
- This will make sure that the SELECT statement returns results in the same sequence on different databases
70085
-
70086
- add ORDER BY PRIMARY KEY if in doubt
70087
-
70424
+ extendedInformation: `
70425
+ This will make sure that the SELECT statement returns results in the same sequence on different databases
70426
+
70427
+ add ORDER BY PRIMARY KEY if in doubt
70428
+
70088
70429
  If the target is a sorted/hashed table, no issue is reported`,
70089
70430
  tags: [_irule_1.RuleTag.SingleFile],
70090
70431
  badExample: `SELECT * FROM db INTO TABLE @DATA(tab).`,
@@ -70215,14 +70556,14 @@ class SelectPerformance {
70215
70556
  key: "select_performance",
70216
70557
  title: "SELECT performance",
70217
70558
  shortDescription: `Various checks regarding SELECT performance.`,
70218
- extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
70219
-
70559
+ extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
70560
+
70220
70561
  SELECT *: not reported if using INTO/APPENDING CORRESPONDING FIELDS OF`,
70221
70562
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Performance],
70222
- badExample: `SELECT field1, field2 FROM table
70223
- INTO @DATA(structure) UP TO 1 ROWS ORDER BY field3 DESCENDING.
70563
+ badExample: `SELECT field1, field2 FROM table
70564
+ INTO @DATA(structure) UP TO 1 ROWS ORDER BY field3 DESCENDING.
70224
70565
  ENDSELECT.`,
70225
- goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
70566
+ goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
70226
70567
  INTO TABLE @DATA(table) ORDER BY field3 DESCENDING`,
70227
70568
  };
70228
70569
  }
@@ -70336,8 +70677,8 @@ class SelectSingleFullKey {
70336
70677
  key: "select_single_full_key",
70337
70678
  title: "Detect SELECT SINGLE which are possibily not unique",
70338
70679
  shortDescription: `Detect SELECT SINGLE which are possibily not unique`,
70339
- extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
70340
-
70680
+ extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
70681
+
70341
70682
  If the statement contains a JOIN it is not checked`,
70342
70683
  pseudoComment: "EC CI_NOORDER",
70343
70684
  tags: [_irule_1.RuleTag.Quickfix],
@@ -70765,8 +71106,8 @@ class SICFConsistency {
70765
71106
  key: "sicf_consistency",
70766
71107
  title: "SICF consistency",
70767
71108
  shortDescription: `Checks the validity of ICF services`,
70768
- extendedInformation: `* Class defined in handler must exist
70769
- * Class must not have any syntax errors
71109
+ extendedInformation: `* Class defined in handler must exist
71110
+ * Class must not have any syntax errors
70770
71111
  * Class must implement interface IF_HTTP_EXTENSION`,
70771
71112
  };
70772
71113
  }
@@ -70878,23 +71219,23 @@ class SlowParameterPassing {
70878
71219
  shortDescription: `Detects slow pass by value passing for methods where parameter is not changed`,
70879
71220
  extendedInformation: `Method parameters defined in interfaces is not checked`,
70880
71221
  tags: [_irule_1.RuleTag.Performance],
70881
- badExample: `CLASS lcl DEFINITION.
70882
- PUBLIC SECTION.
70883
- METHODS bar IMPORTING VALUE(sdf) TYPE string.
70884
- ENDCLASS.
70885
- CLASS lcl IMPLEMENTATION.
70886
- METHOD bar.
70887
- WRITE sdf.
70888
- ENDMETHOD.
71222
+ badExample: `CLASS lcl DEFINITION.
71223
+ PUBLIC SECTION.
71224
+ METHODS bar IMPORTING VALUE(sdf) TYPE string.
71225
+ ENDCLASS.
71226
+ CLASS lcl IMPLEMENTATION.
71227
+ METHOD bar.
71228
+ WRITE sdf.
71229
+ ENDMETHOD.
70889
71230
  ENDCLASS.`,
70890
- goodExample: `CLASS lcl DEFINITION.
70891
- PUBLIC SECTION.
70892
- METHODS bar IMPORTING sdf TYPE string.
70893
- ENDCLASS.
70894
- CLASS lcl IMPLEMENTATION.
70895
- METHOD bar.
70896
- WRITE sdf.
70897
- ENDMETHOD.
71231
+ goodExample: `CLASS lcl DEFINITION.
71232
+ PUBLIC SECTION.
71233
+ METHODS bar IMPORTING sdf TYPE string.
71234
+ ENDCLASS.
71235
+ CLASS lcl IMPLEMENTATION.
71236
+ METHOD bar.
71237
+ WRITE sdf.
71238
+ ENDMETHOD.
70898
71239
  ENDCLASS.`,
70899
71240
  };
70900
71241
  }
@@ -71165,8 +71506,8 @@ class SpaceBeforeDot extends _abap_rule_1.ABAPRule {
71165
71506
  key: "space_before_dot",
71166
71507
  title: "Space before dot",
71167
71508
  shortDescription: `Checks for extra spaces before dots at the ends of statements`,
71168
- extendedInformation: `
71169
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
71509
+ extendedInformation: `
71510
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
71170
71511
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#condense-your-code`,
71171
71512
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
71172
71513
  badExample: `WRITE bar .`,
@@ -71352,12 +71693,12 @@ class SQLValueConversion {
71352
71693
  key: "sql_value_conversion",
71353
71694
  title: "Implicit SQL Value Conversion",
71354
71695
  shortDescription: `Ensure types match when selecting from database`,
71355
- extendedInformation: `
71356
- * Integer to CHAR conversion
71357
- * Integer to NUMC conversion
71358
- * NUMC to Integer conversion
71359
- * CHAR to Integer conversion
71360
- * Source field longer than database field, CHAR -> CHAR
71696
+ extendedInformation: `
71697
+ * Integer to CHAR conversion
71698
+ * Integer to NUMC conversion
71699
+ * NUMC to Integer conversion
71700
+ * CHAR to Integer conversion
71701
+ * Source field longer than database field, CHAR -> CHAR
71361
71702
  * Source field longer than database field, NUMC -> NUMC`,
71362
71703
  tags: [],
71363
71704
  };
@@ -71429,7 +71770,7 @@ class StartAtTab extends _abap_rule_1.ABAPRule {
71429
71770
  key: "start_at_tab",
71430
71771
  title: "Start at tab",
71431
71772
  shortDescription: `Checks that statements start at tabstops.`,
71432
- extendedInformation: `Reports max 100 issues per file
71773
+ extendedInformation: `Reports max 100 issues per file
71433
71774
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
71434
71775
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
71435
71776
  badExample: ` WRITE a.`,
@@ -71606,12 +71947,12 @@ class StrictSQL extends _abap_rule_1.ABAPRule {
71606
71947
  key: "strict_sql",
71607
71948
  title: "Strict SQL",
71608
71949
  shortDescription: `Strict SQL`,
71609
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
71610
-
71611
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
71612
-
71613
- Also see separate rule sql_escape_host_variables
71614
-
71950
+ extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
71951
+
71952
+ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
71953
+
71954
+ Also see separate rule sql_escape_host_variables
71955
+
71615
71956
  Activates from v750 and up`,
71616
71957
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix],
71617
71958
  badExample: `SELECT * FROM ztabl INTO TABLE @rt_content WHERE type = @iv_type ORDER BY PRIMARY KEY.`,
@@ -71865,11 +72206,11 @@ class SyModification extends _abap_rule_1.ABAPRule {
71865
72206
  key: "sy_modification",
71866
72207
  title: "Modification of SY fields",
71867
72208
  shortDescription: `Finds modification of sy fields`,
71868
- extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
71869
-
72209
+ extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
72210
+
71870
72211
  Changes to SY-TVAR* fields are not reported`,
71871
72212
  tags: [_irule_1.RuleTag.SingleFile],
71872
- badExample: `sy-uname = 2.
72213
+ badExample: `sy-uname = 2.
71873
72214
  sy = sy.`,
71874
72215
  };
71875
72216
  }
@@ -71931,8 +72272,8 @@ class TABLEnhancementCategory {
71931
72272
  key: "tabl_enhancement_category",
71932
72273
  title: "TABL enhancement category must be set",
71933
72274
  shortDescription: `Checks that tables do not have the enhancement category 'not classified'.`,
71934
- extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
71935
-
72275
+ extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
72276
+
71936
72277
  You may use standard report RS_DDIC_CLASSIFICATION_FINAL for adjustment.`,
71937
72278
  tags: [],
71938
72279
  };
@@ -71997,8 +72338,8 @@ class TablesDeclaredLocally extends _abap_rule_1.ABAPRule {
71997
72338
  shortDescription: `TABLES are always global, so declare them globally`,
71998
72339
  extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abaptables.htm`,
71999
72340
  tags: [_irule_1.RuleTag.SingleFile],
72000
- badExample: `FORM foo.
72001
- TABLES t100.
72341
+ badExample: `FORM foo.
72342
+ TABLES t100.
72002
72343
  ENDFORM.`,
72003
72344
  goodExample: `TABLES t000.`,
72004
72345
  };
@@ -72126,9 +72467,9 @@ class TypeFormParameters extends _abap_rule_1.ABAPRule {
72126
72467
  title: "Type FORM parameters",
72127
72468
  shortDescription: `Checks for untyped FORM parameters`,
72128
72469
  tags: [_irule_1.RuleTag.SingleFile],
72129
- badExample: `FORM foo USING bar.
72470
+ badExample: `FORM foo USING bar.
72130
72471
  ENDFORM.`,
72131
- goodExample: `FORM foo USING bar TYPE string.
72472
+ goodExample: `FORM foo USING bar TYPE string.
72132
72473
  ENDFORM.`,
72133
72474
  };
72134
72475
  }
@@ -72801,38 +73142,38 @@ class UnnecessaryPragma extends _abap_rule_1.ABAPRule {
72801
73142
  key: "unnecessary_pragma",
72802
73143
  title: "Unnecessary Pragma",
72803
73144
  shortDescription: `Finds pragmas which can be removed`,
72804
- extendedInformation: `* NO_HANDLER with handler
72805
-
72806
- * NEEDED without definition
72807
-
72808
- * NO_TEXT without texts
72809
-
72810
- * SUBRC_OK where sy-subrc is checked
72811
-
73145
+ extendedInformation: `* NO_HANDLER with handler
73146
+
73147
+ * NEEDED without definition
73148
+
73149
+ * NO_TEXT without texts
73150
+
73151
+ * SUBRC_OK where sy-subrc is checked
73152
+
72812
73153
  NO_HANDLER inside macros are not checked`,
72813
73154
  tags: [_irule_1.RuleTag.SingleFile],
72814
- badExample: `TRY.
72815
- ...
72816
- CATCH zcx_abapgit_exception ##NO_HANDLER.
72817
- RETURN. " it has a handler
72818
- ENDTRY.
72819
- MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
72820
- SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
72821
- IF sy-subrc <> 0.
73155
+ badExample: `TRY.
73156
+ ...
73157
+ CATCH zcx_abapgit_exception ##NO_HANDLER.
73158
+ RETURN. " it has a handler
73159
+ ENDTRY.
73160
+ MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
73161
+ SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
73162
+ IF sy-subrc <> 0.
72822
73163
  ENDIF.`,
72823
- goodExample: `TRY.
72824
- ...
72825
- CATCH zcx_abapgit_exception.
72826
- RETURN.
72827
- ENDTRY.
72828
- MESSAGE w125(zbar) WITH c_foo INTO message.
72829
- SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
72830
- IF sy-subrc <> 0.
72831
- ENDIF.
72832
-
72833
- DATA: BEGIN OF blah ##NEEDED,
72834
- test1 TYPE string,
72835
- test2 TYPE string,
73164
+ goodExample: `TRY.
73165
+ ...
73166
+ CATCH zcx_abapgit_exception.
73167
+ RETURN.
73168
+ ENDTRY.
73169
+ MESSAGE w125(zbar) WITH c_foo INTO message.
73170
+ SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
73171
+ IF sy-subrc <> 0.
73172
+ ENDIF.
73173
+
73174
+ DATA: BEGIN OF blah ##NEEDED,
73175
+ test1 TYPE string,
73176
+ test2 TYPE string,
72836
73177
  END OF blah.`,
72837
73178
  };
72838
73179
  }
@@ -72999,18 +73340,18 @@ class UnnecessaryReturn extends _abap_rule_1.ABAPRule {
72999
73340
  shortDescription: `Finds unnecessary RETURN statements`,
73000
73341
  extendedInformation: `Finds unnecessary RETURN statements`,
73001
73342
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
73002
- badExample: `FORM hello1.
73003
- WRITE 'world'.
73004
- RETURN.
73005
- ENDFORM.
73006
-
73007
- FORM foo.
73008
- IF 1 = 2.
73009
- RETURN.
73010
- ENDIF.
73343
+ badExample: `FORM hello1.
73344
+ WRITE 'world'.
73345
+ RETURN.
73346
+ ENDFORM.
73347
+
73348
+ FORM foo.
73349
+ IF 1 = 2.
73350
+ RETURN.
73351
+ ENDIF.
73011
73352
  ENDFORM.`,
73012
- goodExample: `FORM hello2.
73013
- WRITE 'world'.
73353
+ goodExample: `FORM hello2.
73354
+ WRITE 'world'.
73014
73355
  ENDFORM.`,
73015
73356
  };
73016
73357
  }
@@ -73361,13 +73702,13 @@ class UnusedMacros {
73361
73702
  title: "Unused macros",
73362
73703
  shortDescription: `Checks for unused macro definitions definitions`,
73363
73704
  tags: [_irule_1.RuleTag.Quickfix],
73364
- badExample: `DEFINE foobar1.
73365
- WRITE 'hello'.
73705
+ badExample: `DEFINE foobar1.
73706
+ WRITE 'hello'.
73366
73707
  END-OF-DEFINITION.`,
73367
- goodExample: `DEFINE foobar2.
73368
- WRITE 'hello'.
73369
- END-OF-DEFINITION.
73370
-
73708
+ goodExample: `DEFINE foobar2.
73709
+ WRITE 'hello'.
73710
+ END-OF-DEFINITION.
73711
+
73371
73712
  foobar2.`,
73372
73713
  };
73373
73714
  }
@@ -73479,18 +73820,18 @@ class UnusedMethods {
73479
73820
  key: "unused_methods",
73480
73821
  title: "Unused methods",
73481
73822
  shortDescription: `Checks for unused methods`,
73482
- extendedInformation: `Checks private and protected methods.
73483
-
73484
- Unused methods are not reported if the object contains parser or syntax errors.
73485
- Quick fixes only appears for private methods or projected methods where the class doesnt have any subclasses.
73486
-
73487
- Skips:
73488
- * methods FOR TESTING
73489
- * methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
73490
- * class_constructor + constructor methods
73491
- * event handlers
73492
- * methods that are redefined
73493
- * INCLUDEs
73823
+ extendedInformation: `Checks private and protected methods.
73824
+
73825
+ Unused methods are not reported if the object contains parser or syntax errors.
73826
+ Quick fixes only appears for private methods or projected methods where the class doesnt have any subclasses.
73827
+
73828
+ Skips:
73829
+ * methods FOR TESTING
73830
+ * methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
73831
+ * class_constructor + constructor methods
73832
+ * event handlers
73833
+ * methods that are redefined
73834
+ * INCLUDEs
73494
73835
  `,
73495
73836
  tags: [_irule_1.RuleTag.Quickfix],
73496
73837
  pragma: "##CALLED",
@@ -73966,23 +74307,23 @@ class UnusedVariables {
73966
74307
  key: "unused_variables",
73967
74308
  title: "Unused variables",
73968
74309
  shortDescription: `Checks for unused variables and constants`,
73969
- extendedInformation: `Skips event parameters.
73970
-
73971
- Note that this currently does not work if the source code uses macros.
73972
-
73973
- Unused variables are not reported if the object contains parser or syntax errors.
73974
-
74310
+ extendedInformation: `Skips event parameters.
74311
+
74312
+ Note that this currently does not work if the source code uses macros.
74313
+
74314
+ Unused variables are not reported if the object contains parser or syntax errors.
74315
+
73975
74316
  Errors found in INCLUDES are reported for the main program.`,
73976
74317
  tags: [_irule_1.RuleTag.Quickfix],
73977
74318
  pragma: "##NEEDED",
73978
74319
  pseudoComment: "EC NEEDED",
73979
- badExample: `DATA: BEGIN OF blah1,
73980
- test TYPE string,
73981
- test2 TYPE string,
74320
+ badExample: `DATA: BEGIN OF blah1,
74321
+ test TYPE string,
74322
+ test2 TYPE string,
73982
74323
  END OF blah1.`,
73983
- goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
73984
- test TYPE string,
73985
- test2 TYPE string,
74324
+ goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
74325
+ test TYPE string,
74326
+ test2 TYPE string,
73986
74327
  END OF blah2.`,
73987
74328
  };
73988
74329
  }
@@ -74201,15 +74542,15 @@ class UseBoolExpression extends _abap_rule_1.ABAPRule {
74201
74542
  shortDescription: `Use boolean expression, xsdbool from 740sp08 and up, boolc from 702 and up`,
74202
74543
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
74203
74544
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
74204
- badExample: `IF line IS INITIAL.
74205
- has_entries = abap_false.
74206
- ELSE.
74207
- has_entries = abap_true.
74208
- ENDIF.
74209
-
74545
+ badExample: `IF line IS INITIAL.
74546
+ has_entries = abap_false.
74547
+ ELSE.
74548
+ has_entries = abap_true.
74549
+ ENDIF.
74550
+
74210
74551
  DATA(fsdf) = COND #( WHEN foo <> bar THEN abap_true ELSE abap_false ).`,
74211
- goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
74212
-
74552
+ goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
74553
+
74213
74554
  DATA(fsdf) = xsdbool( foo <> bar ).`,
74214
74555
  };
74215
74556
  }
@@ -74327,15 +74668,15 @@ class UseClassBasedExceptions extends _abap_rule_1.ABAPRule {
74327
74668
  shortDescription: `Use class based exceptions, checks interface and class definitions`,
74328
74669
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-class-based-exceptions`,
74329
74670
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
74330
- badExample: `INTERFACE lif.
74331
- METHODS load_data
74332
- EXCEPTIONS
74333
- invalid_parameter.
74671
+ badExample: `INTERFACE lif.
74672
+ METHODS load_data
74673
+ EXCEPTIONS
74674
+ invalid_parameter.
74334
74675
  ENDINTERFACE.`,
74335
- goodExample: `INTERFACE lif.
74336
- METHODS load_data
74337
- RAISING
74338
- cx_something.
74676
+ goodExample: `INTERFACE lif.
74677
+ METHODS load_data
74678
+ RAISING
74679
+ cx_something.
74339
74680
  ENDINTERFACE.`,
74340
74681
  };
74341
74682
  }
@@ -74395,15 +74736,15 @@ class UseLineExists extends _abap_rule_1.ABAPRule {
74395
74736
  key: "use_line_exists",
74396
74737
  title: "Use line_exists",
74397
74738
  shortDescription: `Use line_exists, from 740sp02 and up`,
74398
- extendedInformation: `
74399
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
74400
-
74739
+ extendedInformation: `
74740
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
74741
+
74401
74742
  Not reported if the READ TABLE statement contains BINARY SEARCH.`,
74402
74743
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
74403
- badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
74404
- IF sy-subrc = 0.
74744
+ badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
74745
+ IF sy-subrc = 0.
74405
74746
  ENDIF.`,
74406
- goodExample: `IF line_exists( my_table[ key = 'A' ] ).
74747
+ goodExample: `IF line_exists( my_table[ key = 'A' ] ).
74407
74748
  ENDIF.`,
74408
74749
  };
74409
74750
  }
@@ -74513,10 +74854,10 @@ class UseNew extends _abap_rule_1.ABAPRule {
74513
74854
  key: "use_new",
74514
74855
  title: "Use NEW",
74515
74856
  shortDescription: `Checks for deprecated CREATE OBJECT statements.`,
74516
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
74517
-
74518
- If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
74519
-
74857
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
74858
+
74859
+ If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
74860
+
74520
74861
  Applicable from v740sp02 and up`,
74521
74862
  badExample: `CREATE OBJECT ref.`,
74522
74863
  goodExample: `ref = NEW #( ).`,
@@ -74614,13 +74955,13 @@ class WhenOthersLast extends _abap_rule_1.ABAPRule {
74614
74955
  title: "WHEN OTHERS last",
74615
74956
  shortDescription: `Checks that WHEN OTHERS is placed the last within a CASE statement.`,
74616
74957
  tags: [_irule_1.RuleTag.SingleFile],
74617
- badExample: `CASE bar.
74618
- WHEN OTHERS.
74619
- WHEN 2.
74958
+ badExample: `CASE bar.
74959
+ WHEN OTHERS.
74960
+ WHEN 2.
74620
74961
  ENDCASE.`,
74621
- goodExample: `CASE bar.
74622
- WHEN 2.
74623
- WHEN OTHERS.
74962
+ goodExample: `CASE bar.
74963
+ WHEN 2.
74964
+ WHEN OTHERS.
74624
74965
  ENDCASE.`,
74625
74966
  };
74626
74967
  }
@@ -77361,6 +77702,7 @@ class FieldSymbolTranspiler {
77361
77702
  let name = node.concatTokens();
77362
77703
  name = name.replace("<", "fs_");
77363
77704
  name = name.replace(">", "_");
77705
+ name = name.replace("[]", "");
77364
77706
  return new chunk_1.Chunk().append(name, node, traversal);
77365
77707
  }
77366
77708
  }
@@ -79401,11 +79743,11 @@ class HandleDataElement {
79401
79743
  fixedValues = doma.getFixedValues();
79402
79744
  }
79403
79745
  }
79404
- const chunk = new chunk_1.Chunk().appendString(`abap.DDIC["${obj.getName().toUpperCase()}"] = {
79405
- "objectType": "DTEL",
79406
- "type": ${new transpile_types_1.TranspileTypes().toType(type)},
79407
- "domain": ${JSON.stringify(obj.getDomainName())},
79408
- "fixedValues": ${JSON.stringify(fixedValues)},
79746
+ const chunk = new chunk_1.Chunk().appendString(`abap.DDIC["${obj.getName().toUpperCase()}"] = {
79747
+ "objectType": "DTEL",
79748
+ "type": ${new transpile_types_1.TranspileTypes().toType(type)},
79749
+ "domain": ${JSON.stringify(obj.getDomainName())},
79750
+ "fixedValues": ${JSON.stringify(fixedValues)},
79409
79751
  };`);
79410
79752
  const output = {
79411
79753
  object: {
@@ -79443,20 +79785,20 @@ class HandleEnqu {
79443
79785
  if (filename === undefined) {
79444
79786
  return [];
79445
79787
  }
79446
- const chunk = new chunk_1.Chunk().appendString(`// enqueue object
79447
- abap.FunctionModules["ENQUEUE_${obj.getName().toUpperCase()}"] = async (INPUT) => {
79448
- const lookup = abap.Classes["KERNEL_LOCK"];
79449
- if (lookup === undefined) {
79450
- throw new Error("Lock, kernel class missing");
79451
- }
79452
- await lookup.enqueue(INPUT);
79453
- };
79454
- abap.FunctionModules["DEQUEUE_${obj.getName().toUpperCase()}"] = async (INPUT) => {
79455
- const lookup = abap.Classes["KERNEL_LOCK"];
79456
- if (lookup === undefined) {
79457
- throw new Error("Lock, kernel class missing");
79458
- }
79459
- await lookup.dequeue(INPUT);
79788
+ const chunk = new chunk_1.Chunk().appendString(`// enqueue object
79789
+ abap.FunctionModules["ENQUEUE_${obj.getName().toUpperCase()}"] = async (INPUT) => {
79790
+ const lookup = abap.Classes["KERNEL_LOCK"];
79791
+ if (lookup === undefined) {
79792
+ throw new Error("Lock, kernel class missing");
79793
+ }
79794
+ await lookup.enqueue(INPUT);
79795
+ };
79796
+ abap.FunctionModules["DEQUEUE_${obj.getName().toUpperCase()}"] = async (INPUT) => {
79797
+ const lookup = abap.Classes["KERNEL_LOCK"];
79798
+ if (lookup === undefined) {
79799
+ throw new Error("Lock, kernel class missing");
79800
+ }
79801
+ await lookup.dequeue(INPUT);
79460
79802
  };`);
79461
79803
  const output = {
79462
79804
  object: {
@@ -79624,11 +79966,11 @@ class HandleSMIM {
79624
79966
  }
79625
79967
  obj.parse();
79626
79968
  const dataFile = obj.getDataFile();
79627
- const chunk = new chunk_1.Chunk().appendString(`abap.SMIM["${obj.getName().toUpperCase()}"] = {
79628
- "objectType": "SMIM",
79629
- "filename": ${JSON.stringify(dataFile?.getFilename())},
79630
- "url": ${JSON.stringify(obj.getURL())},
79631
- "class": ${JSON.stringify(obj.getClass())},
79969
+ const chunk = new chunk_1.Chunk().appendString(`abap.SMIM["${obj.getName().toUpperCase()}"] = {
79970
+ "objectType": "SMIM",
79971
+ "filename": ${JSON.stringify(dataFile?.getFilename())},
79972
+ "url": ${JSON.stringify(obj.getURL())},
79973
+ "class": ${JSON.stringify(obj.getClass())},
79632
79974
  };`);
79633
79975
  const output = {
79634
79976
  object: {
@@ -79682,10 +80024,10 @@ class HandleTable {
79682
80024
  return [];
79683
80025
  }
79684
80026
  const type = obj.parseType(reg);
79685
- const chunk = new chunk_1.Chunk().appendString(`abap.DDIC["${obj.getName().toUpperCase()}"] = {
79686
- "objectType": "TABL",
79687
- "type": ${new transpile_types_1.TranspileTypes().toType(type)},
79688
- "keyFields": ${JSON.stringify(obj.listKeys(reg))},
80027
+ const chunk = new chunk_1.Chunk().appendString(`abap.DDIC["${obj.getName().toUpperCase()}"] = {
80028
+ "objectType": "TABL",
80029
+ "type": ${new transpile_types_1.TranspileTypes().toType(type)},
80030
+ "keyFields": ${JSON.stringify(obj.listKeys(reg))},
79689
80031
  };`);
79690
80032
  const output = {
79691
80033
  object: {
@@ -79724,9 +80066,9 @@ class HandleTableType {
79724
80066
  return [];
79725
80067
  }
79726
80068
  const type = obj.parseType(reg);
79727
- const chunk = new chunk_1.Chunk().appendString(`abap.DDIC["${obj.getName().toUpperCase()}"] = {
79728
- "objectType": "TTYP",
79729
- "type": ${new transpile_types_1.TranspileTypes().toType(type)},
80069
+ const chunk = new chunk_1.Chunk().appendString(`abap.DDIC["${obj.getName().toUpperCase()}"] = {
80070
+ "objectType": "TTYP",
80071
+ "type": ${new transpile_types_1.TranspileTypes().toType(type)},
79730
80072
  };`);
79731
80073
  const output = {
79732
80074
  object: {
@@ -79814,9 +80156,9 @@ class HandleView {
79814
80156
  return [];
79815
80157
  }
79816
80158
  const type = obj.parseType(reg);
79817
- const chunk = new chunk_1.Chunk().appendString(`abap.DDIC["${obj.getName().toUpperCase()}"] = {
79818
- "objectType": "VIEW",
79819
- "type": ${new transpile_types_1.TranspileTypes().toType(type)},
80159
+ const chunk = new chunk_1.Chunk().appendString(`abap.DDIC["${obj.getName().toUpperCase()}"] = {
80160
+ "objectType": "VIEW",
80161
+ "type": ${new transpile_types_1.TranspileTypes().toType(type)},
79820
80162
  };`);
79821
80163
  // todo, "keyFields": ${JSON.stringify(obj.listKeys())},
79822
80164
  const output = {
@@ -79856,9 +80198,9 @@ class HandleW3MI {
79856
80198
  }
79857
80199
  obj.parse();
79858
80200
  const dataFile = obj.getDataFile();
79859
- const chunk = new chunk_1.Chunk().appendString(`abap.W3MI["${obj.getName().toUpperCase()}"] = {
79860
- "objectType": "W3MI",
79861
- "filename": ${JSON.stringify(dataFile?.getFilename())},
80201
+ const chunk = new chunk_1.Chunk().appendString(`abap.W3MI["${obj.getName().toUpperCase()}"] = {
80202
+ "objectType": "W3MI",
80203
+ "filename": ${JSON.stringify(dataFile?.getFilename())},
79862
80204
  };`);
79863
80205
  const output = {
79864
80206
  object: {
@@ -80490,26 +80832,26 @@ class AssignTranspiler {
80490
80832
  const firstFirst = first.getChildren()[1];
80491
80833
  if (firstFirst?.get() instanceof abaplint.Expressions.Constant) {
80492
80834
  const s = firstFirst.getFirstToken().getStr().toLowerCase().match(/\w+/)?.toString();
80493
- options.push(`dynamicSource: (() => {
80494
- try { return ${s}; } catch {}
80495
- try { return this.${s}; } catch {}
80835
+ options.push(`dynamicSource: (() => {
80836
+ try { return ${s}; } catch {}
80837
+ try { return this.${s}; } catch {}
80496
80838
  })()`);
80497
80839
  }
80498
80840
  else if (firstFirst?.get() instanceof abaplint.Expressions.FieldChain && firstFirst instanceof abaplint.Nodes.ExpressionNode) {
80499
80841
  const code = new expressions_1.FieldChainTranspiler(true).transpile(firstFirst, traversal).getCode();
80500
- options.push(`dynamicSource: (() => {
80501
- const name = ${code}.toLowerCase().replace(/[~\\/]/g, "$").match(/[\\w\\$\\/]+/)[0];
80502
- try { return eval(name); } catch {}
80503
- try { return eval("this." + name); } catch {}
80842
+ options.push(`dynamicSource: (() => {
80843
+ const name = ${code}.toLowerCase().replace(/[~\\/]/g, "$").match(/[\\w\\$\\/]+/)[0];
80844
+ try { return eval(name); } catch {}
80845
+ try { return eval("this." + name); } catch {}
80504
80846
  })()`);
80505
80847
  }
80506
80848
  }
80507
80849
  else if (first?.get() instanceof abaplint.Expressions.Source && first instanceof abaplint.Nodes.ExpressionNode) {
80508
80850
  // const name = first.concatTokens().toLowerCase();
80509
80851
  const name = new expressions_1.SourceTranspiler().transpile(first, traversal).getCode();
80510
- options.push(`dynamicSource: (() => {
80511
- try { return ${name}; } catch {}
80512
- try { return this.${name}; } catch {}
80852
+ options.push(`dynamicSource: (() => {
80853
+ try { return ${name}; } catch {}
80854
+ try { return this.${name}; } catch {}
80513
80855
  })()`);
80514
80856
  }
80515
80857
  }
@@ -80717,9 +81059,9 @@ class CallTranspiler {
80717
81059
  let pre = "";
80718
81060
  let post = "";
80719
81061
  pre = "try {\n" + pre;
80720
- post += `\nabap.builtin.sy.get().subrc.set(0);
80721
- } catch (e) {
80722
- if (e.classic) {
81062
+ post += `\nabap.builtin.sy.get().subrc.set(0);
81063
+ } catch (e) {
81064
+ if (e.classic) {
80723
81065
  switch (e.classic.toUpperCase()) {\n`;
80724
81066
  for (const e of node.findAllExpressions(abaplint.Expressions.ParameterException)) {
80725
81067
  const name = e.getFirstToken().getStr().toUpperCase();
@@ -80735,10 +81077,10 @@ if (e.classic) {
80735
81077
  post += `case "${name}": abap.builtin.sy.get().subrc.set(${value}); break;\n`;
80736
81078
  }
80737
81079
  }
80738
- post += ` }
80739
- } else {
80740
- throw e;
80741
- }
81080
+ post += ` }
81081
+ } else {
81082
+ throw e;
81083
+ }
80742
81084
  }`;
80743
81085
  return { pre, post };
80744
81086
  }
@@ -81073,11 +81415,11 @@ class ClassImplementationTranspiler {
81073
81415
  ret += " extends " + traversal_1.Traversal.escapeNamespace(def?.getSuperClass()?.toLowerCase());
81074
81416
  }
81075
81417
  const scope = traversal.findCurrentScopeByToken(token);
81076
- return new chunk_1.Chunk().append(ret + ` {
81077
- static INTERNAL_TYPE = 'CLAS';
81078
- static INTERNAL_NAME = '${traversal.buildInternalName(token.getStr(), def)}';
81079
- static IMPLEMENTED_INTERFACES = [${this.findImplementedByClass(traversal, def, scope).map(e => `"` + e.toUpperCase() + `"`).join(",")}];
81080
- static ATTRIBUTES = {${traversal.buildAttributes(def, scope).join(",\n")}};
81418
+ return new chunk_1.Chunk().append(ret + ` {
81419
+ static INTERNAL_TYPE = 'CLAS';
81420
+ static INTERNAL_NAME = '${traversal.buildInternalName(token.getStr(), def)}';
81421
+ static IMPLEMENTED_INTERFACES = [${this.findImplementedByClass(traversal, def, scope).map(e => `"` + e.toUpperCase() + `"`).join(",")}];
81422
+ static ATTRIBUTES = {${traversal.buildAttributes(def, scope).join(",\n")}};
81081
81423
  static METHODS = {${traversal.buildMethods(def, scope).join(",\n")}};`, node, traversal);
81082
81424
  }
81083
81425
  findImplementedInterface(traversal, def, scope) {
@@ -81976,16 +82318,16 @@ class DoTranspiler {
81976
82318
  const source = new expressions_1.SourceTranspiler(true).transpile(found, traversal).getCode();
81977
82319
  const idSource = unique_identifier_1.UniqueIdentifier.get();
81978
82320
  const id = unique_identifier_1.UniqueIdentifier.get();
81979
- return new chunk_1.Chunk(`const ${this.syIndexBackup} = abap.builtin.sy.get().index.get();
81980
- const ${idSource} = ${source};
81981
- for (let ${id} = 0; ${id} < ${idSource}; ${id}++) {
82321
+ return new chunk_1.Chunk(`const ${this.syIndexBackup} = abap.builtin.sy.get().index.get();
82322
+ const ${idSource} = ${source};
82323
+ for (let ${id} = 0; ${id} < ${idSource}; ${id}++) {
81982
82324
  abap.builtin.sy.get().index.set(${id} + 1);`);
81983
82325
  }
81984
82326
  else {
81985
82327
  const unique = unique_identifier_1.UniqueIdentifier.get();
81986
- return new chunk_1.Chunk(`const ${this.syIndexBackup} = abap.builtin.sy.get().index.get();
81987
- let ${unique} = 1;
81988
- while (true) {
82328
+ return new chunk_1.Chunk(`const ${this.syIndexBackup} = abap.builtin.sy.get().index.get();
82329
+ let ${unique} = 1;
82330
+ while (true) {
81989
82331
  abap.builtin.sy.get().index.set(${unique}++);`);
81990
82332
  }
81991
82333
  }
@@ -82145,7 +82487,7 @@ class EndDoTranspiler {
82145
82487
  this.syIndexBackup = syIndexBackup;
82146
82488
  }
82147
82489
  transpile(node, traversal) {
82148
- return new chunk_1.Chunk().append(`}
82490
+ return new chunk_1.Chunk().append(`}
82149
82491
  abap.builtin.sy.get().index.set(${this.syIndexBackup});\n`, node, traversal);
82150
82492
  }
82151
82493
  }
@@ -82344,7 +82686,7 @@ class EndWhileTranspiler {
82344
82686
  this.syIndexBackup = syIndexBackup;
82345
82687
  }
82346
82688
  transpile(node, traversal) {
82347
- return new chunk_1.Chunk().append(`}
82689
+ return new chunk_1.Chunk().append(`}
82348
82690
  abap.builtin.sy.get().index.set(${this.syIndexBackup});\n`, node, traversal);
82349
82691
  }
82350
82692
  }
@@ -83749,9 +84091,9 @@ class MethodImplementationTranspiler {
83749
84091
  after += `let ${varPrefixed} = ${unique}?.${varName};\n`;
83750
84092
  }
83751
84093
  if (type instanceof abaplint.BasicTypes.NumericGenericType) {
83752
- after += `if (${varPrefixed}.constructor.name === "Character") {
83753
- ${varPrefixed} = ${new transpile_types_1.TranspileTypes().toType(identifier.getType())};
83754
- ${varPrefixed}.set(${unique}?.${varName});
84094
+ after += `if (${varPrefixed}.constructor.name === "Character") {
84095
+ ${varPrefixed} = ${new transpile_types_1.TranspileTypes().toType(identifier.getType())};
84096
+ ${varPrefixed}.set(${unique}?.${varName});
83755
84097
  }\n`;
83756
84098
  }
83757
84099
  }
@@ -84314,8 +84656,8 @@ class RaiseTranspiler {
84314
84656
  const extra = `{"INTERNAL_FILENAME": "${traversal.getFilename()}","INTERNAL_LINE": ${node.getStart().getRow()}}`;
84315
84657
  const lookup = traversal.lookupClassOrInterface(classNameToken?.getStr(), classNameToken);
84316
84658
  const id = unique_identifier_1.UniqueIdentifier.get();
84317
- return new chunk_1.Chunk().append(`const ${id} = await (new ${lookup}()).constructor_(${p});
84318
- ${id}.EXTRA_CX = ${extra};
84659
+ return new chunk_1.Chunk().append(`const ${id} = await (new ${lookup}()).constructor_(${p});
84660
+ ${id}.EXTRA_CX = ${extra};
84319
84661
  throw ${id};`, node, traversal);
84320
84662
  }
84321
84663
  }
@@ -84967,19 +85309,19 @@ class SelectTranspiler {
84967
85309
  if (keys.length > 0) {
84968
85310
  by = JSON.stringify(keys);
84969
85311
  }
84970
- const code = `if (${faeTranspiled}.array().length === 0) {
84971
- throw new Error("FAE, todo, empty table");
84972
- } else {
84973
- const ${unique2} = ${faeTranspiled}.array();
84974
- abap.statements.clear(${target});
84975
- for await (const ${unique} of ${unique2}) {
84976
- await abap.statements.select(${target}, {select: "${select.trim()}"${extra}}, {appending: true});
84977
- }
84978
- if (!(${target} instanceof abap.types.HashedTable) && ${target}.getOptions()?.primaryKey?.type !== "SORTED") {
84979
- abap.statements.sort(${target}, {by: ${by}.map(k => { return {component: k}; })});
84980
- await abap.statements.deleteInternal(${target}, {adjacent: true, by: ${by}});
84981
- }
84982
- abap.builtin.sy.get().dbcnt.set(${target}.getArrayLength());
85312
+ const code = `if (${faeTranspiled}.array().length === 0) {
85313
+ throw new Error("FAE, todo, empty table");
85314
+ } else {
85315
+ const ${unique2} = ${faeTranspiled}.array();
85316
+ abap.statements.clear(${target});
85317
+ for await (const ${unique} of ${unique2}) {
85318
+ await abap.statements.select(${target}, {select: "${select.trim()}"${extra}}, {appending: true});
85319
+ }
85320
+ if (!(${target} instanceof abap.types.HashedTable) && ${target}.getOptions()?.primaryKey?.type !== "SORTED") {
85321
+ abap.statements.sort(${target}, {by: ${by}.map(k => { return {component: k}; })});
85322
+ await abap.statements.deleteInternal(${target}, {adjacent: true, by: ${by}});
85323
+ }
85324
+ abap.builtin.sy.get().dbcnt.set(${target}.getArrayLength());
84983
85325
  }`;
84984
85326
  return new chunk_1.Chunk().append(code, node, traversal);
84985
85327
  }
@@ -85918,11 +86260,11 @@ class WhileTranspiler {
85918
86260
  const cond = new expressions_1.CondTranspiler().transpile(node.findFirstExpression(abaplint.Expressions.Cond), traversal);
85919
86261
  const unique = unique_identifier_1.UniqueIdentifier.get();
85920
86262
  return new chunk_1.Chunk()
85921
- .append(`const ${this.syIndexBackup} = abap.builtin.sy.get().index.get();
85922
- let ${unique} = 1;
86263
+ .append(`const ${this.syIndexBackup} = abap.builtin.sy.get().index.get();
86264
+ let ${unique} = 1;
85923
86265
  while (`, node, traversal)
85924
86266
  .appendChunk(cond)
85925
- .appendString(`) {
86267
+ .appendString(`) {
85926
86268
  abap.builtin.sy.get().index.set(${unique}++);`);
85927
86269
  }
85928
86270
  }
@@ -86269,17 +86611,17 @@ class ClassDefinitionTranspiler {
86269
86611
  }
86270
86612
  else {
86271
86613
  // its an abstract class with only abstract methods
86272
- return new chunk_1.Chunk(`
86273
- class ${className?.toLowerCase()} {
86274
- static INTERNAL_TYPE = 'CLAS';
86275
- static IMPLEMENTED_INTERFACES = [];
86276
- static INTERNAL_NAME = 'ABSTRACT_CLASS_INTERNAL_NAME';
86277
- static ATTRIBUTES = {};
86278
- async constructor_() {
86279
- this.me = new abap.types.ABAPObject();
86280
- this.me.set(this);
86281
- return this;
86282
- }
86614
+ return new chunk_1.Chunk(`
86615
+ class ${className?.toLowerCase()} {
86616
+ static INTERNAL_TYPE = 'CLAS';
86617
+ static IMPLEMENTED_INTERFACES = [];
86618
+ static INTERNAL_NAME = 'ABSTRACT_CLASS_INTERNAL_NAME';
86619
+ static ATTRIBUTES = {};
86620
+ async constructor_() {
86621
+ this.me = new abap.types.ABAPObject();
86622
+ this.me.set(this);
86623
+ return this;
86624
+ }
86283
86625
  }`);
86284
86626
  }
86285
86627
  }
@@ -86659,8 +87001,8 @@ class FunctionModuleTranspiler {
86659
87001
  const type = scope?.findVariable(name)?.getType();
86660
87002
  if (type !== undefined && p.optional === true) {
86661
87003
  // todo, set DEFAULT value
86662
- ret += `if (${name} === undefined) {
86663
- ${name} = ${new transpile_types_1.TranspileTypes().toType(type)};
87004
+ ret += `if (${name} === undefined) {
87005
+ ${name} = ${new transpile_types_1.TranspileTypes().toType(type)};
86664
87006
  }\n`;
86665
87007
  }
86666
87008
  }
@@ -86972,10 +87314,10 @@ class SelectTranspiler {
86972
87314
  const packageSize = node.findFirstExpression(abaplint.Expressions.SelectLoop)?.findExpressionAfterToken("SIZE");
86973
87315
  if (packageSize) {
86974
87316
  const getSize = new expressions_1.SQLSourceTranspiler().transpile(packageSize, traversal).getCode() + ".get()";
86975
- ret.appendString(`if (${targetName}.array().length > ${getSize}) {
86976
- throw new Error("PACKAGE SIZED loop larger than package size not supported");
86977
- };
86978
- abap.statements.append({source: ${targetName}, target: ${intoName}, lines: true});
87317
+ ret.appendString(`if (${targetName}.array().length > ${getSize}) {
87318
+ throw new Error("PACKAGE SIZED loop larger than package size not supported");
87319
+ };
87320
+ abap.statements.append({source: ${targetName}, target: ${intoName}, lines: true});
86979
87321
  {\n`);
86980
87322
  }
86981
87323
  else if (concat.includes(" INTO CORRESPONDING FIELDS OF ")) {
@@ -88125,16 +88467,16 @@ class UnitTest {
88125
88467
  initializationScript(reg, dbSetup, extraSetup, useImport) {
88126
88468
  let ret = "";
88127
88469
  if (useImport === true) {
88128
- ret = `/* eslint-disable import/newline-after-import */
88470
+ ret = `/* eslint-disable import/newline-after-import */
88129
88471
  import "./_top.mjs";\n`;
88130
88472
  }
88131
88473
  else {
88132
- ret = `/* eslint-disable import/newline-after-import */
88133
- import runtime from "@abaplint/runtime";
88474
+ ret = `/* eslint-disable import/newline-after-import */
88475
+ import runtime from "@abaplint/runtime";
88134
88476
  globalThis.abap = new runtime.ABAP();\n`;
88135
88477
  }
88136
- ret += `${this.buildImports(reg, useImport)}
88137
-
88478
+ ret += `${this.buildImports(reg, useImport)}
88479
+
88138
88480
  export async function initializeABAP() {\n`;
88139
88481
  ret += ` const sqlite = [];\n`;
88140
88482
  for (const i of dbSetup.schemas.sqlite) {
@@ -88171,19 +88513,19 @@ export async function initializeABAP() {\n`;
88171
88513
  return filename.replace(/\//g, "%23");
88172
88514
  }
88173
88515
  unitTestScriptOpen(reg, _skip) {
88174
- let ret = `/* eslint-disable curly */
88175
- import fs from "fs";
88176
- import path from "path";
88177
- import {fileURLToPath} from "url";
88178
- import {initializeABAP} from "./init.mjs";
88179
-
88180
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
88181
-
88182
- async function run() {
88183
- await initializeABAP();
88184
- let lt_input = new abap.types.Table(new abap.types.Structure({class_name: new abap.types.Character(30), testclass_name: new abap.types.Character(30), method_name: new abap.types.Character(30)}), {"withHeader":false,"type":"STANDARD","isUnique":false,"keyFields":[]});
88185
- let ls_input = new abap.types.Structure({class_name: new abap.types.Character(30), testclass_name: new abap.types.Character(30), method_name: new abap.types.Character(30)});
88186
- let ls_result = new abap.types.Structure({list: new abap.types.Table(new abap.types.Structure({class_name: new abap.types.Character(30), testclass_name: new abap.types.Character(30), method_name: new abap.types.Character(30), expected: new abap.types.String(), actual: new abap.types.String(), status: new abap.types.String(), runtime: new abap.types.Integer(), message: new abap.types.String(), js_location: new abap.types.String(), console: new abap.types.String()}), {"withHeader":false,"type":"STANDARD","isUnique":false,"keyFields":[]}), json: new abap.types.String()});
88516
+ let ret = `/* eslint-disable curly */
88517
+ import fs from "fs";
88518
+ import path from "path";
88519
+ import {fileURLToPath} from "url";
88520
+ import {initializeABAP} from "./init.mjs";
88521
+
88522
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
88523
+
88524
+ async function run() {
88525
+ await initializeABAP();
88526
+ let lt_input = new abap.types.Table(new abap.types.Structure({class_name: new abap.types.Character(30), testclass_name: new abap.types.Character(30), method_name: new abap.types.Character(30)}), {"withHeader":false,"type":"STANDARD","isUnique":false,"keyFields":[]});
88527
+ let ls_input = new abap.types.Structure({class_name: new abap.types.Character(30), testclass_name: new abap.types.Character(30), method_name: new abap.types.Character(30)});
88528
+ let ls_result = new abap.types.Structure({list: new abap.types.Table(new abap.types.Structure({class_name: new abap.types.Character(30), testclass_name: new abap.types.Character(30), method_name: new abap.types.Character(30), expected: new abap.types.String(), actual: new abap.types.String(), status: new abap.types.String(), runtime: new abap.types.Integer(), message: new abap.types.String(), js_location: new abap.types.String(), console: new abap.types.String()}), {"withHeader":false,"type":"STANDARD","isUnique":false,"keyFields":[]}), json: new abap.types.String()});
88187
88529
  `;
88188
88530
  for (const obj of reg.getObjects()) {
88189
88531
  if (reg.isDependency(obj) || !(obj instanceof abaplint.Objects.Class)) {
@@ -88203,25 +88545,25 @@ async function run() {
88203
88545
  if (m.isForTesting === false) {
88204
88546
  continue;
88205
88547
  }
88206
- ret += ` ls_input.get().class_name.set("${obj.getName()}");
88207
- ls_input.get().testclass_name.set("${def.name.toUpperCase()}");
88208
- ls_input.get().method_name.set("${m.name.toUpperCase()}");
88548
+ ret += ` ls_input.get().class_name.set("${obj.getName()}");
88549
+ ls_input.get().testclass_name.set("${def.name.toUpperCase()}");
88550
+ ls_input.get().method_name.set("${m.name.toUpperCase()}");
88209
88551
  abap.statements.append({source: ls_input, target: lt_input});\n`;
88210
88552
  }
88211
88553
  }
88212
88554
  }
88213
88555
  }
88214
- ret += `
88215
-
88216
- ls_result.set(await abap.Classes["KERNEL_UNIT_RUNNER"].run({it_input: lt_input}));
88217
- fs.writeFileSync(__dirname + path.sep + "output.json", ls_result.get().json.get());
88218
- }
88219
-
88220
- run().then(() => {
88221
- process.exit(0);
88222
- }).catch((err) => {
88223
- console.log(err);
88224
- process.exit(1);
88556
+ ret += `
88557
+
88558
+ ls_result.set(await abap.Classes["KERNEL_UNIT_RUNNER"].run({it_input: lt_input}));
88559
+ fs.writeFileSync(__dirname + path.sep + "output.json", ls_result.get().json.get());
88560
+ }
88561
+
88562
+ run().then(() => {
88563
+ process.exit(0);
88564
+ }).catch((err) => {
88565
+ console.log(err);
88566
+ process.exit(1);
88225
88567
  });`;
88226
88568
  return ret;
88227
88569
  }
@@ -88309,29 +88651,29 @@ run().then(() => {
88309
88651
  return tests;
88310
88652
  }
88311
88653
  unitTestScript(reg, skip) {
88312
- let ret = `/* eslint-disable curly */
88313
- import fs from "fs";
88314
- import path from "path";
88315
- import {fileURLToPath} from "url";
88316
- import {initializeABAP} from "./init.mjs";
88317
- import runtime from "@abaplint/runtime";
88318
-
88319
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
88320
-
88321
- async function run() {
88322
- await initializeABAP();
88323
- const unit = new runtime.UnitTestResult();
88324
- let clas;
88325
- let locl;
88326
- let meth;
88654
+ let ret = `/* eslint-disable curly */
88655
+ import fs from "fs";
88656
+ import path from "path";
88657
+ import {fileURLToPath} from "url";
88658
+ import {initializeABAP} from "./init.mjs";
88659
+ import runtime from "@abaplint/runtime";
88660
+
88661
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
88662
+
88663
+ async function run() {
88664
+ await initializeABAP();
88665
+ const unit = new runtime.UnitTestResult();
88666
+ let clas;
88667
+ let locl;
88668
+ let meth;
88327
88669
  try {\n`;
88328
88670
  for (const st of this.getSortedTests(reg)) {
88329
88671
  ret += `// --------------------------------------------\n`;
88330
88672
  ret += ` clas = unit.addObject("${st.obj.getName()}");\n`;
88331
88673
  const lc = st.localClass.toLowerCase();
88332
- ret += ` {
88333
- const {${lc}} = await import("./${this.escapeNamespace(st.obj.getName().toLowerCase())}.${st.obj.getType().toLowerCase()}.testclasses.mjs");
88334
- locl = clas.addTestClass("${lc}");
88674
+ ret += ` {
88675
+ const {${lc}} = await import("./${this.escapeNamespace(st.obj.getName().toLowerCase())}.${st.obj.getType().toLowerCase()}.testclasses.mjs");
88676
+ locl = clas.addTestClass("${lc}");
88335
88677
  if (${lc}.class_setup) await ${lc}.class_setup();\n`;
88336
88678
  for (const m of st.methods) {
88337
88679
  const skipThis = (skip || []).some(a => a.object === st.obj.getName() && a.class === lc && a.method === m);
@@ -88406,22 +88748,22 @@ async function run() {
88406
88748
  }
88407
88749
  }
88408
88750
  */
88409
- ret += `// -------------------END-------------------
88410
- fs.writeFileSync(__dirname + path.sep + "_output.xml", unit.xUnitXML());
88411
- } catch (e) {
88412
- if (meth) {
88413
- meth.fail();
88414
- }
88415
- fs.writeFileSync(__dirname + path.sep + "_output.xml", unit.xUnitXML());
88416
- throw e;
88417
- }
88418
- }
88419
-
88420
- run().then(() => {
88421
- process.exit(0);
88422
- }).catch((err) => {
88423
- console.log(err);
88424
- process.exit(1);
88751
+ ret += `// -------------------END-------------------
88752
+ fs.writeFileSync(__dirname + path.sep + "_output.xml", unit.xUnitXML());
88753
+ } catch (e) {
88754
+ if (meth) {
88755
+ meth.fail();
88756
+ }
88757
+ fs.writeFileSync(__dirname + path.sep + "_output.xml", unit.xUnitXML());
88758
+ throw e;
88759
+ }
88760
+ }
88761
+
88762
+ run().then(() => {
88763
+ process.exit(0);
88764
+ }).catch((err) => {
88765
+ console.log(err);
88766
+ process.exit(1);
88425
88767
  });`;
88426
88768
  return ret;
88427
88769
  }
@@ -89974,6 +90316,7 @@ function readDocType(xmlData, i){
89974
90316
  if (xmlData[i] === '<' && !comment) { //Determine the tag type
89975
90317
  if( hasBody && isEntity(xmlData, i)){
89976
90318
  i += 7;
90319
+ let entityName, val;
89977
90320
  [entityName, val,i] = readEntityExp(xmlData,i+1);
89978
90321
  if(val.indexOf("&") === -1) //Parameter entities are not supported
89979
90322
  entities[ validateEntityName(entityName) ] = {
@@ -101830,7 +102173,7 @@ async function run() {
101830
102173
  fs.writeFileSync(outputFolder + path.sep + "init.mjs", output.initializationScript);
101831
102174
  // new static referenced imports,
101832
102175
  fs.writeFileSync(outputFolder + path.sep + "_init.mjs", output.initializationScript2);
101833
- fs.writeFileSync(outputFolder + path.sep + "_top.mjs", `import runtime from "@abaplint/runtime";
102176
+ fs.writeFileSync(outputFolder + path.sep + "_top.mjs", `import runtime from "@abaplint/runtime";
101834
102177
  globalThis.abap = new runtime.ABAP();`);
101835
102178
  }
101836
102179
  run().then(() => {