@abaplint/cli 2.113.62 → 2.113.64

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 +871 -863
  4. package/package.json +63 -63
package/build/cli.js CHANGED
@@ -4811,7 +4811,7 @@ class CorrespondingBody extends combi_1.Expression {
4811
4811
  const mapping = (0, combi_1.seq)("MAPPING", (0, combi_1.plus)((0, combi_1.seq)(_1.ComponentName, "=", component_chain_1.ComponentChain)));
4812
4812
  const baseParen = (0, combi_1.seq)("BASE", (0, combi_1.tok)(tokens_1.WParenLeftW), _1.Source, (0, combi_1.tok)(tokens_1.WParenRightW));
4813
4813
  const discarding = (0, combi_1.ver)(version_1.Version.v751, "DISCARDING DUPLICATES");
4814
- return (0, combi_1.seq)((0, combi_1.optPrio)("DEEP"), (0, combi_1.optPrio)(baseParen), _1.Source, (0, combi_1.optPrio)(discarding), (0, combi_1.optPrio)(mapping), (0, combi_1.optPrio)((0, combi_1.seq)("EXCEPT", (0, combi_1.alt)((0, combi_1.plus)(_1.Field), "*"))));
4814
+ return (0, combi_1.seq)((0, combi_1.optPrio)("DEEP"), (0, combi_1.optPrio)(baseParen), _1.Source, (0, combi_1.optPrio)(discarding), (0, combi_1.optPrio)(mapping), (0, combi_1.optPrio)("CHANGING CONTROL"), (0, combi_1.optPrio)((0, combi_1.seq)("EXCEPT", (0, combi_1.alt)((0, combi_1.plus)(_1.Field), "*"))));
4815
4815
  }
4816
4816
  }
4817
4817
  exports.CorrespondingBody = CorrespondingBody;
@@ -5039,7 +5039,7 @@ exports.EntityAssociation = void 0;
5039
5039
  const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
5040
5040
  class EntityAssociation extends combi_1.Expression {
5041
5041
  getRunnable() {
5042
- return (0, combi_1.regex)(/^[\w]+\\_[\w]+$/);
5042
+ return (0, combi_1.regex)(/^\w+(\\_|\\\\)\w+$/);
5043
5043
  }
5044
5044
  }
5045
5045
  exports.EntityAssociation = EntityAssociation;
@@ -5279,7 +5279,7 @@ const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules
5279
5279
  const table_body_1 = __webpack_require__(/*! ./table_body */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/table_body.js");
5280
5280
  class FieldSub extends combi_1.Expression {
5281
5281
  getRunnable() {
5282
- const ret = (0, combi_1.seq)((0, combi_1.regex)(/^\*?!?(\/\w+\/)?[a-zA-Z_%$\?][\w%$\$\*]*$/), (0, combi_1.starPrio)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), (0, combi_1.regex)(/^[\w%$\$\*]+$/))), (0, combi_1.opt)(table_body_1.TableBody));
5282
+ const ret = (0, combi_1.seq)((0, combi_1.regex)(/^\*?!?&?(\/\w+\/)?[a-zA-Z_%$\?][\w%$\$\*]*$/), (0, combi_1.starPrio)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), (0, combi_1.regex)(/^[\w%$\$\*]+$/))), (0, combi_1.opt)(table_body_1.TableBody));
5283
5283
  return ret;
5284
5284
  }
5285
5285
  }
@@ -6417,7 +6417,7 @@ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/co
6417
6417
  class MessageClass extends combi_1.Expression {
6418
6418
  getRunnable() {
6419
6419
  // "&1" can be used for almost anything(field names, method names etc.) in macros
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
+ return (0, combi_1.seq)((0, combi_1.regex)(/^>?[\w\/]+#?@?\/?!?&?>?\$?\??<?$/), (0, combi_1.starPrio)((0, combi_1.tok)(tokens_1.Plus)), (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)));
6421
6421
  }
6422
6422
  }
6423
6423
  exports.MessageClass = MessageClass;
@@ -9406,11 +9406,12 @@ class TypeStructure extends combi_1.Expression {
9406
9406
  getRunnable() {
9407
9407
  // todo, add version,
9408
9408
  const hier = (0, combi_1.seq)("HIERARCHY", _1.NamespaceSimpleName);
9409
- const create = (0, combi_1.seq)("CREATE", _1.NamespaceSimpleName);
9410
- const update = (0, combi_1.seq)("UPDATE", _1.NamespaceSimpleName);
9411
- const action = (0, combi_1.seq)("ACTION IMPORT", _1.SourceField);
9409
+ const create = (0, combi_1.seq)("CREATE", (0, combi_1.alt)(_1.NamespaceSimpleName, _1.EntityAssociation));
9410
+ const update = (0, combi_1.seq)("UPDATE", (0, combi_1.alt)(_1.NamespaceSimpleName, _1.EntityAssociation));
9411
+ const action = (0, combi_1.seq)("ACTION IMPORT", _1.Source);
9412
+ const permissionsRequest = (0, combi_1.seq)("PERMISSIONS REQUEST", _1.NamespaceSimpleName);
9412
9413
  const evt = (0, combi_1.seq)("EVENT", _1.EventName);
9413
- return (0, combi_1.seq)("TYPE STRUCTURE FOR", (0, combi_1.altPrio)(hier, evt, create, update, action));
9414
+ return (0, combi_1.seq)("TYPE STRUCTURE FOR", (0, combi_1.altPrio)(hier, evt, create, update, action, permissionsRequest));
9414
9415
  }
9415
9416
  }
9416
9417
  exports.TypeStructure = TypeStructure;
@@ -9446,7 +9447,7 @@ class TypeTable extends combi_1.Expression {
9446
9447
  // "WITH" is not allowed as a field name in keys
9447
9448
  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)))));
9448
9449
  const occurs = (0, combi_1.seq)("OCCURS", (0, combi_1.altPrio)(_1.Integer, field_chain_1.FieldChain));
9449
- 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));
9450
+ 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"), (0, combi_1.alt)(_1.TypeName, _1.EntityAssociation)));
9450
9451
  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));
9451
9452
  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));
9452
9453
  const typeLine = (0, combi_1.seq)("LINE OF", _1.TypeName, occurs, header);
@@ -10041,7 +10042,8 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
10041
10042
  class Add {
10042
10043
  getMatcher() {
10043
10044
  const to = (0, combi_1.seq)("TO", expressions_1.Target);
10044
- const giving = (0, combi_1.seq)("GIVING", expressions_1.FieldSub);
10045
+ const accordingTo = (0, combi_1.seq)("ACCORDING TO", expressions_1.FieldSub);
10046
+ const giving = (0, combi_1.seq)("GIVING", expressions_1.FieldSub, (0, combi_1.opt)(accordingTo));
10045
10047
  const then = (0, combi_1.seq)("THEN", expressions_1.FieldSub, "UNTIL", expressions_1.FieldSub, (0, combi_1.alt)(giving, to));
10046
10048
  const ret = (0, combi_1.seq)("ADD", expressions_1.Source, (0, combi_1.altPrio)(to, then));
10047
10049
  return ret;
@@ -10571,7 +10573,7 @@ class CallDialog {
10571
10573
  const exporting = (0, combi_1.seq)("EXPORTING", (0, combi_1.plus)(from));
10572
10574
  const to = (0, combi_1.seq)(expressions_1.Field, (0, combi_1.optPrio)((0, combi_1.seq)("TO", expressions_1.Field)));
10573
10575
  const importing = (0, combi_1.seq)("IMPORTING", (0, combi_1.plus)(to));
10574
- const ret = (0, combi_1.seq)("CALL DIALOG", expressions_1.Constant, (0, combi_1.opt)(exporting), (0, combi_1.opt)(importing));
10576
+ const ret = (0, combi_1.seq)("CALL DIALOG", (0, combi_1.alt)(expressions_1.Constant, expressions_1.FieldSub), (0, combi_1.opt)(exporting), (0, combi_1.opt)(importing));
10575
10577
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
10576
10578
  }
10577
10579
  }
@@ -10881,7 +10883,7 @@ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/co
10881
10883
  const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
10882
10884
  class Check {
10883
10885
  getMatcher() {
10884
- const ret = (0, combi_1.seq)("CHECK", (0, combi_1.altPrio)(expressions_1.Cond, expressions_1.Field));
10886
+ const ret = (0, combi_1.seq)("CHECK", (0, combi_1.altPrio)(expressions_1.Cond, expressions_1.FieldSub));
10885
10887
  return ret;
10886
10888
  }
10887
10889
  }
@@ -14975,7 +14977,7 @@ const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules
14975
14977
  class Move {
14976
14978
  getMatcher() {
14977
14979
  const mov = (0, combi_1.verNot)(version_1.Version.Cloud, "MOVE");
14978
- 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)));
14980
+ 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, (0, combi_1.opt)((0, combi_1.alt)("LEFT", "RIGHT")))));
14979
14981
  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), "="), "/=", "*=", "&&="));
14980
14982
  const chained = (0, combi_1.seq)("=", (0, combi_1.star)((0, combi_1.seq)(expressions_1.Target, "=")));
14981
14983
  const equals = (0, combi_1.altPrio)((0, combi_1.altPrio)(chained, "?="), calcAssign);
@@ -15096,7 +15098,7 @@ class NewPage {
15096
15098
  const dataset = (0, combi_1.seq)("LIST DATASET", expressions_1.Source);
15097
15099
  const name = (0, combi_1.seq)("LIST NAME", expressions_1.Source);
15098
15100
  const newList = (0, combi_1.seq)("NEW LIST IDENTIFICATION", expressions_1.Source);
15099
- const ret = (0, combi_1.seq)("NEW-PAGE", (0, combi_1.opt)((0, combi_1.per)(print, (0, combi_1.alt)("NO-TITLE", "WITH-TITLE"), (0, combi_1.alt)("NO-HEADING", "WITH-HEADING"), "NO DIALOG", parameters, listAuth, immediately, dataset, coverPage, newList, keep, department, name, layout, destination, receiver, copies, coverText, archive, "NEW-SECTION", lineCount, line)));
15101
+ const ret = (0, combi_1.seq)("NEW-PAGE", (0, combi_1.opt)((0, combi_1.per)(print, (0, combi_1.alt)("NO-TITLE", "WITH-TITLE"), (0, combi_1.alt)("NO-HEADING", "WITH-HEADING"), "NO DIALOG", "NO-TOPOFPAGE", parameters, listAuth, immediately, dataset, coverPage, newList, keep, department, name, layout, destination, receiver, copies, coverText, archive, "NEW-SECTION", lineCount, line)));
15100
15102
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
15101
15103
  }
15102
15104
  }
@@ -15294,7 +15296,7 @@ class Parameter {
15294
15296
  const decimals = (0, combi_1.seq)("DECIMALS", expressions_1.Source);
15295
15297
  const forTable = (0, combi_1.seq)("FOR TABLE", expressions_1.DatabaseTable, (0, combi_1.opt)("VALUE-REQUEST"));
15296
15298
  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");
15297
- const ret = (0, combi_1.seq)(para, expressions_1.FieldSub, (0, combi_1.opt)(expressions_1.FieldLength), (0, combi_1.opt)(perm));
15299
+ const ret = (0, combi_1.seq)(para, expressions_1.FieldSub, (0, combi_1.opt)(expressions_1.ConstantFieldLength), (0, combi_1.opt)(perm));
15298
15300
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
15299
15301
  }
15300
15302
  }
