@abaplint/cli 2.113.56 → 2.113.58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/README.md +4 -4
  2. package/abaplint +2 -2
  3. package/build/cli.js +889 -856
  4. package/package.json +63 -63
package/build/cli.js CHANGED
@@ -5947,6 +5947,7 @@ __exportStar(__webpack_require__(/*! ./sql_fields */ "./node_modules/@abaplint/c
5947
5947
  __exportStar(__webpack_require__(/*! ./sql_for_all_entries */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_for_all_entries.js"), exports);
5948
5948
  __exportStar(__webpack_require__(/*! ./sql_from_source */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_from_source.js"), exports);
5949
5949
  __exportStar(__webpack_require__(/*! ./sql_from */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_from.js"), exports);
5950
+ __exportStar(__webpack_require__(/*! ./provide_field_name */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/provide_field_name.js"), exports);
5950
5951
  __exportStar(__webpack_require__(/*! ./sql_function_input */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_function_input.js"), exports);
5951
5952
  __exportStar(__webpack_require__(/*! ./sql_function */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_function.js"), exports);
5952
5953
  __exportStar(__webpack_require__(/*! ./sql_group_by */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_group_by.js"), exports);
@@ -6416,7 +6417,7 @@ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/co
6416
6417
  class MessageClass extends combi_1.Expression {
6417
6418
  getRunnable() {
6418
6419
  // "&1" can be used for almost anything(field names, method names etc.) in macros
6419
- return (0, combi_1.seq)((0, combi_1.regex)(/^>?[\w\/]+#?@?\/?!?&?>?\$?\??$/), (0, combi_1.starPrio)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), (0, combi_1.optPrio)((0, combi_1.regex)(/^\w+$/)))), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.DashW)));
6420
+ return (0, combi_1.seq)((0, combi_1.regex)(/^>?[\w\/]+#?@?\/?!?&?>?\$?\??<?$/), (0, combi_1.starPrio)((0, combi_1.tok)(tokens_1.PlusW)), (0, combi_1.starPrio)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), (0, combi_1.optPrio)((0, combi_1.regex)(/^\w+$/)))), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.DashW)));
6420
6421
  }
6421
6422
  }
6422
6423
  exports.MessageClass = MessageClass;
@@ -7257,6 +7258,28 @@ exports.PerformUsing = PerformUsing;
7257
7258
 
7258
7259
  /***/ }),
7259
7260
 
7261
+ /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/provide_field_name.js":
7262
+ /*!***************************************************************************************************!*\
7263
+ !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/provide_field_name.js ***!
7264
+ \***************************************************************************************************/
7265
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7266
+
7267
+ "use strict";
7268
+
7269
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
7270
+ exports.ProvideFieldName = void 0;
7271
+ const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
7272
+ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
7273
+ class ProvideFieldName extends combi_1.Expression {
7274
+ getRunnable() {
7275
+ return (0, combi_1.seq)((0, combi_1.regex)(/^(?!(?:FROM|BETWEEN|WHERE)$)(\/\w+\/)?(\w+~(\w+|\*)|\w+)$/i), (0, combi_1.optPrio)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), (0, combi_1.regex)(/^\w+$/i))));
7276
+ }
7277
+ }
7278
+ exports.ProvideFieldName = ProvideFieldName;
7279
+ //# sourceMappingURL=provide_field_name.js.map
7280
+
7281
+ /***/ }),
7282
+
7260
7283
  /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/radio_group_name.js":
7261
7284
  /*!*************************************************************************************************!*\
7262
7285
  !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/radio_group_name.js ***!
@@ -9421,12 +9444,12 @@ class TypeTable extends combi_1.Expression {
9421
9444
  // a maximum of 15 secondary table keys can be defined
9422
9445
  // "WITH" is not allowed as a field name in keys
9423
9446
  const typetable = (0, combi_1.alt)(generic, (0, combi_1.seq)(normal1, (0, combi_1.alt)((0, combi_1.opt)((0, combi_1.per)(header, initial, (0, combi_1.plusPrio)(type_table_key_1.TypeTableKey))), (0, combi_1.seq)((0, combi_1.plus)(type_table_key_1.TypeTableKey), (0, combi_1.optPrio)(initial)))));
9424
- const occurs = (0, combi_1.seq)("OCCURS", _1.Integer);
9447
+ const occurs = (0, combi_1.seq)("OCCURS", (0, combi_1.altPrio)(_1.Integer, field_chain_1.FieldChain));
9425
9448
  const derived = (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("TABLE FOR", (0, combi_1.altPrio)("ACTION IMPORT", "ACTION RESULT", "CREATE", "EVENT", "FAILED", "LOCK", "READ RESULT", "UPDATE"), _1.TypeName));
9426
9449
  const oldType = (0, combi_1.seq)((0, combi_1.opt)("REF TO"), _1.TypeName, (0, combi_1.alt)((0, combi_1.seq)(occurs, (0, combi_1.opt)(header)), header));
9427
9450
  const oldLike = (0, combi_1.seq)((0, combi_1.opt)("REF TO"), field_chain_1.FieldChain, (0, combi_1.alt)((0, combi_1.seq)(occurs, (0, combi_1.opt)(header)), header));
9428
9451
  const typeLine = (0, combi_1.seq)("LINE OF", _1.TypeName, occurs, header);
9429
- const ret = (0, combi_1.altPrio)((0, combi_1.seq)(occurs, (0, combi_1.opt)(header)), (0, combi_1.seq)("LIKE", (0, combi_1.alt)(oldLike, likeType, rangeLike)), (0, combi_1.seq)("TYPE", (0, combi_1.alt)(oldType, typetable, rangeType, typeLine, derived)));
9452
+ const ret = (0, combi_1.altPrio)((0, combi_1.seq)(occurs, (0, combi_1.opt)(header)), (0, combi_1.seq)("LIKE", (0, combi_1.alt)(oldLike, likeType, rangeLike, typeLine)), (0, combi_1.seq)("TYPE", (0, combi_1.alt)(oldType, typetable, rangeType, typeLine, derived)));
9430
9453
  return ret;
9431
9454
  }
9432
9455
  }
@@ -10174,7 +10197,10 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
10174
10197
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
10175
10198
  class AssignLocalCopy {
10176
10199
  getMatcher() {
10177
- const ret = (0, combi_1.seq)("ASSIGN LOCAL COPY OF", (0, combi_1.opt)((0, combi_1.seq)("INITIAL", (0, combi_1.opt)("LINE OF"))), (0, combi_1.alt)(expressions_1.Source, expressions_1.Dynamic), "TO", expressions_1.TargetFieldSymbol);
10200
+ const init = (0, combi_1.seq)("INITIAL", (0, combi_1.alt)(expressions_1.Source, expressions_1.Dynamic));
10201
+ const iline = (0, combi_1.seq)("INITIAL LINE OF", (0, combi_1.alt)(expressions_1.Source, expressions_1.Dynamic));
10202
+ const main = (0, combi_1.seq)("MAIN TABLE FIELD", expressions_1.Dynamic);
10203
+ const ret = (0, combi_1.seq)("ASSIGN LOCAL COPY OF", (0, combi_1.alt)(init, iline, main, expressions_1.Source), "TO", expressions_1.TargetFieldSymbol);
10178
10204
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
10179
10205
  }
10180
10206
  }
@@ -11967,7 +11993,7 @@ class Describe {
11967
11993
  const table = (0, combi_1.seq)("TABLE", expressions_1.FieldChain, (0, combi_1.opt)((0, combi_1.per)(tlines, kind, occurs)));
11968
11994
  const mode = (0, combi_1.seq)("IN", (0, combi_1.alt)("BYTE", "CHARACTER"), "MODE");
11969
11995
  const field = (0, combi_1.seq)("FIELD", expressions_1.Source, (0, combi_1.per)((0, combi_1.seq)("TYPE", expressions_1.Target), (0, combi_1.seq)("COMPONENTS", expressions_1.Target), (0, combi_1.seq)("LENGTH", expressions_1.Target, (0, combi_1.opt)(mode)), (0, combi_1.seq)("DECIMALS", expressions_1.Target), (0, combi_1.seq)("HELP-ID", expressions_1.Target), (0, combi_1.seq)("OUTPUT-LENGTH", expressions_1.Target), (0, combi_1.seq)("EDIT MASK", expressions_1.Target), (0, combi_1.seq)("INTO", expressions_1.Target)));
11970
- const distance = (0, combi_1.seq)("DISTANCE BETWEEN", expressions_1.Source, "AND", expressions_1.Source, "INTO", expressions_1.Target, mode);
11996
+ const distance = (0, combi_1.seq)("DISTANCE BETWEEN", expressions_1.Source, "AND", expressions_1.Source, "INTO", expressions_1.Target, (0, combi_1.opt)(mode));
11971
11997
  const lines = (0, combi_1.seq)("NUMBER OF LINES", expressions_1.Target);
11972
11998
  const pages = (0, combi_1.seq)("NUMBER OF PAGES", expressions_1.Target);
11973
11999
  const line = (0, combi_1.seq)("LINE", expressions_1.Source);
@@ -13105,7 +13131,7 @@ class Format {
13105
13131
  getMatcher() {
13106
13132
  const eq = (0, combi_1.seq)("=", expressions_1.Source);
13107
13133
  const value = (0, combi_1.altPrio)(eq, "ON", "OFF");
13108
- const options = (0, combi_1.per)("RESET", (0, combi_1.seq)("INTENSIFIED", (0, combi_1.opt)(value)), (0, combi_1.seq)("INVERSE", (0, combi_1.opt)(value)), (0, combi_1.seq)("HOTSPOT", (0, combi_1.opt)(value)), (0, combi_1.seq)("FRAMES", value), (0, combi_1.seq)("INPUT", value), expressions_1.Color);
13134
+ const options = (0, combi_1.per)("RESET", (0, combi_1.seq)("INTENSIFIED", (0, combi_1.opt)(value)), (0, combi_1.seq)("INVERSE", (0, combi_1.opt)(value)), (0, combi_1.seq)("HOTSPOT", (0, combi_1.opt)(value)), (0, combi_1.seq)("FRAMES", value), (0, combi_1.seq)("INPUT", (0, combi_1.opt)(value)), expressions_1.Color);
13109
13135
  const ret = (0, combi_1.seq)("FORMAT", options);
13110
13136
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
13111
13137
  }
@@ -14920,7 +14946,7 @@ const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules
14920
14946
  class Move {
14921
14947
  getMatcher() {
14922
14948
  const mov = (0, combi_1.verNot)(version_1.Version.Cloud, "MOVE");
14923
- const move = (0, combi_1.seq)(mov, (0, combi_1.altPrio)((0, combi_1.seq)("EXACT", expressions_1.Source, "TO", expressions_1.Target), (0, combi_1.seq)(expressions_1.Source, (0, combi_1.altPrio)("?TO", "TO"), expressions_1.Target)));
14949
+ const move = (0, combi_1.seq)(mov, (0, combi_1.altPrio)((0, combi_1.seq)("EXACT", expressions_1.Source, "TO", expressions_1.Target), (0, combi_1.seq)(expressions_1.Source, (0, combi_1.altPrio)("?TO", "TO"), expressions_1.Target)), (0, combi_1.opt)((0, combi_1.seq)("PERCENTAGE", expressions_1.Source)));
14924
14950
  const calcAssign = (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.alt)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.WPlus), "="), (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WDash), "="), "/=", "*=", "&&="));
14925
14951
  const chained = (0, combi_1.seq)("=", (0, combi_1.star)((0, combi_1.seq)(expressions_1.Target, "=")));
14926
14952
  const equals = (0, combi_1.altPrio)((0, combi_1.altPrio)(chained, "?="), calcAssign);
@@ -15236,7 +15262,8 @@ class Parameter {
15236
15262
  const length = (0, combi_1.seq)("LENGTH", expressions_1.Constant);
15237
15263
  const match = (0, combi_1.seq)("MATCHCODE OBJECT", expressions_1.Field);
15238
15264
  const decimals = (0, combi_1.seq)("DECIMALS", expressions_1.Source);
15239
- const perm = (0, combi_1.per)(type, def, "OBLIGATORY", match, cmd, length, decimals, radio, memory, modif, listbox, visible, "VALUE CHECK", "NO-DISPLAY", "AS CHECKBOX", "LOWER CASE");
15265
+ const forTable = (0, combi_1.seq)("FOR TABLE", expressions_1.DatabaseTable);
15266
+ const perm = (0, combi_1.per)(type, def, "OBLIGATORY", match, cmd, length, decimals, radio, memory, modif, listbox, visible, forTable, "VALUE CHECK", "NO-DISPLAY", "AS CHECKBOX", "LOWER CASE");
15240
15267
  const ret = (0, combi_1.seq)(para, expressions_1.FieldSub, (0, combi_1.opt)(expressions_1.FieldLength), (0, combi_1.opt)(perm));
15241
15268
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
15242
15269
  }
@@ -15319,7 +15346,10 @@ class PrintControl {
15319
15346
  getMatcher() {
15320
15347
  const index = (0, combi_1.seq)("INDEX-LINE", expressions_1.Source);
15321
15348
  const func = (0, combi_1.seq)("FUNCTION", expressions_1.Source);
15322
- const ret = (0, combi_1.seq)("PRINT-CONTROL", (0, combi_1.alt)(index, func));
15349
+ const line = (0, combi_1.seq)("LINE", expressions_1.Source);
15350
+ const position = (0, combi_1.seq)("POSITION", expressions_1.Source);
15351
+ const size = (0, combi_1.seq)("SIZE", expressions_1.Source);
15352
+ const ret = (0, combi_1.seq)("PRINT-CONTROL", (0, combi_1.per)(index, func, line, position, size));
15323
15353
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
15324
15354
  }
15325
15355
  }
@@ -15414,10 +15444,13 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
15414
15444
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
15415
15445
  class Provide {
15416
15446
  getMatcher() {
15417
- const list = (0, combi_1.plus)((0, combi_1.altPrio)("*", expressions_1.Field));
15447
+ const list = (0, combi_1.plusPrio)((0, combi_1.altPrio)("*", expressions_1.ProvideFieldName));
15418
15448
  const fields = (0, combi_1.seq)("FIELDS", list, "FROM", expressions_1.Source, "INTO", expressions_1.Target, "VALID", expressions_1.Field, "BOUNDS", expressions_1.Field, "AND", expressions_1.Field);
15419
- const fieldList = (0, combi_1.altPrio)((0, combi_1.seq)(list, "FROM", expressions_1.Source), list);
15420
- const ret = (0, combi_1.seq)("PROVIDE", (0, combi_1.altPrio)((0, combi_1.plus)(fields), (0, combi_1.plus)(fieldList)), "BETWEEN", expressions_1.SimpleSource3, "AND", expressions_1.SimpleSource3);
15449
+ const from = (0, combi_1.seq)("FROM", expressions_1.Source);
15450
+ const fieldList = (0, combi_1.seq)((0, combi_1.plus)(list), from);
15451
+ const where = (0, combi_1.seq)("WHERE", expressions_1.Cond);
15452
+ const between = (0, combi_1.seq)("BETWEEN", expressions_1.SimpleSource3, "AND", expressions_1.SimpleSource3);
15453
+ const ret = (0, combi_1.seq)("PROVIDE", (0, combi_1.altPrio)((0, combi_1.plusPrio)(fields), (0, combi_1.plusPrio)(fieldList)), (0, combi_1.opt)((0, combi_1.per)(between, where)));
15421
15454
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
15422
15455
  }
15423
15456
  }
@@ -35296,13 +35329,13 @@ class FlowGraph {
35296
35329
  this.label = label;
35297
35330
  }
35298
35331
  toDigraph() {
35299
- return `digraph G {
35300
- labelloc="t";
35301
- label="${this.label}";
35302
- graph [fontname = "helvetica"];
35303
- node [fontname = "helvetica", shape="box"];
35304
- edge [fontname = "helvetica"];
35305
- ${this.toTextEdges()}
35332
+ return `digraph G {
35333
+ labelloc="t";
35334
+ label="${this.label}";
35335
+ graph [fontname = "helvetica"];
35336
+ node [fontname = "helvetica", shape="box"];
35337
+ edge [fontname = "helvetica"];
35338
+ ${this.toTextEdges()}
35306
35339
  }`;
35307
35340
  }
35308
35341
  listSources(node) {
@@ -43720,13 +43753,13 @@ class Help {
43720
43753
  /////////////////////////////////////////////////
43721
43754
  static dumpABAP(file, reg, textDocument, position) {
43722
43755
  let content = "";
43723
- content = `
43724
- <a href="#_tokens" rel="no-refresh">Tokens</a> |
43725
- <a href="#_statements" rel="no-refresh">Statements</a> |
43726
- <a href="#_structure" rel="no-refresh">Structure</a> |
43727
- <a href="#_files" rel="no-refresh">Files</a> |
43728
- <a href="#_info" rel="no-refresh">Info Dump</a>
43729
- <hr>
43756
+ content = `
43757
+ <a href="#_tokens" rel="no-refresh">Tokens</a> |
43758
+ <a href="#_statements" rel="no-refresh">Statements</a> |
43759
+ <a href="#_structure" rel="no-refresh">Structure</a> |
43760
+ <a href="#_files" rel="no-refresh">Files</a> |
43761
+ <a href="#_info" rel="no-refresh">Info Dump</a>
43762
+ <hr>
43730
43763
  ` +
43731
43764
  "<tt>" + textDocument.uri + " (" +
43732
43765
  (position.line + 1) + ", " +
@@ -43881,9 +43914,9 @@ class Help {
43881
43914
  return ret + "</ul>";
43882
43915
  }
43883
43916
  static tokens(file) {
43884
- let inner = `<table><tr><td><b>String</b></td><td><b>Type</b></td>
43885
- <td><b>Row</b></td><td><b>Column</b></td>
43886
- <td><b>vRow</b></td><td><b>vColumn</b></td>
43917
+ let inner = `<table><tr><td><b>String</b></td><td><b>Type</b></td>
43918
+ <td><b>Row</b></td><td><b>Column</b></td>
43919
+ <td><b>vRow</b></td><td><b>vColumn</b></td>
43887
43920
  </tr>`;
43888
43921
  for (const token of file.getTokens()) {
43889
43922
  const tStart = token.getStart();
@@ -53134,7 +53167,7 @@ class Registry {
53134
53167
  }
53135
53168
  static abaplintVersion() {
53136
53169
  // magic, see build script "version.sh"
53137
- return "2.113.56";
53170
+ return "2.113.58";
53138
53171
  }
53139
53172
  getDDICReferences() {
53140
53173
  return this.ddicReferences;
@@ -53453,10 +53486,10 @@ class SevenBitAscii {
53453
53486
  key: "7bit_ascii",
53454
53487
  title: "Check for 7bit ascii",
53455
53488
  shortDescription: `Only allow characters from the 7bit ASCII set.`,
53456
- extendedInformation: `https://docs.abapopenchecks.org/checks/05/
53457
-
53458
- https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
53459
-
53489
+ extendedInformation: `https://docs.abapopenchecks.org/checks/05/
53490
+
53491
+ https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
53492
+
53460
53493
  Checkes files with extensions ".abap" and ".asddls"`,
53461
53494
  tags: [_irule_1.RuleTag.SingleFile],
53462
53495
  badExample: `WRITE '뽑'.`,
@@ -53662,10 +53695,10 @@ class Abapdoc extends _abap_rule_1.ABAPRule {
53662
53695
  key: "abapdoc",
53663
53696
  title: "Check abapdoc",
53664
53697
  shortDescription: `Various checks regarding abapdoc.`,
53665
- extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
53666
-
53667
- Plus class and interface definitions.
53668
-
53698
+ extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
53699
+
53700
+ Plus class and interface definitions.
53701
+
53669
53702
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#abap-doc-only-for-public-apis`,
53670
53703
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
53671
53704
  };
@@ -53802,27 +53835,27 @@ class AddTestAttributes extends _abap_rule_1.ABAPRule {
53802
53835
  title: "Add test attributes for tests classes with test methods",
53803
53836
  shortDescription: `Add test attributes DURATION and RISK LEVEL for tests classes with test methods`,
53804
53837
  tags: [_irule_1.RuleTag.SingleFile],
53805
- badExample: `CLASS ltcl_test1 DEFINITION FINAL FOR TESTING.
53806
- PUBLIC SECTION.
53807
- PROTECTED SECTION.
53808
- PRIVATE SECTION.
53809
- METHODS test FOR TESTING RAISING cx_static_check.
53810
- ENDCLASS.
53811
-
53812
- CLASS ltcl_test1 IMPLEMENTATION.
53813
- METHOD test.
53814
- ENDMETHOD.
53838
+ badExample: `CLASS ltcl_test1 DEFINITION FINAL FOR TESTING.
53839
+ PUBLIC SECTION.
53840
+ PROTECTED SECTION.
53841
+ PRIVATE SECTION.
53842
+ METHODS test FOR TESTING RAISING cx_static_check.
53843
+ ENDCLASS.
53844
+
53845
+ CLASS ltcl_test1 IMPLEMENTATION.
53846
+ METHOD test.
53847
+ ENDMETHOD.
53815
53848
  ENDCLASS.`,
53816
- goodExample: `CLASS ltcl_test2 DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
53817
- PUBLIC SECTION.
53818
- PROTECTED SECTION.
53819
- PRIVATE SECTION.
53820
- METHODS test FOR TESTING RAISING cx_static_check.
53821
- ENDCLASS.
53822
-
53823
- CLASS ltcl_test2 IMPLEMENTATION.
53824
- METHOD test.
53825
- ENDMETHOD.
53849
+ goodExample: `CLASS ltcl_test2 DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
53850
+ PUBLIC SECTION.
53851
+ PROTECTED SECTION.
53852
+ PRIVATE SECTION.
53853
+ METHODS test FOR TESTING RAISING cx_static_check.
53854
+ ENDCLASS.
53855
+
53856
+ CLASS ltcl_test2 IMPLEMENTATION.
53857
+ METHOD test.
53858
+ ENDMETHOD.
53826
53859
  ENDCLASS.`,
53827
53860
  };
53828
53861
  }
@@ -53908,49 +53941,49 @@ class AlignParameters extends _abap_rule_1.ABAPRule {
53908
53941
  key: "align_parameters",
53909
53942
  title: "Align Parameters",
53910
53943
  shortDescription: `Checks for vertially aligned parameters`,
53911
- extendedInformation: `Checks:
53912
- * function module calls
53913
- * method calls
53914
- * VALUE constructors
53915
- * NEW constructors
53916
- * RAISE EXCEPTION statements
53917
- * CREATE OBJECT statements
53918
- * RAISE EVENT statements
53919
-
53920
- https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
53921
-
53922
- Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
53923
-
53924
- If parameters are on the same row, no issues are reported, see
53944
+ extendedInformation: `Checks:
53945
+ * function module calls
53946
+ * method calls
53947
+ * VALUE constructors
53948
+ * NEW constructors
53949
+ * RAISE EXCEPTION statements
53950
+ * CREATE OBJECT statements
53951
+ * RAISE EVENT statements
53952
+
53953
+ https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
53954
+
53955
+ Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
53956
+
53957
+ If parameters are on the same row, no issues are reported, see
53925
53958
  https://rules.abaplint.org/max_one_method_parameter_per_line/ for splitting parameters to lines`,
53926
53959
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
53927
- badExample: `CALL FUNCTION 'FOOBAR'
53928
- EXPORTING
53929
- foo = 2
53930
- parameter = 3.
53931
-
53932
- foobar( moo = 1
53933
- param = 1 ).
53934
-
53935
- foo = VALUE #(
53936
- foo = bar
53960
+ badExample: `CALL FUNCTION 'FOOBAR'
53961
+ EXPORTING
53962
+ foo = 2
53963
+ parameter = 3.
53964
+
53965
+ foobar( moo = 1
53966
+ param = 1 ).
53967
+
53968
+ foo = VALUE #(
53969
+ foo = bar
53937
53970
  moo = 2 ).`,
53938
- goodExample: `CALL FUNCTION 'FOOBAR'
53939
- EXPORTING
53940
- foo = 2
53941
- parameter = 3.
53942
-
53943
- foobar( moo = 1
53944
- param = 1 ).
53945
-
53946
- foo = VALUE #(
53947
- foo = bar
53948
- moo = 2 ).
53949
-
53950
- DATA(sdf) = VALUE type(
53951
- common_val = 2
53952
- another_common = 5
53953
- ( row_value = 4
53971
+ goodExample: `CALL FUNCTION 'FOOBAR'
53972
+ EXPORTING
53973
+ foo = 2
53974
+ parameter = 3.
53975
+
53976
+ foobar( moo = 1
53977
+ param = 1 ).
53978
+
53979
+ foo = VALUE #(
53980
+ foo = bar
53981
+ moo = 2 ).
53982
+
53983
+ DATA(sdf) = VALUE type(
53984
+ common_val = 2
53985
+ another_common = 5
53986
+ ( row_value = 4
53954
53987
  value_foo = 5 ) ).`,
53955
53988
  };
53956
53989
  }
@@ -54384,37 +54417,37 @@ class AlignTypeExpressions extends _abap_rule_1.ABAPRule {
54384
54417
  key: "align_type_expressions",
54385
54418
  title: "Align TYPE expressions",
54386
54419
  shortDescription: `Align TYPE expressions in statements`,
54387
- extendedInformation: `
54388
- Currently works for METHODS + BEGIN OF
54389
-
54390
- If BEGIN OF has an INCLUDE TYPE its ignored
54391
-
54392
- Also note that clean ABAP does not recommend aligning TYPE clauses:
54420
+ extendedInformation: `
54421
+ Currently works for METHODS + BEGIN OF
54422
+
54423
+ If BEGIN OF has an INCLUDE TYPE its ignored
54424
+
54425
+ Also note that clean ABAP does not recommend aligning TYPE clauses:
54393
54426
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-align-type-clauses`,
54394
54427
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix],
54395
- badExample: `
54396
- TYPES: BEGIN OF foo,
54397
- bar TYPE i,
54398
- foobar TYPE i,
54399
- END OF foo.
54400
-
54401
- INTERFACE lif.
54402
- METHODS bar
54403
- IMPORTING
54404
- foo TYPE i
54405
- foobar TYPE i.
54428
+ badExample: `
54429
+ TYPES: BEGIN OF foo,
54430
+ bar TYPE i,
54431
+ foobar TYPE i,
54432
+ END OF foo.
54433
+
54434
+ INTERFACE lif.
54435
+ METHODS bar
54436
+ IMPORTING
54437
+ foo TYPE i
54438
+ foobar TYPE i.
54406
54439
  ENDINTERFACE.`,
54407
- goodExample: `
54408
- TYPES: BEGIN OF foo,
54409
- bar TYPE i,
54410
- foobar TYPE i,
54411
- END OF foo.
54412
-
54413
- INTERFACE lif.
54414
- METHODS bar
54415
- IMPORTING
54416
- foo TYPE i
54417
- foobar TYPE i.
54440
+ goodExample: `
54441
+ TYPES: BEGIN OF foo,
54442
+ bar TYPE i,
54443
+ foobar TYPE i,
54444
+ END OF foo.
54445
+
54446
+ INTERFACE lif.
54447
+ METHODS bar
54448
+ IMPORTING
54449
+ foo TYPE i
54450
+ foobar TYPE i.
54418
54451
  ENDINTERFACE.`,
54419
54452
  };
54420
54453
  }
@@ -54693,16 +54726,16 @@ class AmbiguousStatement extends _abap_rule_1.ABAPRule {
54693
54726
  return {
54694
54727
  key: "ambiguous_statement",
54695
54728
  title: "Check for ambigious statements",
54696
- shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
54697
- Add "TABLE" keyword or "@" for escaping SQL variables
54698
-
54729
+ shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
54730
+ Add "TABLE" keyword or "@" for escaping SQL variables
54731
+
54699
54732
  Only works if the target version is 740sp05 or above`,
54700
54733
  tags: [_irule_1.RuleTag.SingleFile],
54701
- badExample: `DELETE foo FROM bar.
54734
+ badExample: `DELETE foo FROM bar.
54702
54735
  MODIFY foo FROM bar.`,
54703
- goodExample: `DELETE foo FROM @bar.
54704
- DELETE TABLE itab FROM 2.
54705
- MODIFY zfoo FROM @wa.
54736
+ goodExample: `DELETE foo FROM @bar.
54737
+ DELETE TABLE itab FROM 2.
54738
+ MODIFY zfoo FROM @wa.
54706
54739
  MODIFY TABLE foo FROM bar.`,
54707
54740
  };
54708
54741
  }
@@ -54807,16 +54840,16 @@ class AvoidUse extends _abap_rule_1.ABAPRule {
54807
54840
  key: "avoid_use",
54808
54841
  title: "Avoid use of certain statements",
54809
54842
  shortDescription: `Detects usage of certain statements.`,
54810
- extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
54811
-
54812
- Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
54813
-
54814
- STATICS: use CLASS-DATA instead
54815
-
54816
- DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
54817
-
54818
- TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
54819
-
54843
+ extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
54844
+
54845
+ Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
54846
+
54847
+ STATICS: use CLASS-DATA instead
54848
+
54849
+ DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
54850
+
54851
+ TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
54852
+
54820
54853
  BREAK points`,
54821
54854
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
54822
54855
  };
@@ -54948,11 +54981,11 @@ class BeginEndNames extends _abap_rule_1.ABAPRule {
54948
54981
  title: "Check BEGIN END names",
54949
54982
  shortDescription: `Check BEGIN OF and END OF names match, plus there must be statements between BEGIN and END`,
54950
54983
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
54951
- badExample: `DATA: BEGIN OF stru,
54952
- field TYPE i,
54984
+ badExample: `DATA: BEGIN OF stru,
54985
+ field TYPE i,
54953
54986
  END OF structure_not_the_same.`,
54954
- goodExample: `DATA: BEGIN OF stru,
54955
- field TYPE i,
54987
+ goodExample: `DATA: BEGIN OF stru,
54988
+ field TYPE i,
54956
54989
  END OF stru.`,
54957
54990
  };
54958
54991
  }
@@ -55049,20 +55082,20 @@ class BeginSingleInclude extends _abap_rule_1.ABAPRule {
55049
55082
  title: "BEGIN contains single INCLUDE",
55050
55083
  shortDescription: `Finds TYPE BEGIN with just one INCLUDE TYPE, and DATA with single INCLUDE STRUCTURE`,
55051
55084
  tags: [_irule_1.RuleTag.SingleFile],
55052
- badExample: `TYPES: BEGIN OF dummy1.
55053
- INCLUDE TYPE dselc.
55054
- TYPES: END OF dummy1.
55055
-
55056
- DATA BEGIN OF foo.
55057
- INCLUDE STRUCTURE syst.
55058
- DATA END OF foo.
55059
-
55060
- STATICS BEGIN OF bar.
55061
- INCLUDE STRUCTURE syst.
55085
+ badExample: `TYPES: BEGIN OF dummy1.
55086
+ INCLUDE TYPE dselc.
55087
+ TYPES: END OF dummy1.
55088
+
55089
+ DATA BEGIN OF foo.
55090
+ INCLUDE STRUCTURE syst.
55091
+ DATA END OF foo.
55092
+
55093
+ STATICS BEGIN OF bar.
55094
+ INCLUDE STRUCTURE syst.
55062
55095
  STATICS END OF bar.`,
55063
- goodExample: `DATA BEGIN OF foo.
55064
- DATA field TYPE i.
55065
- INCLUDE STRUCTURE dselc.
55096
+ goodExample: `DATA BEGIN OF foo.
55097
+ DATA field TYPE i.
55098
+ INCLUDE STRUCTURE dselc.
55066
55099
  DATA END OF foo.`,
55067
55100
  };
55068
55101
  }
@@ -55152,9 +55185,9 @@ class CallTransactionAuthorityCheck extends _abap_rule_1.ABAPRule {
55152
55185
  extendedInformation: `https://docs.abapopenchecks.org/checks/54/`,
55153
55186
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
55154
55187
  badExample: `CALL TRANSACTION 'FOO'.`,
55155
- goodExample: `TRY.
55156
- CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
55157
- CATCH cx_sy_authorization_error.
55188
+ goodExample: `TRY.
55189
+ CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
55190
+ CATCH cx_sy_authorization_error.
55158
55191
  ENDTRY.`,
55159
55192
  };
55160
55193
  }
@@ -55219,10 +55252,10 @@ class CDSCommentStyle {
55219
55252
  key: "cds_comment_style",
55220
55253
  title: "CDS Comment Style",
55221
55254
  shortDescription: `Check for obsolete comment style`,
55222
- extendedInformation: `Check for obsolete comment style
55223
-
55224
- Comments starting with "--" are considered obsolete
55225
-
55255
+ extendedInformation: `Check for obsolete comment style
55256
+
55257
+ Comments starting with "--" are considered obsolete
55258
+
55226
55259
  https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abencds_general_syntax_rules.htm`,
55227
55260
  tags: [_irule_1.RuleTag.SingleFile],
55228
55261
  badExample: "-- this is a comment",
@@ -55288,10 +55321,10 @@ class CDSLegacyView {
55288
55321
  key: "cds_legacy_view",
55289
55322
  title: "CDS Legacy View",
55290
55323
  shortDescription: `Identify CDS Legacy Views`,
55291
- extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
55292
-
55293
- https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
55294
-
55324
+ extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
55325
+
55326
+ https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
55327
+
55295
55328
  v755 and up`,
55296
55329
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Upport],
55297
55330
  };
@@ -55446,10 +55479,10 @@ class ChainMainlyDeclarations extends _abap_rule_1.ABAPRule {
55446
55479
  key: "chain_mainly_declarations",
55447
55480
  title: "Chain mainly declarations",
55448
55481
  shortDescription: `Chain mainly declarations, allows chaining for the configured statements, reports errors for other statements.`,
55449
- extendedInformation: `
55450
- https://docs.abapopenchecks.org/checks/23/
55451
-
55452
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
55482
+ extendedInformation: `
55483
+ https://docs.abapopenchecks.org/checks/23/
55484
+
55485
+ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
55453
55486
  `,
55454
55487
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
55455
55488
  badExample: `CALL METHOD: bar.`,
@@ -55625,17 +55658,17 @@ class ChangeIfToCase extends _abap_rule_1.ABAPRule {
55625
55658
  title: "Change IF to CASE",
55626
55659
  shortDescription: `Finds IF constructs that can be changed to CASE`,
55627
55660
  // eslint-disable-next-line max-len
55628
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
55629
-
55661
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
55662
+
55630
55663
  If the first comparison is a boolean compare, no issue is reported.`,
55631
55664
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
55632
- badExample: `IF l_fcat-fieldname EQ 'FOO'.
55633
- ELSEIF l_fcat-fieldname = 'BAR'
55634
- OR l_fcat-fieldname = 'MOO'.
55665
+ badExample: `IF l_fcat-fieldname EQ 'FOO'.
55666
+ ELSEIF l_fcat-fieldname = 'BAR'
55667
+ OR l_fcat-fieldname = 'MOO'.
55635
55668
  ENDIF.`,
55636
- goodExample: `CASE l_fcat-fieldname.
55637
- WHEN 'FOO'.
55638
- WHEN 'BAR' OR 'MOO'.
55669
+ goodExample: `CASE l_fcat-fieldname.
55670
+ WHEN 'FOO'.
55671
+ WHEN 'BAR' OR 'MOO'.
55639
55672
  ENDCASE.`,
55640
55673
  };
55641
55674
  }
@@ -55772,8 +55805,8 @@ class CheckAbstract extends _abap_rule_1.ABAPRule {
55772
55805
  return {
55773
55806
  key: "check_abstract",
55774
55807
  title: "Check abstract methods and classes",
55775
- shortDescription: `Checks abstract methods and classes:
55776
- - class defined as abstract and final,
55808
+ shortDescription: `Checks abstract methods and classes:
55809
+ - class defined as abstract and final,
55777
55810
  - non-abstract class contains abstract methods`,
55778
55811
  extendedInformation: `If a class defines only constants, use an interface instead`,
55779
55812
  tags: [_irule_1.RuleTag.SingleFile],
@@ -55854,11 +55887,11 @@ class CheckComments extends _abap_rule_1.ABAPRule {
55854
55887
  return {
55855
55888
  key: "check_comments",
55856
55889
  title: "Check Comments",
55857
- shortDescription: `
55890
+ shortDescription: `
55858
55891
  Various checks for comment usage.`,
55859
- extendedInformation: `
55860
- Detects end of line comments. Comments starting with "#EC" or "##" are ignored
55861
-
55892
+ extendedInformation: `
55893
+ Detects end of line comments. Comments starting with "#EC" or "##" are ignored
55894
+
55862
55895
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#put-comments-before-the-statement-they-relate-to`,
55863
55896
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
55864
55897
  badExample: `WRITE 2. " descriptive comment`,
@@ -56020,9 +56053,9 @@ class CheckInclude {
56020
56053
  key: "check_include",
56021
56054
  title: "Check INCLUDEs",
56022
56055
  shortDescription: `Checks INCLUDE statements`,
56023
- extendedInformation: `
56024
- * Reports unused includes
56025
- * Errors if the includes are not found
56056
+ extendedInformation: `
56057
+ * Reports unused includes
56058
+ * Errors if the includes are not found
56026
56059
  * Error if including a main program`,
56027
56060
  tags: [_irule_1.RuleTag.Syntax],
56028
56061
  };
@@ -56098,14 +56131,14 @@ class CheckSubrc extends _abap_rule_1.ABAPRule {
56098
56131
  key: "check_subrc",
56099
56132
  title: "Check sy-subrc",
56100
56133
  shortDescription: `Check sy-subrc`,
56101
- extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
56102
-
56103
- If sy-dbcnt is checked after database statements, it is considered okay.
56104
-
56105
- "SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
56106
-
56107
- If IS ASSIGNED is checked after assigning, it is considered okay.
56108
-
56134
+ extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
56135
+
56136
+ If sy-dbcnt is checked after database statements, it is considered okay.
56137
+
56138
+ "SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
56139
+
56140
+ If IS ASSIGNED is checked after assigning, it is considered okay.
56141
+
56109
56142
  FIND statement with MATCH COUNT is considered okay if subrc is not checked`,
56110
56143
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
56111
56144
  pseudoComment: "EC CI_SUBRC",
@@ -56675,17 +56708,17 @@ class ClassicExceptionsOverlap extends _abap_rule_1.ABAPRule {
56675
56708
  shortDescription: `Find overlapping classic exceptions`,
56676
56709
  extendedInformation: `When debugging its typically good to know exactly which exception is caught`,
56677
56710
  tags: [_irule_1.RuleTag.SingleFile],
56678
- badExample: `CALL FUNCTION 'SOMETHING'
56679
- EXCEPTIONS
56680
- system_failure = 1 MESSAGE lv_message
56681
- communication_failure = 1 MESSAGE lv_message
56682
- resource_failure = 1
56711
+ badExample: `CALL FUNCTION 'SOMETHING'
56712
+ EXCEPTIONS
56713
+ system_failure = 1 MESSAGE lv_message
56714
+ communication_failure = 1 MESSAGE lv_message
56715
+ resource_failure = 1
56683
56716
  OTHERS = 1.`,
56684
- goodExample: `CALL FUNCTION 'SOMETHING'
56685
- EXCEPTIONS
56686
- system_failure = 1 MESSAGE lv_message
56687
- communication_failure = 2 MESSAGE lv_message
56688
- resource_failure = 3
56717
+ goodExample: `CALL FUNCTION 'SOMETHING'
56718
+ EXCEPTIONS
56719
+ system_failure = 1 MESSAGE lv_message
56720
+ communication_failure = 2 MESSAGE lv_message
56721
+ resource_failure = 3
56689
56722
  OTHERS = 4.`,
56690
56723
  };
56691
56724
  }
@@ -56931,7 +56964,7 @@ class CommentedCode extends _abap_rule_1.ABAPRule {
56931
56964
  key: "commented_code",
56932
56965
  title: "Find commented code",
56933
56966
  shortDescription: `Detects usage of commented out code.`,
56934
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it
56967
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it
56935
56968
  https://docs.abapopenchecks.org/checks/14/`,
56936
56969
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
56937
56970
  badExample: `* WRITE 'hello world'.`,
@@ -57164,10 +57197,10 @@ class ConstructorVisibilityPublic {
57164
57197
  key: "constructor_visibility_public",
57165
57198
  title: "Check constructor visibility is public",
57166
57199
  shortDescription: `Constructor must be placed in the public section, even if the class is not CREATE PUBLIC.`,
57167
- extendedInformation: `
57168
- This only applies to global classes.
57169
-
57170
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
57200
+ extendedInformation: `
57201
+ This only applies to global classes.
57202
+
57203
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
57171
57204
  https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abeninstance_constructor_guidl.htm`,
57172
57205
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
57173
57206
  };
@@ -57242,8 +57275,8 @@ class ContainsTab extends _abap_rule_1.ABAPRule {
57242
57275
  key: "contains_tab",
57243
57276
  title: "Code contains tab",
57244
57277
  shortDescription: `Checks for usage of tabs (enable to enforce spaces)`,
57245
- extendedInformation: `
57246
- https://docs.abapopenchecks.org/checks/09/
57278
+ extendedInformation: `
57279
+ https://docs.abapopenchecks.org/checks/09/
57247
57280
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
57248
57281
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
57249
57282
  badExample: `\tWRITE 'hello world'.`,
@@ -57330,10 +57363,10 @@ class CyclicOO {
57330
57363
  key: "cyclic_oo",
57331
57364
  title: "Cyclic OO",
57332
57365
  shortDescription: `Finds cyclic/circular OO references`,
57333
- extendedInformation: `Runs for global INTF + CLAS objects
57334
-
57335
- Objects must be without syntax errors for this rule to take effect
57336
-
57366
+ extendedInformation: `Runs for global INTF + CLAS objects
57367
+
57368
+ Objects must be without syntax errors for this rule to take effect
57369
+
57337
57370
  References in testclass includes are ignored`,
57338
57371
  };
57339
57372
  }
@@ -57576,7 +57609,7 @@ class DangerousStatement extends _abap_rule_1.ABAPRule {
57576
57609
  key: "dangerous_statement",
57577
57610
  title: "Dangerous statement",
57578
57611
  shortDescription: `Detects potentially dangerous statements`,
57579
- extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
57612
+ extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
57580
57613
  dynamic SQL can potentially create SQL injection problems`,
57581
57614
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
57582
57615
  };
@@ -57783,13 +57816,13 @@ class DefinitionsTop extends _abap_rule_1.ABAPRule {
57783
57816
  shortDescription: `Checks that definitions are placed at the beginning of METHODs, FORMs and FUNCTIONs.`,
57784
57817
  extendedInformation: `https://docs.abapopenchecks.org/checks/17/`,
57785
57818
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
57786
- badExample: `FROM foo.
57787
- WRITE 'hello'.
57788
- DATA int TYPE i.
57819
+ badExample: `FROM foo.
57820
+ WRITE 'hello'.
57821
+ DATA int TYPE i.
57789
57822
  ENDFORM.`,
57790
- goodExample: `FROM foo.
57791
- DATA int TYPE i.
57792
- WRITE 'hello'.
57823
+ goodExample: `FROM foo.
57824
+ DATA int TYPE i.
57825
+ WRITE 'hello'.
57793
57826
  ENDFORM.`,
57794
57827
  };
57795
57828
  }
@@ -58328,39 +58361,39 @@ class Downport {
58328
58361
  key: "downport",
58329
58362
  title: "Downport statement",
58330
58363
  shortDescription: `Downport functionality`,
58331
- extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with
58332
- a higher level language version. If successful, various rules are applied to downport the statement.
58333
- Target downport version is always v702, thus rule is only enabled if target version is v702.
58334
-
58335
- Current rules:
58336
- * NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/
58337
- * DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/
58338
- * FIELD-SYMBOL() definitions are outlined
58339
- * CONV is outlined
58340
- * COND is outlined
58341
- * REDUCE is outlined
58342
- * SWITCH is outlined
58343
- * FILTER is outlined
58344
- * APPEND expression is outlined
58345
- * INSERT expression is outlined
58346
- * EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/
58347
- * CAST changed to ?=
58348
- * LOOP AT method_call( ) is outlined
58349
- * VALUE # with structure fields
58350
- * VALUE # with internal table lines
58351
- * Table Expressions are outlined
58352
- * SELECT INTO @DATA definitions are outlined
58353
- * Some occurrences of string template formatting option ALPHA changed to function module call
58354
- * SELECT/INSERT/MODIFY/DELETE/UPDATE "," in field list removed, "@" in source/targets removed
58355
- * PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods
58356
- * RAISE EXCEPTION ... MESSAGE
58357
- * Moving with +=, -=, /=, *=, &&= is expanded
58358
- * line_exists and line_index is downported to READ TABLE
58359
- * ENUMs, but does not nessesarily give the correct type and value
58360
- * MESSAGE with non simple source
58361
-
58362
- Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.
58363
-
58364
+ extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with
58365
+ a higher level language version. If successful, various rules are applied to downport the statement.
58366
+ Target downport version is always v702, thus rule is only enabled if target version is v702.
58367
+
58368
+ Current rules:
58369
+ * NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/
58370
+ * DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/
58371
+ * FIELD-SYMBOL() definitions are outlined
58372
+ * CONV is outlined
58373
+ * COND is outlined
58374
+ * REDUCE is outlined
58375
+ * SWITCH is outlined
58376
+ * FILTER is outlined
58377
+ * APPEND expression is outlined
58378
+ * INSERT expression is outlined
58379
+ * EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/
58380
+ * CAST changed to ?=
58381
+ * LOOP AT method_call( ) is outlined
58382
+ * VALUE # with structure fields
58383
+ * VALUE # with internal table lines
58384
+ * Table Expressions are outlined
58385
+ * SELECT INTO @DATA definitions are outlined
58386
+ * Some occurrences of string template formatting option ALPHA changed to function module call
58387
+ * SELECT/INSERT/MODIFY/DELETE/UPDATE "," in field list removed, "@" in source/targets removed
58388
+ * PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods
58389
+ * RAISE EXCEPTION ... MESSAGE
58390
+ * Moving with +=, -=, /=, *=, &&= is expanded
58391
+ * line_exists and line_index is downported to READ TABLE
58392
+ * ENUMs, but does not nessesarily give the correct type and value
58393
+ * MESSAGE with non simple source
58394
+
58395
+ Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.
58396
+
58364
58397
  Make sure to test the downported code, it might not always be completely correct.`,
58365
58398
  tags: [_irule_1.RuleTag.Downport, _irule_1.RuleTag.Quickfix],
58366
58399
  };
@@ -58938,10 +58971,10 @@ Make sure to test the downported code, it might not always be completely correct
58938
58971
  const fieldName = f.concatTokens();
58939
58972
  fieldDefinition += indentation + " " + fieldName + " TYPE " + tableName + "-" + fieldName + ",\n";
58940
58973
  }
58941
- fieldDefinition = `DATA: BEGIN OF ${name},
58974
+ fieldDefinition = `DATA: BEGIN OF ${name},
58942
58975
  ${fieldDefinition}${indentation} END OF ${name}.`;
58943
58976
  }
58944
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
58977
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
58945
58978
  ${indentation}`);
58946
58979
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
58947
58980
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -59000,12 +59033,12 @@ ${indentation}`);
59000
59033
  }
59001
59034
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59002
59035
  const name = ((_g = inlineData.findFirstExpression(Expressions.TargetField)) === null || _g === void 0 ? void 0 : _g.concatTokens()) || "error";
59003
- let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
59004
- ${fieldDefinitions}${indentation} END OF ${uniqueName}.
59005
- ${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.
59036
+ let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
59037
+ ${fieldDefinitions}${indentation} END OF ${uniqueName}.
59038
+ ${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.
59006
59039
  ${indentation}`);
59007
59040
  if (fieldDefinitions === "") {
59008
- fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.
59041
+ fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.
59009
59042
  ${indentation}`);
59010
59043
  }
59011
59044
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
@@ -59073,7 +59106,7 @@ ${indentation}`);
59073
59106
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59074
59107
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
59075
59108
  const firstToken = high.getFirstToken();
59076
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
59109
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
59077
59110
  ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
59078
59111
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
59079
59112
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -59127,7 +59160,7 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
59127
59160
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59128
59161
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
59129
59162
  const firstToken = high.getFirstToken();
59130
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
59163
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
59131
59164
  ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
59132
59165
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
59133
59166
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -59169,14 +59202,14 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
59169
59202
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
59170
59203
  const firstToken = high.getFirstToken();
59171
59204
  // note that the tabix restore should be done before throwing the exception
59172
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.
59173
- ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
59174
- ${indentation}${tabixBackup} = sy-tabix.
59175
- ${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.
59176
- ${indentation}sy-tabix = ${tabixBackup}.
59177
- ${indentation}IF sy-subrc <> 0.
59178
- ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59179
- ${indentation}ENDIF.
59205
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.
59206
+ ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
59207
+ ${indentation}${tabixBackup} = sy-tabix.
59208
+ ${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.
59209
+ ${indentation}sy-tabix = ${tabixBackup}.
59210
+ ${indentation}IF sy-subrc <> 0.
59211
+ ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59212
+ ${indentation}ENDIF.
59180
59213
  ${indentation}`);
59181
59214
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, startToken.getStart(), tableExpression.getLastToken().getEnd(), uniqueName);
59182
59215
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -59233,7 +59266,7 @@ ${indentation}`);
59233
59266
  const className = classNames[0].concatTokens();
59234
59267
  const targetName = (_b = target.findFirstExpression(Expressions.TargetField)) === null || _b === void 0 ? void 0 : _b.concatTokens();
59235
59268
  const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
59236
- const code = ` DATA ${targetName} TYPE REF TO ${className}.
59269
+ const code = ` DATA ${targetName} TYPE REF TO ${className}.
59237
59270
  ${indentation}CATCH ${className} INTO ${targetName}.`;
59238
59271
  const fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getStart(), node.getEnd(), code);
59239
59272
  return issue_1.Issue.atToken(lowFile, node.getFirstToken(), "Outline DATA", this.getMetadata().key, this.conf.severity, fix);
@@ -59395,16 +59428,16 @@ ${indentation}CATCH ${className} INTO ${targetName}.`;
59395
59428
  const uniqueName1 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59396
59429
  const uniqueName2 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59397
59430
  const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
59398
- let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
59399
- ${indentation}${uniqueName1}-msgid = ${id}.
59431
+ let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
59432
+ ${indentation}${uniqueName1}-msgid = ${id}.
59400
59433
  ${indentation}${uniqueName1}-msgno = ${number}.\n`;
59401
59434
  if (withs.length > 0) {
59402
- abap += `${indentation}${uniqueName1}-attr1 = 'IF_T100_DYN_MSG~MSGV1'.
59403
- ${indentation}${uniqueName1}-attr2 = 'IF_T100_DYN_MSG~MSGV2'.
59404
- ${indentation}${uniqueName1}-attr3 = 'IF_T100_DYN_MSG~MSGV3'.
59435
+ abap += `${indentation}${uniqueName1}-attr1 = 'IF_T100_DYN_MSG~MSGV1'.
59436
+ ${indentation}${uniqueName1}-attr2 = 'IF_T100_DYN_MSG~MSGV2'.
59437
+ ${indentation}${uniqueName1}-attr3 = 'IF_T100_DYN_MSG~MSGV3'.
59405
59438
  ${indentation}${uniqueName1}-attr4 = 'IF_T100_DYN_MSG~MSGV4'.\n`;
59406
59439
  }
59407
- abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
59440
+ abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
59408
59441
  ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`;
59409
59442
  if (withs.length > 0) {
59410
59443
  abap += `${indentation}${uniqueName2}->if_t100_dyn_msg~msgty = 'E'.\n`;
@@ -59516,10 +59549,10 @@ ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`
59516
59549
  let code = "";
59517
59550
  if (sourceRef.findFirstExpression(Expressions.TableExpression)) {
59518
59551
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59519
- code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).
59520
- IF sy-subrc <> 0.
59521
- RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59522
- ENDIF.
59552
+ code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).
59553
+ IF sy-subrc <> 0.
59554
+ RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59555
+ ENDIF.
59523
59556
  GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
59524
59557
  }
59525
59558
  else {
@@ -59608,20 +59641,20 @@ GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
59608
59641
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59609
59642
  const uniqueFS = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59610
59643
  const uniqueNameIndex = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59611
- code += ` items LIKE ${loopSourceName},
59612
- END OF ${groupTargetName}type.
59613
- DATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.
59614
- DATA ${uniqueName} LIKE LINE OF ${groupTargetName}tab.
59644
+ code += ` items LIKE ${loopSourceName},
59645
+ END OF ${groupTargetName}type.
59646
+ DATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.
59647
+ DATA ${uniqueName} LIKE LINE OF ${groupTargetName}tab.
59615
59648
  LOOP AT ${loopSourceName} ${(_l = high.findFirstExpression(Expressions.LoopTarget)) === null || _l === void 0 ? void 0 : _l.concatTokens()}.\n`;
59616
59649
  if (groupIndexName !== undefined) {
59617
59650
  code += `DATA(${uniqueNameIndex}) = sy-tabix.\n`;
59618
59651
  }
59619
- code += `READ TABLE ${groupTargetName}tab ASSIGNING FIELD-SYMBOL(<${uniqueFS}>) WITH KEY ${condition}.
59652
+ code += `READ TABLE ${groupTargetName}tab ASSIGNING FIELD-SYMBOL(<${uniqueFS}>) WITH KEY ${condition}.
59620
59653
  IF sy-subrc = 0.\n`;
59621
59654
  if (groupCountName !== undefined) {
59622
59655
  code += ` <${uniqueFS}>-${groupCountName} = <${uniqueFS}>-${groupCountName} + 1.\n`;
59623
59656
  }
59624
- code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
59657
+ code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
59625
59658
  ELSE.\n`;
59626
59659
  code += ` CLEAR ${uniqueName}.\n`;
59627
59660
  for (const c of group.findAllExpressions(Expressions.LoopGroupByComponent)) {
@@ -59642,8 +59675,8 @@ ELSE.\n`;
59642
59675
  }
59643
59676
  code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE ${uniqueName}-items.\n`;
59644
59677
  code += ` INSERT ${uniqueName} INTO TABLE ${groupTargetName}tab.\n`;
59645
- code += `ENDIF.
59646
- ENDLOOP.
59678
+ code += `ENDIF.
59679
+ ENDLOOP.
59647
59680
  LOOP AT ${groupTargetName}tab ${groupTarget}.`;
59648
59681
  let fix = edit_helper_1.EditHelper.replaceRange(lowFile, high.getFirstToken().getStart(), high.getLastToken().getEnd(), code);
59649
59682
  for (const l of ((_m = highFile.getStructure()) === null || _m === void 0 ? void 0 : _m.findAllStructures(Structures.Loop)) || []) {
@@ -59815,7 +59848,7 @@ LOOP AT ${groupTargetName}tab ${groupTarget}.`;
59815
59848
  const enumName = (_b = high.findExpressionAfterToken("ENUM")) === null || _b === void 0 ? void 0 : _b.concatTokens();
59816
59849
  const structureName = (_c = high.findExpressionAfterToken("STRUCTURE")) === null || _c === void 0 ? void 0 : _c.concatTokens();
59817
59850
  // all ENUMS are char like?
59818
- let code = `TYPES ${enumName} TYPE string.
59851
+ let code = `TYPES ${enumName} TYPE string.
59819
59852
  CONSTANTS: BEGIN OF ${structureName},\n`;
59820
59853
  let count = 1;
59821
59854
  for (const e of enumStructure.findDirectStatements(Statements.TypeEnum).concat(enumStructure.findDirectStatements(Statements.Type))) {
@@ -59859,14 +59892,14 @@ CONSTANTS: BEGIN OF ${structureName},\n`;
59859
59892
  const tabixBackup = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59860
59893
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
59861
59894
  // restore tabix before exeption
59862
- const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.
59863
- ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
59864
- ${indentation}${tabixBackup} = sy-tabix.
59865
- ${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.
59866
- ${indentation}sy-tabix = ${tabixBackup}.
59867
- ${indentation}IF sy-subrc <> 0.
59868
- ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59869
- ${indentation}ENDIF.
59895
+ const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.
59896
+ ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
59897
+ ${indentation}${tabixBackup} = sy-tabix.
59898
+ ${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.
59899
+ ${indentation}sy-tabix = ${tabixBackup}.
59900
+ ${indentation}IF sy-subrc <> 0.
59901
+ ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59902
+ ${indentation}ENDIF.
59870
59903
  ${indentation}${uniqueName}`;
59871
59904
  const start = target.getFirstToken().getStart();
59872
59905
  const end = (_a = tableExpression.findDirectTokenByText("]")) === null || _a === void 0 ? void 0 : _a.getEnd();
@@ -59946,11 +59979,11 @@ ${indentation}${uniqueName}`;
59946
59979
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
59947
59980
  const source = (_b = child.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens();
59948
59981
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59949
- const code = `DATA ${uniqueName} TYPE string.
59950
- ${indentation}CALL FUNCTION '${functionName}'
59951
- ${indentation} EXPORTING
59952
- ${indentation} input = ${source}
59953
- ${indentation} IMPORTING
59982
+ const code = `DATA ${uniqueName} TYPE string.
59983
+ ${indentation}CALL FUNCTION '${functionName}'
59984
+ ${indentation} EXPORTING
59985
+ ${indentation} input = ${source}
59986
+ ${indentation} IMPORTING
59954
59987
  ${indentation} output = ${uniqueName}.\n`;
59955
59988
  const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), code);
59956
59989
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, child.getFirstToken().getStart(), child.getLastToken().getEnd(), uniqueName);
@@ -61262,12 +61295,12 @@ class EasyToFindMessages {
61262
61295
  key: "easy_to_find_messages",
61263
61296
  title: "Easy to find messages",
61264
61297
  shortDescription: `Make messages easy to find`,
61265
- extendedInformation: `All messages must be statically referenced exactly once
61266
-
61267
- Only MESSAGE and RAISE statments are counted as static references
61268
-
61269
- Also see rule "message_exists"
61270
-
61298
+ extendedInformation: `All messages must be statically referenced exactly once
61299
+
61300
+ Only MESSAGE and RAISE statments are counted as static references
61301
+
61302
+ Also see rule "message_exists"
61303
+
61271
61304
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#make-messages-easy-to-find`,
61272
61305
  tags: [_irule_1.RuleTag.Styleguide],
61273
61306
  };
@@ -61348,13 +61381,13 @@ class EmptyEvent extends _abap_rule_1.ABAPRule {
61348
61381
  shortDescription: `Empty selection screen or list processing event block`,
61349
61382
  extendedInformation: ``,
61350
61383
  tags: [_irule_1.RuleTag.SingleFile],
61351
- badExample: `
61352
- INITIALIZATION.
61353
- WRITE 'hello'.
61384
+ badExample: `
61385
+ INITIALIZATION.
61386
+ WRITE 'hello'.
61354
61387
  END-OF-SELECTION.`,
61355
- goodExample: `
61356
- START-OF-SELECTION.
61357
- PERFORM sdf.
61388
+ goodExample: `
61389
+ START-OF-SELECTION.
61390
+ PERFORM sdf.
61358
61391
  COMMIT WORK.`,
61359
61392
  };
61360
61393
  }
@@ -61446,8 +61479,8 @@ class EmptyLineinStatement extends _abap_rule_1.ABAPRule {
61446
61479
  key: "empty_line_in_statement",
61447
61480
  title: "Find empty lines in statements",
61448
61481
  shortDescription: `Checks that statements do not contain empty lines.`,
61449
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
61450
-
61482
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
61483
+
61451
61484
  https://docs.abapopenchecks.org/checks/41/`,
61452
61485
  tags: [_irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
61453
61486
  badExample: `WRITE\n\nhello.`,
@@ -61623,13 +61656,13 @@ class EmptyStructure extends _abap_rule_1.ABAPRule {
61623
61656
  shortDescription: `Checks that the code does not contain empty blocks.`,
61624
61657
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-empty-if-branches`,
61625
61658
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
61626
- badExample: `IF foo = bar.
61627
- ENDIF.
61628
-
61629
- DO 2 TIMES.
61659
+ badExample: `IF foo = bar.
61660
+ ENDIF.
61661
+
61662
+ DO 2 TIMES.
61630
61663
  ENDDO.`,
61631
- goodExample: `LOOP AT itab WHERE qty = 0 OR date > sy-datum.
61632
- ENDLOOP.
61664
+ goodExample: `LOOP AT itab WHERE qty = 0 OR date > sy-datum.
61665
+ ENDLOOP.
61633
61666
  result = xsdbool( sy-subrc = 0 ).`,
61634
61667
  };
61635
61668
  }
@@ -61771,10 +61804,10 @@ class ExitOrCheck extends _abap_rule_1.ABAPRule {
61771
61804
  return {
61772
61805
  key: "exit_or_check",
61773
61806
  title: "Find EXIT or CHECK outside loops",
61774
- shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
61807
+ shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
61775
61808
  Use RETURN to leave procesing blocks instead.`,
61776
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
61777
- https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
61809
+ extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
61810
+ https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
61778
61811
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#check-vs-return`,
61779
61812
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
61780
61813
  };
@@ -61857,12 +61890,12 @@ class ExpandMacros extends _abap_rule_1.ABAPRule {
61857
61890
  key: "expand_macros",
61858
61891
  title: "Expand Macros",
61859
61892
  shortDescription: `Allows expanding macro calls with quick fixes`,
61860
- extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
61861
-
61893
+ extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
61894
+
61862
61895
  Note that macros/DEFINE cannot be used in the ABAP Cloud programming model`,
61863
- badExample: `DEFINE _hello.
61864
- WRITE 'hello'.
61865
- END-OF-DEFINITION.
61896
+ badExample: `DEFINE _hello.
61897
+ WRITE 'hello'.
61898
+ END-OF-DEFINITION.
61866
61899
  _hello.`,
61867
61900
  goodExample: `WRITE 'hello'.`,
61868
61901
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
@@ -61949,7 +61982,7 @@ class Exporting extends _abap_rule_1.ABAPRule {
61949
61982
  shortDescription: `Detects EXPORTING statements which can be omitted.`,
61950
61983
  badExample: `call_method( EXPORTING foo = bar ).`,
61951
61984
  goodExample: `call_method( foo = bar ).`,
61952
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-optional-keyword-exporting
61985
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-optional-keyword-exporting
61953
61986
  https://docs.abapopenchecks.org/checks/30/`,
61954
61987
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
61955
61988
  };
@@ -62047,7 +62080,7 @@ class ForbiddenIdentifier extends _abap_rule_1.ABAPRule {
62047
62080
  key: "forbidden_identifier",
62048
62081
  title: "Forbidden Identifier",
62049
62082
  shortDescription: `Forbid use of specified identifiers, list of regex.`,
62050
- extendedInformation: `Used in the transpiler to find javascript keywords in ABAP identifiers,
62083
+ extendedInformation: `Used in the transpiler to find javascript keywords in ABAP identifiers,
62051
62084
  https://github.com/abaplint/transpiler/blob/bda94b8b56e2b7f2f87be2168f12361aa530220e/packages/transpiler/src/validation.ts#L44`,
62052
62085
  tags: [_irule_1.RuleTag.SingleFile],
62053
62086
  };
@@ -62289,8 +62322,8 @@ class ForbiddenVoidType {
62289
62322
  key: "forbidden_void_type",
62290
62323
  title: "Forbidden Void Types",
62291
62324
  shortDescription: `Avoid usage of specified void types.`,
62292
- extendedInformation: `Inspiration:
62293
- BOOLEAN, BOOLE_D, CHAR01, CHAR1, CHAR10, CHAR12, CHAR128, CHAR2, CHAR20, CHAR4, CHAR70,
62325
+ extendedInformation: `Inspiration:
62326
+ BOOLEAN, BOOLE_D, CHAR01, CHAR1, CHAR10, CHAR12, CHAR128, CHAR2, CHAR20, CHAR4, CHAR70,
62294
62327
  DATS, TIMS, DATUM, FLAG, INT4, NUMC3, NUMC4, SAP_BOOL, TEXT25, TEXT80, X255, XFELD`,
62295
62328
  };
62296
62329
  }
@@ -62533,9 +62566,9 @@ class FullyTypeITabs extends _abap_rule_1.ABAPRule {
62533
62566
  key: "fully_type_itabs",
62534
62567
  title: "Fully type internal tables",
62535
62568
  shortDescription: `No implict table types or table keys`,
62536
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-the-right-table-type
62569
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-the-right-table-type
62537
62570
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key`,
62538
- badExample: `DATA lt_foo TYPE TABLE OF ty.
62571
+ badExample: `DATA lt_foo TYPE TABLE OF ty.
62539
62572
  DATA lt_bar TYPE STANDARD TABLE OF ty.`,
62540
62573
  goodExample: `DATA lt_foo TYPE STANDARD TABLE OF ty WITH EMPTY KEY.`,
62541
62574
  tags: [_irule_1.RuleTag.SingleFile],
@@ -62720,26 +62753,26 @@ class FunctionalWriting extends _abap_rule_1.ABAPRule {
62720
62753
  key: "functional_writing",
62721
62754
  title: "Use functional writing",
62722
62755
  shortDescription: `Detects usage of call method when functional style calls can be used.`,
62723
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-calls
62756
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-calls
62724
62757
  https://docs.abapopenchecks.org/checks/07/`,
62725
62758
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
62726
- badExample: `CALL METHOD zcl_class=>method( ).
62727
- CALL METHOD cl_abap_typedescr=>describe_by_name
62728
- EXPORTING
62729
- p_name = 'NAME'
62730
- RECEIVING
62731
- p_descr_ref = lr_typedescr
62732
- EXCEPTIONS
62733
- type_not_found = 1
62759
+ badExample: `CALL METHOD zcl_class=>method( ).
62760
+ CALL METHOD cl_abap_typedescr=>describe_by_name
62761
+ EXPORTING
62762
+ p_name = 'NAME'
62763
+ RECEIVING
62764
+ p_descr_ref = lr_typedescr
62765
+ EXCEPTIONS
62766
+ type_not_found = 1
62734
62767
  OTHERS = 2.`,
62735
- goodExample: `zcl_class=>method( ).
62736
- cl_abap_typedescr=>describe_by_name(
62737
- EXPORTING
62738
- p_name = 'NAME'
62739
- RECEIVING
62740
- p_descr_ref = lr_typedescr
62741
- EXCEPTIONS
62742
- type_not_found = 1
62768
+ goodExample: `zcl_class=>method( ).
62769
+ cl_abap_typedescr=>describe_by_name(
62770
+ EXPORTING
62771
+ p_name = 'NAME'
62772
+ RECEIVING
62773
+ p_descr_ref = lr_typedescr
62774
+ EXCEPTIONS
62775
+ type_not_found = 1
62743
62776
  OTHERS = 2 ).`,
62744
62777
  };
62745
62778
  }
@@ -62850,14 +62883,14 @@ class GlobalClass extends _abap_rule_1.ABAPRule {
62850
62883
  key: "global_class",
62851
62884
  title: "Global class checks",
62852
62885
  shortDescription: `Checks related to global classes`,
62853
- extendedInformation: `* global classes must be in own files
62854
-
62855
- * file names must match class name
62856
-
62857
- * file names must match interface name
62858
-
62859
- * global classes must be global definitions
62860
-
62886
+ extendedInformation: `* global classes must be in own files
62887
+
62888
+ * file names must match class name
62889
+
62890
+ * file names must match interface name
62891
+
62892
+ * global classes must be global definitions
62893
+
62861
62894
  * global interfaces must be global definitions`,
62862
62895
  tags: [_irule_1.RuleTag.Syntax],
62863
62896
  };
@@ -62956,21 +62989,21 @@ class IdenticalConditions extends _abap_rule_1.ABAPRule {
62956
62989
  return {
62957
62990
  key: "identical_conditions",
62958
62991
  title: "Identical conditions",
62959
- shortDescription: `Find identical conditions in IF + CASE + WHILE etc
62960
-
62992
+ shortDescription: `Find identical conditions in IF + CASE + WHILE etc
62993
+
62961
62994
  Prerequsites: code is pretty printed with identical cAsE`,
62962
62995
  tags: [_irule_1.RuleTag.SingleFile],
62963
- badExample: `IF foo = bar OR 1 = a OR foo = bar.
62964
- ENDIF.
62965
- CASE bar.
62966
- WHEN '1'.
62967
- WHEN 'A' OR '1'.
62996
+ badExample: `IF foo = bar OR 1 = a OR foo = bar.
62997
+ ENDIF.
62998
+ CASE bar.
62999
+ WHEN '1'.
63000
+ WHEN 'A' OR '1'.
62968
63001
  ENDCASE.`,
62969
- goodExample: `IF foo = bar OR 1 = a.
62970
- ENDIF.
62971
- CASE bar.
62972
- WHEN '1'.
62973
- WHEN 'A'.
63002
+ goodExample: `IF foo = bar OR 1 = a.
63003
+ ENDIF.
63004
+ CASE bar.
63005
+ WHEN '1'.
63006
+ WHEN 'A'.
62974
63007
  ENDCASE.`,
62975
63008
  };
62976
63009
  }
@@ -63104,23 +63137,23 @@ class IdenticalContents extends _abap_rule_1.ABAPRule {
63104
63137
  key: "identical_contents",
63105
63138
  title: "Identical contents",
63106
63139
  shortDescription: `Find identical contents in blocks inside IFs, both in the beginning and in the end.`,
63107
- extendedInformation: `
63108
- Prerequsites: code is pretty printed with identical cAsE
63109
-
63140
+ extendedInformation: `
63141
+ Prerequsites: code is pretty printed with identical cAsE
63142
+
63110
63143
  Chained statments are ignored`,
63111
63144
  tags: [_irule_1.RuleTag.SingleFile],
63112
- badExample: `IF foo = bar.
63113
- WRITE 'bar'.
63114
- WRITE 'world'.
63115
- ELSE.
63116
- WRITE 'foo'.
63117
- WRITE 'world'.
63145
+ badExample: `IF foo = bar.
63146
+ WRITE 'bar'.
63147
+ WRITE 'world'.
63148
+ ELSE.
63149
+ WRITE 'foo'.
63150
+ WRITE 'world'.
63118
63151
  ENDIF.`,
63119
- goodExample: `IF foo = bar.
63120
- WRITE 'bar'.
63121
- ELSE.
63122
- WRITE 'foo'.
63123
- ENDIF.
63152
+ goodExample: `IF foo = bar.
63153
+ WRITE 'bar'.
63154
+ ELSE.
63155
+ WRITE 'foo'.
63156
+ ENDIF.
63124
63157
  WRITE 'world'.`,
63125
63158
  };
63126
63159
  }
@@ -63228,12 +63261,12 @@ class IdenticalDescriptions {
63228
63261
  key: "identical_descriptions",
63229
63262
  title: "Identical descriptions",
63230
63263
  shortDescription: `Searches for objects with the same type and same description`,
63231
- extendedInformation: `Case insensitive
63232
-
63233
- Only checks the master language descriptions
63234
-
63235
- Dependencies are skipped
63236
-
63264
+ extendedInformation: `Case insensitive
63265
+
63266
+ Only checks the master language descriptions
63267
+
63268
+ Dependencies are skipped
63269
+
63237
63270
  Works for: INTF, CLAS, DOMA, DTEL, FUNC in same FUGR`,
63238
63271
  tags: [],
63239
63272
  };
@@ -63407,43 +63440,43 @@ class IfInIf extends _abap_rule_1.ABAPRule {
63407
63440
  key: "if_in_if",
63408
63441
  title: "IF in IF",
63409
63442
  shortDescription: `Detects nested ifs which can be refactored.`,
63410
- extendedInformation: `
63411
- Directly nested IFs without ELSE can be refactored to a single condition using AND.
63412
-
63413
- ELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.
63414
-
63415
- https://docs.abapopenchecks.org/checks/01/
63443
+ extendedInformation: `
63444
+ Directly nested IFs without ELSE can be refactored to a single condition using AND.
63445
+
63446
+ ELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.
63447
+
63448
+ https://docs.abapopenchecks.org/checks/01/
63416
63449
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low`,
63417
- badExample: `IF condition1.
63418
- IF condition2.
63419
- ...
63420
- ENDIF.
63421
- ENDIF.
63422
-
63423
- IF condition1.
63424
- ...
63425
- ELSE.
63426
- IF condition2.
63427
- ...
63428
- ENDIF.
63450
+ badExample: `IF condition1.
63451
+ IF condition2.
63452
+ ...
63453
+ ENDIF.
63454
+ ENDIF.
63455
+
63456
+ IF condition1.
63457
+ ...
63458
+ ELSE.
63459
+ IF condition2.
63460
+ ...
63461
+ ENDIF.
63429
63462
  ENDIF.`,
63430
- goodExample: `IF ( condition1 ) AND ( condition2 ).
63431
- ...
63432
- ENDIF.
63433
-
63434
- IF condition1.
63435
- ...
63436
- ELSEIF condition2.
63437
- ...
63438
- ENDIF.
63439
-
63440
- CASE variable.
63441
- WHEN value1.
63442
- ...
63443
- WHEN value2.
63444
- IF condition2.
63445
- ...
63446
- ENDIF.
63463
+ goodExample: `IF ( condition1 ) AND ( condition2 ).
63464
+ ...
63465
+ ENDIF.
63466
+
63467
+ IF condition1.
63468
+ ...
63469
+ ELSEIF condition2.
63470
+ ...
63471
+ ENDIF.
63472
+
63473
+ CASE variable.
63474
+ WHEN value1.
63475
+ ...
63476
+ WHEN value2.
63477
+ IF condition2.
63478
+ ...
63479
+ ENDIF.
63447
63480
  ENDCASE.`,
63448
63481
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
63449
63482
  };
@@ -63628,9 +63661,9 @@ class ImplementMethods extends _abap_rule_1.ABAPRule {
63628
63661
  for (const i of ((_a = file.getStructure()) === null || _a === void 0 ? void 0 : _a.findAllStatements(Statements.ClassImplementation)) || []) {
63629
63662
  const name = (_b = i.findFirstExpression(Expressions.ClassName)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr().toUpperCase();
63630
63663
  if (name === impl.identifier.getName().toUpperCase()) {
63631
- return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
63632
- METHOD ${methodName.toLowerCase()}.
63633
- RETURN. " todo, implement method
63664
+ return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
63665
+ METHOD ${methodName.toLowerCase()}.
63666
+ RETURN. " todo, implement method
63634
63667
  ENDMETHOD.`);
63635
63668
  }
63636
63669
  }
@@ -63809,14 +63842,14 @@ class ImplicitStartOfSelection extends _abap_rule_1.ABAPRule {
63809
63842
  key: "implicit_start_of_selection",
63810
63843
  title: "Implicit START-OF-SELECTION",
63811
63844
  shortDescription: `Add explicit selection screen event handling`,
63812
- extendedInformation: `Only runs for executable programs
63813
-
63845
+ extendedInformation: `Only runs for executable programs
63846
+
63814
63847
  https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapstart-of-selection.htm`,
63815
63848
  tags: [_irule_1.RuleTag.SingleFile],
63816
- badExample: `REPORT zfoo.
63849
+ badExample: `REPORT zfoo.
63817
63850
  WRITE 'hello'.`,
63818
- goodExample: `
63819
- START-OF-SELECTION.
63851
+ goodExample: `
63852
+ START-OF-SELECTION.
63820
63853
  WRITE 'hello'.`,
63821
63854
  };
63822
63855
  }
@@ -63921,19 +63954,19 @@ class InStatementIndentation extends _abap_rule_1.ABAPRule {
63921
63954
  key: "in_statement_indentation",
63922
63955
  title: "In-statement indentation",
63923
63956
  shortDescription: "Checks alignment within statements which span multiple lines.",
63924
- extendedInformation: `Lines following the first line should be indented once (2 spaces).
63925
-
63926
- For block declaration statements, lines after the first should be indented an additional time (default: +2 spaces)
63957
+ extendedInformation: `Lines following the first line should be indented once (2 spaces).
63958
+
63959
+ For block declaration statements, lines after the first should be indented an additional time (default: +2 spaces)
63927
63960
  to distinguish them better from code within the block.`,
63928
- badExample: `IF 1 = 1
63929
- AND 2 = 2.
63930
- WRITE 'hello' &&
63931
- 'world'.
63961
+ badExample: `IF 1 = 1
63962
+ AND 2 = 2.
63963
+ WRITE 'hello' &&
63964
+ 'world'.
63932
63965
  ENDIF.`,
63933
- goodExample: `IF 1 = 1
63934
- AND 2 = 2.
63935
- WRITE 'hello' &&
63936
- 'world'.
63966
+ goodExample: `IF 1 = 1
63967
+ AND 2 = 2.
63968
+ WRITE 'hello' &&
63969
+ 'world'.
63937
63970
  ENDIF.`,
63938
63971
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
63939
63972
  };
@@ -64056,23 +64089,23 @@ class Indentation extends _abap_rule_1.ABAPRule {
64056
64089
  title: "Indentation",
64057
64090
  shortDescription: `Checks indentation`,
64058
64091
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
64059
- badExample: `CLASS lcl DEFINITION.
64060
- PRIVATE SECTION.
64061
- METHODS constructor.
64062
- ENDCLASS.
64063
-
64064
- CLASS lcl IMPLEMENTATION.
64065
- METHOD constructor.
64066
- ENDMETHOD.
64092
+ badExample: `CLASS lcl DEFINITION.
64093
+ PRIVATE SECTION.
64094
+ METHODS constructor.
64095
+ ENDCLASS.
64096
+
64097
+ CLASS lcl IMPLEMENTATION.
64098
+ METHOD constructor.
64099
+ ENDMETHOD.
64067
64100
  ENDCLASS.`,
64068
- goodExample: `CLASS lcl DEFINITION.
64069
- PRIVATE SECTION.
64070
- METHODS constructor.
64071
- ENDCLASS.
64072
-
64073
- CLASS lcl IMPLEMENTATION.
64074
- METHOD constructor.
64075
- ENDMETHOD.
64101
+ goodExample: `CLASS lcl DEFINITION.
64102
+ PRIVATE SECTION.
64103
+ METHODS constructor.
64104
+ ENDCLASS.
64105
+
64106
+ CLASS lcl IMPLEMENTATION.
64107
+ METHOD constructor.
64108
+ ENDMETHOD.
64076
64109
  ENDCLASS.`,
64077
64110
  };
64078
64111
  }
@@ -64473,9 +64506,9 @@ class IntfReferencingClas {
64473
64506
  key: "intf_referencing_clas",
64474
64507
  title: "INTF referencing CLAS",
64475
64508
  shortDescription: `Interface contains references to class`,
64476
- extendedInformation: `Only global interfaces are checked.
64477
- Only first level references are checked.
64478
- Exception class references are ignored.
64509
+ extendedInformation: `Only global interfaces are checked.
64510
+ Only first level references are checked.
64511
+ Exception class references are ignored.
64479
64512
  Void references are ignored.`,
64480
64513
  };
64481
64514
  }
@@ -64560,9 +64593,9 @@ class InvalidTableIndex extends _abap_rule_1.ABAPRule {
64560
64593
  title: "Invalid Table Index",
64561
64594
  shortDescription: `Issues error for constant table index zero, as ABAP starts from 1`,
64562
64595
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
64563
- badExample: `DATA(first) = table[ 0 ].
64596
+ badExample: `DATA(first) = table[ 0 ].
64564
64597
  READ TABLE gt_stack ASSIGNING <ls_stack> INDEX 0.`,
64565
- goodExample: `DATA(first) = table[ 1 ].
64598
+ goodExample: `DATA(first) = table[ 1 ].
64566
64599
  READ TABLE gt_stack ASSIGNING <ls_stack> INDEX 1.`,
64567
64600
  };
64568
64601
  }
@@ -65163,8 +65196,8 @@ class LineBreakStyle {
65163
65196
  return {
65164
65197
  key: "line_break_style",
65165
65198
  title: "Makes sure line breaks are consistent in the ABAP code",
65166
- shortDescription: `Enforces LF as newlines in ABAP files
65167
-
65199
+ shortDescription: `Enforces LF as newlines in ABAP files
65200
+
65168
65201
  abapGit does not work with CRLF`,
65169
65202
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
65170
65203
  };
@@ -65233,7 +65266,7 @@ class LineLength extends _abap_rule_1.ABAPRule {
65233
65266
  key: "line_length",
65234
65267
  title: "Line length",
65235
65268
  shortDescription: `Detects lines exceeding the provided maximum length.`,
65236
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length
65269
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length
65237
65270
  https://docs.abapopenchecks.org/checks/04/`,
65238
65271
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
65239
65272
  };
@@ -65304,7 +65337,7 @@ class LineOnlyPunc extends _abap_rule_1.ABAPRule {
65304
65337
  key: "line_only_punc",
65305
65338
  title: "Line containing only punctuation",
65306
65339
  shortDescription: `Detects lines containing only punctuation.`,
65307
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#close-brackets-at-line-end
65340
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#close-brackets-at-line-end
65308
65341
  https://docs.abapopenchecks.org/checks/16/`,
65309
65342
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
65310
65343
  badExample: "zcl_class=>method(\n).",
@@ -65567,15 +65600,15 @@ class LocalVariableNames extends _abap_rule_1.ABAPRule {
65567
65600
  return {
65568
65601
  key: "local_variable_names",
65569
65602
  title: "Local variable naming conventions",
65570
- shortDescription: `
65571
- Allows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols.
65603
+ shortDescription: `
65604
+ Allows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols.
65572
65605
  Regexes are case-insensitive.`,
65573
65606
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
65574
- badExample: `FORM bar.
65575
- DATA foo.
65607
+ badExample: `FORM bar.
65608
+ DATA foo.
65576
65609
  ENDFORM.`,
65577
- goodExample: `FORM bar.
65578
- DATA lv_foo.
65610
+ goodExample: `FORM bar.
65611
+ DATA lv_foo.
65579
65612
  ENDFORM.`,
65580
65613
  };
65581
65614
  }
@@ -65727,9 +65760,9 @@ class MacroNaming extends _abap_rule_1.ABAPRule {
65727
65760
  shortDescription: `Allows you to enforce a pattern for macro definitions`,
65728
65761
  extendedInformation: `Use rule "avoid_use" to avoid macros altogether.`,
65729
65762
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
65730
- badExample: `DEFINE something.
65763
+ badExample: `DEFINE something.
65731
65764
  END-OF-DEFINITION.`,
65732
- goodExample: `DEFINE _something.
65765
+ goodExample: `DEFINE _something.
65733
65766
  END-OF-DEFINITION.`,
65734
65767
  };
65735
65768
  }
@@ -65802,10 +65835,10 @@ class MainFileContents {
65802
65835
  key: "main_file_contents",
65803
65836
  title: "Main file contents",
65804
65837
  shortDescription: `Checks related to report declarations.`,
65805
- extendedInformation: `Does not run if the target version is Cloud
65806
-
65807
- * PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
65808
- * TYPEs must begin with "TYPE-POOL <name>."
65838
+ extendedInformation: `Does not run if the target version is Cloud
65839
+
65840
+ * PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
65841
+ * TYPEs must begin with "TYPE-POOL <name>."
65809
65842
  `,
65810
65843
  };
65811
65844
  }
@@ -65921,17 +65954,17 @@ class ManyParentheses extends _abap_rule_1.ABAPRule {
65921
65954
  title: "Too many parentheses",
65922
65955
  shortDescription: `Searches for expressions where extra parentheses can safely be removed`,
65923
65956
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
65924
- badExample: `
65925
- IF ( destination IS INITIAL ).
65926
- ENDIF.
65927
- IF foo = boo AND ( bar = lar AND moo = loo ).
65928
- ENDIF.
65957
+ badExample: `
65958
+ IF ( destination IS INITIAL ).
65959
+ ENDIF.
65960
+ IF foo = boo AND ( bar = lar AND moo = loo ).
65961
+ ENDIF.
65929
65962
  `,
65930
- goodExample: `
65931
- IF destination IS INITIAL.
65932
- ENDIF.
65933
- IF foo = boo AND bar = lar AND moo = loo.
65934
- ENDIF.
65963
+ goodExample: `
65964
+ IF destination IS INITIAL.
65965
+ ENDIF.
65966
+ IF foo = boo AND bar = lar AND moo = loo.
65967
+ ENDIF.
65935
65968
  `,
65936
65969
  };
65937
65970
  }
@@ -66105,14 +66138,14 @@ class MaxOneMethodParameterPerLine extends _abap_rule_1.ABAPRule {
66105
66138
  title: "Max one method parameter definition per line",
66106
66139
  shortDescription: `Keep max one method parameter description per line`,
66107
66140
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace],
66108
- badExample: `
66109
- METHODS apps_scope_token
66110
- IMPORTING
66141
+ badExample: `
66142
+ METHODS apps_scope_token
66143
+ IMPORTING
66111
66144
  body TYPE bodyapps_scope_token client_id TYPE str.`,
66112
- goodExample: `
66113
- METHODS apps_scope_token
66114
- IMPORTING
66115
- body TYPE bodyapps_scope_token
66145
+ goodExample: `
66146
+ METHODS apps_scope_token
66147
+ IMPORTING
66148
+ body TYPE bodyapps_scope_token
66116
66149
  client_id TYPE str.`,
66117
66150
  };
66118
66151
  }
@@ -66177,11 +66210,11 @@ class MaxOneStatement extends _abap_rule_1.ABAPRule {
66177
66210
  key: "max_one_statement",
66178
66211
  title: "Max one statement per line",
66179
66212
  shortDescription: `Checks that each line contains only a single statement.`,
66180
- extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
66181
-
66182
- Does not report anything for chained statements.
66183
-
66184
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line
66213
+ extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
66214
+
66215
+ Does not report anything for chained statements.
66216
+
66217
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line
66185
66218
  https://docs.abapopenchecks.org/checks/11/`,
66186
66219
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
66187
66220
  badExample: `WRITE foo. WRITE bar.`,
@@ -66519,8 +66552,8 @@ class MethodLength {
66519
66552
  key: "method_length",
66520
66553
  title: "Method/Form Length",
66521
66554
  shortDescription: `Checks relating to method/form length.`,
66522
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
66523
-
66555
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
66556
+
66524
66557
  Abstract methods without statements are considered okay.`,
66525
66558
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
66526
66559
  };
@@ -66625,20 +66658,20 @@ class MethodOverwritesBuiltIn extends _abap_rule_1.ABAPRule {
66625
66658
  key: "method_overwrites_builtin",
66626
66659
  title: "Method name overwrites builtin function",
66627
66660
  shortDescription: `Checks Method names that overwrite builtin SAP functions`,
66628
- extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
66629
-
66630
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
66631
-
66661
+ extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
66662
+
66663
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
66664
+
66632
66665
  Interface method names are ignored`,
66633
66666
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
66634
- badExample: `CLASS lcl DEFINITION.
66635
- PUBLIC SECTION.
66636
- METHODS matches.
66637
- ENDCLASS.
66638
-
66639
- CLASS lcl IMPLEMENTATION.
66640
- METHOD matches.
66641
- ENDMETHOD.
66667
+ badExample: `CLASS lcl DEFINITION.
66668
+ PUBLIC SECTION.
66669
+ METHODS matches.
66670
+ ENDCLASS.
66671
+
66672
+ CLASS lcl IMPLEMENTATION.
66673
+ METHOD matches.
66674
+ ENDMETHOD.
66642
66675
  ENDCLASS.`,
66643
66676
  };
66644
66677
  }
@@ -66829,12 +66862,12 @@ class MixReturning extends _abap_rule_1.ABAPRule {
66829
66862
  // eslint-disable-next-line max-len
66830
66863
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-either-returning-or-exporting-or-changing-but-not-a-combination`,
66831
66864
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
66832
- badExample: `CLASS lcl DEFINITION.
66833
- PUBLIC SECTION.
66834
- METHODS
66835
- foobar
66836
- EXPORTING foo TYPE i
66837
- RETURNING VALUE(rv_string) TYPE string.
66865
+ badExample: `CLASS lcl DEFINITION.
66866
+ PUBLIC SECTION.
66867
+ METHODS
66868
+ foobar
66869
+ EXPORTING foo TYPE i
66870
+ RETURNING VALUE(rv_string) TYPE string.
66838
66871
  ENDCLASS.`,
66839
66872
  };
66840
66873
  }
@@ -67214,7 +67247,7 @@ class Nesting extends _abap_rule_1.ABAPRule {
67214
67247
  key: "nesting",
67215
67248
  title: "Check nesting depth",
67216
67249
  shortDescription: `Checks for methods exceeding a maximum nesting depth`,
67217
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low
67250
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low
67218
67251
  https://docs.abapopenchecks.org/checks/74/`,
67219
67252
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
67220
67253
  };
@@ -67457,7 +67490,7 @@ class NoChainedAssignment extends _abap_rule_1.ABAPRule {
67457
67490
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-chain-assignments`,
67458
67491
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
67459
67492
  badExample: `var1 = var2 = var3.`,
67460
- goodExample: `var2 = var3.
67493
+ goodExample: `var2 = var3.
67461
67494
  var1 = var2.`,
67462
67495
  };
67463
67496
  }
@@ -67516,8 +67549,8 @@ class NoExternalFormCalls extends _abap_rule_1.ABAPRule {
67516
67549
  key: "no_external_form_calls",
67517
67550
  title: "No external FORM calls",
67518
67551
  shortDescription: `Detect external form calls`,
67519
- badExample: `PERFORM foo IN PROGRAM bar.
67520
-
67552
+ badExample: `PERFORM foo IN PROGRAM bar.
67553
+
67521
67554
  PERFORM foo(bar).`,
67522
67555
  tags: [_irule_1.RuleTag.SingleFile],
67523
67556
  };
@@ -67578,17 +67611,17 @@ class NoInlineInOptionalBranches extends _abap_rule_1.ABAPRule {
67578
67611
  key: "no_inline_in_optional_branches",
67579
67612
  title: "Don't declare inline in optional branches",
67580
67613
  shortDescription: `Don't declare inline in optional branches`,
67581
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
67582
-
67583
- Considered optional branches:
67584
- * inside IF/ELSEIF/ELSE
67585
- * inside LOOP
67586
- * inside WHILE
67587
- * inside CASE/WHEN, CASE TYPE OF
67588
- * inside DO
67589
- * inside SELECT loops
67590
-
67591
- Not considered optional branches:
67614
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
67615
+
67616
+ Considered optional branches:
67617
+ * inside IF/ELSEIF/ELSE
67618
+ * inside LOOP
67619
+ * inside WHILE
67620
+ * inside CASE/WHEN, CASE TYPE OF
67621
+ * inside DO
67622
+ * inside SELECT loops
67623
+
67624
+ Not considered optional branches:
67592
67625
  * TRY/CATCH/CLEANUP`,
67593
67626
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
67594
67627
  };
@@ -67688,12 +67721,12 @@ class NoPrefixes extends _abap_rule_1.ABAPRule {
67688
67721
  key: "no_prefixes",
67689
67722
  title: "No Prefixes",
67690
67723
  shortDescription: `Dont use hungarian notation`,
67691
- extendedInformation: `
67692
- Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
67693
- allowing all types to become voided, abaplint will then provide less precise syntax errors.
67694
-
67695
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
67696
-
67724
+ extendedInformation: `
67725
+ Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
67726
+ allowing all types to become voided, abaplint will then provide less precise syntax errors.
67727
+
67728
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
67729
+
67697
67730
  https://github.com/SAP/styleguides/blob/main/clean-abap/sub-sections/AvoidEncodings.md`,
67698
67731
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
67699
67732
  badExample: `DATA lv_foo TYPE i.`,
@@ -67872,7 +67905,7 @@ class NoPublicAttributes extends _abap_rule_1.ABAPRule {
67872
67905
  return {
67873
67906
  key: "no_public_attributes",
67874
67907
  title: "No public attributes",
67875
- shortDescription: `Checks that classes and interfaces don't contain any public attributes.
67908
+ shortDescription: `Checks that classes and interfaces don't contain any public attributes.
67876
67909
  Exceptions are excluded from this rule.`,
67877
67910
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#members-private-by-default-protected-only-if-needed`,
67878
67911
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
@@ -67973,13 +68006,13 @@ class NoYodaConditions extends _abap_rule_1.ABAPRule {
67973
68006
  key: "no_yoda_conditions",
67974
68007
  title: "No Yoda conditions",
67975
68008
  shortDescription: `Finds Yoda conditions and reports issues`,
67976
- extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
67977
-
68009
+ extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
68010
+
67978
68011
  Conditions with operators CP, NP, CS, NS, CA, NA, CO, CN are ignored`,
67979
68012
  tags: [_irule_1.RuleTag.SingleFile],
67980
- badExample: `IF 0 <> sy-subrc.
68013
+ badExample: `IF 0 <> sy-subrc.
67981
68014
  ENDIF.`,
67982
- goodExample: `IF sy-subrc <> 0.
68015
+ goodExample: `IF sy-subrc <> 0.
67983
68016
  ENDIF.`,
67984
68017
  };
67985
68018
  }
@@ -68080,8 +68113,8 @@ class NROBConsistency {
68080
68113
  key: "nrob_consistency",
68081
68114
  title: "Number range consistency",
68082
68115
  shortDescription: `Consistency checks for number ranges`,
68083
- extendedInformation: `Issue reported if percentage warning is over 50%
68084
-
68116
+ extendedInformation: `Issue reported if percentage warning is over 50%
68117
+
68085
68118
  Issue reported if the referenced domain is not found(taking error namespace into account)`,
68086
68119
  tags: [_irule_1.RuleTag.SingleFile],
68087
68120
  };
@@ -68358,58 +68391,58 @@ class ObsoleteStatement extends _abap_rule_1.ABAPRule {
68358
68391
  title: "Obsolete statements",
68359
68392
  shortDescription: `Checks for usages of certain obsolete statements`,
68360
68393
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
68361
- extendedInformation: `
68362
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
68363
-
68364
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
68365
-
68366
- SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
68367
-
68368
- IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
68369
-
68370
- WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
68371
-
68372
- FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
68373
-
68374
- TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
68375
-
68376
- LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
68377
-
68378
- COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
68379
-
68380
- OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
68381
-
68382
- PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
68383
-
68384
- RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
68385
-
68386
- PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
68387
-
68388
- MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
68389
-
68390
- SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
68391
- SELECT COUNT(*) is considered okay
68392
-
68393
- FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
68394
-
68395
- SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
68396
-
68397
- CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
68398
-
68399
- POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
68400
-
68401
- OCCURENCES: check for OCCURENCES vs OCCURRENCES
68402
-
68394
+ extendedInformation: `
68395
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
68396
+
68397
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
68398
+
68399
+ SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
68400
+
68401
+ IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
68402
+
68403
+ WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
68404
+
68405
+ FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
68406
+
68407
+ TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
68408
+
68409
+ LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
68410
+
68411
+ COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
68412
+
68413
+ OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
68414
+
68415
+ PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
68416
+
68417
+ RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
68418
+
68419
+ PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
68420
+
68421
+ MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
68422
+
68423
+ SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
68424
+ SELECT COUNT(*) is considered okay
68425
+
68426
+ FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
68427
+
68428
+ SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
68429
+
68430
+ CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
68431
+
68432
+ POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
68433
+
68434
+ OCCURENCES: check for OCCURENCES vs OCCURRENCES
68435
+
68403
68436
  CLIENT SPECIFIED, from 754: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abapselect_client_obsolete.htm`,
68404
- badExample: `REFRESH itab.
68405
-
68406
- COMPUTE foo = 2 + 2.
68407
-
68408
- MULTIPLY lv_foo BY 2.
68409
-
68410
- INTERFACE intf LOAD.
68411
-
68412
- IF foo IS SUPPLIED.
68437
+ badExample: `REFRESH itab.
68438
+
68439
+ COMPUTE foo = 2 + 2.
68440
+
68441
+ MULTIPLY lv_foo BY 2.
68442
+
68443
+ INTERFACE intf LOAD.
68444
+
68445
+ IF foo IS SUPPLIED.
68413
68446
  ENDIF.`,
68414
68447
  };
68415
68448
  }
@@ -68749,9 +68782,9 @@ class OmitParameterName {
68749
68782
  key: "omit_parameter_name",
68750
68783
  title: "Omit parameter name",
68751
68784
  shortDescription: `Omit the parameter name in single parameter calls`,
68752
- extendedInformation: `
68753
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
68754
-
68785
+ extendedInformation: `
68786
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
68787
+
68755
68788
  EXPORTING must already be omitted for this rule to take effect, https://rules.abaplint.org/exporting/`,
68756
68789
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
68757
68790
  badExample: `method( param = 2 ).`,
@@ -68957,20 +68990,20 @@ class OmitReceiving extends _abap_rule_1.ABAPRule {
68957
68990
  shortDescription: `Omit RECEIVING`,
68958
68991
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-receiving`,
68959
68992
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
68960
- badExample: `
68961
- upload_pack(
68962
- EXPORTING
68963
- io_client = lo_client
68964
- iv_url = iv_url
68965
- iv_deepen_level = iv_deepen_level
68966
- it_hashes = lt_hashes
68967
- RECEIVING
68993
+ badExample: `
68994
+ upload_pack(
68995
+ EXPORTING
68996
+ io_client = lo_client
68997
+ iv_url = iv_url
68998
+ iv_deepen_level = iv_deepen_level
68999
+ it_hashes = lt_hashes
69000
+ RECEIVING
68968
69001
  rt_objects = et_objects ).`,
68969
- goodExample: `
68970
- et_objects = upload_pack(
68971
- io_client = lo_client
68972
- iv_url = iv_url
68973
- iv_deepen_level = iv_deepen_level
69002
+ goodExample: `
69003
+ et_objects = upload_pack(
69004
+ io_client = lo_client
69005
+ iv_url = iv_url
69006
+ iv_deepen_level = iv_deepen_level
68974
69007
  it_hashes = lt_hashes ).`,
68975
69008
  };
68976
69009
  }
@@ -69034,8 +69067,8 @@ class Parser702Chaining extends _abap_rule_1.ABAPRule {
69034
69067
  return {
69035
69068
  key: "parser_702_chaining",
69036
69069
  title: "Parser Error, bad chanining on 702",
69037
- shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
69038
- this rule finds these and reports errors.
69070
+ shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
69071
+ this rule finds these and reports errors.
69039
69072
  Only active on target version 702 and below.`,
69040
69073
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
69041
69074
  };
@@ -69115,8 +69148,8 @@ class ParserError {
69115
69148
  return {
69116
69149
  key: "parser_error",
69117
69150
  title: "Parser error",
69118
- shortDescription: `Checks for syntax not recognized by abaplint.
69119
-
69151
+ shortDescription: `Checks for syntax not recognized by abaplint.
69152
+
69120
69153
  See recognized syntax at https://syntax.abaplint.org`,
69121
69154
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
69122
69155
  };
@@ -69201,7 +69234,7 @@ class ParserMissingSpace extends _abap_rule_1.ABAPRule {
69201
69234
  return {
69202
69235
  key: "parser_missing_space",
69203
69236
  title: "Parser Error, missing space",
69204
- shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.
69237
+ shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.
69205
69238
  This rule makes sure the spaces are consistently required across the language.`,
69206
69239
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
69207
69240
  badExample: `IF ( foo = 'bar').`,
@@ -69624,25 +69657,25 @@ class PreferInline {
69624
69657
  key: "prefer_inline",
69625
69658
  title: "Prefer Inline Declarations",
69626
69659
  shortDescription: `Prefer inline to up-front declarations.`,
69627
- extendedInformation: `EXPERIMENTAL
69628
-
69629
- Activates if language version is v740sp02 or above.
69630
-
69631
- Variables must be local(METHOD or FORM).
69632
-
69633
- No generic or void typed variables. No syntax errors.
69634
-
69635
- First position used must be a full/pure write.
69636
-
69637
- Move statment is not a cast(?=)
69638
-
69660
+ extendedInformation: `EXPERIMENTAL
69661
+
69662
+ Activates if language version is v740sp02 or above.
69663
+
69664
+ Variables must be local(METHOD or FORM).
69665
+
69666
+ No generic or void typed variables. No syntax errors.
69667
+
69668
+ First position used must be a full/pure write.
69669
+
69670
+ Move statment is not a cast(?=)
69671
+
69639
69672
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-inline-to-up-front-declarations`,
69640
69673
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Experimental, _irule_1.RuleTag.Quickfix],
69641
- badExample: `DATA foo TYPE i.
69642
- foo = 2.
69643
- DATA percentage TYPE decfloat34.
69674
+ badExample: `DATA foo TYPE i.
69675
+ foo = 2.
69676
+ DATA percentage TYPE decfloat34.
69644
69677
  percentage = ( comment_number / abs_statement_number ) * 100.`,
69645
- goodExample: `DATA(foo) = 2.
69678
+ goodExample: `DATA(foo) = 2.
69646
69679
  DATA(percentage) = CONV decfloat34( comment_number / abs_statement_number ) * 100.`,
69647
69680
  };
69648
69681
  }
@@ -69856,18 +69889,18 @@ class PreferIsNot extends _abap_rule_1.ABAPRule {
69856
69889
  key: "prefer_is_not",
69857
69890
  title: "Prefer IS NOT to NOT IS",
69858
69891
  shortDescription: `Prefer IS NOT to NOT IS`,
69859
- extendedInformation: `
69860
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
69861
-
69892
+ extendedInformation: `
69893
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
69894
+
69862
69895
  "if not is_valid( )." examples are skipped`,
69863
69896
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
69864
- goodExample: `IF variable IS NOT INITIAL.
69865
- IF variable NP 'TODO*'.
69866
- IF variable <> 42.
69897
+ goodExample: `IF variable IS NOT INITIAL.
69898
+ IF variable NP 'TODO*'.
69899
+ IF variable <> 42.
69867
69900
  IF variable CO 'hello'.`,
69868
- badExample: `IF NOT variable IS INITIAL.
69869
- IF NOT variable CP 'TODO*'.
69870
- IF NOT variable = 42.
69901
+ badExample: `IF NOT variable IS INITIAL.
69902
+ IF NOT variable CP 'TODO*'.
69903
+ IF NOT variable = 42.
69871
69904
  IF NOT variable CA 'hello'.`,
69872
69905
  };
69873
69906
  }
@@ -70055,14 +70088,14 @@ class PreferRaiseExceptionNew extends _abap_rule_1.ABAPRule {
70055
70088
  key: "prefer_raise_exception_new",
70056
70089
  title: "Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE",
70057
70090
  shortDescription: `Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE`,
70058
- extendedInformation: `
70059
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
70060
-
70091
+ extendedInformation: `
70092
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
70093
+
70061
70094
  From 752 and up`,
70062
70095
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
70063
70096
  goodExample: `RAISE EXCEPTION NEW cx_generation_error( previous = exception ).`,
70064
- badExample: `RAISE EXCEPTION TYPE cx_generation_error
70065
- EXPORTING
70097
+ badExample: `RAISE EXCEPTION TYPE cx_generation_error
70098
+ EXPORTING
70066
70099
  previous = exception.`,
70067
70100
  };
70068
70101
  }
@@ -70140,12 +70173,12 @@ class PreferReturningToExporting extends _abap_rule_1.ABAPRule {
70140
70173
  key: "prefer_returning_to_exporting",
70141
70174
  title: "Prefer RETURNING to EXPORTING",
70142
70175
  shortDescription: `Prefer RETURNING to EXPORTING. Generic types cannot be RETURNING.`,
70143
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting
70176
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting
70144
70177
  https://docs.abapopenchecks.org/checks/44/`,
70145
70178
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
70146
- badExample: `CLASS lcl DEFINITION.
70147
- PUBLIC SECTION.
70148
- METHODS test EXPORTING ev_foo TYPE i.
70179
+ badExample: `CLASS lcl DEFINITION.
70180
+ PUBLIC SECTION.
70181
+ METHODS test EXPORTING ev_foo TYPE i.
70149
70182
  ENDCLASS.`,
70150
70183
  };
70151
70184
  }
@@ -70241,8 +70274,8 @@ class PreferXsdbool extends _abap_rule_1.ABAPRule {
70241
70274
  key: "prefer_xsdbool",
70242
70275
  title: "Prefer xsdbool over boolc",
70243
70276
  shortDescription: `Prefer xsdbool over boolc`,
70244
- extendedInformation: `Activates if language version is v740sp08 or above.
70245
-
70277
+ extendedInformation: `Activates if language version is v740sp08 or above.
70278
+
70246
70279
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
70247
70280
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
70248
70281
  badExample: `DATA(sdf) = boolc( 1 = 2 ).`,
@@ -70314,9 +70347,9 @@ class PreferredCompareOperator extends _abap_rule_1.ABAPRule {
70314
70347
  title: "Preferred compare operator",
70315
70348
  shortDescription: `Configure undesired operator variants`,
70316
70349
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
70317
- badExample: `IF foo EQ bar.
70350
+ badExample: `IF foo EQ bar.
70318
70351
  ENDIF.`,
70319
- goodExample: `IF foo = bar.
70352
+ goodExample: `IF foo = bar.
70320
70353
  ENDIF.`,
70321
70354
  };
70322
70355
  }
@@ -70540,26 +70573,26 @@ class ReduceProceduralCode extends _abap_rule_1.ABAPRule {
70540
70573
  key: "reduce_procedural_code",
70541
70574
  title: "Reduce procedural code",
70542
70575
  shortDescription: `Checks FORM and FUNCTION-MODULE have few statements`,
70543
- extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
70544
-
70545
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
70546
-
70576
+ extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
70577
+
70578
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
70579
+
70547
70580
  Comments are not counted as statements.`,
70548
70581
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
70549
- badExample: `FORM foo.
70550
- DATA lv_bar TYPE i.
70551
- lv_bar = 2 + 2.
70552
- IF lv_bar = 4.
70553
- WRITE 'hello world'.
70554
- ENDIF.
70555
- DATA lv_bar TYPE i.
70556
- lv_bar = 2 + 2.
70557
- IF lv_bar = 4.
70558
- WRITE 'hello world'.
70559
- ENDIF.
70582
+ badExample: `FORM foo.
70583
+ DATA lv_bar TYPE i.
70584
+ lv_bar = 2 + 2.
70585
+ IF lv_bar = 4.
70586
+ WRITE 'hello world'.
70587
+ ENDIF.
70588
+ DATA lv_bar TYPE i.
70589
+ lv_bar = 2 + 2.
70590
+ IF lv_bar = 4.
70591
+ WRITE 'hello world'.
70592
+ ENDIF.
70560
70593
  ENDFORM.`,
70561
- goodExample: `FORM foo.
70562
- NEW zcl_global_class( )->run_logic( ).
70594
+ goodExample: `FORM foo.
70595
+ NEW zcl_global_class( )->run_logic( ).
70563
70596
  ENDFORM.`,
70564
70597
  };
70565
70598
  }
@@ -70803,10 +70836,10 @@ class RemoveDescriptions {
70803
70836
  return {
70804
70837
  key: "remove_descriptions",
70805
70838
  title: "Remove descriptions",
70806
- shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
70807
-
70808
- Class descriptions are required, see rule description_empty.
70809
-
70839
+ shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
70840
+
70841
+ Class descriptions are required, see rule description_empty.
70842
+
70810
70843
  Consider using ABAP Doc for documentation.`,
70811
70844
  tags: [],
70812
70845
  };
@@ -70931,14 +70964,14 @@ class RFCErrorHandling extends _abap_rule_1.ABAPRule {
70931
70964
  tags: [_irule_1.RuleTag.SingleFile],
70932
70965
  shortDescription: `Checks that exceptions 'system_failure' and 'communication_failure' are handled in RFC calls`,
70933
70966
  extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenrfc_exception.htm`,
70934
- badExample: `CALL FUNCTION 'ZRFC'
70967
+ badExample: `CALL FUNCTION 'ZRFC'
70935
70968
  DESTINATION lv_rfc.`,
70936
- goodExample: `CALL FUNCTION 'ZRFC'
70937
- DESTINATION lv_rfc
70938
- EXCEPTIONS
70939
- system_failure = 1 MESSAGE msg
70940
- communication_failure = 2 MESSAGE msg
70941
- resource_failure = 3
70969
+ goodExample: `CALL FUNCTION 'ZRFC'
70970
+ DESTINATION lv_rfc
70971
+ EXCEPTIONS
70972
+ system_failure = 1 MESSAGE msg
70973
+ communication_failure = 2 MESSAGE msg
70974
+ resource_failure = 3
70942
70975
  OTHERS = 4.`,
70943
70976
  };
70944
70977
  }
@@ -71022,11 +71055,11 @@ class SelectAddOrderBy {
71022
71055
  key: "select_add_order_by",
71023
71056
  title: "SELECT add ORDER BY",
71024
71057
  shortDescription: `SELECTs add ORDER BY clause`,
71025
- extendedInformation: `
71026
- This will make sure that the SELECT statement returns results in the same sequence on different databases
71027
-
71028
- add ORDER BY PRIMARY KEY if in doubt
71029
-
71058
+ extendedInformation: `
71059
+ This will make sure that the SELECT statement returns results in the same sequence on different databases
71060
+
71061
+ add ORDER BY PRIMARY KEY if in doubt
71062
+
71030
71063
  If the target is a sorted/hashed table, no issue is reported`,
71031
71064
  tags: [_irule_1.RuleTag.SingleFile],
71032
71065
  badExample: `SELECT * FROM db INTO TABLE @DATA(tab).`,
@@ -71157,14 +71190,14 @@ class SelectPerformance {
71157
71190
  key: "select_performance",
71158
71191
  title: "SELECT performance",
71159
71192
  shortDescription: `Various checks regarding SELECT performance.`,
71160
- extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
71161
-
71193
+ extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
71194
+
71162
71195
  SELECT *: not reported if using INTO/APPENDING CORRESPONDING FIELDS OF`,
71163
71196
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Performance],
71164
- badExample: `SELECT field1, field2 FROM table
71165
- INTO @DATA(structure) UP TO 1 ROWS ORDER BY field3 DESCENDING.
71197
+ badExample: `SELECT field1, field2 FROM table
71198
+ INTO @DATA(structure) UP TO 1 ROWS ORDER BY field3 DESCENDING.
71166
71199
  ENDSELECT.`,
71167
- goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
71200
+ goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
71168
71201
  INTO TABLE @DATA(table) ORDER BY field3 DESCENDING`,
71169
71202
  };
71170
71203
  }
@@ -71278,8 +71311,8 @@ class SelectSingleFullKey {
71278
71311
  key: "select_single_full_key",
71279
71312
  title: "Detect SELECT SINGLE which are possibily not unique",
71280
71313
  shortDescription: `Detect SELECT SINGLE which are possibily not unique`,
71281
- extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
71282
-
71314
+ extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
71315
+
71283
71316
  If the statement contains a JOIN it is not checked`,
71284
71317
  pseudoComment: "EC CI_NOORDER",
71285
71318
  tags: [_irule_1.RuleTag.Quickfix],
@@ -71707,8 +71740,8 @@ class SICFConsistency {
71707
71740
  key: "sicf_consistency",
71708
71741
  title: "SICF consistency",
71709
71742
  shortDescription: `Checks the validity of ICF services`,
71710
- extendedInformation: `* Class defined in handler must exist
71711
- * Class must not have any syntax errors
71743
+ extendedInformation: `* Class defined in handler must exist
71744
+ * Class must not have any syntax errors
71712
71745
  * Class must implement interface IF_HTTP_EXTENSION`,
71713
71746
  };
71714
71747
  }
@@ -71820,23 +71853,23 @@ class SlowParameterPassing {
71820
71853
  shortDescription: `Detects slow pass by value passing for methods where parameter is not changed`,
71821
71854
  extendedInformation: `Method parameters defined in interfaces is not checked`,
71822
71855
  tags: [_irule_1.RuleTag.Performance],
71823
- badExample: `CLASS lcl DEFINITION.
71824
- PUBLIC SECTION.
71825
- METHODS bar IMPORTING VALUE(sdf) TYPE string.
71826
- ENDCLASS.
71827
- CLASS lcl IMPLEMENTATION.
71828
- METHOD bar.
71829
- WRITE sdf.
71830
- ENDMETHOD.
71856
+ badExample: `CLASS lcl DEFINITION.
71857
+ PUBLIC SECTION.
71858
+ METHODS bar IMPORTING VALUE(sdf) TYPE string.
71859
+ ENDCLASS.
71860
+ CLASS lcl IMPLEMENTATION.
71861
+ METHOD bar.
71862
+ WRITE sdf.
71863
+ ENDMETHOD.
71831
71864
  ENDCLASS.`,
71832
- goodExample: `CLASS lcl DEFINITION.
71833
- PUBLIC SECTION.
71834
- METHODS bar IMPORTING sdf TYPE string.
71835
- ENDCLASS.
71836
- CLASS lcl IMPLEMENTATION.
71837
- METHOD bar.
71838
- WRITE sdf.
71839
- ENDMETHOD.
71865
+ goodExample: `CLASS lcl DEFINITION.
71866
+ PUBLIC SECTION.
71867
+ METHODS bar IMPORTING sdf TYPE string.
71868
+ ENDCLASS.
71869
+ CLASS lcl IMPLEMENTATION.
71870
+ METHOD bar.
71871
+ WRITE sdf.
71872
+ ENDMETHOD.
71840
71873
  ENDCLASS.`,
71841
71874
  };
71842
71875
  }
@@ -72093,8 +72126,8 @@ class SpaceBeforeDot extends _abap_rule_1.ABAPRule {
72093
72126
  key: "space_before_dot",
72094
72127
  title: "Space before dot",
72095
72128
  shortDescription: `Checks for extra spaces before dots at the ends of statements`,
72096
- extendedInformation: `
72097
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
72129
+ extendedInformation: `
72130
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
72098
72131
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#condense-your-code`,
72099
72132
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
72100
72133
  badExample: `WRITE bar .`,
@@ -72280,12 +72313,12 @@ class SQLValueConversion {
72280
72313
  key: "sql_value_conversion",
72281
72314
  title: "Implicit SQL Value Conversion",
72282
72315
  shortDescription: `Ensure types match when selecting from database`,
72283
- extendedInformation: `
72284
- * Integer to CHAR conversion
72285
- * Integer to NUMC conversion
72286
- * NUMC to Integer conversion
72287
- * CHAR to Integer conversion
72288
- * Source field longer than database field, CHAR -> CHAR
72316
+ extendedInformation: `
72317
+ * Integer to CHAR conversion
72318
+ * Integer to NUMC conversion
72319
+ * NUMC to Integer conversion
72320
+ * CHAR to Integer conversion
72321
+ * Source field longer than database field, CHAR -> CHAR
72289
72322
  * Source field longer than database field, NUMC -> NUMC`,
72290
72323
  tags: [],
72291
72324
  };
@@ -72357,7 +72390,7 @@ class StartAtTab extends _abap_rule_1.ABAPRule {
72357
72390
  key: "start_at_tab",
72358
72391
  title: "Start at tab",
72359
72392
  shortDescription: `Checks that statements start at tabstops.`,
72360
- extendedInformation: `Reports max 100 issues per file
72393
+ extendedInformation: `Reports max 100 issues per file
72361
72394
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
72362
72395
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
72363
72396
  badExample: ` WRITE a.`,
@@ -72534,12 +72567,12 @@ class StrictSQL extends _abap_rule_1.ABAPRule {
72534
72567
  key: "strict_sql",
72535
72568
  title: "Strict SQL",
72536
72569
  shortDescription: `Strict SQL`,
72537
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
72538
-
72539
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
72540
-
72541
- Also see separate rule sql_escape_host_variables
72542
-
72570
+ extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
72571
+
72572
+ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
72573
+
72574
+ Also see separate rule sql_escape_host_variables
72575
+
72543
72576
  Activates from v750 and up`,
72544
72577
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix],
72545
72578
  badExample: `SELECT * FROM ztabl INTO TABLE @rt_content WHERE type = @iv_type ORDER BY PRIMARY KEY.`,
@@ -72793,11 +72826,11 @@ class SyModification extends _abap_rule_1.ABAPRule {
72793
72826
  key: "sy_modification",
72794
72827
  title: "Modification of SY fields",
72795
72828
  shortDescription: `Finds modification of sy fields`,
72796
- extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
72797
-
72829
+ extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
72830
+
72798
72831
  Changes to SY-TVAR* fields are not reported`,
72799
72832
  tags: [_irule_1.RuleTag.SingleFile],
72800
- badExample: `sy-uname = 2.
72833
+ badExample: `sy-uname = 2.
72801
72834
  sy = sy.`,
72802
72835
  };
72803
72836
  }
@@ -72859,8 +72892,8 @@ class TABLEnhancementCategory {
72859
72892
  key: "tabl_enhancement_category",
72860
72893
  title: "TABL enhancement category must be set",
72861
72894
  shortDescription: `Checks that tables do not have the enhancement category 'not classified'.`,
72862
- extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
72863
-
72895
+ extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
72896
+
72864
72897
  You may use standard report RS_DDIC_CLASSIFICATION_FINAL for adjustment.`,
72865
72898
  tags: [],
72866
72899
  };
@@ -72925,8 +72958,8 @@ class TablesDeclaredLocally extends _abap_rule_1.ABAPRule {
72925
72958
  shortDescription: `TABLES are always global, so declare them globally`,
72926
72959
  extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abaptables.htm`,
72927
72960
  tags: [_irule_1.RuleTag.SingleFile],
72928
- badExample: `FORM foo.
72929
- TABLES t100.
72961
+ badExample: `FORM foo.
72962
+ TABLES t100.
72930
72963
  ENDFORM.`,
72931
72964
  goodExample: `TABLES t000.`,
72932
72965
  };
@@ -73054,9 +73087,9 @@ class TypeFormParameters extends _abap_rule_1.ABAPRule {
73054
73087
  title: "Type FORM parameters",
73055
73088
  shortDescription: `Checks for untyped FORM parameters`,
73056
73089
  tags: [_irule_1.RuleTag.SingleFile],
73057
- badExample: `FORM foo USING bar.
73090
+ badExample: `FORM foo USING bar.
73058
73091
  ENDFORM.`,
73059
- goodExample: `FORM foo USING bar TYPE string.
73092
+ goodExample: `FORM foo USING bar TYPE string.
73060
73093
  ENDFORM.`,
73061
73094
  };
73062
73095
  }
@@ -73729,38 +73762,38 @@ class UnnecessaryPragma extends _abap_rule_1.ABAPRule {
73729
73762
  key: "unnecessary_pragma",
73730
73763
  title: "Unnecessary Pragma",
73731
73764
  shortDescription: `Finds pragmas which can be removed`,
73732
- extendedInformation: `* NO_HANDLER with handler
73733
-
73734
- * NEEDED without definition
73735
-
73736
- * NO_TEXT without texts
73737
-
73738
- * SUBRC_OK where sy-subrc is checked
73739
-
73765
+ extendedInformation: `* NO_HANDLER with handler
73766
+
73767
+ * NEEDED without definition
73768
+
73769
+ * NO_TEXT without texts
73770
+
73771
+ * SUBRC_OK where sy-subrc is checked
73772
+
73740
73773
  NO_HANDLER inside macros are not checked`,
73741
73774
  tags: [_irule_1.RuleTag.SingleFile],
73742
- badExample: `TRY.
73743
- ...
73744
- CATCH zcx_abapgit_exception ##NO_HANDLER.
73745
- RETURN. " it has a handler
73746
- ENDTRY.
73747
- MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
73748
- SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
73749
- IF sy-subrc <> 0.
73775
+ badExample: `TRY.
73776
+ ...
73777
+ CATCH zcx_abapgit_exception ##NO_HANDLER.
73778
+ RETURN. " it has a handler
73779
+ ENDTRY.
73780
+ MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
73781
+ SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
73782
+ IF sy-subrc <> 0.
73750
73783
  ENDIF.`,
73751
- goodExample: `TRY.
73752
- ...
73753
- CATCH zcx_abapgit_exception.
73754
- RETURN.
73755
- ENDTRY.
73756
- MESSAGE w125(zbar) WITH c_foo INTO message.
73757
- SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
73758
- IF sy-subrc <> 0.
73759
- ENDIF.
73760
-
73761
- DATA: BEGIN OF blah ##NEEDED,
73762
- test1 TYPE string,
73763
- test2 TYPE string,
73784
+ goodExample: `TRY.
73785
+ ...
73786
+ CATCH zcx_abapgit_exception.
73787
+ RETURN.
73788
+ ENDTRY.
73789
+ MESSAGE w125(zbar) WITH c_foo INTO message.
73790
+ SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
73791
+ IF sy-subrc <> 0.
73792
+ ENDIF.
73793
+
73794
+ DATA: BEGIN OF blah ##NEEDED,
73795
+ test1 TYPE string,
73796
+ test2 TYPE string,
73764
73797
  END OF blah.`,
73765
73798
  };
73766
73799
  }
@@ -73927,18 +73960,18 @@ class UnnecessaryReturn extends _abap_rule_1.ABAPRule {
73927
73960
  shortDescription: `Finds unnecessary RETURN statements`,
73928
73961
  extendedInformation: `Finds unnecessary RETURN statements`,
73929
73962
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
73930
- badExample: `FORM hello1.
73931
- WRITE 'world'.
73932
- RETURN.
73933
- ENDFORM.
73934
-
73935
- FORM foo.
73936
- IF 1 = 2.
73937
- RETURN.
73938
- ENDIF.
73963
+ badExample: `FORM hello1.
73964
+ WRITE 'world'.
73965
+ RETURN.
73966
+ ENDFORM.
73967
+
73968
+ FORM foo.
73969
+ IF 1 = 2.
73970
+ RETURN.
73971
+ ENDIF.
73939
73972
  ENDFORM.`,
73940
- goodExample: `FORM hello2.
73941
- WRITE 'world'.
73973
+ goodExample: `FORM hello2.
73974
+ WRITE 'world'.
73942
73975
  ENDFORM.`,
73943
73976
  };
73944
73977
  }
@@ -74289,13 +74322,13 @@ class UnusedMacros {
74289
74322
  title: "Unused macros",
74290
74323
  shortDescription: `Checks for unused macro definitions definitions`,
74291
74324
  tags: [_irule_1.RuleTag.Quickfix],
74292
- badExample: `DEFINE foobar1.
74293
- WRITE 'hello'.
74325
+ badExample: `DEFINE foobar1.
74326
+ WRITE 'hello'.
74294
74327
  END-OF-DEFINITION.`,
74295
- goodExample: `DEFINE foobar2.
74296
- WRITE 'hello'.
74297
- END-OF-DEFINITION.
74298
-
74328
+ goodExample: `DEFINE foobar2.
74329
+ WRITE 'hello'.
74330
+ END-OF-DEFINITION.
74331
+
74299
74332
  foobar2.`,
74300
74333
  };
74301
74334
  }
@@ -74407,18 +74440,18 @@ class UnusedMethods {
74407
74440
  key: "unused_methods",
74408
74441
  title: "Unused methods",
74409
74442
  shortDescription: `Checks for unused methods`,
74410
- extendedInformation: `Checks private and protected methods.
74411
-
74412
- Unused methods are not reported if the object contains parser or syntax errors.
74413
- Quick fixes only appears for private methods or projected methods where the class doesnt have any subclasses.
74414
-
74415
- Skips:
74416
- * methods FOR TESTING
74417
- * methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
74418
- * class_constructor + constructor methods
74419
- * event handlers
74420
- * methods that are redefined
74421
- * INCLUDEs
74443
+ extendedInformation: `Checks private and protected methods.
74444
+
74445
+ Unused methods are not reported if the object contains parser or syntax errors.
74446
+ Quick fixes only appears for private methods or projected methods where the class doesnt have any subclasses.
74447
+
74448
+ Skips:
74449
+ * methods FOR TESTING
74450
+ * methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
74451
+ * class_constructor + constructor methods
74452
+ * event handlers
74453
+ * methods that are redefined
74454
+ * INCLUDEs
74422
74455
  `,
74423
74456
  tags: [_irule_1.RuleTag.Quickfix],
74424
74457
  pragma: "##CALLED",
@@ -74894,23 +74927,23 @@ class UnusedVariables {
74894
74927
  key: "unused_variables",
74895
74928
  title: "Unused variables",
74896
74929
  shortDescription: `Checks for unused variables and constants`,
74897
- extendedInformation: `Skips event parameters.
74898
-
74899
- Note that this currently does not work if the source code uses macros.
74900
-
74901
- Unused variables are not reported if the object contains parser or syntax errors.
74902
-
74930
+ extendedInformation: `Skips event parameters.
74931
+
74932
+ Note that this currently does not work if the source code uses macros.
74933
+
74934
+ Unused variables are not reported if the object contains parser or syntax errors.
74935
+
74903
74936
  Errors found in INCLUDES are reported for the main program.`,
74904
74937
  tags: [_irule_1.RuleTag.Quickfix],
74905
74938
  pragma: "##NEEDED",
74906
74939
  pseudoComment: "EC NEEDED",
74907
- badExample: `DATA: BEGIN OF blah1,
74908
- test TYPE string,
74909
- test2 TYPE string,
74940
+ badExample: `DATA: BEGIN OF blah1,
74941
+ test TYPE string,
74942
+ test2 TYPE string,
74910
74943
  END OF blah1.`,
74911
- goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
74912
- test TYPE string,
74913
- test2 TYPE string,
74944
+ goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
74945
+ test TYPE string,
74946
+ test2 TYPE string,
74914
74947
  END OF blah2.`,
74915
74948
  };
74916
74949
  }
@@ -75129,15 +75162,15 @@ class UseBoolExpression extends _abap_rule_1.ABAPRule {
75129
75162
  shortDescription: `Use boolean expression, xsdbool from 740sp08 and up, boolc from 702 and up`,
75130
75163
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
75131
75164
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
75132
- badExample: `IF line IS INITIAL.
75133
- has_entries = abap_false.
75134
- ELSE.
75135
- has_entries = abap_true.
75136
- ENDIF.
75137
-
75165
+ badExample: `IF line IS INITIAL.
75166
+ has_entries = abap_false.
75167
+ ELSE.
75168
+ has_entries = abap_true.
75169
+ ENDIF.
75170
+
75138
75171
  DATA(fsdf) = COND #( WHEN foo <> bar THEN abap_true ELSE abap_false ).`,
75139
- goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
75140
-
75172
+ goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
75173
+
75141
75174
  DATA(fsdf) = xsdbool( foo <> bar ).`,
75142
75175
  };
75143
75176
  }
@@ -75255,15 +75288,15 @@ class UseClassBasedExceptions extends _abap_rule_1.ABAPRule {
75255
75288
  shortDescription: `Use class based exceptions, checks interface and class definitions`,
75256
75289
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-class-based-exceptions`,
75257
75290
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
75258
- badExample: `INTERFACE lif.
75259
- METHODS load_data
75260
- EXCEPTIONS
75261
- invalid_parameter.
75291
+ badExample: `INTERFACE lif.
75292
+ METHODS load_data
75293
+ EXCEPTIONS
75294
+ invalid_parameter.
75262
75295
  ENDINTERFACE.`,
75263
- goodExample: `INTERFACE lif.
75264
- METHODS load_data
75265
- RAISING
75266
- cx_something.
75296
+ goodExample: `INTERFACE lif.
75297
+ METHODS load_data
75298
+ RAISING
75299
+ cx_something.
75267
75300
  ENDINTERFACE.`,
75268
75301
  };
75269
75302
  }
@@ -75323,15 +75356,15 @@ class UseLineExists extends _abap_rule_1.ABAPRule {
75323
75356
  key: "use_line_exists",
75324
75357
  title: "Use line_exists",
75325
75358
  shortDescription: `Use line_exists, from 740sp02 and up`,
75326
- extendedInformation: `
75327
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
75328
-
75359
+ extendedInformation: `
75360
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
75361
+
75329
75362
  Not reported if the READ TABLE statement contains BINARY SEARCH.`,
75330
75363
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
75331
- badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
75332
- IF sy-subrc = 0.
75364
+ badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
75365
+ IF sy-subrc = 0.
75333
75366
  ENDIF.`,
75334
- goodExample: `IF line_exists( my_table[ key = 'A' ] ).
75367
+ goodExample: `IF line_exists( my_table[ key = 'A' ] ).
75335
75368
  ENDIF.`,
75336
75369
  };
75337
75370
  }
@@ -75441,10 +75474,10 @@ class UseNew extends _abap_rule_1.ABAPRule {
75441
75474
  key: "use_new",
75442
75475
  title: "Use NEW",
75443
75476
  shortDescription: `Checks for deprecated CREATE OBJECT statements.`,
75444
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
75445
-
75446
- If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
75447
-
75477
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
75478
+
75479
+ If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
75480
+
75448
75481
  Applicable from v740sp02 and up`,
75449
75482
  badExample: `CREATE OBJECT ref.`,
75450
75483
  goodExample: `ref = NEW #( ).`,
@@ -75542,13 +75575,13 @@ class WhenOthersLast extends _abap_rule_1.ABAPRule {
75542
75575
  title: "WHEN OTHERS last",
75543
75576
  shortDescription: `Checks that WHEN OTHERS is placed the last within a CASE statement.`,
75544
75577
  tags: [_irule_1.RuleTag.SingleFile],
75545
- badExample: `CASE bar.
75546
- WHEN OTHERS.
75547
- WHEN 2.
75578
+ badExample: `CASE bar.
75579
+ WHEN OTHERS.
75580
+ WHEN 2.
75548
75581
  ENDCASE.`,
75549
- goodExample: `CASE bar.
75550
- WHEN 2.
75551
- WHEN OTHERS.
75582
+ goodExample: `CASE bar.
75583
+ WHEN 2.
75584
+ WHEN OTHERS.
75552
75585
  ENDCASE.`,
75553
75586
  };
75554
75587
  }