@abaplint/cli 2.113.62 → 2.113.63

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