@@ -15680,7 +15682,7 @@ class ReadEntities {
15680
15682
  const from = (0, combi_1.seq)("FROM", expressions_1.Source);
15681
15683
  const fields = (0, combi_1.seq)("FIELDS", (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.plus)(expressions_1.SimpleName), (0, combi_1.tok)(tokens_1.WParenRightW), "WITH", expressions_1.Source);
15682
15684
  const all = (0, combi_1.seq)("ALL FIELDS WITH", expressions_1.Source);
15683
- const s = (0, combi_1.seq)("READ ENTITIES OF", expressions_1.NamespaceSimpleName, (0, combi_1.opt)("IN LOCAL MODE"), "ENTITY", expressions_1.SimpleName, (0, combi_1.opt)((0, combi_1.seq)("BY", expressions_1.AssociationName)), (0, combi_1.alt)(fields, from, all), "RESULT", expressions_1.Target, (0, combi_1.optPrio)((0, combi_1.seq)("LINK", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("FAILED", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("REPORTED", expressions_1.Target)));
15685
+ const s = (0, combi_1.seq)("READ ENTITIES OF", expressions_1.NamespaceSimpleName, (0, combi_1.opt)("IN LOCAL MODE"), "ENTITY", expressions_1.SimpleName, (0, combi_1.opt)((0, combi_1.seq)("BY", expressions_1.AssociationName)), (0, combi_1.alt)(fields, from, all), (0, combi_1.optPrio)((0, combi_1.seq)("RESULT", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("LINK", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("FAILED", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("REPORTED", expressions_1.Target)));
15684
15686
  return (0, combi_1.ver)(version_1.Version.v754, s);
15685
15687
  }
15686
15688
  }
@@ -34295,6 +34297,9 @@ class Data {
34295
34297
  if (found instanceof Basic.UnknownType) {
34296
34298
  return new _typed_identifier_1.TypedIdentifier(name, input.filename, new Basic.UnknownType("unknown type, " + typeName));
34297
34299
  }
34300
+ if (found instanceof Basic.TableType && found.isWithHeader()) {
34301
+ found = found.getRowType();
34302
+ }
34298
34303
  if (!(found instanceof Basic.StructureType)) {
34299
34304
  const message = "not structured, " + typeName;
34300
34305
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, typeToken, message));
@@ -35368,13 +35373,13 @@ class FlowGraph {
35368
35373
  this.label = label;
35369
35374
  }
35370
35375
  toDigraph() {
35371
- return `digraph G {
35372
- labelloc="t";
35373
- label="${this.label}";
35374
- graph [fontname = "helvetica"];
35375
- node [fontname = "helvetica", shape="box"];
35376
- edge [fontname = "helvetica"];
35377
- ${this.toTextEdges()}
35376
+ return `digraph G {
35377
+ labelloc="t";
35378
+ label="${this.label}";
35379
+ graph [fontname = "helvetica"];
35380
+ node [fontname = "helvetica", shape="box"];
35381
+ edge [fontname = "helvetica"];
35382
+ ${this.toTextEdges()}
35378
35383
  }`;
35379
35384
  }
35380
35385
  listSources(node) {
@@ -43793,13 +43798,13 @@ class Help {
43793
43798
  /////////////////////////////////////////////////
43794
43799
  static dumpABAP(file, reg, textDocument, position) {
43795
43800
  let content = "";
43796
- content = `
43797
- <a href="#_tokens" rel="no-refresh">Tokens</a> |
43798
- <a href="#_statements" rel="no-refresh">Statements</a> |
43799
- <a href="#_structure" rel="no-refresh">Structure</a> |
43800
- <a href="#_files" rel="no-refresh">Files</a> |
43801
- <a href="#_info" rel="no-refresh">Info Dump</a>
43802
- <hr>
43801
+ content = `
43802
+ <a href="#_tokens" rel="no-refresh">Tokens</a> |
43803
+ <a href="#_statements" rel="no-refresh">Statements</a> |
43804
+ <a href="#_structure" rel="no-refresh">Structure</a> |
43805
+ <a href="#_files" rel="no-refresh">Files</a> |
43806
+ <a href="#_info" rel="no-refresh">Info Dump</a>
43807
+ <hr>
43803
43808
  ` +
43804
43809
  "<tt>" + textDocument.uri + " (" +
43805
43810
  (position.line + 1) + ", " +
@@ -43954,9 +43959,9 @@ class Help {
43954
43959
  return ret + "</ul>";
43955
43960
  }
43956
43961
  static tokens(file) {
43957
- let inner = `<table><tr><td><b>String</b></td><td><b>Type</b></td>
43958
- <td><b>Row</b></td><td><b>Column</b></td>
43959
- <td><b>vRow</b></td><td><b>vColumn</b></td>
43962
+ let inner = `<table><tr><td><b>String</b></td><td><b>Type</b></td>
43963
+ <td><b>Row</b></td><td><b>Column</b></td>
43964
+ <td><b>vRow</b></td><td><b>vColumn</b></td>
43960
43965
  </tr>`;
43961
43966
  for (const token of file.getTokens()) {
43962
43967
  const tStart = token.getStart();
@@ -51619,7 +51624,7 @@ const version_1 = __webpack_require__(/*! ../version */ "./node_modules/@abaplin
51619
51624
  var EnhancementCategory;
51620
51625
  (function (EnhancementCategory) {
51621
51626
  EnhancementCategory["NotClassified"] = "0";
51622
- EnhancementCategory["CannotBeEhanced"] = "1";
51627
+ EnhancementCategory["CannotBeEnhanced"] = "1";
51623
51628
  EnhancementCategory["Character"] = "2";
51624
51629
  EnhancementCategory["CharacterOrNumeric"] = "3";
51625
51630
  EnhancementCategory["Deep"] = "4";
@@ -51724,8 +51729,11 @@ class Table extends _abstract_object_1.AbstractObject {
51724
51729
  if (field.GROUPNAME !== undefined) {
51725
51730
  components.push({ name: field.GROUPNAME, type: found });
51726
51731
  }
51727
- for (const c of found.getComponents()) {
51728
- components.push({ name: c.name, type: c.type });
51732
+ if (field.FIELDNAME.startsWith(".INCLU-") === false
51733
+ || field.FIELDNAME === ".INCLU--AP") {
51734
+ for (const c of found.getComponents()) {
51735
+ components.push({ name: c.name, type: c.type });
51736
+ }
51729
51737
  }
51730
51738
  }
51731
51739
  else if ((((_a = field.PRECFIELD) === null || _a === void 0 ? void 0 : _a.startsWith("CI_")) || ((_b = field.PRECFIELD) === null || _b === void 0 ? void 0 : _b.startsWith("SI_")))
@@ -53208,7 +53216,7 @@ class Registry {
53208
53216
  }
53209
53217
  static abaplintVersion() {
53210
53218
  // magic, see build script "version.sh"
53211
- return "2.113.62";
53219
+ return "2.113.64";
53212
53220
  }
53213
53221
  getDDICReferences() {
53214
53222
  return this.ddicReferences;
@@ -53527,10 +53535,10 @@ class SevenBitAscii {
53527
53535
  key: "7bit_ascii",
53528
53536
  title: "Check for 7bit ascii",
53529
53537
  shortDescription: `Only allow characters from the 7bit ASCII set.`,
53530
- extendedInformation: `https://docs.abapopenchecks.org/checks/05/
53531
-
53532
- https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
53533
-
53538
+ extendedInformation: `https://docs.abapopenchecks.org/checks/05/
53539
+
53540
+ https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
53541
+
53534
53542
  Checkes files with extensions ".abap" and ".asddls"`,
53535
53543
  tags: [_irule_1.RuleTag.SingleFile],
53536
53544
  badExample: `WRITE '뽑'.`,
@@ -53736,10 +53744,10 @@ class Abapdoc extends _abap_rule_1.ABAPRule {
53736
53744
  key: "abapdoc",
53737
53745
  title: "Check abapdoc",
53738
53746
  shortDescription: `Various checks regarding abapdoc.`,
53739
- extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
53740
-
53741
- Plus class and interface definitions.
53742
-
53747
+ extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
53748
+
53749
+ Plus class and interface definitions.
53750
+
53743
53751
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#abap-doc-only-for-public-apis`,
53744
53752
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
53745
53753
  };
@@ -53876,27 +53884,27 @@ class AddTestAttributes extends _abap_rule_1.ABAPRule {
53876
53884
  title: "Add test attributes for tests classes with test methods",
53877
53885
  shortDescription: `Add test attributes DURATION and RISK LEVEL for tests classes with test methods`,
53878
53886
  tags: [_irule_1.RuleTag.SingleFile],
53879
- badExample: `CLASS ltcl_test1 DEFINITION FINAL FOR TESTING.
53880
- PUBLIC SECTION.
53881
- PROTECTED SECTION.
53882
- PRIVATE SECTION.
53883
- METHODS test FOR TESTING RAISING cx_static_check.
53884
- ENDCLASS.
53885
-
53886
- CLASS ltcl_test1 IMPLEMENTATION.
53887
- METHOD test.
53888
- ENDMETHOD.
53887
+ badExample: `CLASS ltcl_test1 DEFINITION FINAL FOR TESTING.
53888
+ PUBLIC SECTION.
53889
+ PROTECTED SECTION.
53890
+ PRIVATE SECTION.
53891
+ METHODS test FOR TESTING RAISING cx_static_check.
53892
+ ENDCLASS.
53893
+
53894
+ CLASS ltcl_test1 IMPLEMENTATION.
53895
+ METHOD test.
53896
+ ENDMETHOD.
53889
53897
  ENDCLASS.`,
53890
- goodExample: `CLASS ltcl_test2 DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
53891
- PUBLIC SECTION.
53892
- PROTECTED SECTION.
53893
- PRIVATE SECTION.
53894
- METHODS test FOR TESTING RAISING cx_static_check.
53895
- ENDCLASS.
53896
-
53897
- CLASS ltcl_test2 IMPLEMENTATION.
53898
- METHOD test.
53899
- ENDMETHOD.
53898
+ goodExample: `CLASS ltcl_test2 DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
53899
+ PUBLIC SECTION.
53900
+ PROTECTED SECTION.
53901
+ PRIVATE SECTION.
53902
+ METHODS test FOR TESTING RAISING cx_static_check.
53903
+ ENDCLASS.
53904
+
53905
+ CLASS ltcl_test2 IMPLEMENTATION.
53906
+ METHOD test.
53907
+ ENDMETHOD.
53900
53908
  ENDCLASS.`,
53901
53909
  };
53902
53910
  }
@@ -53982,49 +53990,49 @@ class AlignParameters extends _abap_rule_1.ABAPRule {
53982
53990
  key: "align_parameters",
53983
53991
  title: "Align Parameters",
53984
53992
  shortDescription: `Checks for vertially aligned parameters`,
53985
- extendedInformation: `Checks:
53986
- * function module calls
53987
- * method calls
53988
- * VALUE constructors
53989
- * NEW constructors
53990
- * RAISE EXCEPTION statements
53991
- * CREATE OBJECT statements
53992
- * RAISE EVENT statements
53993
-
53994
- https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
53995
-
53996
- Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
53997
-
53998
- If parameters are on the same row, no issues are reported, see
53993
+ extendedInformation: `Checks:
53994
+ * function module calls
53995
+ * method calls
53996
+ * VALUE constructors
53997
+ * NEW constructors
53998
+ * RAISE EXCEPTION statements
53999
+ * CREATE OBJECT statements
54000
+ * RAISE EVENT statements
54001
+
54002
+ https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
54003
+
54004
+ Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
54005
+
54006
+ If parameters are on the same row, no issues are reported, see
53999
54007
  https://rules.abaplint.org/max_one_method_parameter_per_line/ for splitting parameters to lines`,
54000
54008
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
54001
- badExample: `CALL FUNCTION 'FOOBAR'
54002
- EXPORTING
54003
- foo = 2
54004
- parameter = 3.
54005
-
54006
- foobar( moo = 1
54007
- param = 1 ).
54008
-
54009
- foo = VALUE #(
54010
- foo = bar
54009
+ badExample: `CALL FUNCTION 'FOOBAR'
54010
+ EXPORTING
54011
+ foo = 2
54012
+ parameter = 3.
54013
+
54014
+ foobar( moo = 1
54015
+ param = 1 ).
54016
+
54017
+ foo = VALUE #(
54018
+ foo = bar
54011
54019
  moo = 2 ).`,
54012
- goodExample: `CALL FUNCTION 'FOOBAR'
54013
- EXPORTING
54014
- foo = 2
54015
- parameter = 3.
54016
-
54017
- foobar( moo = 1
54018
- param = 1 ).
54019
-
54020
- foo = VALUE #(
54021
- foo = bar
54022
- moo = 2 ).
54023
-
54024
- DATA(sdf) = VALUE type(
54025
- common_val = 2
54026
- another_common = 5
54027
- ( row_value = 4
54020
+ goodExample: `CALL FUNCTION 'FOOBAR'
54021
+ EXPORTING
54022
+ foo = 2
54023
+ parameter = 3.
54024
+
54025
+ foobar( moo = 1
54026
+ param = 1 ).
54027
+
54028
+ foo = VALUE #(
54029
+ foo = bar
54030
+ moo = 2 ).
54031
+
54032
+ DATA(sdf) = VALUE type(
54033
+ common_val = 2
54034
+ another_common = 5
54035
+ ( row_value = 4
54028
54036
  value_foo = 5 ) ).`,
54029
54037
  };
54030
54038
  }
@@ -54458,37 +54466,37 @@ class AlignTypeExpressions extends _abap_rule_1.ABAPRule {
54458
54466
  key: "align_type_expressions",
54459
54467
  title: "Align TYPE expressions",
54460
54468
  shortDescription: `Align TYPE expressions in statements`,
54461
- extendedInformation: `
54462
- Currently works for METHODS + BEGIN OF
54463
-
54464
- If BEGIN OF has an INCLUDE TYPE its ignored
54465
-
54466
- Also note that clean ABAP does not recommend aligning TYPE clauses:
54469
+ extendedInformation: `
54470
+ Currently works for METHODS + BEGIN OF
54471
+
54472
+ If BEGIN OF has an INCLUDE TYPE its ignored
54473
+
54474
+ Also note that clean ABAP does not recommend aligning TYPE clauses:
54467
54475
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-align-type-clauses`,
54468
54476
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix],
54469
- badExample: `
54470
- TYPES: BEGIN OF foo,
54471
- bar TYPE i,
54472
- foobar TYPE i,
54473
- END OF foo.
54474
-
54475
- INTERFACE lif.
54476
- METHODS bar
54477
- IMPORTING
54478
- foo TYPE i
54479
- foobar TYPE i.
54477
+ badExample: `
54478
+ TYPES: BEGIN OF foo,
54479
+ bar TYPE i,
54480
+ foobar TYPE i,
54481
+ END OF foo.
54482
+
54483
+ INTERFACE lif.
54484
+ METHODS bar
54485
+ IMPORTING
54486
+ foo TYPE i
54487
+ foobar TYPE i.
54480
54488
  ENDINTERFACE.`,
54481
- goodExample: `
54482
- TYPES: BEGIN OF foo,
54483
- bar TYPE i,
54484
- foobar TYPE i,
54485
- END OF foo.
54486
-
54487
- INTERFACE lif.
54488
- METHODS bar
54489
- IMPORTING
54490
- foo TYPE i
54491
- foobar TYPE i.
54489
+ goodExample: `
54490
+ TYPES: BEGIN OF foo,
54491
+ bar TYPE i,
54492
+ foobar TYPE i,
54493
+ END OF foo.
54494
+
54495
+ INTERFACE lif.
54496
+ METHODS bar
54497
+ IMPORTING
54498
+ foo TYPE i
54499
+ foobar TYPE i.
54492
54500
  ENDINTERFACE.`,
54493
54501
  };
54494
54502
  }
@@ -54767,16 +54775,16 @@ class AmbiguousStatement extends _abap_rule_1.ABAPRule {
54767
54775
  return {
54768
54776
  key: "ambiguous_statement",
54769
54777
  title: "Check for ambigious statements",
54770
- shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
54771
- Add "TABLE" keyword or "@" for escaping SQL variables
54772
-
54778
+ shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
54779
+ Add "TABLE" keyword or "@" for escaping SQL variables
54780
+
54773
54781
  Only works if the target version is 740sp05 or above`,
54774
54782
  tags: [_irule_1.RuleTag.SingleFile],
54775
- badExample: `DELETE foo FROM bar.
54783
+ badExample: `DELETE foo FROM bar.
54776
54784
  MODIFY foo FROM bar.`,
54777
- goodExample: `DELETE foo FROM @bar.
54778
- DELETE TABLE itab FROM 2.
54779
- MODIFY zfoo FROM @wa.
54785
+ goodExample: `DELETE foo FROM @bar.
54786
+ DELETE TABLE itab FROM 2.
54787
+ MODIFY zfoo FROM @wa.
54780
54788
  MODIFY TABLE foo FROM bar.`,
54781
54789
  };
54782
54790
  }
@@ -54881,16 +54889,16 @@ class AvoidUse extends _abap_rule_1.ABAPRule {
54881
54889
  key: "avoid_use",
54882
54890
  title: "Avoid use of certain statements",
54883
54891
  shortDescription: `Detects usage of certain statements.`,
54884
- extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
54885
-
54886
- Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
54887
-
54888
- STATICS: use CLASS-DATA instead
54889
-
54890
- DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
54891
-
54892
- TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
54893
-
54892
+ extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
54893
+
54894
+ Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
54895
+
54896
+ STATICS: use CLASS-DATA instead
54897
+
54898
+ DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
54899
+
54900
+ TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
54901
+
54894
54902
  BREAK points`,
54895
54903
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
54896
54904
  };
@@ -55022,11 +55030,11 @@ class BeginEndNames extends _abap_rule_1.ABAPRule {
55022
55030
  title: "Check BEGIN END names",
55023
55031
  shortDescription: `Check BEGIN OF and END OF names match, plus there must be statements between BEGIN and END`,
55024
55032
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
55025
- badExample: `DATA: BEGIN OF stru,
55026
- field TYPE i,
55033
+ badExample: `DATA: BEGIN OF stru,
55034
+ field TYPE i,
55027
55035
  END OF structure_not_the_same.`,
55028
- goodExample: `DATA: BEGIN OF stru,
55029
- field TYPE i,
55036
+ goodExample: `DATA: BEGIN OF stru,
55037
+ field TYPE i,
55030
55038
  END OF stru.`,
55031
55039
  };
55032
55040
  }
@@ -55123,20 +55131,20 @@ class BeginSingleInclude extends _abap_rule_1.ABAPRule {
55123
55131
  title: "BEGIN contains single INCLUDE",
55124
55132
  shortDescription: `Finds TYPE BEGIN with just one INCLUDE TYPE, and DATA with single INCLUDE STRUCTURE`,
55125
55133
  tags: [_irule_1.RuleTag.SingleFile],
55126
- badExample: `TYPES: BEGIN OF dummy1.
55127
- INCLUDE TYPE dselc.
55128
- TYPES: END OF dummy1.
55129
-
55130
- DATA BEGIN OF foo.
55131
- INCLUDE STRUCTURE syst.
55132
- DATA END OF foo.
55133
-
55134
- STATICS BEGIN OF bar.
55135
- INCLUDE STRUCTURE syst.
55134
+ badExample: `TYPES: BEGIN OF dummy1.
55135
+ INCLUDE TYPE dselc.
55136
+ TYPES: END OF dummy1.
55137
+
55138
+ DATA BEGIN OF foo.
55139
+ INCLUDE STRUCTURE syst.
55140
+ DATA END OF foo.
55141
+
55142
+ STATICS BEGIN OF bar.
55143
+ INCLUDE STRUCTURE syst.
55136
55144
  STATICS END OF bar.`,
55137
- goodExample: `DATA BEGIN OF foo.
55138
- DATA field TYPE i.
55139
- INCLUDE STRUCTURE dselc.
55145
+ goodExample: `DATA BEGIN OF foo.
55146
+ DATA field TYPE i.
55147
+ INCLUDE STRUCTURE dselc.
55140
55148
  DATA END OF foo.`,
55141
55149
  };
55142
55150
  }
@@ -55226,9 +55234,9 @@ class CallTransactionAuthorityCheck extends _abap_rule_1.ABAPRule {
55226
55234
  extendedInformation: `https://docs.abapopenchecks.org/checks/54/`,
55227
55235
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
55228
55236
  badExample: `CALL TRANSACTION 'FOO'.`,
55229
- goodExample: `TRY.
55230
- CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
55231
- CATCH cx_sy_authorization_error.
55237
+ goodExample: `TRY.
55238
+ CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
55239
+ CATCH cx_sy_authorization_error.
55232
55240
  ENDTRY.`,
55233
55241
  };
55234
55242
  }
@@ -55293,10 +55301,10 @@ class CDSCommentStyle {
55293
55301
  key: "cds_comment_style",
55294
55302
  title: "CDS Comment Style",
55295
55303
  shortDescription: `Check for obsolete comment style`,
55296
- extendedInformation: `Check for obsolete comment style
55297
-
55298
- Comments starting with "--" are considered obsolete
55299
-
55304
+ extendedInformation: `Check for obsolete comment style
55305
+
55306
+ Comments starting with "--" are considered obsolete
55307
+
55300
55308
  https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abencds_general_syntax_rules.htm`,
55301
55309
  tags: [_irule_1.RuleTag.SingleFile],
55302
55310
  badExample: "-- this is a comment",
@@ -55362,10 +55370,10 @@ class CDSLegacyView {
55362
55370
  key: "cds_legacy_view",
55363
55371
  title: "CDS Legacy View",
55364
55372
  shortDescription: `Identify CDS Legacy Views`,
55365
- extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
55366
-
55367
- https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
55368
-
55373
+ extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
55374
+
55375
+ https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
55376
+
55369
55377
  v755 and up`,
55370
55378
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Upport],
55371
55379
  };
@@ -55520,10 +55528,10 @@ class ChainMainlyDeclarations extends _abap_rule_1.ABAPRule {
55520
55528
  key: "chain_mainly_declarations",
55521
55529
  title: "Chain mainly declarations",
55522
55530
  shortDescription: `Chain mainly declarations, allows chaining for the configured statements, reports errors for other statements.`,
55523
- extendedInformation: `
55524
- https://docs.abapopenchecks.org/checks/23/
55525
-
55526
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
55531
+ extendedInformation: `
55532
+ https://docs.abapopenchecks.org/checks/23/
55533
+
55534
+ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
55527
55535
  `,
55528
55536
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
55529
55537
  badExample: `CALL METHOD: bar.`,
@@ -55699,17 +55707,17 @@ class ChangeIfToCase extends _abap_rule_1.ABAPRule {
55699
55707
  title: "Change IF to CASE",
55700
55708
  shortDescription: `Finds IF constructs that can be changed to CASE`,
55701
55709
  // eslint-disable-next-line max-len
55702
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
55703
-
55710
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
55711
+
55704
55712
  If the first comparison is a boolean compare, no issue is reported.`,
55705
55713
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
55706
- badExample: `IF l_fcat-fieldname EQ 'FOO'.
55707
- ELSEIF l_fcat-fieldname = 'BAR'
55708
- OR l_fcat-fieldname = 'MOO'.
55714
+ badExample: `IF l_fcat-fieldname EQ 'FOO'.
55715
+ ELSEIF l_fcat-fieldname = 'BAR'
55716
+ OR l_fcat-fieldname = 'MOO'.
55709
55717
  ENDIF.`,
55710
- goodExample: `CASE l_fcat-fieldname.
55711
- WHEN 'FOO'.
55712
- WHEN 'BAR' OR 'MOO'.
55718
+ goodExample: `CASE l_fcat-fieldname.
55719
+ WHEN 'FOO'.
55720
+ WHEN 'BAR' OR 'MOO'.
55713
55721
  ENDCASE.`,
55714
55722
  };
55715
55723
  }
@@ -55846,8 +55854,8 @@ class CheckAbstract extends _abap_rule_1.ABAPRule {
55846
55854
  return {
55847
55855
  key: "check_abstract",
55848
55856
  title: "Check abstract methods and classes",
55849
- shortDescription: `Checks abstract methods and classes:
55850
- - class defined as abstract and final,
55857
+ shortDescription: `Checks abstract methods and classes:
55858
+ - class defined as abstract and final,
55851
55859
  - non-abstract class contains abstract methods`,
55852
55860
  extendedInformation: `If a class defines only constants, use an interface instead`,
55853
55861
  tags: [_irule_1.RuleTag.SingleFile],
@@ -55928,11 +55936,11 @@ class CheckComments extends _abap_rule_1.ABAPRule {
55928
55936
  return {
55929
55937
  key: "check_comments",
55930
55938
  title: "Check Comments",
55931
- shortDescription: `
55939
+ shortDescription: `
55932
55940
  Various checks for comment usage.`,
55933
- extendedInformation: `
55934
- Detects end of line comments. Comments starting with "#EC" or "##" are ignored
55935
-
55941
+ extendedInformation: `
55942
+ Detects end of line comments. Comments starting with "#EC" or "##" are ignored
55943
+
55936
55944
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#put-comments-before-the-statement-they-relate-to`,
55937
55945
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
55938
55946
  badExample: `WRITE 2. " descriptive comment`,
@@ -56094,9 +56102,9 @@ class CheckInclude {
56094
56102
  key: "check_include",
56095
56103
  title: "Check INCLUDEs",
56096
56104
  shortDescription: `Checks INCLUDE statements`,
56097
- extendedInformation: `
56098
- * Reports unused includes
56099
- * Errors if the includes are not found
56105
+ extendedInformation: `
56106
+ * Reports unused includes
56107
+ * Errors if the includes are not found
56100
56108
  * Error if including a main program`,
56101
56109
  tags: [_irule_1.RuleTag.Syntax],
56102
56110
  };
@@ -56172,14 +56180,14 @@ class CheckSubrc extends _abap_rule_1.ABAPRule {
56172
56180
  key: "check_subrc",
56173
56181
  title: "Check sy-subrc",
56174
56182
  shortDescription: `Check sy-subrc`,
56175
- extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
56176
-
56177
- If sy-dbcnt is checked after database statements, it is considered okay.
56178
-
56179
- "SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
56180
-
56181
- If IS ASSIGNED is checked after assigning, it is considered okay.
56182
-
56183
+ extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
56184
+
56185
+ If sy-dbcnt is checked after database statements, it is considered okay.
56186
+
56187
+ "SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
56188
+
56189
+ If IS ASSIGNED is checked after assigning, it is considered okay.
56190
+
56183
56191
  FIND statement with MATCH COUNT is considered okay if subrc is not checked`,
56184
56192
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
56185
56193
  pseudoComment: "EC CI_SUBRC",
@@ -56749,17 +56757,17 @@ class ClassicExceptionsOverlap extends _abap_rule_1.ABAPRule {
56749
56757
  shortDescription: `Find overlapping classic exceptions`,
56750
56758
  extendedInformation: `When debugging its typically good to know exactly which exception is caught`,
56751
56759
  tags: [_irule_1.RuleTag.SingleFile],
56752
- badExample: `CALL FUNCTION 'SOMETHING'
56753
- EXCEPTIONS
56754
- system_failure = 1 MESSAGE lv_message
56755
- communication_failure = 1 MESSAGE lv_message
56756
- resource_failure = 1
56760
+ badExample: `CALL FUNCTION 'SOMETHING'
56761
+ EXCEPTIONS
56762
+ system_failure = 1 MESSAGE lv_message
56763
+ communication_failure = 1 MESSAGE lv_message
56764
+ resource_failure = 1
56757
56765
  OTHERS = 1.`,
56758
- goodExample: `CALL FUNCTION 'SOMETHING'
56759
- EXCEPTIONS
56760
- system_failure = 1 MESSAGE lv_message
56761
- communication_failure = 2 MESSAGE lv_message
56762
- resource_failure = 3
56766
+ goodExample: `CALL FUNCTION 'SOMETHING'
56767
+ EXCEPTIONS
56768
+ system_failure = 1 MESSAGE lv_message
56769
+ communication_failure = 2 MESSAGE lv_message
56770
+ resource_failure = 3
56763
56771
  OTHERS = 4.`,
56764
56772
  };
56765
56773
  }
@@ -57005,7 +57013,7 @@ class CommentedCode extends _abap_rule_1.ABAPRule {
57005
57013
  key: "commented_code",
57006
57014
  title: "Find commented code",
57007
57015
  shortDescription: `Detects usage of commented out code.`,
57008
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it
57016
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it
57009
57017
  https://docs.abapopenchecks.org/checks/14/`,
57010
57018
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
57011
57019
  badExample: `* WRITE 'hello world'.`,
@@ -57238,10 +57246,10 @@ class ConstructorVisibilityPublic {
57238
57246
  key: "constructor_visibility_public",
57239
57247
  title: "Check constructor visibility is public",
57240
57248
  shortDescription: `Constructor must be placed in the public section, even if the class is not CREATE PUBLIC.`,
57241
- extendedInformation: `
57242
- This only applies to global classes.
57243
-
57244
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
57249
+ extendedInformation: `
57250
+ This only applies to global classes.
57251
+
57252
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
57245
57253
  https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abeninstance_constructor_guidl.htm`,
57246
57254
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
57247
57255
  };
@@ -57316,8 +57324,8 @@ class ContainsTab extends _abap_rule_1.ABAPRule {
57316
57324
  key: "contains_tab",
57317
57325
  title: "Code contains tab",
57318
57326
  shortDescription: `Checks for usage of tabs (enable to enforce spaces)`,
57319
- extendedInformation: `
57320
- https://docs.abapopenchecks.org/checks/09/
57327
+ extendedInformation: `
57328
+ https://docs.abapopenchecks.org/checks/09/
57321
57329
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
57322
57330
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
57323
57331
  badExample: `\tWRITE 'hello world'.`,
@@ -57404,10 +57412,10 @@ class CyclicOO {
57404
57412
  key: "cyclic_oo",
57405
57413
  title: "Cyclic OO",
57406
57414
  shortDescription: `Finds cyclic/circular OO references`,
57407
- extendedInformation: `Runs for global INTF + CLAS objects
57408
-
57409
- Objects must be without syntax errors for this rule to take effect
57410
-
57415
+ extendedInformation: `Runs for global INTF + CLAS objects
57416
+
57417
+ Objects must be without syntax errors for this rule to take effect
57418
+
57411
57419
  References in testclass includes are ignored`,
57412
57420
  };
57413
57421
  }
@@ -57650,7 +57658,7 @@ class DangerousStatement extends _abap_rule_1.ABAPRule {
57650
57658
  key: "dangerous_statement",
57651
57659
  title: "Dangerous statement",
57652
57660
  shortDescription: `Detects potentially dangerous statements`,
57653
- extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
57661
+ extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
57654
57662
  dynamic SQL can potentially create SQL injection problems`,
57655
57663
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
57656
57664
  };
@@ -57857,13 +57865,13 @@ class DefinitionsTop extends _abap_rule_1.ABAPRule {
57857
57865
  shortDescription: `Checks that definitions are placed at the beginning of METHODs, FORMs and FUNCTIONs.`,
57858
57866
  extendedInformation: `https://docs.abapopenchecks.org/checks/17/`,
57859
57867
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
57860
- badExample: `FROM foo.
57861
- WRITE 'hello'.
57862
- DATA int TYPE i.
57868
+ badExample: `FROM foo.
57869
+ WRITE 'hello'.
57870
+ DATA int TYPE i.
57863
57871
  ENDFORM.`,
57864
- goodExample: `FROM foo.
57865
- DATA int TYPE i.
57866
- WRITE 'hello'.
57872
+ goodExample: `FROM foo.
57873
+ DATA int TYPE i.
57874
+ WRITE 'hello'.
57867
57875
  ENDFORM.`,
57868
57876
  };
57869
57877
  }
@@ -58402,39 +58410,39 @@ class Downport {
58402
58410
  key: "downport",
58403
58411
  title: "Downport statement",
58404
58412
  shortDescription: `Downport functionality`,
58405
- extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with
58406
- a higher level language version. If successful, various rules are applied to downport the statement.
58407
- Target downport version is always v702, thus rule is only enabled if target version is v702.
58408
-
58409
- Current rules:
58410
- * NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/
58411
- * DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/
58412
- * FIELD-SYMBOL() definitions are outlined
58413
- * CONV is outlined
58414
- * COND is outlined
58415
- * REDUCE is outlined
58416
- * SWITCH is outlined
58417
- * FILTER is outlined
58418
- * APPEND expression is outlined
58419
- * INSERT expression is outlined
58420
- * EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/
58421
- * CAST changed to ?=
58422
- * LOOP AT method_call( ) is outlined
58423
- * VALUE # with structure fields
58424
- * VALUE # with internal table lines
58425
- * Table Expressions are outlined
58426
- * SELECT INTO @DATA definitions are outlined
58427
- * Some occurrences of string template formatting option ALPHA changed to function module call
58428
- * SELECT/INSERT/MODIFY/DELETE/UPDATE "," in field list removed, "@" in source/targets removed
58429
- * PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods
58430
- * RAISE EXCEPTION ... MESSAGE
58431
- * Moving with +=, -=, /=, *=, &&= is expanded
58432
- * line_exists and line_index is downported to READ TABLE
58433
- * ENUMs, but does not nessesarily give the correct type and value
58434
- * MESSAGE with non simple source
58435
-
58436
- Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.
58437
-
58413
+ extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with
58414
+ a higher level language version. If successful, various rules are applied to downport the statement.
58415
+ Target downport version is always v702, thus rule is only enabled if target version is v702.
58416
+
58417
+ Current rules:
58418
+ * NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/
58419
+ * DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/
58420
+ * FIELD-SYMBOL() definitions are outlined
58421
+ * CONV is outlined
58422
+ * COND is outlined
58423
+ * REDUCE is outlined
58424
+ * SWITCH is outlined
58425
+ * FILTER is outlined
58426
+ * APPEND expression is outlined
58427
+ * INSERT expression is outlined
58428
+ * EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/
58429
+ * CAST changed to ?=
58430
+ * LOOP AT method_call( ) is outlined
58431
+ * VALUE # with structure fields
58432
+ * VALUE # with internal table lines
58433
+ * Table Expressions are outlined
58434
+ * SELECT INTO @DATA definitions are outlined
58435
+ * Some occurrences of string template formatting option ALPHA changed to function module call
58436
+ * SELECT/INSERT/MODIFY/DELETE/UPDATE "," in field list removed, "@" in source/targets removed
58437
+ * PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods
58438
+ * RAISE EXCEPTION ... MESSAGE
58439
+ * Moving with +=, -=, /=, *=, &&= is expanded
58440
+ * line_exists and line_index is downported to READ TABLE
58441
+ * ENUMs, but does not nessesarily give the correct type and value
58442
+ * MESSAGE with non simple source
58443
+
58444
+ Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.
58445
+
58438
58446
  Make sure to test the downported code, it might not always be completely correct.`,
58439
58447
  tags: [_irule_1.RuleTag.Downport, _irule_1.RuleTag.Quickfix],
58440
58448
  };
@@ -59012,10 +59020,10 @@ Make sure to test the downported code, it might not always be completely correct
59012
59020
  const fieldName = f.concatTokens();
59013
59021
  fieldDefinition += indentation + " " + fieldName + " TYPE " + tableName + "-" + fieldName + ",\n";
59014
59022
  }
59015
- fieldDefinition = `DATA: BEGIN OF ${name},
59023
+ fieldDefinition = `DATA: BEGIN OF ${name},
59016
59024
  ${fieldDefinition}${indentation} END OF ${name}.`;
59017
59025
  }
59018
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
59026
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
59019
59027
  ${indentation}`);
59020
59028
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
59021
59029
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -59074,12 +59082,12 @@ ${indentation}`);
59074
59082
  }
59075
59083
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59076
59084
  const name = ((_g = inlineData.findFirstExpression(Expressions.TargetField)) === null || _g === void 0 ? void 0 : _g.concatTokens()) || "error";
59077
- let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
59078
- ${fieldDefinitions}${indentation} END OF ${uniqueName}.
59079
- ${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.
59085
+ let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
59086
+ ${fieldDefinitions}${indentation} END OF ${uniqueName}.
59087
+ ${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.
59080
59088
  ${indentation}`);
59081
59089
  if (fieldDefinitions === "") {
59082
- fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.
59090
+ fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.
59083
59091
  ${indentation}`);
59084
59092
  }
59085
59093
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
@@ -59147,7 +59155,7 @@ ${indentation}`);
59147
59155
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59148
59156
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
59149
59157
  const firstToken = high.getFirstToken();
59150
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
59158
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
59151
59159
  ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
59152
59160
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
59153
59161
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -59201,7 +59209,7 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
59201
59209
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59202
59210
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
59203
59211
  const firstToken = high.getFirstToken();
59204
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
59212
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
59205
59213
  ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
59206
59214
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
59207
59215
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -59243,14 +59251,14 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
59243
59251
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
59244
59252
  const firstToken = high.getFirstToken();
59245
59253
  // note that the tabix restore should be done before throwing the exception
59246
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.
59247
- ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
59248
- ${indentation}${tabixBackup} = sy-tabix.
59249
- ${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.
59250
- ${indentation}sy-tabix = ${tabixBackup}.
59251
- ${indentation}IF sy-subrc <> 0.
59252
- ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59253
- ${indentation}ENDIF.
59254
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.
59255
+ ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
59256
+ ${indentation}${tabixBackup} = sy-tabix.
59257
+ ${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.
59258
+ ${indentation}sy-tabix = ${tabixBackup}.
59259
+ ${indentation}IF sy-subrc <> 0.
59260
+ ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59261
+ ${indentation}ENDIF.
59254
59262
  ${indentation}`);
59255
59263
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, startToken.getStart(), tableExpression.getLastToken().getEnd(), uniqueName);
59256
59264
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -59307,7 +59315,7 @@ ${indentation}`);
59307
59315
  const className = classNames[0].concatTokens();
59308
59316
  const targetName = (_b = target.findFirstExpression(Expressions.TargetField)) === null || _b === void 0 ? void 0 : _b.concatTokens();
59309
59317
  const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
59310
- const code = ` DATA ${targetName} TYPE REF TO ${className}.
59318
+ const code = ` DATA ${targetName} TYPE REF TO ${className}.
59311
59319
  ${indentation}CATCH ${className} INTO ${targetName}.`;
59312
59320
  const fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getStart(), node.getEnd(), code);
59313
59321
  return issue_1.Issue.atToken(lowFile, node.getFirstToken(), "Outline DATA", this.getMetadata().key, this.conf.severity, fix);
@@ -59469,16 +59477,16 @@ ${indentation}CATCH ${className} INTO ${targetName}.`;
59469
59477
  const uniqueName1 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59470
59478
  const uniqueName2 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59471
59479
  const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
59472
- let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
59473
- ${indentation}${uniqueName1}-msgid = ${id}.
59480
+ let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
59481
+ ${indentation}${uniqueName1}-msgid = ${id}.
59474
59482
  ${indentation}${uniqueName1}-msgno = ${number}.\n`;
59475
59483
  if (withs.length > 0) {
59476
- abap += `${indentation}${uniqueName1}-attr1 = 'IF_T100_DYN_MSG~MSGV1'.
59477
- ${indentation}${uniqueName1}-attr2 = 'IF_T100_DYN_MSG~MSGV2'.
59478
- ${indentation}${uniqueName1}-attr3 = 'IF_T100_DYN_MSG~MSGV3'.
59484
+ abap += `${indentation}${uniqueName1}-attr1 = 'IF_T100_DYN_MSG~MSGV1'.
59485
+ ${indentation}${uniqueName1}-attr2 = 'IF_T100_DYN_MSG~MSGV2'.
59486
+ ${indentation}${uniqueName1}-attr3 = 'IF_T100_DYN_MSG~MSGV3'.
59479
59487
  ${indentation}${uniqueName1}-attr4 = 'IF_T100_DYN_MSG~MSGV4'.\n`;
59480
59488
  }
59481
- abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
59489
+ abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
59482
59490
  ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`;
59483
59491
  if (withs.length > 0) {
59484
59492
  abap += `${indentation}${uniqueName2}->if_t100_dyn_msg~msgty = 'E'.\n`;
@@ -59590,10 +59598,10 @@ ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`
59590
59598
  let code = "";
59591
59599
  if (sourceRef.findFirstExpression(Expressions.TableExpression)) {
59592
59600
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59593
- code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).
59594
- IF sy-subrc <> 0.
59595
- RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59596
- ENDIF.
59601
+ code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).
59602
+ IF sy-subrc <> 0.
59603
+ RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59604
+ ENDIF.
59597
59605
  GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
59598
59606
  }
59599
59607
  else {
@@ -59682,20 +59690,20 @@ GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
59682
59690
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59683
59691
  const uniqueFS = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59684
59692
  const uniqueNameIndex = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59685
- code += ` items LIKE ${loopSourceName},
59686
- END OF ${groupTargetName}type.
59687
- DATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.
59688
- DATA ${uniqueName} LIKE LINE OF ${groupTargetName}tab.
59693
+ code += ` items LIKE ${loopSourceName},
59694
+ END OF ${groupTargetName}type.
59695
+ DATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.
59696
+ DATA ${uniqueName} LIKE LINE OF ${groupTargetName}tab.
59689
59697
  LOOP AT ${loopSourceName} ${(_l = high.findFirstExpression(Expressions.LoopTarget)) === null || _l === void 0 ? void 0 : _l.concatTokens()}.\n`;
59690
59698
  if (groupIndexName !== undefined) {
59691
59699
  code += `DATA(${uniqueNameIndex}) = sy-tabix.\n`;
59692
59700
  }
59693
- code += `READ TABLE ${groupTargetName}tab ASSIGNING FIELD-SYMBOL(<${uniqueFS}>) WITH KEY ${condition}.
59701
+ code += `READ TABLE ${groupTargetName}tab ASSIGNING FIELD-SYMBOL(<${uniqueFS}>) WITH KEY ${condition}.
59694
59702
  IF sy-subrc = 0.\n`;
59695
59703
  if (groupCountName !== undefined) {
59696
59704
  code += ` <${uniqueFS}>-${groupCountName} = <${uniqueFS}>-${groupCountName} + 1.\n`;
59697
59705
  }
59698
- code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
59706
+ code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
59699
59707
  ELSE.\n`;
59700
59708
  code += ` CLEAR ${uniqueName}.\n`;
59701
59709
  for (const c of group.findAllExpressions(Expressions.LoopGroupByComponent)) {
@@ -59716,8 +59724,8 @@ ELSE.\n`;
59716
59724
  }
59717
59725
  code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE ${uniqueName}-items.\n`;
59718
59726
  code += ` INSERT ${uniqueName} INTO TABLE ${groupTargetName}tab.\n`;
59719
- code += `ENDIF.
59720
- ENDLOOP.
59727
+ code += `ENDIF.
59728
+ ENDLOOP.
59721
59729
  LOOP AT ${groupTargetName}tab ${groupTarget}.`;
59722
59730
  let fix = edit_helper_1.EditHelper.replaceRange(lowFile, high.getFirstToken().getStart(), high.getLastToken().getEnd(), code);
59723
59731
  for (const l of ((_m = highFile.getStructure()) === null || _m === void 0 ? void 0 : _m.findAllStructures(Structures.Loop)) || []) {
@@ -59889,7 +59897,7 @@ LOOP AT ${groupTargetName}tab ${groupTarget}.`;
59889
59897
  const enumName = (_b = high.findExpressionAfterToken("ENUM")) === null || _b === void 0 ? void 0 : _b.concatTokens();
59890
59898
  const structureName = (_c = high.findExpressionAfterToken("STRUCTURE")) === null || _c === void 0 ? void 0 : _c.concatTokens();
59891
59899
  // all ENUMS are char like?
59892
- let code = `TYPES ${enumName} TYPE string.
59900
+ let code = `TYPES ${enumName} TYPE string.
59893
59901
  CONSTANTS: BEGIN OF ${structureName},\n`;
59894
59902
  let count = 1;
59895
59903
  for (const e of enumStructure.findDirectStatements(Statements.TypeEnum).concat(enumStructure.findDirectStatements(Statements.Type))) {
@@ -59933,14 +59941,14 @@ CONSTANTS: BEGIN OF ${structureName},\n`;
59933
59941
  const tabixBackup = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59934
59942
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
59935
59943
  // restore tabix before exeption
59936
- const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.
59937
- ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
59938
- ${indentation}${tabixBackup} = sy-tabix.
59939
- ${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.
59940
- ${indentation}sy-tabix = ${tabixBackup}.
59941
- ${indentation}IF sy-subrc <> 0.
59942
- ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59943
- ${indentation}ENDIF.
59944
+ const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.
59945
+ ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
59946
+ ${indentation}${tabixBackup} = sy-tabix.
59947
+ ${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.
59948
+ ${indentation}sy-tabix = ${tabixBackup}.
59949
+ ${indentation}IF sy-subrc <> 0.
59950
+ ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59951
+ ${indentation}ENDIF.
59944
59952
  ${indentation}${uniqueName}`;
59945
59953
  const start = target.getFirstToken().getStart();
59946
59954
  const end = (_a = tableExpression.findDirectTokenByText("]")) === null || _a === void 0 ? void 0 : _a.getEnd();
@@ -60020,11 +60028,11 @@ ${indentation}${uniqueName}`;
60020
60028
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
60021
60029
  const source = (_b = child.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens();
60022
60030
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
60023
- const code = `DATA ${uniqueName} TYPE string.
60024
- ${indentation}CALL FUNCTION '${functionName}'
60025
- ${indentation} EXPORTING
60026
- ${indentation} input = ${source}
60027
- ${indentation} IMPORTING
60031
+ const code = `DATA ${uniqueName} TYPE string.
60032
+ ${indentation}CALL FUNCTION '${functionName}'
60033
+ ${indentation} EXPORTING
60034
+ ${indentation} input = ${source}
60035
+ ${indentation} IMPORTING
60028
60036
  ${indentation} output = ${uniqueName}.\n`;
60029
60037
  const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), code);
60030
60038
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, child.getFirstToken().getStart(), child.getLastToken().getEnd(), uniqueName);
@@ -61336,12 +61344,12 @@ class EasyToFindMessages {
61336
61344
  key: "easy_to_find_messages",
61337
61345
  title: "Easy to find messages",
61338
61346
  shortDescription: `Make messages easy to find`,
61339
- extendedInformation: `All messages must be statically referenced exactly once
61340
-
61341
- Only MESSAGE and RAISE statments are counted as static references
61342
-
61343
- Also see rule "message_exists"
61344
-
61347
+ extendedInformation: `All messages must be statically referenced exactly once
61348
+
61349
+ Only MESSAGE and RAISE statments are counted as static references
61350
+
61351
+ Also see rule "message_exists"
61352
+
61345
61353
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#make-messages-easy-to-find`,
61346
61354
  tags: [_irule_1.RuleTag.Styleguide],
61347
61355
  };
@@ -61422,13 +61430,13 @@ class EmptyEvent extends _abap_rule_1.ABAPRule {
61422
61430
  shortDescription: `Empty selection screen or list processing event block`,
61423
61431
  extendedInformation: ``,
61424
61432
  tags: [_irule_1.RuleTag.SingleFile],
61425
- badExample: `
61426
- INITIALIZATION.
61427
- WRITE 'hello'.
61433
+ badExample: `
61434
+ INITIALIZATION.
61435
+ WRITE 'hello'.
61428
61436
  END-OF-SELECTION.`,
61429
- goodExample: `
61430
- START-OF-SELECTION.
61431
- PERFORM sdf.
61437
+ goodExample: `
61438
+ START-OF-SELECTION.
61439
+ PERFORM sdf.
61432
61440
  COMMIT WORK.`,
61433
61441
  };
61434
61442
  }
@@ -61520,8 +61528,8 @@ class EmptyLineinStatement extends _abap_rule_1.ABAPRule {
61520
61528
  key: "empty_line_in_statement",
61521
61529
  title: "Find empty lines in statements",
61522
61530
  shortDescription: `Checks that statements do not contain empty lines.`,
61523
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
61524
-
61531
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
61532
+
61525
61533
  https://docs.abapopenchecks.org/checks/41/`,
61526
61534
  tags: [_irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
61527
61535
  badExample: `WRITE\n\nhello.`,
@@ -61697,13 +61705,13 @@ class EmptyStructure extends _abap_rule_1.ABAPRule {
61697
61705
  shortDescription: `Checks that the code does not contain empty blocks.`,
61698
61706
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-empty-if-branches`,
61699
61707
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
61700
- badExample: `IF foo = bar.
61701
- ENDIF.
61702
-
61703
- DO 2 TIMES.
61708
+ badExample: `IF foo = bar.
61709
+ ENDIF.
61710
+
61711
+ DO 2 TIMES.
61704
61712
  ENDDO.`,
61705
- goodExample: `LOOP AT itab WHERE qty = 0 OR date > sy-datum.
61706
- ENDLOOP.
61713
+ goodExample: `LOOP AT itab WHERE qty = 0 OR date > sy-datum.
61714
+ ENDLOOP.
61707
61715
  result = xsdbool( sy-subrc = 0 ).`,
61708
61716
  };
61709
61717
  }
@@ -61845,10 +61853,10 @@ class ExitOrCheck extends _abap_rule_1.ABAPRule {
61845
61853
  return {
61846
61854
  key: "exit_or_check",
61847
61855
  title: "Find EXIT or CHECK outside loops",
61848
- shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
61856
+ shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
61849
61857
  Use RETURN to leave procesing blocks instead.`,
61850
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
61851
- https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
61858
+ extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
61859
+ https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
61852
61860
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#check-vs-return`,
61853
61861
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
61854
61862
  };
@@ -61931,12 +61939,12 @@ class ExpandMacros extends _abap_rule_1.ABAPRule {
61931
61939
  key: "expand_macros",
61932
61940
  title: "Expand Macros",
61933
61941
  shortDescription: `Allows expanding macro calls with quick fixes`,
61934
- extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
61935
-
61942
+ extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
61943
+
61936
61944
  Note that macros/DEFINE cannot be used in the ABAP Cloud programming model`,
61937
- badExample: `DEFINE _hello.
61938
- WRITE 'hello'.
61939
- END-OF-DEFINITION.
61945
+ badExample: `DEFINE _hello.
61946
+ WRITE 'hello'.
61947
+ END-OF-DEFINITION.
61940
61948
  _hello.`,
61941
61949
  goodExample: `WRITE 'hello'.`,
61942
61950
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
@@ -62023,7 +62031,7 @@ class Exporting extends _abap_rule_1.ABAPRule {
62023
62031
  shortDescription: `Detects EXPORTING statements which can be omitted.`,
62024
62032
  badExample: `call_method( EXPORTING foo = bar ).`,
62025
62033
  goodExample: `call_method( foo = bar ).`,
62026
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-optional-keyword-exporting
62034
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-optional-keyword-exporting
62027
62035
  https://docs.abapopenchecks.org/checks/30/`,
62028
62036
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
62029
62037
  };
@@ -62121,7 +62129,7 @@ class ForbiddenIdentifier extends _abap_rule_1.ABAPRule {
62121
62129
  key: "forbidden_identifier",
62122
62130
  title: "Forbidden Identifier",
62123
62131
  shortDescription: `Forbid use of specified identifiers, list of regex.`,
62124
- extendedInformation: `Used in the transpiler to find javascript keywords in ABAP identifiers,
62132
+ extendedInformation: `Used in the transpiler to find javascript keywords in ABAP identifiers,
62125
62133
  https://github.com/abaplint/transpiler/blob/bda94b8b56e2b7f2f87be2168f12361aa530220e/packages/transpiler/src/validation.ts#L44`,
62126
62134
  tags: [_irule_1.RuleTag.SingleFile],
62127
62135
  };
@@ -62363,8 +62371,8 @@ class ForbiddenVoidType {
62363
62371
  key: "forbidden_void_type",
62364
62372
  title: "Forbidden Void Types",
62365
62373
  shortDescription: `Avoid usage of specified void types.`,
62366
- extendedInformation: `Inspiration:
62367
- BOOLEAN, BOOLE_D, CHAR01, CHAR1, CHAR10, CHAR12, CHAR128, CHAR2, CHAR20, CHAR4, CHAR70,
62374
+ extendedInformation: `Inspiration:
62375
+ BOOLEAN, BOOLE_D, CHAR01, CHAR1, CHAR10, CHAR12, CHAR128, CHAR2, CHAR20, CHAR4, CHAR70,
62368
62376
  DATS, TIMS, DATUM, FLAG, INT4, NUMC3, NUMC4, SAP_BOOL, TEXT25, TEXT80, X255, XFELD`,
62369
62377
  };
62370
62378
  }
@@ -62607,9 +62615,9 @@ class FullyTypeITabs extends _abap_rule_1.ABAPRule {
62607
62615
  key: "fully_type_itabs",
62608
62616
  title: "Fully type internal tables",
62609
62617
  shortDescription: `No implict table types or table keys`,
62610
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-the-right-table-type
62618
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-the-right-table-type
62611
62619
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key`,
62612
- badExample: `DATA lt_foo TYPE TABLE OF ty.
62620
+ badExample: `DATA lt_foo TYPE TABLE OF ty.
62613
62621
  DATA lt_bar TYPE STANDARD TABLE OF ty.`,
62614
62622
  goodExample: `DATA lt_foo TYPE STANDARD TABLE OF ty WITH EMPTY KEY.`,
62615
62623
  tags: [_irule_1.RuleTag.SingleFile],
@@ -62794,26 +62802,26 @@ class FunctionalWriting extends _abap_rule_1.ABAPRule {
62794
62802
  key: "functional_writing",
62795
62803
  title: "Use functional writing",
62796
62804
  shortDescription: `Detects usage of call method when functional style calls can be used.`,
62797
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-calls
62805
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-calls
62798
62806
  https://docs.abapopenchecks.org/checks/07/`,
62799
62807
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
62800
- badExample: `CALL METHOD zcl_class=>method( ).
62801
- CALL METHOD cl_abap_typedescr=>describe_by_name
62802
- EXPORTING
62803
- p_name = 'NAME'
62804
- RECEIVING
62805
- p_descr_ref = lr_typedescr
62806
- EXCEPTIONS
62807
- type_not_found = 1
62808
+ badExample: `CALL METHOD zcl_class=>method( ).
62809
+ CALL METHOD cl_abap_typedescr=>describe_by_name
62810
+ EXPORTING
62811
+ p_name = 'NAME'
62812
+ RECEIVING
62813
+ p_descr_ref = lr_typedescr
62814
+ EXCEPTIONS
62815
+ type_not_found = 1
62808
62816
  OTHERS = 2.`,
62809
- goodExample: `zcl_class=>method( ).
62810
- cl_abap_typedescr=>describe_by_name(
62811
- EXPORTING
62812
- p_name = 'NAME'
62813
- RECEIVING
62814
- p_descr_ref = lr_typedescr
62815
- EXCEPTIONS
62816
- type_not_found = 1
62817
+ goodExample: `zcl_class=>method( ).
62818
+ cl_abap_typedescr=>describe_by_name(
62819
+ EXPORTING
62820
+ p_name = 'NAME'
62821
+ RECEIVING
62822
+ p_descr_ref = lr_typedescr
62823
+ EXCEPTIONS
62824
+ type_not_found = 1
62817
62825
  OTHERS = 2 ).`,
62818
62826
  };
62819
62827
  }
@@ -62924,14 +62932,14 @@ class GlobalClass extends _abap_rule_1.ABAPRule {
62924
62932
  key: "global_class",
62925
62933
  title: "Global class checks",
62926
62934
  shortDescription: `Checks related to global classes`,
62927
- extendedInformation: `* global classes must be in own files
62928
-
62929
- * file names must match class name
62930
-
62931
- * file names must match interface name
62932
-
62933
- * global classes must be global definitions
62934
-
62935
+ extendedInformation: `* global classes must be in own files
62936
+
62937
+ * file names must match class name
62938
+
62939
+ * file names must match interface name
62940
+
62941
+ * global classes must be global definitions
62942
+
62935
62943
  * global interfaces must be global definitions`,
62936
62944
  tags: [_irule_1.RuleTag.Syntax],
62937
62945
  };
@@ -63030,21 +63038,21 @@ class IdenticalConditions extends _abap_rule_1.ABAPRule {
63030
63038
  return {
63031
63039
  key: "identical_conditions",
63032
63040
  title: "Identical conditions",
63033
- shortDescription: `Find identical conditions in IF + CASE + WHILE etc
63034
-
63041
+ shortDescription: `Find identical conditions in IF + CASE + WHILE etc
63042
+
63035
63043
  Prerequsites: code is pretty printed with identical cAsE`,
63036
63044
  tags: [_irule_1.RuleTag.SingleFile],
63037
- badExample: `IF foo = bar OR 1 = a OR foo = bar.
63038
- ENDIF.
63039
- CASE bar.
63040
- WHEN '1'.
63041
- WHEN 'A' OR '1'.
63045
+ badExample: `IF foo = bar OR 1 = a OR foo = bar.
63046
+ ENDIF.
63047
+ CASE bar.
63048
+ WHEN '1'.
63049
+ WHEN 'A' OR '1'.
63042
63050
  ENDCASE.`,
63043
- goodExample: `IF foo = bar OR 1 = a.
63044
- ENDIF.
63045
- CASE bar.
63046
- WHEN '1'.
63047
- WHEN 'A'.
63051
+ goodExample: `IF foo = bar OR 1 = a.
63052
+ ENDIF.
63053
+ CASE bar.
63054
+ WHEN '1'.
63055
+ WHEN 'A'.
63048
63056
  ENDCASE.`,
63049
63057
  };
63050
63058
  }
@@ -63178,23 +63186,23 @@ class IdenticalContents extends _abap_rule_1.ABAPRule {
63178
63186
  key: "identical_contents",
63179
63187
  title: "Identical contents",
63180
63188
  shortDescription: `Find identical contents in blocks inside IFs, both in the beginning and in the end.`,
63181
- extendedInformation: `
63182
- Prerequsites: code is pretty printed with identical cAsE
63183
-
63189
+ extendedInformation: `
63190
+ Prerequsites: code is pretty printed with identical cAsE
63191
+
63184
63192
  Chained statments are ignored`,
63185
63193
  tags: [_irule_1.RuleTag.SingleFile],
63186
- badExample: `IF foo = bar.
63187
- WRITE 'bar'.
63188
- WRITE 'world'.
63189
- ELSE.
63190
- WRITE 'foo'.
63191
- WRITE 'world'.
63194
+ badExample: `IF foo = bar.
63195
+ WRITE 'bar'.
63196
+ WRITE 'world'.
63197
+ ELSE.
63198
+ WRITE 'foo'.
63199
+ WRITE 'world'.
63192
63200
  ENDIF.`,
63193
- goodExample: `IF foo = bar.
63194
- WRITE 'bar'.
63195
- ELSE.
63196
- WRITE 'foo'.
63197
- ENDIF.
63201
+ goodExample: `IF foo = bar.
63202
+ WRITE 'bar'.
63203
+ ELSE.
63204
+ WRITE 'foo'.
63205
+ ENDIF.
63198
63206
  WRITE 'world'.`,
63199
63207
  };
63200
63208
  }
@@ -63302,12 +63310,12 @@ class IdenticalDescriptions {
63302
63310
  key: "identical_descriptions",
63303
63311
  title: "Identical descriptions",
63304
63312
  shortDescription: `Searches for objects with the same type and same description`,
63305
- extendedInformation: `Case insensitive
63306
-
63307
- Only checks the master language descriptions
63308
-
63309
- Dependencies are skipped
63310
-
63313
+ extendedInformation: `Case insensitive
63314
+
63315
+ Only checks the master language descriptions
63316
+
63317
+ Dependencies are skipped
63318
+
63311
63319
  Works for: INTF, CLAS, DOMA, DTEL, FUNC in same FUGR`,
63312
63320
  tags: [],
63313
63321
  };
@@ -63481,43 +63489,43 @@ class IfInIf extends _abap_rule_1.ABAPRule {
63481
63489
  key: "if_in_if",
63482
63490
  title: "IF in IF",
63483
63491
  shortDescription: `Detects nested ifs which can be refactored.`,
63484
- extendedInformation: `
63485
- Directly nested IFs without ELSE can be refactored to a single condition using AND.
63486
-
63487
- ELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.
63488
-
63489
- https://docs.abapopenchecks.org/checks/01/
63492
+ extendedInformation: `
63493
+ Directly nested IFs without ELSE can be refactored to a single condition using AND.
63494
+
63495
+ ELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.
63496
+
63497
+ https://docs.abapopenchecks.org/checks/01/
63490
63498
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low`,
63491
- badExample: `IF condition1.
63492
- IF condition2.
63493
- ...
63494
- ENDIF.
63495
- ENDIF.
63496
-
63497
- IF condition1.
63498
- ...
63499
- ELSE.
63500
- IF condition2.
63501
- ...
63502
- ENDIF.
63499
+ badExample: `IF condition1.
63500
+ IF condition2.
63501
+ ...
63502
+ ENDIF.
63503
+ ENDIF.
63504
+
63505
+ IF condition1.
63506
+ ...
63507
+ ELSE.
63508
+ IF condition2.
63509
+ ...
63510
+ ENDIF.
63503
63511
  ENDIF.`,
63504
- goodExample: `IF ( condition1 ) AND ( condition2 ).
63505
- ...
63506
- ENDIF.
63507
-
63508
- IF condition1.
63509
- ...
63510
- ELSEIF condition2.
63511
- ...
63512
- ENDIF.
63513
-
63514
- CASE variable.
63515
- WHEN value1.
63516
- ...
63517
- WHEN value2.
63518
- IF condition2.
63519
- ...
63520
- ENDIF.
63512
+ goodExample: `IF ( condition1 ) AND ( condition2 ).
63513
+ ...
63514
+ ENDIF.
63515
+
63516
+ IF condition1.
63517
+ ...
63518
+ ELSEIF condition2.
63519
+ ...
63520
+ ENDIF.
63521
+
63522
+ CASE variable.
63523
+ WHEN value1.
63524
+ ...
63525
+ WHEN value2.
63526
+ IF condition2.
63527
+ ...
63528
+ ENDIF.
63521
63529
  ENDCASE.`,
63522
63530
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
63523
63531
  };
@@ -63702,9 +63710,9 @@ class ImplementMethods extends _abap_rule_1.ABAPRule {
63702
63710
  for (const i of ((_a = file.getStructure()) === null || _a === void 0 ? void 0 : _a.findAllStatements(Statements.ClassImplementation)) || []) {
63703
63711
  const name = (_b = i.findFirstExpression(Expressions.ClassName)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr().toUpperCase();
63704
63712
  if (name === impl.identifier.getName().toUpperCase()) {
63705
- return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
63706
- METHOD ${methodName.toLowerCase()}.
63707
- RETURN. " todo, implement method
63713
+ return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
63714
+ METHOD ${methodName.toLowerCase()}.
63715
+ RETURN. " todo, implement method
63708
63716
  ENDMETHOD.`);
63709
63717
  }
63710
63718
  }
@@ -63883,14 +63891,14 @@ class ImplicitStartOfSelection extends _abap_rule_1.ABAPRule {
63883
63891
  key: "implicit_start_of_selection",
63884
63892
  title: "Implicit START-OF-SELECTION",
63885
63893
  shortDescription: `Add explicit selection screen event handling`,
63886
- extendedInformation: `Only runs for executable programs
63887
-
63894
+ extendedInformation: `Only runs for executable programs
63895
+
63888
63896
  https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapstart-of-selection.htm`,
63889
63897
  tags: [_irule_1.RuleTag.SingleFile],
63890
- badExample: `REPORT zfoo.
63898
+ badExample: `REPORT zfoo.
63891
63899
  WRITE 'hello'.`,
63892
- goodExample: `
63893
- START-OF-SELECTION.
63900
+ goodExample: `
63901
+ START-OF-SELECTION.
63894
63902
  WRITE 'hello'.`,
63895
63903
  };
63896
63904
  }
@@ -63995,19 +64003,19 @@ class InStatementIndentation extends _abap_rule_1.ABAPRule {
63995
64003
  key: "in_statement_indentation",
63996
64004
  title: "In-statement indentation",
63997
64005
  shortDescription: "Checks alignment within statements which span multiple lines.",
63998
- extendedInformation: `Lines following the first line should be indented once (2 spaces).
63999
-
64000
- For block declaration statements, lines after the first should be indented an additional time (default: +2 spaces)
64006
+ extendedInformation: `Lines following the first line should be indented once (2 spaces).
64007
+
64008
+ For block declaration statements, lines after the first should be indented an additional time (default: +2 spaces)
64001
64009
  to distinguish them better from code within the block.`,
64002
- badExample: `IF 1 = 1
64003
- AND 2 = 2.
64004
- WRITE 'hello' &&
64005
- 'world'.
64010
+ badExample: `IF 1 = 1
64011
+ AND 2 = 2.
64012
+ WRITE 'hello' &&
64013
+ 'world'.
64006
64014
  ENDIF.`,
64007
- goodExample: `IF 1 = 1
64008
- AND 2 = 2.
64009
- WRITE 'hello' &&
64010
- 'world'.
64015
+ goodExample: `IF 1 = 1
64016
+ AND 2 = 2.
64017
+ WRITE 'hello' &&
64018
+ 'world'.
64011
64019
  ENDIF.`,
64012
64020
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
64013
64021
  };
@@ -64130,23 +64138,23 @@ class Indentation extends _abap_rule_1.ABAPRule {
64130
64138
  title: "Indentation",
64131
64139
  shortDescription: `Checks indentation`,
64132
64140
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
64133
- badExample: `CLASS lcl DEFINITION.
64134
- PRIVATE SECTION.
64135
- METHODS constructor.
64136
- ENDCLASS.
64137
-
64138
- CLASS lcl IMPLEMENTATION.
64139
- METHOD constructor.
64140
- ENDMETHOD.
64141
+ badExample: `CLASS lcl DEFINITION.
64142
+ PRIVATE SECTION.
64143
+ METHODS constructor.
64144
+ ENDCLASS.
64145
+
64146
+ CLASS lcl IMPLEMENTATION.
64147
+ METHOD constructor.
64148
+ ENDMETHOD.
64141
64149
  ENDCLASS.`,
64142
- goodExample: `CLASS lcl DEFINITION.
64143
- PRIVATE SECTION.
64144
- METHODS constructor.
64145
- ENDCLASS.
64146
-
64147
- CLASS lcl IMPLEMENTATION.
64148
- METHOD constructor.
64149
- ENDMETHOD.
64150
+ goodExample: `CLASS lcl DEFINITION.
64151
+ PRIVATE SECTION.
64152
+ METHODS constructor.
64153
+ ENDCLASS.
64154
+
64155
+ CLASS lcl IMPLEMENTATION.
64156
+ METHOD constructor.
64157
+ ENDMETHOD.
64150
64158
  ENDCLASS.`,
64151
64159
  };
64152
64160
  }
@@ -64547,9 +64555,9 @@ class IntfReferencingClas {
64547
64555
  key: "intf_referencing_clas",
64548
64556
  title: "INTF referencing CLAS",
64549
64557
  shortDescription: `Interface contains references to class`,
64550
- extendedInformation: `Only global interfaces are checked.
64551
- Only first level references are checked.
64552
- Exception class references are ignored.
64558
+ extendedInformation: `Only global interfaces are checked.
64559
+ Only first level references are checked.
64560
+ Exception class references are ignored.
64553
64561
  Void references are ignored.`,
64554
64562
  };
64555
64563
  }
@@ -64634,9 +64642,9 @@ class InvalidTableIndex extends _abap_rule_1.ABAPRule {
64634
64642
  title: "Invalid Table Index",
64635
64643
  shortDescription: `Issues error for constant table index zero, as ABAP starts from 1`,
64636
64644
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
64637
- badExample: `DATA(first) = table[ 0 ].
64645
+ badExample: `DATA(first) = table[ 0 ].
64638
64646
  READ TABLE gt_stack ASSIGNING <ls_stack> INDEX 0.`,
64639
- goodExample: `DATA(first) = table[ 1 ].
64647
+ goodExample: `DATA(first) = table[ 1 ].
64640
64648
  READ TABLE gt_stack ASSIGNING <ls_stack> INDEX 1.`,
64641
64649
  };
64642
64650
  }
@@ -65237,8 +65245,8 @@ class LineBreakStyle {
65237
65245
  return {
65238
65246
  key: "line_break_style",
65239
65247
  title: "Makes sure line breaks are consistent in the ABAP code",
65240
- shortDescription: `Enforces LF as newlines in ABAP files
65241
-
65248
+ shortDescription: `Enforces LF as newlines in ABAP files
65249
+
65242
65250
  abapGit does not work with CRLF`,
65243
65251
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
65244
65252
  };
@@ -65307,7 +65315,7 @@ class LineLength extends _abap_rule_1.ABAPRule {
65307
65315
  key: "line_length",
65308
65316
  title: "Line length",
65309
65317
  shortDescription: `Detects lines exceeding the provided maximum length.`,
65310
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length
65318
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length
65311
65319
  https://docs.abapopenchecks.org/checks/04/`,
65312
65320
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
65313
65321
  };
@@ -65378,7 +65386,7 @@ class LineOnlyPunc extends _abap_rule_1.ABAPRule {
65378
65386
  key: "line_only_punc",
65379
65387
  title: "Line containing only punctuation",
65380
65388
  shortDescription: `Detects lines containing only punctuation.`,
65381
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#close-brackets-at-line-end
65389
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#close-brackets-at-line-end
65382
65390
  https://docs.abapopenchecks.org/checks/16/`,
65383
65391
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
65384
65392
  badExample: "zcl_class=>method(\n).",
@@ -65641,15 +65649,15 @@ class LocalVariableNames extends _abap_rule_1.ABAPRule {
65641
65649
  return {
65642
65650
  key: "local_variable_names",
65643
65651
  title: "Local variable naming conventions",
65644
- shortDescription: `
65645
- Allows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols.
65652
+ shortDescription: `
65653
+ Allows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols.
65646
65654
  Regexes are case-insensitive.`,
65647
65655
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
65648
- badExample: `FORM bar.
65649
- DATA foo.
65656
+ badExample: `FORM bar.
65657
+ DATA foo.
65650
65658
  ENDFORM.`,
65651
- goodExample: `FORM bar.
65652
- DATA lv_foo.
65659
+ goodExample: `FORM bar.
65660
+ DATA lv_foo.
65653
65661
  ENDFORM.`,
65654
65662
  };
65655
65663
  }
@@ -65801,9 +65809,9 @@ class MacroNaming extends _abap_rule_1.ABAPRule {
65801
65809
  shortDescription: `Allows you to enforce a pattern for macro definitions`,
65802
65810
  extendedInformation: `Use rule "avoid_use" to avoid macros altogether.`,
65803
65811
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
65804
- badExample: `DEFINE something.
65812
+ badExample: `DEFINE something.
65805
65813
  END-OF-DEFINITION.`,
65806
- goodExample: `DEFINE _something.
65814
+ goodExample: `DEFINE _something.
65807
65815
  END-OF-DEFINITION.`,
65808
65816
  };
65809
65817
  }
@@ -65876,10 +65884,10 @@ class MainFileContents {
65876
65884
  key: "main_file_contents",
65877
65885
  title: "Main file contents",
65878
65886
  shortDescription: `Checks related to report declarations.`,
65879
- extendedInformation: `Does not run if the target version is Cloud
65880
-
65881
- * PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
65882
- * TYPEs must begin with "TYPE-POOL <name>."
65887
+ extendedInformation: `Does not run if the target version is Cloud
65888
+
65889
+ * PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
65890
+ * TYPEs must begin with "TYPE-POOL <name>."
65883
65891
  `,
65884
65892
  };
65885
65893
  }
@@ -65995,17 +66003,17 @@ class ManyParentheses extends _abap_rule_1.ABAPRule {
65995
66003
  title: "Too many parentheses",
65996
66004
  shortDescription: `Searches for expressions where extra parentheses can safely be removed`,
65997
66005
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
65998
- badExample: `
65999
- IF ( destination IS INITIAL ).
66000
- ENDIF.
66001
- IF foo = boo AND ( bar = lar AND moo = loo ).
66002
- ENDIF.
66006
+ badExample: `
66007
+ IF ( destination IS INITIAL ).
66008
+ ENDIF.
66009
+ IF foo = boo AND ( bar = lar AND moo = loo ).
66010
+ ENDIF.
66003
66011
  `,
66004
- goodExample: `
66005
- IF destination IS INITIAL.
66006
- ENDIF.
66007
- IF foo = boo AND bar = lar AND moo = loo.
66008
- ENDIF.
66012
+ goodExample: `
66013
+ IF destination IS INITIAL.
66014
+ ENDIF.
66015
+ IF foo = boo AND bar = lar AND moo = loo.
66016
+ ENDIF.
66009
66017
  `,
66010
66018
  };
66011
66019
  }
@@ -66179,14 +66187,14 @@ class MaxOneMethodParameterPerLine extends _abap_rule_1.ABAPRule {
66179
66187
  title: "Max one method parameter definition per line",
66180
66188
  shortDescription: `Keep max one method parameter description per line`,
66181
66189
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace],
66182
- badExample: `
66183
- METHODS apps_scope_token
66184
- IMPORTING
66190
+ badExample: `
66191
+ METHODS apps_scope_token
66192
+ IMPORTING
66185
66193
  body TYPE bodyapps_scope_token client_id TYPE str.`,
66186
- goodExample: `
66187
- METHODS apps_scope_token
66188
- IMPORTING
66189
- body TYPE bodyapps_scope_token
66194
+ goodExample: `
66195
+ METHODS apps_scope_token
66196
+ IMPORTING
66197
+ body TYPE bodyapps_scope_token
66190
66198
  client_id TYPE str.`,
66191
66199
  };
66192
66200
  }
@@ -66251,11 +66259,11 @@ class MaxOneStatement extends _abap_rule_1.ABAPRule {
66251
66259
  key: "max_one_statement",
66252
66260
  title: "Max one statement per line",
66253
66261
  shortDescription: `Checks that each line contains only a single statement.`,
66254
- extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
66255
-
66256
- Does not report anything for chained statements.
66257
-
66258
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line
66262
+ extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
66263
+
66264
+ Does not report anything for chained statements.
66265
+
66266
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line
66259
66267
  https://docs.abapopenchecks.org/checks/11/`,
66260
66268
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
66261
66269
  badExample: `WRITE foo. WRITE bar.`,
@@ -66593,8 +66601,8 @@ class MethodLength {
66593
66601
  key: "method_length",
66594
66602
  title: "Method/Form Length",
66595
66603
  shortDescription: `Checks relating to method/form length.`,
66596
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
66597
-
66604
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
66605
+
66598
66606
  Abstract methods without statements are considered okay.`,
66599
66607
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
66600
66608
  };
@@ -66699,20 +66707,20 @@ class MethodOverwritesBuiltIn extends _abap_rule_1.ABAPRule {
66699
66707
  key: "method_overwrites_builtin",
66700
66708
  title: "Method name overwrites builtin function",
66701
66709
  shortDescription: `Checks Method names that overwrite builtin SAP functions`,
66702
- extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
66703
-
66704
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
66705
-
66710
+ extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
66711
+
66712
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
66713
+
66706
66714
  Interface method names are ignored`,
66707
66715
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
66708
- badExample: `CLASS lcl DEFINITION.
66709
- PUBLIC SECTION.
66710
- METHODS matches.
66711
- ENDCLASS.
66712
-
66713
- CLASS lcl IMPLEMENTATION.
66714
- METHOD matches.
66715
- ENDMETHOD.
66716
+ badExample: `CLASS lcl DEFINITION.
66717
+ PUBLIC SECTION.
66718
+ METHODS matches.
66719
+ ENDCLASS.
66720
+
66721
+ CLASS lcl IMPLEMENTATION.
66722
+ METHOD matches.
66723
+ ENDMETHOD.
66716
66724
  ENDCLASS.`,
66717
66725
  };
66718
66726
  }
@@ -66903,12 +66911,12 @@ class MixReturning extends _abap_rule_1.ABAPRule {
66903
66911
  // eslint-disable-next-line max-len
66904
66912
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-either-returning-or-exporting-or-changing-but-not-a-combination`,
66905
66913
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
66906
- badExample: `CLASS lcl DEFINITION.
66907
- PUBLIC SECTION.
66908
- METHODS
66909
- foobar
66910
- EXPORTING foo TYPE i
66911
- RETURNING VALUE(rv_string) TYPE string.
66914
+ badExample: `CLASS lcl DEFINITION.
66915
+ PUBLIC SECTION.
66916
+ METHODS
66917
+ foobar
66918
+ EXPORTING foo TYPE i
66919
+ RETURNING VALUE(rv_string) TYPE string.
66912
66920
  ENDCLASS.`,
66913
66921
  };
66914
66922
  }
@@ -67288,7 +67296,7 @@ class Nesting extends _abap_rule_1.ABAPRule {
67288
67296
  key: "nesting",
67289
67297
  title: "Check nesting depth",
67290
67298
  shortDescription: `Checks for methods exceeding a maximum nesting depth`,
67291
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low
67299
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low
67292
67300
  https://docs.abapopenchecks.org/checks/74/`,
67293
67301
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
67294
67302
  };
@@ -67531,7 +67539,7 @@ class NoChainedAssignment extends _abap_rule_1.ABAPRule {
67531
67539
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-chain-assignments`,
67532
67540
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
67533
67541
  badExample: `var1 = var2 = var3.`,
67534
- goodExample: `var2 = var3.
67542
+ goodExample: `var2 = var3.
67535
67543
  var1 = var2.`,
67536
67544
  };
67537
67545
  }
@@ -67590,8 +67598,8 @@ class NoExternalFormCalls extends _abap_rule_1.ABAPRule {
67590
67598
  key: "no_external_form_calls",
67591
67599
  title: "No external FORM calls",
67592
67600
  shortDescription: `Detect external form calls`,
67593
- badExample: `PERFORM foo IN PROGRAM bar.
67594
-
67601
+ badExample: `PERFORM foo IN PROGRAM bar.
67602
+
67595
67603
  PERFORM foo(bar).`,
67596
67604
  tags: [_irule_1.RuleTag.SingleFile],
67597
67605
  };
@@ -67652,17 +67660,17 @@ class NoInlineInOptionalBranches extends _abap_rule_1.ABAPRule {
67652
67660
  key: "no_inline_in_optional_branches",
67653
67661
  title: "Don't declare inline in optional branches",
67654
67662
  shortDescription: `Don't declare inline in optional branches`,
67655
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
67656
-
67657
- Considered optional branches:
67658
- * inside IF/ELSEIF/ELSE
67659
- * inside LOOP
67660
- * inside WHILE
67661
- * inside CASE/WHEN, CASE TYPE OF
67662
- * inside DO
67663
- * inside SELECT loops
67664
-
67665
- Not considered optional branches:
67663
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
67664
+
67665
+ Considered optional branches:
67666
+ * inside IF/ELSEIF/ELSE
67667
+ * inside LOOP
67668
+ * inside WHILE
67669
+ * inside CASE/WHEN, CASE TYPE OF
67670
+ * inside DO
67671
+ * inside SELECT loops
67672
+
67673
+ Not considered optional branches:
67666
67674
  * TRY/CATCH/CLEANUP`,
67667
67675
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
67668
67676
  };
@@ -67762,12 +67770,12 @@ class NoPrefixes extends _abap_rule_1.ABAPRule {
67762
67770
  key: "no_prefixes",
67763
67771
  title: "No Prefixes",
67764
67772
  shortDescription: `Dont use hungarian notation`,
67765
- extendedInformation: `
67766
- Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
67767
- allowing all types to become voided, abaplint will then provide less precise syntax errors.
67768
-
67769
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
67770
-
67773
+ extendedInformation: `
67774
+ Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
67775
+ allowing all types to become voided, abaplint will then provide less precise syntax errors.
67776
+
67777
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
67778
+
67771
67779
  https://github.com/SAP/styleguides/blob/main/clean-abap/sub-sections/AvoidEncodings.md`,
67772
67780
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
67773
67781
  badExample: `DATA lv_foo TYPE i.`,
@@ -67946,7 +67954,7 @@ class NoPublicAttributes extends _abap_rule_1.ABAPRule {
67946
67954
  return {
67947
67955
  key: "no_public_attributes",
67948
67956
  title: "No public attributes",
67949
- shortDescription: `Checks that classes and interfaces don't contain any public attributes.
67957
+ shortDescription: `Checks that classes and interfaces don't contain any public attributes.
67950
67958
  Exceptions are excluded from this rule.`,
67951
67959
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#members-private-by-default-protected-only-if-needed`,
67952
67960
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
@@ -68047,13 +68055,13 @@ class NoYodaConditions extends _abap_rule_1.ABAPRule {
68047
68055
  key: "no_yoda_conditions",
68048
68056
  title: "No Yoda conditions",
68049
68057
  shortDescription: `Finds Yoda conditions and reports issues`,
68050
- extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
68051
-
68058
+ extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
68059
+
68052
68060
  Conditions with operators CP, NP, CS, NS, CA, NA, CO, CN are ignored`,
68053
68061
  tags: [_irule_1.RuleTag.SingleFile],
68054
- badExample: `IF 0 <> sy-subrc.
68062
+ badExample: `IF 0 <> sy-subrc.
68055
68063
  ENDIF.`,
68056
- goodExample: `IF sy-subrc <> 0.
68064
+ goodExample: `IF sy-subrc <> 0.
68057
68065
  ENDIF.`,
68058
68066
  };
68059
68067
  }
@@ -68154,8 +68162,8 @@ class NROBConsistency {
68154
68162
  key: "nrob_consistency",
68155
68163
  title: "Number range consistency",
68156
68164
  shortDescription: `Consistency checks for number ranges`,
68157
- extendedInformation: `Issue reported if percentage warning is over 50%
68158
-
68165
+ extendedInformation: `Issue reported if percentage warning is over 50%
68166
+
68159
68167
  Issue reported if the referenced domain is not found(taking error namespace into account)`,
68160
68168
  tags: [_irule_1.RuleTag.SingleFile],
68161
68169
  };
@@ -68432,58 +68440,58 @@ class ObsoleteStatement extends _abap_rule_1.ABAPRule {
68432
68440
  title: "Obsolete statements",
68433
68441
  shortDescription: `Checks for usages of certain obsolete statements`,
68434
68442
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
68435
- extendedInformation: `
68436
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
68437
-
68438
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
68439
-
68440
- SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
68441
-
68442
- IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
68443
-
68444
- WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
68445
-
68446
- FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
68447
-
68448
- TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
68449
-
68450
- LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
68451
-
68452
- COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
68453
-
68454
- OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
68455
-
68456
- PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
68457
-
68458
- RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
68459
-
68460
- PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
68461
-
68462
- MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
68463
-
68464
- SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
68465
- SELECT COUNT(*) is considered okay
68466
-
68467
- FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
68468
-
68469
- SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
68470
-
68471
- CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
68472
-
68473
- POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
68474
-
68475
- OCCURENCES: check for OCCURENCES vs OCCURRENCES
68476
-
68443
+ extendedInformation: `
68444
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
68445
+
68446
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
68447
+
68448
+ SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
68449
+
68450
+ IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
68451
+
68452
+ WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
68453
+
68454
+ FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
68455
+
68456
+ TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
68457
+
68458
+ LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
68459
+
68460
+ COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
68461
+
68462
+ OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
68463
+
68464
+ PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
68465
+
68466
+ RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
68467
+
68468
+ PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
68469
+
68470
+ MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
68471
+
68472
+ SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
68473
+ SELECT COUNT(*) is considered okay
68474
+
68475
+ FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
68476
+
68477
+ SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
68478
+
68479
+ CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
68480
+
68481
+ POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
68482
+
68483
+ OCCURENCES: check for OCCURENCES vs OCCURRENCES
68484
+
68477
68485
  CLIENT SPECIFIED, from 754: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abapselect_client_obsolete.htm`,
68478
- badExample: `REFRESH itab.
68479
-
68480
- COMPUTE foo = 2 + 2.
68481
-
68482
- MULTIPLY lv_foo BY 2.
68483
-
68484
- INTERFACE intf LOAD.
68485
-
68486
- IF foo IS SUPPLIED.
68486
+ badExample: `REFRESH itab.
68487
+
68488
+ COMPUTE foo = 2 + 2.
68489
+
68490
+ MULTIPLY lv_foo BY 2.
68491
+
68492
+ INTERFACE intf LOAD.
68493
+
68494
+ IF foo IS SUPPLIED.
68487
68495
  ENDIF.`,
68488
68496
  };
68489
68497
  }
@@ -68823,9 +68831,9 @@ class OmitParameterName {
68823
68831
  key: "omit_parameter_name",
68824
68832
  title: "Omit parameter name",
68825
68833
  shortDescription: `Omit the parameter name in single parameter calls`,
68826
- extendedInformation: `
68827
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
68828
-
68834
+ extendedInformation: `
68835
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
68836
+
68829
68837
  EXPORTING must already be omitted for this rule to take effect, https://rules.abaplint.org/exporting/`,
68830
68838
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
68831
68839
  badExample: `method( param = 2 ).`,
@@ -69031,20 +69039,20 @@ class OmitReceiving extends _abap_rule_1.ABAPRule {
69031
69039
  shortDescription: `Omit RECEIVING`,
69032
69040
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-receiving`,
69033
69041
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
69034
- badExample: `
69035
- upload_pack(
69036
- EXPORTING
69037
- io_client = lo_client
69038
- iv_url = iv_url
69039
- iv_deepen_level = iv_deepen_level
69040
- it_hashes = lt_hashes
69041
- RECEIVING
69042
+ badExample: `
69043
+ upload_pack(
69044
+ EXPORTING
69045
+ io_client = lo_client
69046
+ iv_url = iv_url
69047
+ iv_deepen_level = iv_deepen_level
69048
+ it_hashes = lt_hashes
69049
+ RECEIVING
69042
69050
  rt_objects = et_objects ).`,
69043
- goodExample: `
69044
- et_objects = upload_pack(
69045
- io_client = lo_client
69046
- iv_url = iv_url
69047
- iv_deepen_level = iv_deepen_level
69051
+ goodExample: `
69052
+ et_objects = upload_pack(
69053
+ io_client = lo_client
69054
+ iv_url = iv_url
69055
+ iv_deepen_level = iv_deepen_level
69048
69056
  it_hashes = lt_hashes ).`,
69049
69057
  };
69050
69058
  }
@@ -69108,8 +69116,8 @@ class Parser702Chaining extends _abap_rule_1.ABAPRule {
69108
69116
  return {
69109
69117
  key: "parser_702_chaining",
69110
69118
  title: "Parser Error, bad chanining on 702",
69111
- shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
69112
- this rule finds these and reports errors.
69119
+ shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
69120
+ this rule finds these and reports errors.
69113
69121
  Only active on target version 702 and below.`,
69114
69122
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
69115
69123
  };
@@ -69189,8 +69197,8 @@ class ParserError {
69189
69197
  return {
69190
69198
  key: "parser_error",
69191
69199
  title: "Parser error",
69192
- shortDescription: `Checks for syntax not recognized by abaplint.
69193
-
69200
+ shortDescription: `Checks for syntax not recognized by abaplint.
69201
+
69194
69202
  See recognized syntax at https://syntax.abaplint.org`,
69195
69203
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
69196
69204
  };
@@ -69275,7 +69283,7 @@ class ParserMissingSpace extends _abap_rule_1.ABAPRule {
69275
69283
  return {
69276
69284
  key: "parser_missing_space",
69277
69285
  title: "Parser Error, missing space",
69278
- shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.
69286
+ shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.
69279
69287
  This rule makes sure the spaces are consistently required across the language.`,
69280
69288
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
69281
69289
  badExample: `IF ( foo = 'bar').`,
@@ -69698,25 +69706,25 @@ class PreferInline {
69698
69706
  key: "prefer_inline",
69699
69707
  title: "Prefer Inline Declarations",
69700
69708
  shortDescription: `Prefer inline to up-front declarations.`,
69701
- extendedInformation: `EXPERIMENTAL
69702
-
69703
- Activates if language version is v740sp02 or above.
69704
-
69705
- Variables must be local(METHOD or FORM).
69706
-
69707
- No generic or void typed variables. No syntax errors.
69708
-
69709
- First position used must be a full/pure write.
69710
-
69711
- Move statment is not a cast(?=)
69712
-
69709
+ extendedInformation: `EXPERIMENTAL
69710
+
69711
+ Activates if language version is v740sp02 or above.
69712
+
69713
+ Variables must be local(METHOD or FORM).
69714
+
69715
+ No generic or void typed variables. No syntax errors.
69716
+
69717
+ First position used must be a full/pure write.
69718
+
69719
+ Move statment is not a cast(?=)
69720
+
69713
69721
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-inline-to-up-front-declarations`,
69714
69722
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Experimental, _irule_1.RuleTag.Quickfix],
69715
- badExample: `DATA foo TYPE i.
69716
- foo = 2.
69717
- DATA percentage TYPE decfloat34.
69723
+ badExample: `DATA foo TYPE i.
69724
+ foo = 2.
69725
+ DATA percentage TYPE decfloat34.
69718
69726
  percentage = ( comment_number / abs_statement_number ) * 100.`,
69719
- goodExample: `DATA(foo) = 2.
69727
+ goodExample: `DATA(foo) = 2.
69720
69728
  DATA(percentage) = CONV decfloat34( comment_number / abs_statement_number ) * 100.`,
69721
69729
  };
69722
69730
  }
@@ -69930,18 +69938,18 @@ class PreferIsNot extends _abap_rule_1.ABAPRule {
69930
69938
  key: "prefer_is_not",
69931
69939
  title: "Prefer IS NOT to NOT IS",
69932
69940
  shortDescription: `Prefer IS NOT to NOT IS`,
69933
- extendedInformation: `
69934
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
69935
-
69941
+ extendedInformation: `
69942
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
69943
+
69936
69944
  "if not is_valid( )." examples are skipped`,
69937
69945
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
69938
- goodExample: `IF variable IS NOT INITIAL.
69939
- IF variable NP 'TODO*'.
69940
- IF variable <> 42.
69946
+ goodExample: `IF variable IS NOT INITIAL.
69947
+ IF variable NP 'TODO*'.
69948
+ IF variable <> 42.
69941
69949
  IF variable CO 'hello'.`,
69942
- badExample: `IF NOT variable IS INITIAL.
69943
- IF NOT variable CP 'TODO*'.
69944
- IF NOT variable = 42.
69950
+ badExample: `IF NOT variable IS INITIAL.
69951
+ IF NOT variable CP 'TODO*'.
69952
+ IF NOT variable = 42.
69945
69953
  IF NOT variable CA 'hello'.`,
69946
69954
  };
69947
69955
  }
@@ -70129,14 +70137,14 @@ class PreferRaiseExceptionNew extends _abap_rule_1.ABAPRule {
70129
70137
  key: "prefer_raise_exception_new",
70130
70138
  title: "Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE",
70131
70139
  shortDescription: `Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE`,
70132
- extendedInformation: `
70133
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
70134
-
70140
+ extendedInformation: `
70141
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
70142
+
70135
70143
  From 752 and up`,
70136
70144
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
70137
70145
  goodExample: `RAISE EXCEPTION NEW cx_generation_error( previous = exception ).`,
70138
- badExample: `RAISE EXCEPTION TYPE cx_generation_error
70139
- EXPORTING
70146
+ badExample: `RAISE EXCEPTION TYPE cx_generation_error
70147
+ EXPORTING
70140
70148
  previous = exception.`,
70141
70149
  };
70142
70150
  }
@@ -70214,12 +70222,12 @@ class PreferReturningToExporting extends _abap_rule_1.ABAPRule {
70214
70222
  key: "prefer_returning_to_exporting",
70215
70223
  title: "Prefer RETURNING to EXPORTING",
70216
70224
  shortDescription: `Prefer RETURNING to EXPORTING. Generic types cannot be RETURNING.`,
70217
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting
70225
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting
70218
70226
  https://docs.abapopenchecks.org/checks/44/`,
70219
70227
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
70220
- badExample: `CLASS lcl DEFINITION.
70221
- PUBLIC SECTION.
70222
- METHODS test EXPORTING ev_foo TYPE i.
70228
+ badExample: `CLASS lcl DEFINITION.
70229
+ PUBLIC SECTION.
70230
+ METHODS test EXPORTING ev_foo TYPE i.
70223
70231
  ENDCLASS.`,
70224
70232
  };
70225
70233
  }
@@ -70315,8 +70323,8 @@ class PreferXsdbool extends _abap_rule_1.ABAPRule {
70315
70323
  key: "prefer_xsdbool",
70316
70324
  title: "Prefer xsdbool over boolc",
70317
70325
  shortDescription: `Prefer xsdbool over boolc`,
70318
- extendedInformation: `Activates if language version is v740sp08 or above.
70319
-
70326
+ extendedInformation: `Activates if language version is v740sp08 or above.
70327
+
70320
70328
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
70321
70329
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
70322
70330
  badExample: `DATA(sdf) = boolc( 1 = 2 ).`,
@@ -70388,9 +70396,9 @@ class PreferredCompareOperator extends _abap_rule_1.ABAPRule {
70388
70396
  title: "Preferred compare operator",
70389
70397
  shortDescription: `Configure undesired operator variants`,
70390
70398
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
70391
- badExample: `IF foo EQ bar.
70399
+ badExample: `IF foo EQ bar.
70392
70400
  ENDIF.`,
70393
- goodExample: `IF foo = bar.
70401
+ goodExample: `IF foo = bar.
70394
70402
  ENDIF.`,
70395
70403
  };
70396
70404
  }
@@ -70614,26 +70622,26 @@ class ReduceProceduralCode extends _abap_rule_1.ABAPRule {
70614
70622
  key: "reduce_procedural_code",
70615
70623
  title: "Reduce procedural code",
70616
70624
  shortDescription: `Checks FORM and FUNCTION-MODULE have few statements`,
70617
- extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
70618
-
70619
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
70620
-
70625
+ extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
70626
+
70627
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
70628
+
70621
70629
  Comments are not counted as statements.`,
70622
70630
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
70623
- badExample: `FORM foo.
70624
- DATA lv_bar TYPE i.
70625
- lv_bar = 2 + 2.
70626
- IF lv_bar = 4.
70627
- WRITE 'hello world'.
70628
- ENDIF.
70629
- DATA lv_bar TYPE i.
70630
- lv_bar = 2 + 2.
70631
- IF lv_bar = 4.
70632
- WRITE 'hello world'.
70633
- ENDIF.
70631
+ badExample: `FORM foo.
70632
+ DATA lv_bar TYPE i.
70633
+ lv_bar = 2 + 2.
70634
+ IF lv_bar = 4.
70635
+ WRITE 'hello world'.
70636
+ ENDIF.
70637
+ DATA lv_bar TYPE i.
70638
+ lv_bar = 2 + 2.
70639
+ IF lv_bar = 4.
70640
+ WRITE 'hello world'.
70641
+ ENDIF.
70634
70642
  ENDFORM.`,
70635
- goodExample: `FORM foo.
70636
- NEW zcl_global_class( )->run_logic( ).
70643
+ goodExample: `FORM foo.
70644
+ NEW zcl_global_class( )->run_logic( ).
70637
70645
  ENDFORM.`,
70638
70646
  };
70639
70647
  }
@@ -70877,10 +70885,10 @@ class RemoveDescriptions {
70877
70885
  return {
70878
70886
  key: "remove_descriptions",
70879
70887
  title: "Remove descriptions",
70880
- shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
70881
-
70882
- Class descriptions are required, see rule description_empty.
70883
-
70888
+ shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
70889
+
70890
+ Class descriptions are required, see rule description_empty.
70891
+
70884
70892
  Consider using ABAP Doc for documentation.`,
70885
70893
  tags: [],
70886
70894
  };
@@ -71005,14 +71013,14 @@ class RFCErrorHandling extends _abap_rule_1.ABAPRule {
71005
71013
  tags: [_irule_1.RuleTag.SingleFile],
71006
71014
  shortDescription: `Checks that exceptions 'system_failure' and 'communication_failure' are handled in RFC calls`,
71007
71015
  extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenrfc_exception.htm`,
71008
- badExample: `CALL FUNCTION 'ZRFC'
71016
+ badExample: `CALL FUNCTION 'ZRFC'
71009
71017
  DESTINATION lv_rfc.`,
71010
- goodExample: `CALL FUNCTION 'ZRFC'
71011
- DESTINATION lv_rfc
71012
- EXCEPTIONS
71013
- system_failure = 1 MESSAGE msg
71014
- communication_failure = 2 MESSAGE msg
71015
- resource_failure = 3
71018
+ goodExample: `CALL FUNCTION 'ZRFC'
71019
+ DESTINATION lv_rfc
71020
+ EXCEPTIONS
71021
+ system_failure = 1 MESSAGE msg
71022
+ communication_failure = 2 MESSAGE msg
71023
+ resource_failure = 3
71016
71024
  OTHERS = 4.`,
71017
71025
  };
71018
71026
  }
@@ -71096,11 +71104,11 @@ class SelectAddOrderBy {
71096
71104
  key: "select_add_order_by",
71097
71105
  title: "SELECT add ORDER BY",
71098
71106
  shortDescription: `SELECTs add ORDER BY clause`,
71099
- extendedInformation: `
71100
- This will make sure that the SELECT statement returns results in the same sequence on different databases
71101
-
71102
- add ORDER BY PRIMARY KEY if in doubt
71103
-
71107
+ extendedInformation: `
71108
+ This will make sure that the SELECT statement returns results in the same sequence on different databases
71109
+
71110
+ add ORDER BY PRIMARY KEY if in doubt
71111
+
71104
71112
  If the target is a sorted/hashed table, no issue is reported`,
71105
71113
  tags: [_irule_1.RuleTag.SingleFile],
71106
71114
  badExample: `SELECT * FROM db INTO TABLE @DATA(tab).`,
@@ -71231,14 +71239,14 @@ class SelectPerformance {
71231
71239
  key: "select_performance",
71232
71240
  title: "SELECT performance",
71233
71241
  shortDescription: `Various checks regarding SELECT performance.`,
71234
- extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
71235
-
71242
+ extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
71243
+
71236
71244
  SELECT *: not reported if using INTO/APPENDING CORRESPONDING FIELDS OF`,
71237
71245
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Performance],
71238
- badExample: `SELECT field1, field2 FROM table
71239
- INTO @DATA(structure) UP TO 1 ROWS ORDER BY field3 DESCENDING.
71246
+ badExample: `SELECT field1, field2 FROM table
71247
+ INTO @DATA(structure) UP TO 1 ROWS ORDER BY field3 DESCENDING.
71240
71248
  ENDSELECT.`,
71241
- goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
71249
+ goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
71242
71250
  INTO TABLE @DATA(table) ORDER BY field3 DESCENDING`,
71243
71251
  };
71244
71252
  }
@@ -71352,8 +71360,8 @@ class SelectSingleFullKey {
71352
71360
  key: "select_single_full_key",
71353
71361
  title: "Detect SELECT SINGLE which are possibily not unique",
71354
71362
  shortDescription: `Detect SELECT SINGLE which are possibily not unique`,
71355
- extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
71356
-
71363
+ extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
71364
+
71357
71365
  If the statement contains a JOIN it is not checked`,
71358
71366
  pseudoComment: "EC CI_NOORDER",
71359
71367
  tags: [_irule_1.RuleTag.Quickfix],
@@ -71781,8 +71789,8 @@ class SICFConsistency {
71781
71789
  key: "sicf_consistency",
71782
71790
  title: "SICF consistency",
71783
71791
  shortDescription: `Checks the validity of ICF services`,
71784
- extendedInformation: `* Class defined in handler must exist
71785
- * Class must not have any syntax errors
71792
+ extendedInformation: `* Class defined in handler must exist
71793
+ * Class must not have any syntax errors
71786
71794
  * Class must implement interface IF_HTTP_EXTENSION`,
71787
71795
  };
71788
71796
  }
@@ -71894,23 +71902,23 @@ class SlowParameterPassing {
71894
71902
  shortDescription: `Detects slow pass by value passing for methods where parameter is not changed`,
71895
71903
  extendedInformation: `Method parameters defined in interfaces is not checked`,
71896
71904
  tags: [_irule_1.RuleTag.Performance],
71897
- badExample: `CLASS lcl DEFINITION.
71898
- PUBLIC SECTION.
71899
- METHODS bar IMPORTING VALUE(sdf) TYPE string.
71900
- ENDCLASS.
71901
- CLASS lcl IMPLEMENTATION.
71902
- METHOD bar.
71903
- WRITE sdf.
71904
- ENDMETHOD.
71905
+ badExample: `CLASS lcl DEFINITION.
71906
+ PUBLIC SECTION.
71907
+ METHODS bar IMPORTING VALUE(sdf) TYPE string.
71908
+ ENDCLASS.
71909
+ CLASS lcl IMPLEMENTATION.
71910
+ METHOD bar.
71911
+ WRITE sdf.
71912
+ ENDMETHOD.
71905
71913
  ENDCLASS.`,
71906
- goodExample: `CLASS lcl DEFINITION.
71907
- PUBLIC SECTION.
71908
- METHODS bar IMPORTING sdf TYPE string.
71909
- ENDCLASS.
71910
- CLASS lcl IMPLEMENTATION.
71911
- METHOD bar.
71912
- WRITE sdf.
71913
- ENDMETHOD.
71914
+ goodExample: `CLASS lcl DEFINITION.
71915
+ PUBLIC SECTION.
71916
+ METHODS bar IMPORTING sdf TYPE string.
71917
+ ENDCLASS.
71918
+ CLASS lcl IMPLEMENTATION.
71919
+ METHOD bar.
71920
+ WRITE sdf.
71921
+ ENDMETHOD.
71914
71922
  ENDCLASS.`,
71915
71923
  };
71916
71924
  }
@@ -72167,8 +72175,8 @@ class SpaceBeforeDot extends _abap_rule_1.ABAPRule {
72167
72175
  key: "space_before_dot",
72168
72176
  title: "Space before dot",
72169
72177
  shortDescription: `Checks for extra spaces before dots at the ends of statements`,
72170
- extendedInformation: `
72171
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
72178
+ extendedInformation: `
72179
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
72172
72180
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#condense-your-code`,
72173
72181
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
72174
72182
  badExample: `WRITE bar .`,
@@ -72354,12 +72362,12 @@ class SQLValueConversion {
72354
72362
  key: "sql_value_conversion",
72355
72363
  title: "Implicit SQL Value Conversion",
72356
72364
  shortDescription: `Ensure types match when selecting from database`,
72357
- extendedInformation: `
72358
- * Integer to CHAR conversion
72359
- * Integer to NUMC conversion
72360
- * NUMC to Integer conversion
72361
- * CHAR to Integer conversion
72362
- * Source field longer than database field, CHAR -> CHAR
72365
+ extendedInformation: `
72366
+ * Integer to CHAR conversion
72367
+ * Integer to NUMC conversion
72368
+ * NUMC to Integer conversion
72369
+ * CHAR to Integer conversion
72370
+ * Source field longer than database field, CHAR -> CHAR
72363
72371
  * Source field longer than database field, NUMC -> NUMC`,
72364
72372
  tags: [],
72365
72373
  };
@@ -72431,7 +72439,7 @@ class StartAtTab extends _abap_rule_1.ABAPRule {
72431
72439
  key: "start_at_tab",
72432
72440
  title: "Start at tab",
72433
72441
  shortDescription: `Checks that statements start at tabstops.`,
72434
- extendedInformation: `Reports max 100 issues per file
72442
+ extendedInformation: `Reports max 100 issues per file
72435
72443
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
72436
72444
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
72437
72445
  badExample: ` WRITE a.`,
@@ -72608,12 +72616,12 @@ class StrictSQL extends _abap_rule_1.ABAPRule {
72608
72616
  key: "strict_sql",
72609
72617
  title: "Strict SQL",
72610
72618
  shortDescription: `Strict SQL`,
72611
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
72612
-
72613
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
72614
-
72615
- Also see separate rule sql_escape_host_variables
72616
-
72619
+ extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
72620
+
72621
+ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
72622
+
72623
+ Also see separate rule sql_escape_host_variables
72624
+
72617
72625
  Activates from v750 and up`,
72618
72626
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix],
72619
72627
  badExample: `SELECT * FROM ztabl INTO TABLE @rt_content WHERE type = @iv_type ORDER BY PRIMARY KEY.`,
@@ -72867,11 +72875,11 @@ class SyModification extends _abap_rule_1.ABAPRule {
72867
72875
  key: "sy_modification",
72868
72876
  title: "Modification of SY fields",
72869
72877
  shortDescription: `Finds modification of sy fields`,
72870
- extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
72871
-
72878
+ extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
72879
+
72872
72880
  Changes to SY-TVAR* fields are not reported`,
72873
72881
  tags: [_irule_1.RuleTag.SingleFile],
72874
- badExample: `sy-uname = 2.
72882
+ badExample: `sy-uname = 2.
72875
72883
  sy = sy.`,
72876
72884
  };
72877
72885
  }
@@ -72933,8 +72941,8 @@ class TABLEnhancementCategory {
72933
72941
  key: "tabl_enhancement_category",
72934
72942
  title: "TABL enhancement category must be set",
72935
72943
  shortDescription: `Checks that tables do not have the enhancement category 'not classified'.`,
72936
- extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
72937
-
72944
+ extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
72945
+
72938
72946
  You may use standard report RS_DDIC_CLASSIFICATION_FINAL for adjustment.`,
72939
72947
  tags: [],
72940
72948
  };
@@ -72999,8 +73007,8 @@ class TablesDeclaredLocally extends _abap_rule_1.ABAPRule {
72999
73007
  shortDescription: `TABLES are always global, so declare them globally`,
73000
73008
  extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abaptables.htm`,
73001
73009
  tags: [_irule_1.RuleTag.SingleFile],
73002
- badExample: `FORM foo.
73003
- TABLES t100.
73010
+ badExample: `FORM foo.
73011
+ TABLES t100.
73004
73012
  ENDFORM.`,
73005
73013
  goodExample: `TABLES t000.`,
73006
73014
  };
@@ -73128,9 +73136,9 @@ class TypeFormParameters extends _abap_rule_1.ABAPRule {
73128
73136
  title: "Type FORM parameters",
73129
73137
  shortDescription: `Checks for untyped FORM parameters`,
73130
73138
  tags: [_irule_1.RuleTag.SingleFile],
73131
- badExample: `FORM foo USING bar.
73139
+ badExample: `FORM foo USING bar.
73132
73140
  ENDFORM.`,
73133
- goodExample: `FORM foo USING bar TYPE string.
73141
+ goodExample: `FORM foo USING bar TYPE string.
73134
73142
  ENDFORM.`,
73135
73143
  };
73136
73144
  }
@@ -73803,38 +73811,38 @@ class UnnecessaryPragma extends _abap_rule_1.ABAPRule {
73803
73811
  key: "unnecessary_pragma",
73804
73812
  title: "Unnecessary Pragma",
73805
73813
  shortDescription: `Finds pragmas which can be removed`,
73806
- extendedInformation: `* NO_HANDLER with handler
73807
-
73808
- * NEEDED without definition
73809
-
73810
- * NO_TEXT without texts
73811
-
73812
- * SUBRC_OK where sy-subrc is checked
73813
-
73814
+ extendedInformation: `* NO_HANDLER with handler
73815
+
73816
+ * NEEDED without definition
73817
+
73818
+ * NO_TEXT without texts
73819
+
73820
+ * SUBRC_OK where sy-subrc is checked
73821
+
73814
73822
  NO_HANDLER inside macros are not checked`,
73815
73823
  tags: [_irule_1.RuleTag.SingleFile],
73816
- badExample: `TRY.
73817
- ...
73818
- CATCH zcx_abapgit_exception ##NO_HANDLER.
73819
- RETURN. " it has a handler
73820
- ENDTRY.
73821
- MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
73822
- SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
73823
- IF sy-subrc <> 0.
73824
+ badExample: `TRY.
73825
+ ...
73826
+ CATCH zcx_abapgit_exception ##NO_HANDLER.
73827
+ RETURN. " it has a handler
73828
+ ENDTRY.
73829
+ MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
73830
+ SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
73831
+ IF sy-subrc <> 0.
73824
73832
  ENDIF.`,
73825
- goodExample: `TRY.
73826
- ...
73827
- CATCH zcx_abapgit_exception.
73828
- RETURN.
73829
- ENDTRY.
73830
- MESSAGE w125(zbar) WITH c_foo INTO message.
73831
- SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
73832
- IF sy-subrc <> 0.
73833
- ENDIF.
73834
-
73835
- DATA: BEGIN OF blah ##NEEDED,
73836
- test1 TYPE string,
73837
- test2 TYPE string,
73833
+ goodExample: `TRY.
73834
+ ...
73835
+ CATCH zcx_abapgit_exception.
73836
+ RETURN.
73837
+ ENDTRY.
73838
+ MESSAGE w125(zbar) WITH c_foo INTO message.
73839
+ SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
73840
+ IF sy-subrc <> 0.
73841
+ ENDIF.
73842
+
73843
+ DATA: BEGIN OF blah ##NEEDED,
73844
+ test1 TYPE string,
73845
+ test2 TYPE string,
73838
73846
  END OF blah.`,
73839
73847
  };
73840
73848
  }
@@ -74001,18 +74009,18 @@ class UnnecessaryReturn extends _abap_rule_1.ABAPRule {
74001
74009
  shortDescription: `Finds unnecessary RETURN statements`,
74002
74010
  extendedInformation: `Finds unnecessary RETURN statements`,
74003
74011
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
74004
- badExample: `FORM hello1.
74005
- WRITE 'world'.
74006
- RETURN.
74007
- ENDFORM.
74008
-
74009
- FORM foo.
74010
- IF 1 = 2.
74011
- RETURN.
74012
- ENDIF.
74012
+ badExample: `FORM hello1.
74013
+ WRITE 'world'.
74014
+ RETURN.
74015
+ ENDFORM.
74016
+
74017
+ FORM foo.
74018
+ IF 1 = 2.
74019
+ RETURN.
74020
+ ENDIF.
74013
74021
  ENDFORM.`,
74014
- goodExample: `FORM hello2.
74015
- WRITE 'world'.
74022
+ goodExample: `FORM hello2.
74023
+ WRITE 'world'.
74016
74024
  ENDFORM.`,
74017
74025
  };
74018
74026
  }
@@ -74363,13 +74371,13 @@ class UnusedMacros {
74363
74371
  title: "Unused macros",
74364
74372
  shortDescription: `Checks for unused macro definitions definitions`,
74365
74373
  tags: [_irule_1.RuleTag.Quickfix],
74366
- badExample: `DEFINE foobar1.
74367
- WRITE 'hello'.
74374
+ badExample: `DEFINE foobar1.
74375
+ WRITE 'hello'.
74368
74376
  END-OF-DEFINITION.`,
74369
- goodExample: `DEFINE foobar2.
74370
- WRITE 'hello'.
74371
- END-OF-DEFINITION.
74372
-
74377
+ goodExample: `DEFINE foobar2.
74378
+ WRITE 'hello'.
74379
+ END-OF-DEFINITION.
74380
+
74373
74381
  foobar2.`,
74374
74382
  };
74375
74383
  }
@@ -74481,18 +74489,18 @@ class UnusedMethods {
74481
74489
  key: "unused_methods",
74482
74490
  title: "Unused methods",
74483
74491
  shortDescription: `Checks for unused methods`,
74484
- extendedInformation: `Checks private and protected methods.
74485
-
74486
- Unused methods are not reported if the object contains parser or syntax errors.
74487
- Quick fixes only appears for private methods or projected methods where the class doesnt have any subclasses.
74488
-
74489
- Skips:
74490
- * methods FOR TESTING
74491
- * methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
74492
- * class_constructor + constructor methods
74493
- * event handlers
74494
- * methods that are redefined
74495
- * INCLUDEs
74492
+ extendedInformation: `Checks private and protected methods.
74493
+
74494
+ Unused methods are not reported if the object contains parser or syntax errors.
74495
+ Quick fixes only appears for private methods or projected methods where the class doesnt have any subclasses.
74496
+
74497
+ Skips:
74498
+ * methods FOR TESTING
74499
+ * methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
74500
+ * class_constructor + constructor methods
74501
+ * event handlers
74502
+ * methods that are redefined
74503
+ * INCLUDEs
74496
74504
  `,
74497
74505
  tags: [_irule_1.RuleTag.Quickfix],
74498
74506
  pragma: "##CALLED",
@@ -74968,23 +74976,23 @@ class UnusedVariables {
74968
74976
  key: "unused_variables",
74969
74977
  title: "Unused variables",
74970
74978
  shortDescription: `Checks for unused variables and constants`,
74971
- extendedInformation: `Skips event parameters.
74972
-
74973
- Note that this currently does not work if the source code uses macros.
74974
-
74975
- Unused variables are not reported if the object contains parser or syntax errors.
74976
-
74979
+ extendedInformation: `Skips event parameters.
74980
+
74981
+ Note that this currently does not work if the source code uses macros.
74982
+
74983
+ Unused variables are not reported if the object contains parser or syntax errors.
74984
+
74977
74985
  Errors found in INCLUDES are reported for the main program.`,
74978
74986
  tags: [_irule_1.RuleTag.Quickfix],
74979
74987
  pragma: "##NEEDED",
74980
74988
  pseudoComment: "EC NEEDED",
74981
- badExample: `DATA: BEGIN OF blah1,
74982
- test TYPE string,
74983
- test2 TYPE string,
74989
+ badExample: `DATA: BEGIN OF blah1,
74990
+ test TYPE string,
74991
+ test2 TYPE string,
74984
74992
  END OF blah1.`,
74985
- goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
74986
- test TYPE string,
74987
- test2 TYPE string,
74993
+ goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
74994
+ test TYPE string,
74995
+ test2 TYPE string,
74988
74996
  END OF blah2.`,
74989
74997
  };
74990
74998
  }
@@ -75203,15 +75211,15 @@ class UseBoolExpression extends _abap_rule_1.ABAPRule {
75203
75211
  shortDescription: `Use boolean expression, xsdbool from 740sp08 and up, boolc from 702 and up`,
75204
75212
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
75205
75213
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
75206
- badExample: `IF line IS INITIAL.
75207
- has_entries = abap_false.
75208
- ELSE.
75209
- has_entries = abap_true.
75210
- ENDIF.
75211
-
75214
+ badExample: `IF line IS INITIAL.
75215
+ has_entries = abap_false.
75216
+ ELSE.
75217
+ has_entries = abap_true.
75218
+ ENDIF.
75219
+
75212
75220
  DATA(fsdf) = COND #( WHEN foo <> bar THEN abap_true ELSE abap_false ).`,
75213
- goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
75214
-
75221
+ goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
75222
+
75215
75223
  DATA(fsdf) = xsdbool( foo <> bar ).`,
75216
75224
  };
75217
75225
  }
@@ -75329,15 +75337,15 @@ class UseClassBasedExceptions extends _abap_rule_1.ABAPRule {
75329
75337
  shortDescription: `Use class based exceptions, checks interface and class definitions`,
75330
75338
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-class-based-exceptions`,
75331
75339
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
75332
- badExample: `INTERFACE lif.
75333
- METHODS load_data
75334
- EXCEPTIONS
75335
- invalid_parameter.
75340
+ badExample: `INTERFACE lif.
75341
+ METHODS load_data
75342
+ EXCEPTIONS
75343
+ invalid_parameter.
75336
75344
  ENDINTERFACE.`,
75337
- goodExample: `INTERFACE lif.
75338
- METHODS load_data
75339
- RAISING
75340
- cx_something.
75345
+ goodExample: `INTERFACE lif.
75346
+ METHODS load_data
75347
+ RAISING
75348
+ cx_something.
75341
75349
  ENDINTERFACE.`,
75342
75350
  };
75343
75351
  }
@@ -75397,15 +75405,15 @@ class UseLineExists extends _abap_rule_1.ABAPRule {
75397
75405
  key: "use_line_exists",
75398
75406
  title: "Use line_exists",
75399
75407
  shortDescription: `Use line_exists, from 740sp02 and up`,
75400
- extendedInformation: `
75401
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
75402
-
75408
+ extendedInformation: `
75409
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
75410
+
75403
75411
  Not reported if the READ TABLE statement contains BINARY SEARCH.`,
75404
75412
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
75405
- badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
75406
- IF sy-subrc = 0.
75413
+ badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
75414
+ IF sy-subrc = 0.
75407
75415
  ENDIF.`,
75408
- goodExample: `IF line_exists( my_table[ key = 'A' ] ).
75416
+ goodExample: `IF line_exists( my_table[ key = 'A' ] ).
75409
75417
  ENDIF.`,
75410
75418
  };
75411
75419
  }
@@ -75515,10 +75523,10 @@ class UseNew extends _abap_rule_1.ABAPRule {
75515
75523
  key: "use_new",
75516
75524
  title: "Use NEW",
75517
75525
  shortDescription: `Checks for deprecated CREATE OBJECT statements.`,
75518
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
75519
-
75520
- If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
75521
-
75526
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
75527
+
75528
+ If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
75529
+
75522
75530
  Applicable from v740sp02 and up`,
75523
75531
  badExample: `CREATE OBJECT ref.`,
75524
75532
  goodExample: `ref = NEW #( ).`,
@@ -75616,13 +75624,13 @@ class WhenOthersLast extends _abap_rule_1.ABAPRule {
75616
75624
  title: "WHEN OTHERS last",
75617
75625
  shortDescription: `Checks that WHEN OTHERS is placed the last within a CASE statement.`,
75618
75626
  tags: [_irule_1.RuleTag.SingleFile],
75619
- badExample: `CASE bar.
75620
- WHEN OTHERS.
75621
- WHEN 2.
75627
+ badExample: `CASE bar.
75628
+ WHEN OTHERS.
75629
+ WHEN 2.
75622
75630
  ENDCASE.`,
75623
- goodExample: `CASE bar.
75624
- WHEN 2.
75625
- WHEN OTHERS.
75631
+ goodExample: `CASE bar.
75632
+ WHEN 2.
75633
+ WHEN OTHERS.
75626
75634
  ENDCASE.`,
75627
75635
  };
75628
75636
  }