@abaplint/cli 2.113.84 → 2.113.85

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 +851 -846
  4. package/package.json +63 -63
package/build/cli.js CHANGED
@@ -13105,9 +13105,12 @@ exports.Field = void 0;
13105
13105
  const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
13106
13106
  const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
13107
13107
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
13108
+ const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
13108
13109
  class Field {
13109
13110
  getMatcher() {
13110
- const ret = (0, combi_1.seq)("FIELD", expressions_1.FieldChain, (0, combi_1.opt)((0, combi_1.seq)("MODULE", expressions_1.FormName, (0, combi_1.opt)((0, combi_1.alt)("ON INPUT", "ON REQUEST")))));
13111
+ const module = (0, combi_1.seq)("MODULE", expressions_1.FormName, (0, combi_1.opt)((0, combi_1.alt)("ON INPUT", "ON REQUEST")));
13112
+ const values = (0, combi_1.seq)("VALUES", (0, combi_1.tok)(tokens_1.WParenLeft), "BETWEEN", expressions_1.Constant, "AND", expressions_1.Constant, (0, combi_1.tok)(tokens_1.ParenRightW));
13113
+ const ret = (0, combi_1.seq)("FIELD", expressions_1.FieldChain, (0, combi_1.opt)((0, combi_1.alt)(module, values)));
13111
13114
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
13112
13115
  }
13113
13116
  }
@@ -15091,7 +15094,7 @@ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@a
15091
15094
  class Module {
15092
15095
  getMatcher() {
15093
15096
  const sw = (0, combi_1.seq)("SWITCH", expressions_1.NamespaceSimpleName);
15094
- const ret = (0, combi_1.seq)("MODULE", expressions_1.FormName, (0, combi_1.opt)((0, combi_1.alt)("INPUT", "OUTPUT", "ON CHAIN-REQUEST", "ON CHAIN-INPUT", sw)));
15097
+ const ret = (0, combi_1.seq)("MODULE", expressions_1.FormName, (0, combi_1.opt)((0, combi_1.alt)("INPUT", "OUTPUT", "ON CHAIN-REQUEST", "ON CHAIN-INPUT", "AT EXIT-COMMAND", sw)));
15095
15098
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
15096
15099
  }
15097
15100
  }
@@ -35720,13 +35723,13 @@ class FlowGraph {
35720
35723
  this.label = label;
35721
35724
  }
35722
35725
  toDigraph() {
35723
- return `digraph G {
35724
- labelloc="t";
35725
- label="${this.label}";
35726
- graph [fontname = "helvetica"];
35727
- node [fontname = "helvetica", shape="box"];
35728
- edge [fontname = "helvetica"];
35729
- ${this.toTextEdges()}
35726
+ return `digraph G {
35727
+ labelloc="t";
35728
+ label="${this.label}";
35729
+ graph [fontname = "helvetica"];
35730
+ node [fontname = "helvetica", shape="box"];
35731
+ edge [fontname = "helvetica"];
35732
+ ${this.toTextEdges()}
35730
35733
  }`;
35731
35734
  }
35732
35735
  listSources(node) {
@@ -44149,13 +44152,13 @@ class Help {
44149
44152
  /////////////////////////////////////////////////
44150
44153
  static dumpABAP(file, reg, textDocument, position) {
44151
44154
  let content = "";
44152
- content = `
44153
- <a href="#_tokens" rel="no-refresh">Tokens</a> |
44154
- <a href="#_statements" rel="no-refresh">Statements</a> |
44155
- <a href="#_structure" rel="no-refresh">Structure</a> |
44156
- <a href="#_files" rel="no-refresh">Files</a> |
44157
- <a href="#_info" rel="no-refresh">Info Dump</a>
44158
- <hr>
44155
+ content = `
44156
+ <a href="#_tokens" rel="no-refresh">Tokens</a> |
44157
+ <a href="#_statements" rel="no-refresh">Statements</a> |
44158
+ <a href="#_structure" rel="no-refresh">Structure</a> |
44159
+ <a href="#_files" rel="no-refresh">Files</a> |
44160
+ <a href="#_info" rel="no-refresh">Info Dump</a>
44161
+ <hr>
44159
44162
  ` +
44160
44163
  "<tt>" + textDocument.uri + " (" +
44161
44164
  (position.line + 1) + ", " +
@@ -44310,9 +44313,9 @@ class Help {
44310
44313
  return ret + "</ul>";
44311
44314
  }
44312
44315
  static tokens(file) {
44313
- let inner = `<table><tr><td><b>String</b></td><td><b>Type</b></td>
44314
- <td><b>Row</b></td><td><b>Column</b></td>
44315
- <td><b>vRow</b></td><td><b>vColumn</b></td>
44316
+ let inner = `<table><tr><td><b>String</b></td><td><b>Type</b></td>
44317
+ <td><b>Row</b></td><td><b>Column</b></td>
44318
+ <td><b>vRow</b></td><td><b>vColumn</b></td>
44316
44319
  </tr>`;
44317
44320
  for (const token of file.getTokens()) {
44318
44321
  const tStart = token.getStart();
@@ -53315,6 +53318,7 @@ class Indent {
53315
53318
  || type instanceof Statements.EndModule
53316
53319
  || type instanceof Statements.EndSelect
53317
53320
  || type instanceof Statements.EndMethod
53321
+ || type instanceof Statements.EndChain
53318
53322
  || type instanceof Statements.EndAt
53319
53323
  || type instanceof Statements.Else
53320
53324
  || type instanceof Statements.EndExec
@@ -53423,6 +53427,7 @@ class Indent {
53423
53427
  || type instanceof Statements.Else
53424
53428
  || type instanceof Statements.ElseIf
53425
53429
  || type instanceof Statements.MethodImplementation
53430
+ || type instanceof Statements.Chain
53426
53431
  || type instanceof Statements.TestInjection
53427
53432
  || type instanceof Statements.TestSeam
53428
53433
  || (this.options.selectionScreenBlockIndentation === true
@@ -53628,7 +53633,7 @@ class Registry {
53628
53633
  }
53629
53634
  static abaplintVersion() {
53630
53635
  // magic, see build script "version.sh"
53631
- return "2.113.84";
53636
+ return "2.113.85";
53632
53637
  }
53633
53638
  getDDICReferences() {
53634
53639
  return this.ddicReferences;
@@ -53947,10 +53952,10 @@ class SevenBitAscii {
53947
53952
  key: "7bit_ascii",
53948
53953
  title: "Check for 7bit ascii",
53949
53954
  shortDescription: `Only allow characters from the 7bit ASCII set.`,
53950
- extendedInformation: `https://docs.abapopenchecks.org/checks/05/
53951
-
53952
- https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
53953
-
53955
+ extendedInformation: `https://docs.abapopenchecks.org/checks/05/
53956
+
53957
+ https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
53958
+
53954
53959
  Checkes files with extensions ".abap" and ".asddls"`,
53955
53960
  tags: [_irule_1.RuleTag.SingleFile],
53956
53961
  badExample: `WRITE '뽑'.`,
@@ -54156,10 +54161,10 @@ class Abapdoc extends _abap_rule_1.ABAPRule {
54156
54161
  key: "abapdoc",
54157
54162
  title: "Check abapdoc",
54158
54163
  shortDescription: `Various checks regarding abapdoc.`,
54159
- extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
54160
-
54161
- Plus class and interface definitions.
54162
-
54164
+ extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
54165
+
54166
+ Plus class and interface definitions.
54167
+
54163
54168
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#abap-doc-only-for-public-apis`,
54164
54169
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
54165
54170
  };
@@ -54296,27 +54301,27 @@ class AddTestAttributes extends _abap_rule_1.ABAPRule {
54296
54301
  title: "Add test attributes for tests classes with test methods",
54297
54302
  shortDescription: `Add test attributes DURATION and RISK LEVEL for tests classes with test methods`,
54298
54303
  tags: [_irule_1.RuleTag.SingleFile],
54299
- badExample: `CLASS ltcl_test1 DEFINITION FINAL FOR TESTING.
54300
- PUBLIC SECTION.
54301
- PROTECTED SECTION.
54302
- PRIVATE SECTION.
54303
- METHODS test FOR TESTING RAISING cx_static_check.
54304
- ENDCLASS.
54305
-
54306
- CLASS ltcl_test1 IMPLEMENTATION.
54307
- METHOD test.
54308
- ENDMETHOD.
54304
+ badExample: `CLASS ltcl_test1 DEFINITION FINAL FOR TESTING.
54305
+ PUBLIC SECTION.
54306
+ PROTECTED SECTION.
54307
+ PRIVATE SECTION.
54308
+ METHODS test FOR TESTING RAISING cx_static_check.
54309
+ ENDCLASS.
54310
+
54311
+ CLASS ltcl_test1 IMPLEMENTATION.
54312
+ METHOD test.
54313
+ ENDMETHOD.
54309
54314
  ENDCLASS.`,
54310
- goodExample: `CLASS ltcl_test2 DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
54311
- PUBLIC SECTION.
54312
- PROTECTED SECTION.
54313
- PRIVATE SECTION.
54314
- METHODS test FOR TESTING RAISING cx_static_check.
54315
- ENDCLASS.
54316
-
54317
- CLASS ltcl_test2 IMPLEMENTATION.
54318
- METHOD test.
54319
- ENDMETHOD.
54315
+ goodExample: `CLASS ltcl_test2 DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
54316
+ PUBLIC SECTION.
54317
+ PROTECTED SECTION.
54318
+ PRIVATE SECTION.
54319
+ METHODS test FOR TESTING RAISING cx_static_check.
54320
+ ENDCLASS.
54321
+
54322
+ CLASS ltcl_test2 IMPLEMENTATION.
54323
+ METHOD test.
54324
+ ENDMETHOD.
54320
54325
  ENDCLASS.`,
54321
54326
  };
54322
54327
  }
@@ -54402,49 +54407,49 @@ class AlignParameters extends _abap_rule_1.ABAPRule {
54402
54407
  key: "align_parameters",
54403
54408
  title: "Align Parameters",
54404
54409
  shortDescription: `Checks for vertially aligned parameters`,
54405
- extendedInformation: `Checks:
54406
- * function module calls
54407
- * method calls
54408
- * VALUE constructors
54409
- * NEW constructors
54410
- * RAISE EXCEPTION statements
54411
- * CREATE OBJECT statements
54412
- * RAISE EVENT statements
54413
-
54414
- https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
54415
-
54416
- Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
54417
-
54418
- If parameters are on the same row, no issues are reported, see
54410
+ extendedInformation: `Checks:
54411
+ * function module calls
54412
+ * method calls
54413
+ * VALUE constructors
54414
+ * NEW constructors
54415
+ * RAISE EXCEPTION statements
54416
+ * CREATE OBJECT statements
54417
+ * RAISE EVENT statements
54418
+
54419
+ https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
54420
+
54421
+ Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
54422
+
54423
+ If parameters are on the same row, no issues are reported, see
54419
54424
  https://rules.abaplint.org/max_one_method_parameter_per_line/ for splitting parameters to lines`,
54420
54425
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
54421
- badExample: `CALL FUNCTION 'FOOBAR'
54422
- EXPORTING
54423
- foo = 2
54424
- parameter = 3.
54425
-
54426
- foobar( moo = 1
54427
- param = 1 ).
54428
-
54429
- foo = VALUE #(
54430
- foo = bar
54426
+ badExample: `CALL FUNCTION 'FOOBAR'
54427
+ EXPORTING
54428
+ foo = 2
54429
+ parameter = 3.
54430
+
54431
+ foobar( moo = 1
54432
+ param = 1 ).
54433
+
54434
+ foo = VALUE #(
54435
+ foo = bar
54431
54436
  moo = 2 ).`,
54432
- goodExample: `CALL FUNCTION 'FOOBAR'
54433
- EXPORTING
54434
- foo = 2
54435
- parameter = 3.
54436
-
54437
- foobar( moo = 1
54438
- param = 1 ).
54439
-
54440
- foo = VALUE #(
54441
- foo = bar
54442
- moo = 2 ).
54443
-
54444
- DATA(sdf) = VALUE type(
54445
- common_val = 2
54446
- another_common = 5
54447
- ( row_value = 4
54437
+ goodExample: `CALL FUNCTION 'FOOBAR'
54438
+ EXPORTING
54439
+ foo = 2
54440
+ parameter = 3.
54441
+
54442
+ foobar( moo = 1
54443
+ param = 1 ).
54444
+
54445
+ foo = VALUE #(
54446
+ foo = bar
54447
+ moo = 2 ).
54448
+
54449
+ DATA(sdf) = VALUE type(
54450
+ common_val = 2
54451
+ another_common = 5
54452
+ ( row_value = 4
54448
54453
  value_foo = 5 ) ).`,
54449
54454
  };
54450
54455
  }
@@ -54878,37 +54883,37 @@ class AlignTypeExpressions extends _abap_rule_1.ABAPRule {
54878
54883
  key: "align_type_expressions",
54879
54884
  title: "Align TYPE expressions",
54880
54885
  shortDescription: `Align TYPE expressions in statements`,
54881
- extendedInformation: `
54882
- Currently works for METHODS + BEGIN OF
54883
-
54884
- If BEGIN OF has an INCLUDE TYPE its ignored
54885
-
54886
- Also note that clean ABAP does not recommend aligning TYPE clauses:
54886
+ extendedInformation: `
54887
+ Currently works for METHODS + BEGIN OF
54888
+
54889
+ If BEGIN OF has an INCLUDE TYPE its ignored
54890
+
54891
+ Also note that clean ABAP does not recommend aligning TYPE clauses:
54887
54892
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-align-type-clauses`,
54888
54893
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix],
54889
- badExample: `
54890
- TYPES: BEGIN OF foo,
54891
- bar TYPE i,
54892
- foobar TYPE i,
54893
- END OF foo.
54894
-
54895
- INTERFACE lif.
54896
- METHODS bar
54897
- IMPORTING
54898
- foo TYPE i
54899
- foobar TYPE i.
54894
+ badExample: `
54895
+ TYPES: BEGIN OF foo,
54896
+ bar TYPE i,
54897
+ foobar TYPE i,
54898
+ END OF foo.
54899
+
54900
+ INTERFACE lif.
54901
+ METHODS bar
54902
+ IMPORTING
54903
+ foo TYPE i
54904
+ foobar TYPE i.
54900
54905
  ENDINTERFACE.`,
54901
- goodExample: `
54902
- TYPES: BEGIN OF foo,
54903
- bar TYPE i,
54904
- foobar TYPE i,
54905
- END OF foo.
54906
-
54907
- INTERFACE lif.
54908
- METHODS bar
54909
- IMPORTING
54910
- foo TYPE i
54911
- foobar TYPE i.
54906
+ goodExample: `
54907
+ TYPES: BEGIN OF foo,
54908
+ bar TYPE i,
54909
+ foobar TYPE i,
54910
+ END OF foo.
54911
+
54912
+ INTERFACE lif.
54913
+ METHODS bar
54914
+ IMPORTING
54915
+ foo TYPE i
54916
+ foobar TYPE i.
54912
54917
  ENDINTERFACE.`,
54913
54918
  };
54914
54919
  }
@@ -55187,16 +55192,16 @@ class AmbiguousStatement extends _abap_rule_1.ABAPRule {
55187
55192
  return {
55188
55193
  key: "ambiguous_statement",
55189
55194
  title: "Check for ambigious statements",
55190
- shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
55191
- Add "TABLE" keyword or "@" for escaping SQL variables
55192
-
55195
+ shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
55196
+ Add "TABLE" keyword or "@" for escaping SQL variables
55197
+
55193
55198
  Only works if the target version is 740sp05 or above`,
55194
55199
  tags: [_irule_1.RuleTag.SingleFile],
55195
- badExample: `DELETE foo FROM bar.
55200
+ badExample: `DELETE foo FROM bar.
55196
55201
  MODIFY foo FROM bar.`,
55197
- goodExample: `DELETE foo FROM @bar.
55198
- DELETE TABLE itab FROM 2.
55199
- MODIFY zfoo FROM @wa.
55202
+ goodExample: `DELETE foo FROM @bar.
55203
+ DELETE TABLE itab FROM 2.
55204
+ MODIFY zfoo FROM @wa.
55200
55205
  MODIFY TABLE foo FROM bar.`,
55201
55206
  };
55202
55207
  }
@@ -55301,16 +55306,16 @@ class AvoidUse extends _abap_rule_1.ABAPRule {
55301
55306
  key: "avoid_use",
55302
55307
  title: "Avoid use of certain statements",
55303
55308
  shortDescription: `Detects usage of certain statements.`,
55304
- extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
55305
-
55306
- Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
55307
-
55308
- STATICS: use CLASS-DATA instead
55309
-
55310
- DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
55311
-
55312
- TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
55313
-
55309
+ extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
55310
+
55311
+ Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
55312
+
55313
+ STATICS: use CLASS-DATA instead
55314
+
55315
+ DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
55316
+
55317
+ TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
55318
+
55314
55319
  BREAK points`,
55315
55320
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
55316
55321
  };
@@ -55442,11 +55447,11 @@ class BeginEndNames extends _abap_rule_1.ABAPRule {
55442
55447
  title: "Check BEGIN END names",
55443
55448
  shortDescription: `Check BEGIN OF and END OF names match, plus there must be statements between BEGIN and END`,
55444
55449
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
55445
- badExample: `DATA: BEGIN OF stru,
55446
- field TYPE i,
55450
+ badExample: `DATA: BEGIN OF stru,
55451
+ field TYPE i,
55447
55452
  END OF structure_not_the_same.`,
55448
- goodExample: `DATA: BEGIN OF stru,
55449
- field TYPE i,
55453
+ goodExample: `DATA: BEGIN OF stru,
55454
+ field TYPE i,
55450
55455
  END OF stru.`,
55451
55456
  };
55452
55457
  }
@@ -55543,20 +55548,20 @@ class BeginSingleInclude extends _abap_rule_1.ABAPRule {
55543
55548
  title: "BEGIN contains single INCLUDE",
55544
55549
  shortDescription: `Finds TYPE BEGIN with just one INCLUDE TYPE, and DATA with single INCLUDE STRUCTURE`,
55545
55550
  tags: [_irule_1.RuleTag.SingleFile],
55546
- badExample: `TYPES: BEGIN OF dummy1.
55547
- INCLUDE TYPE dselc.
55548
- TYPES: END OF dummy1.
55549
-
55550
- DATA BEGIN OF foo.
55551
- INCLUDE STRUCTURE syst.
55552
- DATA END OF foo.
55553
-
55554
- STATICS BEGIN OF bar.
55555
- INCLUDE STRUCTURE syst.
55551
+ badExample: `TYPES: BEGIN OF dummy1.
55552
+ INCLUDE TYPE dselc.
55553
+ TYPES: END OF dummy1.
55554
+
55555
+ DATA BEGIN OF foo.
55556
+ INCLUDE STRUCTURE syst.
55557
+ DATA END OF foo.
55558
+
55559
+ STATICS BEGIN OF bar.
55560
+ INCLUDE STRUCTURE syst.
55556
55561
  STATICS END OF bar.`,
55557
- goodExample: `DATA BEGIN OF foo.
55558
- DATA field TYPE i.
55559
- INCLUDE STRUCTURE dselc.
55562
+ goodExample: `DATA BEGIN OF foo.
55563
+ DATA field TYPE i.
55564
+ INCLUDE STRUCTURE dselc.
55560
55565
  DATA END OF foo.`,
55561
55566
  };
55562
55567
  }
@@ -55646,9 +55651,9 @@ class CallTransactionAuthorityCheck extends _abap_rule_1.ABAPRule {
55646
55651
  extendedInformation: `https://docs.abapopenchecks.org/checks/54/`,
55647
55652
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
55648
55653
  badExample: `CALL TRANSACTION 'FOO'.`,
55649
- goodExample: `TRY.
55650
- CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
55651
- CATCH cx_sy_authorization_error.
55654
+ goodExample: `TRY.
55655
+ CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
55656
+ CATCH cx_sy_authorization_error.
55652
55657
  ENDTRY.`,
55653
55658
  };
55654
55659
  }
@@ -55713,10 +55718,10 @@ class CDSCommentStyle {
55713
55718
  key: "cds_comment_style",
55714
55719
  title: "CDS Comment Style",
55715
55720
  shortDescription: `Check for obsolete comment style`,
55716
- extendedInformation: `Check for obsolete comment style
55717
-
55718
- Comments starting with "--" are considered obsolete
55719
-
55721
+ extendedInformation: `Check for obsolete comment style
55722
+
55723
+ Comments starting with "--" are considered obsolete
55724
+
55720
55725
  https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abencds_general_syntax_rules.htm`,
55721
55726
  tags: [_irule_1.RuleTag.SingleFile],
55722
55727
  badExample: "-- this is a comment",
@@ -55782,10 +55787,10 @@ class CDSLegacyView {
55782
55787
  key: "cds_legacy_view",
55783
55788
  title: "CDS Legacy View",
55784
55789
  shortDescription: `Identify CDS Legacy Views`,
55785
- extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
55786
-
55787
- https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
55788
-
55790
+ extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
55791
+
55792
+ https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
55793
+
55789
55794
  v755 and up`,
55790
55795
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Upport],
55791
55796
  };
@@ -55940,10 +55945,10 @@ class ChainMainlyDeclarations extends _abap_rule_1.ABAPRule {
55940
55945
  key: "chain_mainly_declarations",
55941
55946
  title: "Chain mainly declarations",
55942
55947
  shortDescription: `Chain mainly declarations, allows chaining for the configured statements, reports errors for other statements.`,
55943
- extendedInformation: `
55944
- https://docs.abapopenchecks.org/checks/23/
55945
-
55946
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
55948
+ extendedInformation: `
55949
+ https://docs.abapopenchecks.org/checks/23/
55950
+
55951
+ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
55947
55952
  `,
55948
55953
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
55949
55954
  badExample: `CALL METHOD: bar.`,
@@ -56119,17 +56124,17 @@ class ChangeIfToCase extends _abap_rule_1.ABAPRule {
56119
56124
  title: "Change IF to CASE",
56120
56125
  shortDescription: `Finds IF constructs that can be changed to CASE`,
56121
56126
  // eslint-disable-next-line max-len
56122
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
56123
-
56127
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
56128
+
56124
56129
  If the first comparison is a boolean compare, no issue is reported.`,
56125
56130
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
56126
- badExample: `IF l_fcat-fieldname EQ 'FOO'.
56127
- ELSEIF l_fcat-fieldname = 'BAR'
56128
- OR l_fcat-fieldname = 'MOO'.
56131
+ badExample: `IF l_fcat-fieldname EQ 'FOO'.
56132
+ ELSEIF l_fcat-fieldname = 'BAR'
56133
+ OR l_fcat-fieldname = 'MOO'.
56129
56134
  ENDIF.`,
56130
- goodExample: `CASE l_fcat-fieldname.
56131
- WHEN 'FOO'.
56132
- WHEN 'BAR' OR 'MOO'.
56135
+ goodExample: `CASE l_fcat-fieldname.
56136
+ WHEN 'FOO'.
56137
+ WHEN 'BAR' OR 'MOO'.
56133
56138
  ENDCASE.`,
56134
56139
  };
56135
56140
  }
@@ -56266,8 +56271,8 @@ class CheckAbstract extends _abap_rule_1.ABAPRule {
56266
56271
  return {
56267
56272
  key: "check_abstract",
56268
56273
  title: "Check abstract methods and classes",
56269
- shortDescription: `Checks abstract methods and classes:
56270
- - class defined as abstract and final,
56274
+ shortDescription: `Checks abstract methods and classes:
56275
+ - class defined as abstract and final,
56271
56276
  - non-abstract class contains abstract methods`,
56272
56277
  extendedInformation: `If a class defines only constants, use an interface instead`,
56273
56278
  tags: [_irule_1.RuleTag.SingleFile],
@@ -56348,11 +56353,11 @@ class CheckComments extends _abap_rule_1.ABAPRule {
56348
56353
  return {
56349
56354
  key: "check_comments",
56350
56355
  title: "Check Comments",
56351
- shortDescription: `
56356
+ shortDescription: `
56352
56357
  Various checks for comment usage.`,
56353
- extendedInformation: `
56354
- Detects end of line comments. Comments starting with "#EC" or "##" are ignored
56355
-
56358
+ extendedInformation: `
56359
+ Detects end of line comments. Comments starting with "#EC" or "##" are ignored
56360
+
56356
56361
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#put-comments-before-the-statement-they-relate-to`,
56357
56362
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
56358
56363
  badExample: `WRITE 2. " descriptive comment`,
@@ -56514,9 +56519,9 @@ class CheckInclude {
56514
56519
  key: "check_include",
56515
56520
  title: "Check INCLUDEs",
56516
56521
  shortDescription: `Checks INCLUDE statements`,
56517
- extendedInformation: `
56518
- * Reports unused includes
56519
- * Errors if the includes are not found
56522
+ extendedInformation: `
56523
+ * Reports unused includes
56524
+ * Errors if the includes are not found
56520
56525
  * Error if including a main program`,
56521
56526
  tags: [_irule_1.RuleTag.Syntax],
56522
56527
  };
@@ -56592,14 +56597,14 @@ class CheckSubrc extends _abap_rule_1.ABAPRule {
56592
56597
  key: "check_subrc",
56593
56598
  title: "Check sy-subrc",
56594
56599
  shortDescription: `Check sy-subrc`,
56595
- extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
56596
-
56597
- If sy-dbcnt is checked after database statements, it is considered okay.
56598
-
56599
- "SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
56600
-
56601
- If IS ASSIGNED is checked after assigning, it is considered okay.
56602
-
56600
+ extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
56601
+
56602
+ If sy-dbcnt is checked after database statements, it is considered okay.
56603
+
56604
+ "SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
56605
+
56606
+ If IS ASSIGNED is checked after assigning, it is considered okay.
56607
+
56603
56608
  FIND statement with MATCH COUNT is considered okay if subrc is not checked`,
56604
56609
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
56605
56610
  pseudoComment: "EC CI_SUBRC",
@@ -57169,17 +57174,17 @@ class ClassicExceptionsOverlap extends _abap_rule_1.ABAPRule {
57169
57174
  shortDescription: `Find overlapping classic exceptions`,
57170
57175
  extendedInformation: `When debugging its typically good to know exactly which exception is caught`,
57171
57176
  tags: [_irule_1.RuleTag.SingleFile],
57172
- badExample: `CALL FUNCTION 'SOMETHING'
57173
- EXCEPTIONS
57174
- system_failure = 1 MESSAGE lv_message
57175
- communication_failure = 1 MESSAGE lv_message
57176
- resource_failure = 1
57177
+ badExample: `CALL FUNCTION 'SOMETHING'
57178
+ EXCEPTIONS
57179
+ system_failure = 1 MESSAGE lv_message
57180
+ communication_failure = 1 MESSAGE lv_message
57181
+ resource_failure = 1
57177
57182
  OTHERS = 1.`,
57178
- goodExample: `CALL FUNCTION 'SOMETHING'
57179
- EXCEPTIONS
57180
- system_failure = 1 MESSAGE lv_message
57181
- communication_failure = 2 MESSAGE lv_message
57182
- resource_failure = 3
57183
+ goodExample: `CALL FUNCTION 'SOMETHING'
57184
+ EXCEPTIONS
57185
+ system_failure = 1 MESSAGE lv_message
57186
+ communication_failure = 2 MESSAGE lv_message
57187
+ resource_failure = 3
57183
57188
  OTHERS = 4.`,
57184
57189
  };
57185
57190
  }
@@ -57437,7 +57442,7 @@ class CommentedCode extends _abap_rule_1.ABAPRule {
57437
57442
  key: "commented_code",
57438
57443
  title: "Find commented code",
57439
57444
  shortDescription: `Detects usage of commented out code.`,
57440
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it
57445
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it
57441
57446
  https://docs.abapopenchecks.org/checks/14/`,
57442
57447
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
57443
57448
  badExample: `* WRITE 'hello world'.`,
@@ -57670,10 +57675,10 @@ class ConstructorVisibilityPublic {
57670
57675
  key: "constructor_visibility_public",
57671
57676
  title: "Check constructor visibility is public",
57672
57677
  shortDescription: `Constructor must be placed in the public section, even if the class is not CREATE PUBLIC.`,
57673
- extendedInformation: `
57674
- This only applies to global classes.
57675
-
57676
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
57678
+ extendedInformation: `
57679
+ This only applies to global classes.
57680
+
57681
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
57677
57682
  https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abeninstance_constructor_guidl.htm`,
57678
57683
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
57679
57684
  };
@@ -57748,8 +57753,8 @@ class ContainsTab extends _abap_rule_1.ABAPRule {
57748
57753
  key: "contains_tab",
57749
57754
  title: "Code contains tab",
57750
57755
  shortDescription: `Checks for usage of tabs (enable to enforce spaces)`,
57751
- extendedInformation: `
57752
- https://docs.abapopenchecks.org/checks/09/
57756
+ extendedInformation: `
57757
+ https://docs.abapopenchecks.org/checks/09/
57753
57758
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
57754
57759
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
57755
57760
  badExample: `\tWRITE 'hello world'.`,
@@ -57836,10 +57841,10 @@ class CyclicOO {
57836
57841
  key: "cyclic_oo",
57837
57842
  title: "Cyclic OO",
57838
57843
  shortDescription: `Finds cyclic/circular OO references`,
57839
- extendedInformation: `Runs for global INTF + CLAS objects
57840
-
57841
- Objects must be without syntax errors for this rule to take effect
57842
-
57844
+ extendedInformation: `Runs for global INTF + CLAS objects
57845
+
57846
+ Objects must be without syntax errors for this rule to take effect
57847
+
57843
57848
  References in testclass includes are ignored`,
57844
57849
  };
57845
57850
  }
@@ -58082,7 +58087,7 @@ class DangerousStatement extends _abap_rule_1.ABAPRule {
58082
58087
  key: "dangerous_statement",
58083
58088
  title: "Dangerous statement",
58084
58089
  shortDescription: `Detects potentially dangerous statements`,
58085
- extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
58090
+ extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
58086
58091
  dynamic SQL can potentially create SQL injection problems`,
58087
58092
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
58088
58093
  };
@@ -58289,13 +58294,13 @@ class DefinitionsTop extends _abap_rule_1.ABAPRule {
58289
58294
  shortDescription: `Checks that definitions are placed at the beginning of METHODs, FORMs and FUNCTIONs.`,
58290
58295
  extendedInformation: `https://docs.abapopenchecks.org/checks/17/`,
58291
58296
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
58292
- badExample: `FROM foo.
58293
- WRITE 'hello'.
58294
- DATA int TYPE i.
58297
+ badExample: `FROM foo.
58298
+ WRITE 'hello'.
58299
+ DATA int TYPE i.
58295
58300
  ENDFORM.`,
58296
- goodExample: `FROM foo.
58297
- DATA int TYPE i.
58298
- WRITE 'hello'.
58301
+ goodExample: `FROM foo.
58302
+ DATA int TYPE i.
58303
+ WRITE 'hello'.
58299
58304
  ENDFORM.`,
58300
58305
  };
58301
58306
  }
@@ -58837,39 +58842,39 @@ class Downport {
58837
58842
  key: "downport",
58838
58843
  title: "Downport statement",
58839
58844
  shortDescription: `Downport functionality`,
58840
- extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with
58841
- a higher level language version. If successful, various rules are applied to downport the statement.
58842
- Target downport version is always v702, thus rule is only enabled if target version is v702.
58843
-
58844
- Current rules:
58845
- * NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/
58846
- * DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/
58847
- * FIELD-SYMBOL() definitions are outlined
58848
- * CONV is outlined
58849
- * COND is outlined
58850
- * REDUCE is outlined
58851
- * SWITCH is outlined
58852
- * FILTER is outlined
58853
- * APPEND expression is outlined
58854
- * INSERT expression is outlined
58855
- * EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/
58856
- * CAST changed to ?=
58857
- * LOOP AT method_call( ) is outlined
58858
- * VALUE # with structure fields
58859
- * VALUE # with internal table lines
58860
- * Table Expressions are outlined
58861
- * SELECT INTO @DATA definitions are outlined
58862
- * Some occurrences of string template formatting option ALPHA changed to function module call
58863
- * SELECT/INSERT/MODIFY/DELETE/UPDATE "," in field list removed, "@" in source/targets removed
58864
- * PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods
58865
- * RAISE EXCEPTION ... MESSAGE
58866
- * Moving with +=, -=, /=, *=, &&= is expanded
58867
- * line_exists and line_index is downported to READ TABLE
58868
- * ENUMs, but does not nessesarily give the correct type and value
58869
- * MESSAGE with non simple source
58870
-
58871
- Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.
58872
-
58845
+ extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with
58846
+ a higher level language version. If successful, various rules are applied to downport the statement.
58847
+ Target downport version is always v702, thus rule is only enabled if target version is v702.
58848
+
58849
+ Current rules:
58850
+ * NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/
58851
+ * DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/
58852
+ * FIELD-SYMBOL() definitions are outlined
58853
+ * CONV is outlined
58854
+ * COND is outlined
58855
+ * REDUCE is outlined
58856
+ * SWITCH is outlined
58857
+ * FILTER is outlined
58858
+ * APPEND expression is outlined
58859
+ * INSERT expression is outlined
58860
+ * EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/
58861
+ * CAST changed to ?=
58862
+ * LOOP AT method_call( ) is outlined
58863
+ * VALUE # with structure fields
58864
+ * VALUE # with internal table lines
58865
+ * Table Expressions are outlined
58866
+ * SELECT INTO @DATA definitions are outlined
58867
+ * Some occurrences of string template formatting option ALPHA changed to function module call
58868
+ * SELECT/INSERT/MODIFY/DELETE/UPDATE "," in field list removed, "@" in source/targets removed
58869
+ * PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods
58870
+ * RAISE EXCEPTION ... MESSAGE
58871
+ * Moving with +=, -=, /=, *=, &&= is expanded
58872
+ * line_exists and line_index is downported to READ TABLE
58873
+ * ENUMs, but does not nessesarily give the correct type and value
58874
+ * MESSAGE with non simple source
58875
+
58876
+ Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.
58877
+
58873
58878
  Make sure to test the downported code, it might not always be completely correct.`,
58874
58879
  tags: [_irule_1.RuleTag.Downport, _irule_1.RuleTag.Quickfix],
58875
58880
  };
@@ -59484,10 +59489,10 @@ Make sure to test the downported code, it might not always be completely correct
59484
59489
  const fieldName = f.concatTokens();
59485
59490
  fieldDefinition += indentation + " " + fieldName + " TYPE " + tableName + "-" + fieldName + ",\n";
59486
59491
  }
59487
- fieldDefinition = `DATA: BEGIN OF ${name},
59492
+ fieldDefinition = `DATA: BEGIN OF ${name},
59488
59493
  ${fieldDefinition}${indentation} END OF ${name}.`;
59489
59494
  }
59490
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
59495
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
59491
59496
  ${indentation}`);
59492
59497
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
59493
59498
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -59546,12 +59551,12 @@ ${indentation}`);
59546
59551
  }
59547
59552
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59548
59553
  const name = ((_g = inlineData.findFirstExpression(Expressions.TargetField)) === null || _g === void 0 ? void 0 : _g.concatTokens()) || "error";
59549
- let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
59550
- ${fieldDefinitions}${indentation} END OF ${uniqueName}.
59551
- ${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.
59554
+ let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
59555
+ ${fieldDefinitions}${indentation} END OF ${uniqueName}.
59556
+ ${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.
59552
59557
  ${indentation}`);
59553
59558
  if (fieldDefinitions === "") {
59554
- fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.
59559
+ fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.
59555
59560
  ${indentation}`);
59556
59561
  }
59557
59562
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
@@ -59619,7 +59624,7 @@ ${indentation}`);
59619
59624
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59620
59625
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
59621
59626
  const firstToken = high.getFirstToken();
59622
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
59627
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
59623
59628
  ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
59624
59629
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
59625
59630
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -59673,7 +59678,7 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
59673
59678
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59674
59679
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
59675
59680
  const firstToken = high.getFirstToken();
59676
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
59681
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
59677
59682
  ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
59678
59683
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
59679
59684
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -59715,14 +59720,14 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
59715
59720
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
59716
59721
  const firstToken = high.getFirstToken();
59717
59722
  // note that the tabix restore should be done before throwing the exception
59718
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.
59719
- ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
59720
- ${indentation}${tabixBackup} = sy-tabix.
59721
- ${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.
59722
- ${indentation}sy-tabix = ${tabixBackup}.
59723
- ${indentation}IF sy-subrc <> 0.
59724
- ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59725
- ${indentation}ENDIF.
59723
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.
59724
+ ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
59725
+ ${indentation}${tabixBackup} = sy-tabix.
59726
+ ${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.
59727
+ ${indentation}sy-tabix = ${tabixBackup}.
59728
+ ${indentation}IF sy-subrc <> 0.
59729
+ ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59730
+ ${indentation}ENDIF.
59726
59731
  ${indentation}`);
59727
59732
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, startToken.getStart(), tableExpression.getLastToken().getEnd(), uniqueName);
59728
59733
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -59779,7 +59784,7 @@ ${indentation}`);
59779
59784
  const className = classNames[0].concatTokens();
59780
59785
  const targetName = (_b = target.findFirstExpression(Expressions.TargetField)) === null || _b === void 0 ? void 0 : _b.concatTokens();
59781
59786
  const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
59782
- const code = ` DATA ${targetName} TYPE REF TO ${className}.
59787
+ const code = ` DATA ${targetName} TYPE REF TO ${className}.
59783
59788
  ${indentation}CATCH ${className} INTO ${targetName}.`;
59784
59789
  const fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getStart(), node.getEnd(), code);
59785
59790
  return issue_1.Issue.atToken(lowFile, node.getFirstToken(), "Outline DATA", this.getMetadata().key, this.conf.severity, fix);
@@ -59941,16 +59946,16 @@ ${indentation}CATCH ${className} INTO ${targetName}.`;
59941
59946
  const uniqueName1 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59942
59947
  const uniqueName2 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59943
59948
  const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
59944
- let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
59945
- ${indentation}${uniqueName1}-msgid = ${id}.
59949
+ let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
59950
+ ${indentation}${uniqueName1}-msgid = ${id}.
59946
59951
  ${indentation}${uniqueName1}-msgno = ${number}.\n`;
59947
59952
  if (withs.length > 0) {
59948
- abap += `${indentation}${uniqueName1}-attr1 = 'IF_T100_DYN_MSG~MSGV1'.
59949
- ${indentation}${uniqueName1}-attr2 = 'IF_T100_DYN_MSG~MSGV2'.
59950
- ${indentation}${uniqueName1}-attr3 = 'IF_T100_DYN_MSG~MSGV3'.
59953
+ abap += `${indentation}${uniqueName1}-attr1 = 'IF_T100_DYN_MSG~MSGV1'.
59954
+ ${indentation}${uniqueName1}-attr2 = 'IF_T100_DYN_MSG~MSGV2'.
59955
+ ${indentation}${uniqueName1}-attr3 = 'IF_T100_DYN_MSG~MSGV3'.
59951
59956
  ${indentation}${uniqueName1}-attr4 = 'IF_T100_DYN_MSG~MSGV4'.\n`;
59952
59957
  }
59953
- abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
59958
+ abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
59954
59959
  ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`;
59955
59960
  if (withs.length > 0) {
59956
59961
  abap += `${indentation}${uniqueName2}->if_t100_dyn_msg~msgty = 'E'.\n`;
@@ -60062,10 +60067,10 @@ ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`
60062
60067
  let code = "";
60063
60068
  if (sourceRef.findFirstExpression(Expressions.TableExpression)) {
60064
60069
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
60065
- code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).
60066
- IF sy-subrc <> 0.
60067
- RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
60068
- ENDIF.
60070
+ code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).
60071
+ IF sy-subrc <> 0.
60072
+ RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
60073
+ ENDIF.
60069
60074
  GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
60070
60075
  }
60071
60076
  else {
@@ -60154,20 +60159,20 @@ GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
60154
60159
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
60155
60160
  const uniqueFS = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
60156
60161
  const uniqueNameIndex = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
60157
- code += ` items LIKE ${loopSourceName},
60158
- END OF ${groupTargetName}type.
60159
- DATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.
60160
- DATA ${uniqueName} LIKE LINE OF ${groupTargetName}tab.
60162
+ code += ` items LIKE ${loopSourceName},
60163
+ END OF ${groupTargetName}type.
60164
+ DATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.
60165
+ DATA ${uniqueName} LIKE LINE OF ${groupTargetName}tab.
60161
60166
  LOOP AT ${loopSourceName} ${(_l = high.findFirstExpression(Expressions.LoopTarget)) === null || _l === void 0 ? void 0 : _l.concatTokens()}.\n`;
60162
60167
  if (groupIndexName !== undefined) {
60163
60168
  code += `DATA(${uniqueNameIndex}) = sy-tabix.\n`;
60164
60169
  }
60165
- code += `READ TABLE ${groupTargetName}tab ASSIGNING FIELD-SYMBOL(<${uniqueFS}>) WITH KEY ${condition}.
60170
+ code += `READ TABLE ${groupTargetName}tab ASSIGNING FIELD-SYMBOL(<${uniqueFS}>) WITH KEY ${condition}.
60166
60171
  IF sy-subrc = 0.\n`;
60167
60172
  if (groupCountName !== undefined) {
60168
60173
  code += ` <${uniqueFS}>-${groupCountName} = <${uniqueFS}>-${groupCountName} + 1.\n`;
60169
60174
  }
60170
- code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
60175
+ code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
60171
60176
  ELSE.\n`;
60172
60177
  code += ` CLEAR ${uniqueName}.\n`;
60173
60178
  for (const c of group.findAllExpressions(Expressions.LoopGroupByComponent)) {
@@ -60188,8 +60193,8 @@ ELSE.\n`;
60188
60193
  }
60189
60194
  code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE ${uniqueName}-items.\n`;
60190
60195
  code += ` INSERT ${uniqueName} INTO TABLE ${groupTargetName}tab.\n`;
60191
- code += `ENDIF.
60192
- ENDLOOP.
60196
+ code += `ENDIF.
60197
+ ENDLOOP.
60193
60198
  LOOP AT ${groupTargetName}tab ${groupTarget}.`;
60194
60199
  let fix = edit_helper_1.EditHelper.replaceRange(lowFile, high.getFirstToken().getStart(), high.getLastToken().getEnd(), code);
60195
60200
  for (const l of ((_m = highFile.getStructure()) === null || _m === void 0 ? void 0 : _m.findAllStructures(Structures.Loop)) || []) {
@@ -60361,7 +60366,7 @@ LOOP AT ${groupTargetName}tab ${groupTarget}.`;
60361
60366
  const enumName = (_b = high.findExpressionAfterToken("ENUM")) === null || _b === void 0 ? void 0 : _b.concatTokens();
60362
60367
  const structureName = (_c = high.findExpressionAfterToken("STRUCTURE")) === null || _c === void 0 ? void 0 : _c.concatTokens();
60363
60368
  // all ENUMS are char like?
60364
- let code = `TYPES ${enumName} TYPE string.
60369
+ let code = `TYPES ${enumName} TYPE string.
60365
60370
  CONSTANTS: BEGIN OF ${structureName},\n`;
60366
60371
  let count = 1;
60367
60372
  for (const e of enumStructure.findDirectStatements(Statements.TypeEnum).concat(enumStructure.findDirectStatements(Statements.Type))) {
@@ -60405,14 +60410,14 @@ CONSTANTS: BEGIN OF ${structureName},\n`;
60405
60410
  const tabixBackup = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
60406
60411
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
60407
60412
  // restore tabix before exeption
60408
- const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.
60409
- ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
60410
- ${indentation}${tabixBackup} = sy-tabix.
60411
- ${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.
60412
- ${indentation}sy-tabix = ${tabixBackup}.
60413
- ${indentation}IF sy-subrc <> 0.
60414
- ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
60415
- ${indentation}ENDIF.
60413
+ const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.
60414
+ ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
60415
+ ${indentation}${tabixBackup} = sy-tabix.
60416
+ ${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.
60417
+ ${indentation}sy-tabix = ${tabixBackup}.
60418
+ ${indentation}IF sy-subrc <> 0.
60419
+ ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
60420
+ ${indentation}ENDIF.
60416
60421
  ${indentation}${uniqueName}`;
60417
60422
  const start = target.getFirstToken().getStart();
60418
60423
  const end = (_a = tableExpression.findDirectTokenByText("]")) === null || _a === void 0 ? void 0 : _a.getEnd();
@@ -60492,11 +60497,11 @@ ${indentation}${uniqueName}`;
60492
60497
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
60493
60498
  const source = (_b = child.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens();
60494
60499
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
60495
- const code = `DATA ${uniqueName} TYPE string.
60496
- ${indentation}CALL FUNCTION '${functionName}'
60497
- ${indentation} EXPORTING
60498
- ${indentation} input = ${source}
60499
- ${indentation} IMPORTING
60500
+ const code = `DATA ${uniqueName} TYPE string.
60501
+ ${indentation}CALL FUNCTION '${functionName}'
60502
+ ${indentation} EXPORTING
60503
+ ${indentation} input = ${source}
60504
+ ${indentation} IMPORTING
60500
60505
  ${indentation} output = ${uniqueName}.\n`;
60501
60506
  const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), code);
60502
60507
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, child.getFirstToken().getStart(), child.getLastToken().getEnd(), uniqueName);
@@ -61822,12 +61827,12 @@ class EasyToFindMessages {
61822
61827
  key: "easy_to_find_messages",
61823
61828
  title: "Easy to find messages",
61824
61829
  shortDescription: `Make messages easy to find`,
61825
- extendedInformation: `All messages must be statically referenced exactly once
61826
-
61827
- Only MESSAGE and RAISE statments are counted as static references
61828
-
61829
- Also see rule "message_exists"
61830
-
61830
+ extendedInformation: `All messages must be statically referenced exactly once
61831
+
61832
+ Only MESSAGE and RAISE statments are counted as static references
61833
+
61834
+ Also see rule "message_exists"
61835
+
61831
61836
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#make-messages-easy-to-find`,
61832
61837
  tags: [_irule_1.RuleTag.Styleguide],
61833
61838
  };
@@ -61908,13 +61913,13 @@ class EmptyEvent extends _abap_rule_1.ABAPRule {
61908
61913
  shortDescription: `Empty selection screen or list processing event block`,
61909
61914
  extendedInformation: ``,
61910
61915
  tags: [_irule_1.RuleTag.SingleFile],
61911
- badExample: `
61912
- INITIALIZATION.
61913
- WRITE 'hello'.
61916
+ badExample: `
61917
+ INITIALIZATION.
61918
+ WRITE 'hello'.
61914
61919
  END-OF-SELECTION.`,
61915
- goodExample: `
61916
- START-OF-SELECTION.
61917
- PERFORM sdf.
61920
+ goodExample: `
61921
+ START-OF-SELECTION.
61922
+ PERFORM sdf.
61918
61923
  COMMIT WORK.`,
61919
61924
  };
61920
61925
  }
@@ -62006,8 +62011,8 @@ class EmptyLineinStatement extends _abap_rule_1.ABAPRule {
62006
62011
  key: "empty_line_in_statement",
62007
62012
  title: "Find empty lines in statements",
62008
62013
  shortDescription: `Checks that statements do not contain empty lines.`,
62009
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
62010
-
62014
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
62015
+
62011
62016
  https://docs.abapopenchecks.org/checks/41/`,
62012
62017
  tags: [_irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
62013
62018
  badExample: `WRITE\n\nhello.`,
@@ -62183,13 +62188,13 @@ class EmptyStructure extends _abap_rule_1.ABAPRule {
62183
62188
  shortDescription: `Checks that the code does not contain empty blocks.`,
62184
62189
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-empty-if-branches`,
62185
62190
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
62186
- badExample: `IF foo = bar.
62187
- ENDIF.
62188
-
62189
- DO 2 TIMES.
62191
+ badExample: `IF foo = bar.
62192
+ ENDIF.
62193
+
62194
+ DO 2 TIMES.
62190
62195
  ENDDO.`,
62191
- goodExample: `LOOP AT itab WHERE qty = 0 OR date > sy-datum.
62192
- ENDLOOP.
62196
+ goodExample: `LOOP AT itab WHERE qty = 0 OR date > sy-datum.
62197
+ ENDLOOP.
62193
62198
  result = xsdbool( sy-subrc = 0 ).`,
62194
62199
  };
62195
62200
  }
@@ -62331,10 +62336,10 @@ class ExitOrCheck extends _abap_rule_1.ABAPRule {
62331
62336
  return {
62332
62337
  key: "exit_or_check",
62333
62338
  title: "Find EXIT or CHECK outside loops",
62334
- shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
62339
+ shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
62335
62340
  Use RETURN to leave procesing blocks instead.`,
62336
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
62337
- https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
62341
+ extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
62342
+ https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
62338
62343
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#check-vs-return`,
62339
62344
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
62340
62345
  };
@@ -62417,12 +62422,12 @@ class ExpandMacros extends _abap_rule_1.ABAPRule {
62417
62422
  key: "expand_macros",
62418
62423
  title: "Expand Macros",
62419
62424
  shortDescription: `Allows expanding macro calls with quick fixes`,
62420
- extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
62421
-
62425
+ extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
62426
+
62422
62427
  Note that macros/DEFINE cannot be used in the ABAP Cloud programming model`,
62423
- badExample: `DEFINE _hello.
62424
- WRITE 'hello'.
62425
- END-OF-DEFINITION.
62428
+ badExample: `DEFINE _hello.
62429
+ WRITE 'hello'.
62430
+ END-OF-DEFINITION.
62426
62431
  _hello.`,
62427
62432
  goodExample: `WRITE 'hello'.`,
62428
62433
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
@@ -62509,7 +62514,7 @@ class Exporting extends _abap_rule_1.ABAPRule {
62509
62514
  shortDescription: `Detects EXPORTING statements which can be omitted.`,
62510
62515
  badExample: `call_method( EXPORTING foo = bar ).`,
62511
62516
  goodExample: `call_method( foo = bar ).`,
62512
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-optional-keyword-exporting
62517
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-optional-keyword-exporting
62513
62518
  https://docs.abapopenchecks.org/checks/30/`,
62514
62519
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
62515
62520
  };
@@ -62607,7 +62612,7 @@ class ForbiddenIdentifier extends _abap_rule_1.ABAPRule {
62607
62612
  key: "forbidden_identifier",
62608
62613
  title: "Forbidden Identifier",
62609
62614
  shortDescription: `Forbid use of specified identifiers, list of regex.`,
62610
- extendedInformation: `Used in the transpiler to find javascript keywords in ABAP identifiers,
62615
+ extendedInformation: `Used in the transpiler to find javascript keywords in ABAP identifiers,
62611
62616
  https://github.com/abaplint/transpiler/blob/bda94b8b56e2b7f2f87be2168f12361aa530220e/packages/transpiler/src/validation.ts#L44`,
62612
62617
  tags: [_irule_1.RuleTag.SingleFile],
62613
62618
  };
@@ -62849,8 +62854,8 @@ class ForbiddenVoidType {
62849
62854
  key: "forbidden_void_type",
62850
62855
  title: "Forbidden Void Types",
62851
62856
  shortDescription: `Avoid usage of specified void types.`,
62852
- extendedInformation: `Inspiration:
62853
- BOOLEAN, BOOLE_D, CHAR01, CHAR1, CHAR10, CHAR12, CHAR128, CHAR2, CHAR20, CHAR4, CHAR70,
62857
+ extendedInformation: `Inspiration:
62858
+ BOOLEAN, BOOLE_D, CHAR01, CHAR1, CHAR10, CHAR12, CHAR128, CHAR2, CHAR20, CHAR4, CHAR70,
62854
62859
  DATS, TIMS, DATUM, FLAG, INT4, NUMC3, NUMC4, SAP_BOOL, TEXT25, TEXT80, X255, XFELD`,
62855
62860
  };
62856
62861
  }
@@ -63093,9 +63098,9 @@ class FullyTypeITabs extends _abap_rule_1.ABAPRule {
63093
63098
  key: "fully_type_itabs",
63094
63099
  title: "Fully type internal tables",
63095
63100
  shortDescription: `No implict table types or table keys`,
63096
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-the-right-table-type
63101
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-the-right-table-type
63097
63102
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key`,
63098
- badExample: `DATA lt_foo TYPE TABLE OF ty.
63103
+ badExample: `DATA lt_foo TYPE TABLE OF ty.
63099
63104
  DATA lt_bar TYPE STANDARD TABLE OF ty.`,
63100
63105
  goodExample: `DATA lt_foo TYPE STANDARD TABLE OF ty WITH EMPTY KEY.`,
63101
63106
  tags: [_irule_1.RuleTag.SingleFile],
@@ -63280,26 +63285,26 @@ class FunctionalWriting extends _abap_rule_1.ABAPRule {
63280
63285
  key: "functional_writing",
63281
63286
  title: "Use functional writing",
63282
63287
  shortDescription: `Detects usage of call method when functional style calls can be used.`,
63283
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-calls
63288
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-calls
63284
63289
  https://docs.abapopenchecks.org/checks/07/`,
63285
63290
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
63286
- badExample: `CALL METHOD zcl_class=>method( ).
63287
- CALL METHOD cl_abap_typedescr=>describe_by_name
63288
- EXPORTING
63289
- p_name = 'NAME'
63290
- RECEIVING
63291
- p_descr_ref = lr_typedescr
63292
- EXCEPTIONS
63293
- type_not_found = 1
63291
+ badExample: `CALL METHOD zcl_class=>method( ).
63292
+ CALL METHOD cl_abap_typedescr=>describe_by_name
63293
+ EXPORTING
63294
+ p_name = 'NAME'
63295
+ RECEIVING
63296
+ p_descr_ref = lr_typedescr
63297
+ EXCEPTIONS
63298
+ type_not_found = 1
63294
63299
  OTHERS = 2.`,
63295
- goodExample: `zcl_class=>method( ).
63296
- cl_abap_typedescr=>describe_by_name(
63297
- EXPORTING
63298
- p_name = 'NAME'
63299
- RECEIVING
63300
- p_descr_ref = lr_typedescr
63301
- EXCEPTIONS
63302
- type_not_found = 1
63300
+ goodExample: `zcl_class=>method( ).
63301
+ cl_abap_typedescr=>describe_by_name(
63302
+ EXPORTING
63303
+ p_name = 'NAME'
63304
+ RECEIVING
63305
+ p_descr_ref = lr_typedescr
63306
+ EXCEPTIONS
63307
+ type_not_found = 1
63303
63308
  OTHERS = 2 ).`,
63304
63309
  };
63305
63310
  }
@@ -63410,14 +63415,14 @@ class GlobalClass extends _abap_rule_1.ABAPRule {
63410
63415
  key: "global_class",
63411
63416
  title: "Global class checks",
63412
63417
  shortDescription: `Checks related to global classes`,
63413
- extendedInformation: `* global classes must be in own files
63414
-
63415
- * file names must match class name
63416
-
63417
- * file names must match interface name
63418
-
63419
- * global classes must be global definitions
63420
-
63418
+ extendedInformation: `* global classes must be in own files
63419
+
63420
+ * file names must match class name
63421
+
63422
+ * file names must match interface name
63423
+
63424
+ * global classes must be global definitions
63425
+
63421
63426
  * global interfaces must be global definitions`,
63422
63427
  tags: [_irule_1.RuleTag.Syntax],
63423
63428
  };
@@ -63516,21 +63521,21 @@ class IdenticalConditions extends _abap_rule_1.ABAPRule {
63516
63521
  return {
63517
63522
  key: "identical_conditions",
63518
63523
  title: "Identical conditions",
63519
- shortDescription: `Find identical conditions in IF + CASE + WHILE etc
63520
-
63524
+ shortDescription: `Find identical conditions in IF + CASE + WHILE etc
63525
+
63521
63526
  Prerequsites: code is pretty printed with identical cAsE`,
63522
63527
  tags: [_irule_1.RuleTag.SingleFile],
63523
- badExample: `IF foo = bar OR 1 = a OR foo = bar.
63524
- ENDIF.
63525
- CASE bar.
63526
- WHEN '1'.
63527
- WHEN 'A' OR '1'.
63528
+ badExample: `IF foo = bar OR 1 = a OR foo = bar.
63529
+ ENDIF.
63530
+ CASE bar.
63531
+ WHEN '1'.
63532
+ WHEN 'A' OR '1'.
63528
63533
  ENDCASE.`,
63529
- goodExample: `IF foo = bar OR 1 = a.
63530
- ENDIF.
63531
- CASE bar.
63532
- WHEN '1'.
63533
- WHEN 'A'.
63534
+ goodExample: `IF foo = bar OR 1 = a.
63535
+ ENDIF.
63536
+ CASE bar.
63537
+ WHEN '1'.
63538
+ WHEN 'A'.
63534
63539
  ENDCASE.`,
63535
63540
  };
63536
63541
  }
@@ -63664,23 +63669,23 @@ class IdenticalContents extends _abap_rule_1.ABAPRule {
63664
63669
  key: "identical_contents",
63665
63670
  title: "Identical contents",
63666
63671
  shortDescription: `Find identical contents in blocks inside IFs, both in the beginning and in the end.`,
63667
- extendedInformation: `
63668
- Prerequsites: code is pretty printed with identical cAsE
63669
-
63672
+ extendedInformation: `
63673
+ Prerequsites: code is pretty printed with identical cAsE
63674
+
63670
63675
  Chained statments are ignored`,
63671
63676
  tags: [_irule_1.RuleTag.SingleFile],
63672
- badExample: `IF foo = bar.
63673
- WRITE 'bar'.
63674
- WRITE 'world'.
63675
- ELSE.
63676
- WRITE 'foo'.
63677
- WRITE 'world'.
63677
+ badExample: `IF foo = bar.
63678
+ WRITE 'bar'.
63679
+ WRITE 'world'.
63680
+ ELSE.
63681
+ WRITE 'foo'.
63682
+ WRITE 'world'.
63678
63683
  ENDIF.`,
63679
- goodExample: `IF foo = bar.
63680
- WRITE 'bar'.
63681
- ELSE.
63682
- WRITE 'foo'.
63683
- ENDIF.
63684
+ goodExample: `IF foo = bar.
63685
+ WRITE 'bar'.
63686
+ ELSE.
63687
+ WRITE 'foo'.
63688
+ ENDIF.
63684
63689
  WRITE 'world'.`,
63685
63690
  };
63686
63691
  }
@@ -63788,12 +63793,12 @@ class IdenticalDescriptions {
63788
63793
  key: "identical_descriptions",
63789
63794
  title: "Identical descriptions",
63790
63795
  shortDescription: `Searches for objects with the same type and same description`,
63791
- extendedInformation: `Case insensitive
63792
-
63793
- Only checks the master language descriptions
63794
-
63795
- Dependencies are skipped
63796
-
63796
+ extendedInformation: `Case insensitive
63797
+
63798
+ Only checks the master language descriptions
63799
+
63800
+ Dependencies are skipped
63801
+
63797
63802
  Works for: INTF, CLAS, DOMA, DTEL, FUNC in same FUGR`,
63798
63803
  tags: [],
63799
63804
  };
@@ -63967,43 +63972,43 @@ class IfInIf extends _abap_rule_1.ABAPRule {
63967
63972
  key: "if_in_if",
63968
63973
  title: "IF in IF",
63969
63974
  shortDescription: `Detects nested ifs which can be refactored.`,
63970
- extendedInformation: `
63971
- Directly nested IFs without ELSE can be refactored to a single condition using AND.
63972
-
63973
- ELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.
63974
-
63975
- https://docs.abapopenchecks.org/checks/01/
63975
+ extendedInformation: `
63976
+ Directly nested IFs without ELSE can be refactored to a single condition using AND.
63977
+
63978
+ ELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.
63979
+
63980
+ https://docs.abapopenchecks.org/checks/01/
63976
63981
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low`,
63977
- badExample: `IF condition1.
63978
- IF condition2.
63979
- ...
63980
- ENDIF.
63981
- ENDIF.
63982
-
63983
- IF condition1.
63984
- ...
63985
- ELSE.
63986
- IF condition2.
63987
- ...
63988
- ENDIF.
63982
+ badExample: `IF condition1.
63983
+ IF condition2.
63984
+ ...
63985
+ ENDIF.
63986
+ ENDIF.
63987
+
63988
+ IF condition1.
63989
+ ...
63990
+ ELSE.
63991
+ IF condition2.
63992
+ ...
63993
+ ENDIF.
63989
63994
  ENDIF.`,
63990
- goodExample: `IF ( condition1 ) AND ( condition2 ).
63991
- ...
63992
- ENDIF.
63993
-
63994
- IF condition1.
63995
- ...
63996
- ELSEIF condition2.
63997
- ...
63998
- ENDIF.
63999
-
64000
- CASE variable.
64001
- WHEN value1.
64002
- ...
64003
- WHEN value2.
64004
- IF condition2.
64005
- ...
64006
- ENDIF.
63995
+ goodExample: `IF ( condition1 ) AND ( condition2 ).
63996
+ ...
63997
+ ENDIF.
63998
+
63999
+ IF condition1.
64000
+ ...
64001
+ ELSEIF condition2.
64002
+ ...
64003
+ ENDIF.
64004
+
64005
+ CASE variable.
64006
+ WHEN value1.
64007
+ ...
64008
+ WHEN value2.
64009
+ IF condition2.
64010
+ ...
64011
+ ENDIF.
64007
64012
  ENDCASE.`,
64008
64013
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
64009
64014
  };
@@ -64188,9 +64193,9 @@ class ImplementMethods extends _abap_rule_1.ABAPRule {
64188
64193
  for (const i of ((_a = file.getStructure()) === null || _a === void 0 ? void 0 : _a.findAllStatements(Statements.ClassImplementation)) || []) {
64189
64194
  const name = (_b = i.findFirstExpression(Expressions.ClassName)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr().toUpperCase();
64190
64195
  if (name === impl.identifier.getName().toUpperCase()) {
64191
- return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
64192
- METHOD ${methodName.toLowerCase()}.
64193
- RETURN. " todo, implement method
64196
+ return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
64197
+ METHOD ${methodName.toLowerCase()}.
64198
+ RETURN. " todo, implement method
64194
64199
  ENDMETHOD.`);
64195
64200
  }
64196
64201
  }
@@ -64369,14 +64374,14 @@ class ImplicitStartOfSelection extends _abap_rule_1.ABAPRule {
64369
64374
  key: "implicit_start_of_selection",
64370
64375
  title: "Implicit START-OF-SELECTION",
64371
64376
  shortDescription: `Add explicit selection screen event handling`,
64372
- extendedInformation: `Only runs for executable programs
64373
-
64377
+ extendedInformation: `Only runs for executable programs
64378
+
64374
64379
  https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapstart-of-selection.htm`,
64375
64380
  tags: [_irule_1.RuleTag.SingleFile],
64376
- badExample: `REPORT zfoo.
64381
+ badExample: `REPORT zfoo.
64377
64382
  WRITE 'hello'.`,
64378
- goodExample: `
64379
- START-OF-SELECTION.
64383
+ goodExample: `
64384
+ START-OF-SELECTION.
64380
64385
  WRITE 'hello'.`,
64381
64386
  };
64382
64387
  }
@@ -64481,19 +64486,19 @@ class InStatementIndentation extends _abap_rule_1.ABAPRule {
64481
64486
  key: "in_statement_indentation",
64482
64487
  title: "In-statement indentation",
64483
64488
  shortDescription: "Checks alignment within statements which span multiple lines.",
64484
- extendedInformation: `Lines following the first line should be indented once (2 spaces).
64485
-
64486
- For block declaration statements, lines after the first should be indented an additional time (default: +2 spaces)
64489
+ extendedInformation: `Lines following the first line should be indented once (2 spaces).
64490
+
64491
+ For block declaration statements, lines after the first should be indented an additional time (default: +2 spaces)
64487
64492
  to distinguish them better from code within the block.`,
64488
- badExample: `IF 1 = 1
64489
- AND 2 = 2.
64490
- WRITE 'hello' &&
64491
- 'world'.
64493
+ badExample: `IF 1 = 1
64494
+ AND 2 = 2.
64495
+ WRITE 'hello' &&
64496
+ 'world'.
64492
64497
  ENDIF.`,
64493
- goodExample: `IF 1 = 1
64494
- AND 2 = 2.
64495
- WRITE 'hello' &&
64496
- 'world'.
64498
+ goodExample: `IF 1 = 1
64499
+ AND 2 = 2.
64500
+ WRITE 'hello' &&
64501
+ 'world'.
64497
64502
  ENDIF.`,
64498
64503
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
64499
64504
  };
@@ -64619,23 +64624,23 @@ class Indentation extends _abap_rule_1.ABAPRule {
64619
64624
  title: "Indentation",
64620
64625
  shortDescription: `Checks indentation`,
64621
64626
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
64622
- badExample: `CLASS lcl DEFINITION.
64623
- PRIVATE SECTION.
64624
- METHODS constructor.
64625
- ENDCLASS.
64626
-
64627
- CLASS lcl IMPLEMENTATION.
64628
- METHOD constructor.
64629
- ENDMETHOD.
64627
+ badExample: `CLASS lcl DEFINITION.
64628
+ PRIVATE SECTION.
64629
+ METHODS constructor.
64630
+ ENDCLASS.
64631
+
64632
+ CLASS lcl IMPLEMENTATION.
64633
+ METHOD constructor.
64634
+ ENDMETHOD.
64630
64635
  ENDCLASS.`,
64631
- goodExample: `CLASS lcl DEFINITION.
64632
- PRIVATE SECTION.
64633
- METHODS constructor.
64634
- ENDCLASS.
64635
-
64636
- CLASS lcl IMPLEMENTATION.
64637
- METHOD constructor.
64638
- ENDMETHOD.
64636
+ goodExample: `CLASS lcl DEFINITION.
64637
+ PRIVATE SECTION.
64638
+ METHODS constructor.
64639
+ ENDCLASS.
64640
+
64641
+ CLASS lcl IMPLEMENTATION.
64642
+ METHOD constructor.
64643
+ ENDMETHOD.
64639
64644
  ENDCLASS.`,
64640
64645
  };
64641
64646
  }
@@ -65039,9 +65044,9 @@ class IntfReferencingClas {
65039
65044
  key: "intf_referencing_clas",
65040
65045
  title: "INTF referencing CLAS",
65041
65046
  shortDescription: `Interface contains references to class`,
65042
- extendedInformation: `Only global interfaces are checked.
65043
- Only first level references are checked.
65044
- Exception class references are ignored.
65047
+ extendedInformation: `Only global interfaces are checked.
65048
+ Only first level references are checked.
65049
+ Exception class references are ignored.
65045
65050
  Void references are ignored.`,
65046
65051
  };
65047
65052
  }
@@ -65126,9 +65131,9 @@ class InvalidTableIndex extends _abap_rule_1.ABAPRule {
65126
65131
  title: "Invalid Table Index",
65127
65132
  shortDescription: `Issues error for constant table index zero, as ABAP starts from 1`,
65128
65133
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
65129
- badExample: `DATA(first) = table[ 0 ].
65134
+ badExample: `DATA(first) = table[ 0 ].
65130
65135
  READ TABLE gt_stack ASSIGNING <ls_stack> INDEX 0.`,
65131
- goodExample: `DATA(first) = table[ 1 ].
65136
+ goodExample: `DATA(first) = table[ 1 ].
65132
65137
  READ TABLE gt_stack ASSIGNING <ls_stack> INDEX 1.`,
65133
65138
  };
65134
65139
  }
@@ -65730,8 +65735,8 @@ class LineBreakStyle {
65730
65735
  return {
65731
65736
  key: "line_break_style",
65732
65737
  title: "Makes sure line breaks are consistent in the ABAP code",
65733
- shortDescription: `Enforces LF as newlines in ABAP files
65734
-
65738
+ shortDescription: `Enforces LF as newlines in ABAP files
65739
+
65735
65740
  abapGit does not work with CRLF`,
65736
65741
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
65737
65742
  };
@@ -65800,7 +65805,7 @@ class LineLength extends _abap_rule_1.ABAPRule {
65800
65805
  key: "line_length",
65801
65806
  title: "Line length",
65802
65807
  shortDescription: `Detects lines exceeding the provided maximum length.`,
65803
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length
65808
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length
65804
65809
  https://docs.abapopenchecks.org/checks/04/`,
65805
65810
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
65806
65811
  };
@@ -65871,7 +65876,7 @@ class LineOnlyPunc extends _abap_rule_1.ABAPRule {
65871
65876
  key: "line_only_punc",
65872
65877
  title: "Line containing only punctuation",
65873
65878
  shortDescription: `Detects lines containing only punctuation.`,
65874
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#close-brackets-at-line-end
65879
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#close-brackets-at-line-end
65875
65880
  https://docs.abapopenchecks.org/checks/16/`,
65876
65881
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
65877
65882
  badExample: "zcl_class=>method(\n).",
@@ -66134,15 +66139,15 @@ class LocalVariableNames extends _abap_rule_1.ABAPRule {
66134
66139
  return {
66135
66140
  key: "local_variable_names",
66136
66141
  title: "Local variable naming conventions",
66137
- shortDescription: `
66138
- Allows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols.
66142
+ shortDescription: `
66143
+ Allows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols.
66139
66144
  Regexes are case-insensitive.`,
66140
66145
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
66141
- badExample: `FORM bar.
66142
- DATA foo.
66146
+ badExample: `FORM bar.
66147
+ DATA foo.
66143
66148
  ENDFORM.`,
66144
- goodExample: `FORM bar.
66145
- DATA lv_foo.
66149
+ goodExample: `FORM bar.
66150
+ DATA lv_foo.
66146
66151
  ENDFORM.`,
66147
66152
  };
66148
66153
  }
@@ -66294,9 +66299,9 @@ class MacroNaming extends _abap_rule_1.ABAPRule {
66294
66299
  shortDescription: `Allows you to enforce a pattern for macro definitions`,
66295
66300
  extendedInformation: `Use rule "avoid_use" to avoid macros altogether.`,
66296
66301
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
66297
- badExample: `DEFINE something.
66302
+ badExample: `DEFINE something.
66298
66303
  END-OF-DEFINITION.`,
66299
- goodExample: `DEFINE _something.
66304
+ goodExample: `DEFINE _something.
66300
66305
  END-OF-DEFINITION.`,
66301
66306
  };
66302
66307
  }
@@ -66369,10 +66374,10 @@ class MainFileContents {
66369
66374
  key: "main_file_contents",
66370
66375
  title: "Main file contents",
66371
66376
  shortDescription: `Checks related to report declarations.`,
66372
- extendedInformation: `Does not run if the target version is Cloud
66373
-
66374
- * PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
66375
- * TYPEs must begin with "TYPE-POOL <name>."
66377
+ extendedInformation: `Does not run if the target version is Cloud
66378
+
66379
+ * PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
66380
+ * TYPEs must begin with "TYPE-POOL <name>."
66376
66381
  `,
66377
66382
  };
66378
66383
  }
@@ -66488,17 +66493,17 @@ class ManyParentheses extends _abap_rule_1.ABAPRule {
66488
66493
  title: "Too many parentheses",
66489
66494
  shortDescription: `Searches for expressions where extra parentheses can safely be removed`,
66490
66495
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
66491
- badExample: `
66492
- IF ( destination IS INITIAL ).
66493
- ENDIF.
66494
- IF foo = boo AND ( bar = lar AND moo = loo ).
66495
- ENDIF.
66496
+ badExample: `
66497
+ IF ( destination IS INITIAL ).
66498
+ ENDIF.
66499
+ IF foo = boo AND ( bar = lar AND moo = loo ).
66500
+ ENDIF.
66496
66501
  `,
66497
- goodExample: `
66498
- IF destination IS INITIAL.
66499
- ENDIF.
66500
- IF foo = boo AND bar = lar AND moo = loo.
66501
- ENDIF.
66502
+ goodExample: `
66503
+ IF destination IS INITIAL.
66504
+ ENDIF.
66505
+ IF foo = boo AND bar = lar AND moo = loo.
66506
+ ENDIF.
66502
66507
  `,
66503
66508
  };
66504
66509
  }
@@ -66672,14 +66677,14 @@ class MaxOneMethodParameterPerLine extends _abap_rule_1.ABAPRule {
66672
66677
  title: "Max one method parameter definition per line",
66673
66678
  shortDescription: `Keep max one method parameter description per line`,
66674
66679
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace],
66675
- badExample: `
66676
- METHODS apps_scope_token
66677
- IMPORTING
66680
+ badExample: `
66681
+ METHODS apps_scope_token
66682
+ IMPORTING
66678
66683
  body TYPE bodyapps_scope_token client_id TYPE str.`,
66679
- goodExample: `
66680
- METHODS apps_scope_token
66681
- IMPORTING
66682
- body TYPE bodyapps_scope_token
66684
+ goodExample: `
66685
+ METHODS apps_scope_token
66686
+ IMPORTING
66687
+ body TYPE bodyapps_scope_token
66683
66688
  client_id TYPE str.`,
66684
66689
  };
66685
66690
  }
@@ -66744,11 +66749,11 @@ class MaxOneStatement extends _abap_rule_1.ABAPRule {
66744
66749
  key: "max_one_statement",
66745
66750
  title: "Max one statement per line",
66746
66751
  shortDescription: `Checks that each line contains only a single statement.`,
66747
- extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
66748
-
66749
- Does not report anything for chained statements.
66750
-
66751
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line
66752
+ extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
66753
+
66754
+ Does not report anything for chained statements.
66755
+
66756
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line
66752
66757
  https://docs.abapopenchecks.org/checks/11/`,
66753
66758
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
66754
66759
  badExample: `WRITE foo. WRITE bar.`,
@@ -67086,8 +67091,8 @@ class MethodLength {
67086
67091
  key: "method_length",
67087
67092
  title: "Method/Form Length",
67088
67093
  shortDescription: `Checks relating to method/form length.`,
67089
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
67090
-
67094
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
67095
+
67091
67096
  Abstract methods without statements are considered okay.`,
67092
67097
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
67093
67098
  };
@@ -67192,20 +67197,20 @@ class MethodOverwritesBuiltIn extends _abap_rule_1.ABAPRule {
67192
67197
  key: "method_overwrites_builtin",
67193
67198
  title: "Method name overwrites builtin function",
67194
67199
  shortDescription: `Checks Method names that overwrite builtin SAP functions`,
67195
- extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
67196
-
67197
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
67198
-
67200
+ extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
67201
+
67202
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
67203
+
67199
67204
  Interface method names are ignored`,
67200
67205
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
67201
- badExample: `CLASS lcl DEFINITION.
67202
- PUBLIC SECTION.
67203
- METHODS matches.
67204
- ENDCLASS.
67205
-
67206
- CLASS lcl IMPLEMENTATION.
67207
- METHOD matches.
67208
- ENDMETHOD.
67206
+ badExample: `CLASS lcl DEFINITION.
67207
+ PUBLIC SECTION.
67208
+ METHODS matches.
67209
+ ENDCLASS.
67210
+
67211
+ CLASS lcl IMPLEMENTATION.
67212
+ METHOD matches.
67213
+ ENDMETHOD.
67209
67214
  ENDCLASS.`,
67210
67215
  };
67211
67216
  }
@@ -67396,12 +67401,12 @@ class MixReturning extends _abap_rule_1.ABAPRule {
67396
67401
  // eslint-disable-next-line max-len
67397
67402
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-either-returning-or-exporting-or-changing-but-not-a-combination`,
67398
67403
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
67399
- badExample: `CLASS lcl DEFINITION.
67400
- PUBLIC SECTION.
67401
- METHODS
67402
- foobar
67403
- EXPORTING foo TYPE i
67404
- RETURNING VALUE(rv_string) TYPE string.
67404
+ badExample: `CLASS lcl DEFINITION.
67405
+ PUBLIC SECTION.
67406
+ METHODS
67407
+ foobar
67408
+ EXPORTING foo TYPE i
67409
+ RETURNING VALUE(rv_string) TYPE string.
67405
67410
  ENDCLASS.`,
67406
67411
  };
67407
67412
  }
@@ -67781,7 +67786,7 @@ class Nesting extends _abap_rule_1.ABAPRule {
67781
67786
  key: "nesting",
67782
67787
  title: "Check nesting depth",
67783
67788
  shortDescription: `Checks for methods exceeding a maximum nesting depth`,
67784
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low
67789
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low
67785
67790
  https://docs.abapopenchecks.org/checks/74/`,
67786
67791
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
67787
67792
  };
@@ -68024,7 +68029,7 @@ class NoChainedAssignment extends _abap_rule_1.ABAPRule {
68024
68029
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-chain-assignments`,
68025
68030
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
68026
68031
  badExample: `var1 = var2 = var3.`,
68027
- goodExample: `var2 = var3.
68032
+ goodExample: `var2 = var3.
68028
68033
  var1 = var2.`,
68029
68034
  };
68030
68035
  }
@@ -68083,8 +68088,8 @@ class NoExternalFormCalls extends _abap_rule_1.ABAPRule {
68083
68088
  key: "no_external_form_calls",
68084
68089
  title: "No external FORM calls",
68085
68090
  shortDescription: `Detect external form calls`,
68086
- badExample: `PERFORM foo IN PROGRAM bar.
68087
-
68091
+ badExample: `PERFORM foo IN PROGRAM bar.
68092
+
68088
68093
  PERFORM foo(bar).`,
68089
68094
  tags: [_irule_1.RuleTag.SingleFile],
68090
68095
  };
@@ -68145,17 +68150,17 @@ class NoInlineInOptionalBranches extends _abap_rule_1.ABAPRule {
68145
68150
  key: "no_inline_in_optional_branches",
68146
68151
  title: "Don't declare inline in optional branches",
68147
68152
  shortDescription: `Don't declare inline in optional branches`,
68148
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
68149
-
68150
- Considered optional branches:
68151
- * inside IF/ELSEIF/ELSE
68152
- * inside LOOP
68153
- * inside WHILE
68154
- * inside CASE/WHEN, CASE TYPE OF
68155
- * inside DO
68156
- * inside SELECT loops
68157
-
68158
- Not considered optional branches:
68153
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
68154
+
68155
+ Considered optional branches:
68156
+ * inside IF/ELSEIF/ELSE
68157
+ * inside LOOP
68158
+ * inside WHILE
68159
+ * inside CASE/WHEN, CASE TYPE OF
68160
+ * inside DO
68161
+ * inside SELECT loops
68162
+
68163
+ Not considered optional branches:
68159
68164
  * TRY/CATCH/CLEANUP`,
68160
68165
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
68161
68166
  };
@@ -68255,12 +68260,12 @@ class NoPrefixes extends _abap_rule_1.ABAPRule {
68255
68260
  key: "no_prefixes",
68256
68261
  title: "No Prefixes",
68257
68262
  shortDescription: `Dont use hungarian notation`,
68258
- extendedInformation: `
68259
- Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
68260
- allowing all types to become voided, abaplint will then provide less precise syntax errors.
68261
-
68262
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
68263
-
68263
+ extendedInformation: `
68264
+ Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
68265
+ allowing all types to become voided, abaplint will then provide less precise syntax errors.
68266
+
68267
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
68268
+
68264
68269
  https://github.com/SAP/styleguides/blob/main/clean-abap/sub-sections/AvoidEncodings.md`,
68265
68270
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
68266
68271
  badExample: `DATA lv_foo TYPE i.`,
@@ -68439,7 +68444,7 @@ class NoPublicAttributes extends _abap_rule_1.ABAPRule {
68439
68444
  return {
68440
68445
  key: "no_public_attributes",
68441
68446
  title: "No public attributes",
68442
- shortDescription: `Checks that classes and interfaces don't contain any public attributes.
68447
+ shortDescription: `Checks that classes and interfaces don't contain any public attributes.
68443
68448
  Exceptions are excluded from this rule.`,
68444
68449
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#members-private-by-default-protected-only-if-needed`,
68445
68450
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
@@ -68540,13 +68545,13 @@ class NoYodaConditions extends _abap_rule_1.ABAPRule {
68540
68545
  key: "no_yoda_conditions",
68541
68546
  title: "No Yoda conditions",
68542
68547
  shortDescription: `Finds Yoda conditions and reports issues`,
68543
- extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
68544
-
68548
+ extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
68549
+
68545
68550
  Conditions with operators CP, NP, CS, NS, CA, NA, CO, CN are ignored`,
68546
68551
  tags: [_irule_1.RuleTag.SingleFile],
68547
- badExample: `IF 0 <> sy-subrc.
68552
+ badExample: `IF 0 <> sy-subrc.
68548
68553
  ENDIF.`,
68549
- goodExample: `IF sy-subrc <> 0.
68554
+ goodExample: `IF sy-subrc <> 0.
68550
68555
  ENDIF.`,
68551
68556
  };
68552
68557
  }
@@ -68647,8 +68652,8 @@ class NROBConsistency {
68647
68652
  key: "nrob_consistency",
68648
68653
  title: "Number range consistency",
68649
68654
  shortDescription: `Consistency checks for number ranges`,
68650
- extendedInformation: `Issue reported if percentage warning is over 50%
68651
-
68655
+ extendedInformation: `Issue reported if percentage warning is over 50%
68656
+
68652
68657
  Issue reported if the referenced domain is not found(taking error namespace into account)`,
68653
68658
  tags: [_irule_1.RuleTag.SingleFile],
68654
68659
  };
@@ -68925,58 +68930,58 @@ class ObsoleteStatement extends _abap_rule_1.ABAPRule {
68925
68930
  title: "Obsolete statements",
68926
68931
  shortDescription: `Checks for usages of certain obsolete statements`,
68927
68932
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
68928
- extendedInformation: `
68929
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
68930
-
68931
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
68932
-
68933
- SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
68934
-
68935
- IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
68936
-
68937
- WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
68938
-
68939
- FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
68940
-
68941
- TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
68942
-
68943
- LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
68944
-
68945
- COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
68946
-
68947
- OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
68948
-
68949
- PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
68950
-
68951
- RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
68952
-
68953
- PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
68954
-
68955
- MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
68956
-
68957
- SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
68958
- SELECT COUNT(*) is considered okay
68959
-
68960
- FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
68961
-
68962
- SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
68963
-
68964
- CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
68965
-
68966
- POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
68967
-
68968
- OCCURENCES: check for OCCURENCES vs OCCURRENCES
68969
-
68933
+ extendedInformation: `
68934
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
68935
+
68936
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
68937
+
68938
+ SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
68939
+
68940
+ IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
68941
+
68942
+ WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
68943
+
68944
+ FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
68945
+
68946
+ TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
68947
+
68948
+ LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
68949
+
68950
+ COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
68951
+
68952
+ OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
68953
+
68954
+ PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
68955
+
68956
+ RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
68957
+
68958
+ PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
68959
+
68960
+ MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
68961
+
68962
+ SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
68963
+ SELECT COUNT(*) is considered okay
68964
+
68965
+ FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
68966
+
68967
+ SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
68968
+
68969
+ CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
68970
+
68971
+ POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
68972
+
68973
+ OCCURENCES: check for OCCURENCES vs OCCURRENCES
68974
+
68970
68975
  CLIENT SPECIFIED, from 754: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abapselect_client_obsolete.htm`,
68971
- badExample: `REFRESH itab.
68972
-
68973
- COMPUTE foo = 2 + 2.
68974
-
68975
- MULTIPLY lv_foo BY 2.
68976
-
68977
- INTERFACE intf LOAD.
68978
-
68979
- IF foo IS SUPPLIED.
68976
+ badExample: `REFRESH itab.
68977
+
68978
+ COMPUTE foo = 2 + 2.
68979
+
68980
+ MULTIPLY lv_foo BY 2.
68981
+
68982
+ INTERFACE intf LOAD.
68983
+
68984
+ IF foo IS SUPPLIED.
68980
68985
  ENDIF.`,
68981
68986
  };
68982
68987
  }
@@ -69316,9 +69321,9 @@ class OmitParameterName {
69316
69321
  key: "omit_parameter_name",
69317
69322
  title: "Omit parameter name",
69318
69323
  shortDescription: `Omit the parameter name in single parameter calls`,
69319
- extendedInformation: `
69320
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
69321
-
69324
+ extendedInformation: `
69325
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
69326
+
69322
69327
  EXPORTING must already be omitted for this rule to take effect, https://rules.abaplint.org/exporting/`,
69323
69328
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
69324
69329
  badExample: `method( param = 2 ).`,
@@ -69524,20 +69529,20 @@ class OmitReceiving extends _abap_rule_1.ABAPRule {
69524
69529
  shortDescription: `Omit RECEIVING`,
69525
69530
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-receiving`,
69526
69531
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
69527
- badExample: `
69528
- upload_pack(
69529
- EXPORTING
69530
- io_client = lo_client
69531
- iv_url = iv_url
69532
- iv_deepen_level = iv_deepen_level
69533
- it_hashes = lt_hashes
69534
- RECEIVING
69532
+ badExample: `
69533
+ upload_pack(
69534
+ EXPORTING
69535
+ io_client = lo_client
69536
+ iv_url = iv_url
69537
+ iv_deepen_level = iv_deepen_level
69538
+ it_hashes = lt_hashes
69539
+ RECEIVING
69535
69540
  rt_objects = et_objects ).`,
69536
- goodExample: `
69537
- et_objects = upload_pack(
69538
- io_client = lo_client
69539
- iv_url = iv_url
69540
- iv_deepen_level = iv_deepen_level
69541
+ goodExample: `
69542
+ et_objects = upload_pack(
69543
+ io_client = lo_client
69544
+ iv_url = iv_url
69545
+ iv_deepen_level = iv_deepen_level
69541
69546
  it_hashes = lt_hashes ).`,
69542
69547
  };
69543
69548
  }
@@ -69601,8 +69606,8 @@ class Parser702Chaining extends _abap_rule_1.ABAPRule {
69601
69606
  return {
69602
69607
  key: "parser_702_chaining",
69603
69608
  title: "Parser Error, bad chanining on 702",
69604
- shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
69605
- this rule finds these and reports errors.
69609
+ shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
69610
+ this rule finds these and reports errors.
69606
69611
  Only active on target version 702 and below.`,
69607
69612
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
69608
69613
  };
@@ -69682,8 +69687,8 @@ class ParserError {
69682
69687
  return {
69683
69688
  key: "parser_error",
69684
69689
  title: "Parser error",
69685
- shortDescription: `Checks for syntax not recognized by abaplint.
69686
-
69690
+ shortDescription: `Checks for syntax not recognized by abaplint.
69691
+
69687
69692
  See recognized syntax at https://syntax.abaplint.org`,
69688
69693
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
69689
69694
  };
@@ -69768,7 +69773,7 @@ class ParserMissingSpace extends _abap_rule_1.ABAPRule {
69768
69773
  return {
69769
69774
  key: "parser_missing_space",
69770
69775
  title: "Parser Error, missing space",
69771
- shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.
69776
+ shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.
69772
69777
  This rule makes sure the spaces are consistently required across the language.`,
69773
69778
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
69774
69779
  badExample: `IF ( foo = 'bar').`,
@@ -70191,25 +70196,25 @@ class PreferInline {
70191
70196
  key: "prefer_inline",
70192
70197
  title: "Prefer Inline Declarations",
70193
70198
  shortDescription: `Prefer inline to up-front declarations.`,
70194
- extendedInformation: `EXPERIMENTAL
70195
-
70196
- Activates if language version is v740sp02 or above.
70197
-
70198
- Variables must be local(METHOD or FORM).
70199
-
70200
- No generic or void typed variables. No syntax errors.
70201
-
70202
- First position used must be a full/pure write.
70203
-
70204
- Move statment is not a cast(?=)
70205
-
70199
+ extendedInformation: `EXPERIMENTAL
70200
+
70201
+ Activates if language version is v740sp02 or above.
70202
+
70203
+ Variables must be local(METHOD or FORM).
70204
+
70205
+ No generic or void typed variables. No syntax errors.
70206
+
70207
+ First position used must be a full/pure write.
70208
+
70209
+ Move statment is not a cast(?=)
70210
+
70206
70211
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-inline-to-up-front-declarations`,
70207
70212
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Experimental, _irule_1.RuleTag.Quickfix],
70208
- badExample: `DATA foo TYPE i.
70209
- foo = 2.
70210
- DATA percentage TYPE decfloat34.
70213
+ badExample: `DATA foo TYPE i.
70214
+ foo = 2.
70215
+ DATA percentage TYPE decfloat34.
70211
70216
  percentage = ( comment_number / abs_statement_number ) * 100.`,
70212
- goodExample: `DATA(foo) = 2.
70217
+ goodExample: `DATA(foo) = 2.
70213
70218
  DATA(percentage) = CONV decfloat34( comment_number / abs_statement_number ) * 100.`,
70214
70219
  };
70215
70220
  }
@@ -70423,18 +70428,18 @@ class PreferIsNot extends _abap_rule_1.ABAPRule {
70423
70428
  key: "prefer_is_not",
70424
70429
  title: "Prefer IS NOT to NOT IS",
70425
70430
  shortDescription: `Prefer IS NOT to NOT IS`,
70426
- extendedInformation: `
70427
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
70428
-
70431
+ extendedInformation: `
70432
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
70433
+
70429
70434
  "if not is_valid( )." examples are skipped`,
70430
70435
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
70431
- goodExample: `IF variable IS NOT INITIAL.
70432
- IF variable NP 'TODO*'.
70433
- IF variable <> 42.
70436
+ goodExample: `IF variable IS NOT INITIAL.
70437
+ IF variable NP 'TODO*'.
70438
+ IF variable <> 42.
70434
70439
  IF variable CO 'hello'.`,
70435
- badExample: `IF NOT variable IS INITIAL.
70436
- IF NOT variable CP 'TODO*'.
70437
- IF NOT variable = 42.
70440
+ badExample: `IF NOT variable IS INITIAL.
70441
+ IF NOT variable CP 'TODO*'.
70442
+ IF NOT variable = 42.
70438
70443
  IF NOT variable CA 'hello'.`,
70439
70444
  };
70440
70445
  }
@@ -70622,14 +70627,14 @@ class PreferRaiseExceptionNew extends _abap_rule_1.ABAPRule {
70622
70627
  key: "prefer_raise_exception_new",
70623
70628
  title: "Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE",
70624
70629
  shortDescription: `Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE`,
70625
- extendedInformation: `
70626
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
70627
-
70630
+ extendedInformation: `
70631
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
70632
+
70628
70633
  From 752 and up`,
70629
70634
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
70630
70635
  goodExample: `RAISE EXCEPTION NEW cx_generation_error( previous = exception ).`,
70631
- badExample: `RAISE EXCEPTION TYPE cx_generation_error
70632
- EXPORTING
70636
+ badExample: `RAISE EXCEPTION TYPE cx_generation_error
70637
+ EXPORTING
70633
70638
  previous = exception.`,
70634
70639
  };
70635
70640
  }
@@ -70707,12 +70712,12 @@ class PreferReturningToExporting extends _abap_rule_1.ABAPRule {
70707
70712
  key: "prefer_returning_to_exporting",
70708
70713
  title: "Prefer RETURNING to EXPORTING",
70709
70714
  shortDescription: `Prefer RETURNING to EXPORTING. Generic types cannot be RETURNING.`,
70710
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting
70715
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting
70711
70716
  https://docs.abapopenchecks.org/checks/44/`,
70712
70717
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
70713
- badExample: `CLASS lcl DEFINITION.
70714
- PUBLIC SECTION.
70715
- METHODS test EXPORTING ev_foo TYPE i.
70718
+ badExample: `CLASS lcl DEFINITION.
70719
+ PUBLIC SECTION.
70720
+ METHODS test EXPORTING ev_foo TYPE i.
70716
70721
  ENDCLASS.`,
70717
70722
  };
70718
70723
  }
@@ -70808,8 +70813,8 @@ class PreferXsdbool extends _abap_rule_1.ABAPRule {
70808
70813
  key: "prefer_xsdbool",
70809
70814
  title: "Prefer xsdbool over boolc",
70810
70815
  shortDescription: `Prefer xsdbool over boolc`,
70811
- extendedInformation: `Activates if language version is v740sp08 or above.
70812
-
70816
+ extendedInformation: `Activates if language version is v740sp08 or above.
70817
+
70813
70818
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
70814
70819
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
70815
70820
  badExample: `DATA(sdf) = boolc( 1 = 2 ).`,
@@ -70881,9 +70886,9 @@ class PreferredCompareOperator extends _abap_rule_1.ABAPRule {
70881
70886
  title: "Preferred compare operator",
70882
70887
  shortDescription: `Configure undesired operator variants`,
70883
70888
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
70884
- badExample: `IF foo EQ bar.
70889
+ badExample: `IF foo EQ bar.
70885
70890
  ENDIF.`,
70886
- goodExample: `IF foo = bar.
70891
+ goodExample: `IF foo = bar.
70887
70892
  ENDIF.`,
70888
70893
  };
70889
70894
  }
@@ -71107,26 +71112,26 @@ class ReduceProceduralCode extends _abap_rule_1.ABAPRule {
71107
71112
  key: "reduce_procedural_code",
71108
71113
  title: "Reduce procedural code",
71109
71114
  shortDescription: `Checks FORM and FUNCTION-MODULE have few statements`,
71110
- extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
71111
-
71112
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
71113
-
71115
+ extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
71116
+
71117
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
71118
+
71114
71119
  Comments are not counted as statements.`,
71115
71120
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
71116
- badExample: `FORM foo.
71117
- DATA lv_bar TYPE i.
71118
- lv_bar = 2 + 2.
71119
- IF lv_bar = 4.
71120
- WRITE 'hello world'.
71121
- ENDIF.
71122
- DATA lv_bar TYPE i.
71123
- lv_bar = 2 + 2.
71124
- IF lv_bar = 4.
71125
- WRITE 'hello world'.
71126
- ENDIF.
71121
+ badExample: `FORM foo.
71122
+ DATA lv_bar TYPE i.
71123
+ lv_bar = 2 + 2.
71124
+ IF lv_bar = 4.
71125
+ WRITE 'hello world'.
71126
+ ENDIF.
71127
+ DATA lv_bar TYPE i.
71128
+ lv_bar = 2 + 2.
71129
+ IF lv_bar = 4.
71130
+ WRITE 'hello world'.
71131
+ ENDIF.
71127
71132
  ENDFORM.`,
71128
- goodExample: `FORM foo.
71129
- NEW zcl_global_class( )->run_logic( ).
71133
+ goodExample: `FORM foo.
71134
+ NEW zcl_global_class( )->run_logic( ).
71130
71135
  ENDFORM.`,
71131
71136
  };
71132
71137
  }
@@ -71370,10 +71375,10 @@ class RemoveDescriptions {
71370
71375
  return {
71371
71376
  key: "remove_descriptions",
71372
71377
  title: "Remove descriptions",
71373
- shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
71374
-
71375
- Class descriptions are required, see rule description_empty.
71376
-
71378
+ shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
71379
+
71380
+ Class descriptions are required, see rule description_empty.
71381
+
71377
71382
  Consider using ABAP Doc for documentation.`,
71378
71383
  tags: [],
71379
71384
  };
@@ -71498,14 +71503,14 @@ class RFCErrorHandling extends _abap_rule_1.ABAPRule {
71498
71503
  tags: [_irule_1.RuleTag.SingleFile],
71499
71504
  shortDescription: `Checks that exceptions 'system_failure' and 'communication_failure' are handled in RFC calls`,
71500
71505
  extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenrfc_exception.htm`,
71501
- badExample: `CALL FUNCTION 'ZRFC'
71506
+ badExample: `CALL FUNCTION 'ZRFC'
71502
71507
  DESTINATION lv_rfc.`,
71503
- goodExample: `CALL FUNCTION 'ZRFC'
71504
- DESTINATION lv_rfc
71505
- EXCEPTIONS
71506
- system_failure = 1 MESSAGE msg
71507
- communication_failure = 2 MESSAGE msg
71508
- resource_failure = 3
71508
+ goodExample: `CALL FUNCTION 'ZRFC'
71509
+ DESTINATION lv_rfc
71510
+ EXCEPTIONS
71511
+ system_failure = 1 MESSAGE msg
71512
+ communication_failure = 2 MESSAGE msg
71513
+ resource_failure = 3
71509
71514
  OTHERS = 4.`,
71510
71515
  };
71511
71516
  }
@@ -71589,11 +71594,11 @@ class SelectAddOrderBy {
71589
71594
  key: "select_add_order_by",
71590
71595
  title: "SELECT add ORDER BY",
71591
71596
  shortDescription: `SELECTs add ORDER BY clause`,
71592
- extendedInformation: `
71593
- This will make sure that the SELECT statement returns results in the same sequence on different databases
71594
-
71595
- add ORDER BY PRIMARY KEY if in doubt
71596
-
71597
+ extendedInformation: `
71598
+ This will make sure that the SELECT statement returns results in the same sequence on different databases
71599
+
71600
+ add ORDER BY PRIMARY KEY if in doubt
71601
+
71597
71602
  If the target is a sorted/hashed table, no issue is reported`,
71598
71603
  tags: [_irule_1.RuleTag.SingleFile],
71599
71604
  badExample: `SELECT * FROM db INTO TABLE @DATA(tab).`,
@@ -71724,14 +71729,14 @@ class SelectPerformance {
71724
71729
  key: "select_performance",
71725
71730
  title: "SELECT performance",
71726
71731
  shortDescription: `Various checks regarding SELECT performance.`,
71727
- extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
71728
-
71732
+ extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
71733
+
71729
71734
  SELECT *: not reported if using INTO/APPENDING CORRESPONDING FIELDS OF`,
71730
71735
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Performance],
71731
- badExample: `SELECT field1, field2 FROM table
71732
- INTO @DATA(structure) UP TO 1 ROWS ORDER BY field3 DESCENDING.
71736
+ badExample: `SELECT field1, field2 FROM table
71737
+ INTO @DATA(structure) UP TO 1 ROWS ORDER BY field3 DESCENDING.
71733
71738
  ENDSELECT.`,
71734
- goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
71739
+ goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
71735
71740
  INTO TABLE @DATA(table) ORDER BY field3 DESCENDING`,
71736
71741
  };
71737
71742
  }
@@ -71845,8 +71850,8 @@ class SelectSingleFullKey {
71845
71850
  key: "select_single_full_key",
71846
71851
  title: "Detect SELECT SINGLE which are possibily not unique",
71847
71852
  shortDescription: `Detect SELECT SINGLE which are possibily not unique`,
71848
- extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
71849
-
71853
+ extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
71854
+
71850
71855
  If the statement contains a JOIN it is not checked`,
71851
71856
  pseudoComment: "EC CI_NOORDER",
71852
71857
  tags: [_irule_1.RuleTag.Quickfix],
@@ -72274,8 +72279,8 @@ class SICFConsistency {
72274
72279
  key: "sicf_consistency",
72275
72280
  title: "SICF consistency",
72276
72281
  shortDescription: `Checks the validity of ICF services`,
72277
- extendedInformation: `* Class defined in handler must exist
72278
- * Class must not have any syntax errors
72282
+ extendedInformation: `* Class defined in handler must exist
72283
+ * Class must not have any syntax errors
72279
72284
  * Class must implement interface IF_HTTP_EXTENSION`,
72280
72285
  };
72281
72286
  }
@@ -72387,23 +72392,23 @@ class SlowParameterPassing {
72387
72392
  shortDescription: `Detects slow pass by value passing for methods where parameter is not changed`,
72388
72393
  extendedInformation: `Method parameters defined in interfaces is not checked`,
72389
72394
  tags: [_irule_1.RuleTag.Performance],
72390
- badExample: `CLASS lcl DEFINITION.
72391
- PUBLIC SECTION.
72392
- METHODS bar IMPORTING VALUE(sdf) TYPE string.
72393
- ENDCLASS.
72394
- CLASS lcl IMPLEMENTATION.
72395
- METHOD bar.
72396
- WRITE sdf.
72397
- ENDMETHOD.
72395
+ badExample: `CLASS lcl DEFINITION.
72396
+ PUBLIC SECTION.
72397
+ METHODS bar IMPORTING VALUE(sdf) TYPE string.
72398
+ ENDCLASS.
72399
+ CLASS lcl IMPLEMENTATION.
72400
+ METHOD bar.
72401
+ WRITE sdf.
72402
+ ENDMETHOD.
72398
72403
  ENDCLASS.`,
72399
- goodExample: `CLASS lcl DEFINITION.
72400
- PUBLIC SECTION.
72401
- METHODS bar IMPORTING sdf TYPE string.
72402
- ENDCLASS.
72403
- CLASS lcl IMPLEMENTATION.
72404
- METHOD bar.
72405
- WRITE sdf.
72406
- ENDMETHOD.
72404
+ goodExample: `CLASS lcl DEFINITION.
72405
+ PUBLIC SECTION.
72406
+ METHODS bar IMPORTING sdf TYPE string.
72407
+ ENDCLASS.
72408
+ CLASS lcl IMPLEMENTATION.
72409
+ METHOD bar.
72410
+ WRITE sdf.
72411
+ ENDMETHOD.
72407
72412
  ENDCLASS.`,
72408
72413
  };
72409
72414
  }
@@ -72674,8 +72679,8 @@ class SpaceBeforeDot extends _abap_rule_1.ABAPRule {
72674
72679
  key: "space_before_dot",
72675
72680
  title: "Space before dot",
72676
72681
  shortDescription: `Checks for extra spaces before dots at the ends of statements`,
72677
- extendedInformation: `
72678
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
72682
+ extendedInformation: `
72683
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
72679
72684
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#condense-your-code`,
72680
72685
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
72681
72686
  badExample: `WRITE bar .`,
@@ -72861,12 +72866,12 @@ class SQLValueConversion {
72861
72866
  key: "sql_value_conversion",
72862
72867
  title: "Implicit SQL Value Conversion",
72863
72868
  shortDescription: `Ensure types match when selecting from database`,
72864
- extendedInformation: `
72865
- * Integer to CHAR conversion
72866
- * Integer to NUMC conversion
72867
- * NUMC to Integer conversion
72868
- * CHAR to Integer conversion
72869
- * Source field longer than database field, CHAR -> CHAR
72869
+ extendedInformation: `
72870
+ * Integer to CHAR conversion
72871
+ * Integer to NUMC conversion
72872
+ * NUMC to Integer conversion
72873
+ * CHAR to Integer conversion
72874
+ * Source field longer than database field, CHAR -> CHAR
72870
72875
  * Source field longer than database field, NUMC -> NUMC`,
72871
72876
  tags: [],
72872
72877
  };
@@ -72938,7 +72943,7 @@ class StartAtTab extends _abap_rule_1.ABAPRule {
72938
72943
  key: "start_at_tab",
72939
72944
  title: "Start at tab",
72940
72945
  shortDescription: `Checks that statements start at tabstops.`,
72941
- extendedInformation: `Reports max 100 issues per file
72946
+ extendedInformation: `Reports max 100 issues per file
72942
72947
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
72943
72948
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
72944
72949
  badExample: ` WRITE a.`,
@@ -73115,12 +73120,12 @@ class StrictSQL extends _abap_rule_1.ABAPRule {
73115
73120
  key: "strict_sql",
73116
73121
  title: "Strict SQL",
73117
73122
  shortDescription: `Strict SQL`,
73118
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
73119
-
73120
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
73121
-
73122
- Also see separate rule sql_escape_host_variables
73123
-
73123
+ extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
73124
+
73125
+ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
73126
+
73127
+ Also see separate rule sql_escape_host_variables
73128
+
73124
73129
  Activates from v750 and up`,
73125
73130
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix],
73126
73131
  badExample: `SELECT * FROM ztabl INTO TABLE @rt_content WHERE type = @iv_type ORDER BY PRIMARY KEY.`,
@@ -73374,11 +73379,11 @@ class SyModification extends _abap_rule_1.ABAPRule {
73374
73379
  key: "sy_modification",
73375
73380
  title: "Modification of SY fields",
73376
73381
  shortDescription: `Finds modification of sy fields`,
73377
- extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
73378
-
73382
+ extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
73383
+
73379
73384
  Changes to SY-TVAR* fields are not reported`,
73380
73385
  tags: [_irule_1.RuleTag.SingleFile],
73381
- badExample: `sy-uname = 2.
73386
+ badExample: `sy-uname = 2.
73382
73387
  sy = sy.`,
73383
73388
  };
73384
73389
  }
@@ -73440,8 +73445,8 @@ class TABLEnhancementCategory {
73440
73445
  key: "tabl_enhancement_category",
73441
73446
  title: "TABL enhancement category must be set",
73442
73447
  shortDescription: `Checks that tables do not have the enhancement category 'not classified'.`,
73443
- extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
73444
-
73448
+ extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
73449
+
73445
73450
  You may use standard report RS_DDIC_CLASSIFICATION_FINAL for adjustment.`,
73446
73451
  tags: [],
73447
73452
  };
@@ -73506,8 +73511,8 @@ class TablesDeclaredLocally extends _abap_rule_1.ABAPRule {
73506
73511
  shortDescription: `TABLES are always global, so declare them globally`,
73507
73512
  extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abaptables.htm`,
73508
73513
  tags: [_irule_1.RuleTag.SingleFile],
73509
- badExample: `FORM foo.
73510
- TABLES t100.
73514
+ badExample: `FORM foo.
73515
+ TABLES t100.
73511
73516
  ENDFORM.`,
73512
73517
  goodExample: `TABLES t000.`,
73513
73518
  };
@@ -73635,9 +73640,9 @@ class TypeFormParameters extends _abap_rule_1.ABAPRule {
73635
73640
  title: "Type FORM parameters",
73636
73641
  shortDescription: `Checks for untyped FORM parameters`,
73637
73642
  tags: [_irule_1.RuleTag.SingleFile],
73638
- badExample: `FORM foo USING bar.
73643
+ badExample: `FORM foo USING bar.
73639
73644
  ENDFORM.`,
73640
- goodExample: `FORM foo USING bar TYPE string.
73645
+ goodExample: `FORM foo USING bar TYPE string.
73641
73646
  ENDFORM.`,
73642
73647
  };
73643
73648
  }
@@ -74310,38 +74315,38 @@ class UnnecessaryPragma extends _abap_rule_1.ABAPRule {
74310
74315
  key: "unnecessary_pragma",
74311
74316
  title: "Unnecessary Pragma",
74312
74317
  shortDescription: `Finds pragmas which can be removed`,
74313
- extendedInformation: `* NO_HANDLER with handler
74314
-
74315
- * NEEDED without definition
74316
-
74317
- * NO_TEXT without texts
74318
-
74319
- * SUBRC_OK where sy-subrc is checked
74320
-
74318
+ extendedInformation: `* NO_HANDLER with handler
74319
+
74320
+ * NEEDED without definition
74321
+
74322
+ * NO_TEXT without texts
74323
+
74324
+ * SUBRC_OK where sy-subrc is checked
74325
+
74321
74326
  NO_HANDLER inside macros are not checked`,
74322
74327
  tags: [_irule_1.RuleTag.SingleFile],
74323
- badExample: `TRY.
74324
- ...
74325
- CATCH zcx_abapgit_exception ##NO_HANDLER.
74326
- RETURN. " it has a handler
74327
- ENDTRY.
74328
- MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
74329
- SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
74330
- IF sy-subrc <> 0.
74328
+ badExample: `TRY.
74329
+ ...
74330
+ CATCH zcx_abapgit_exception ##NO_HANDLER.
74331
+ RETURN. " it has a handler
74332
+ ENDTRY.
74333
+ MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
74334
+ SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
74335
+ IF sy-subrc <> 0.
74331
74336
  ENDIF.`,
74332
- goodExample: `TRY.
74333
- ...
74334
- CATCH zcx_abapgit_exception.
74335
- RETURN.
74336
- ENDTRY.
74337
- MESSAGE w125(zbar) WITH c_foo INTO message.
74338
- SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
74339
- IF sy-subrc <> 0.
74340
- ENDIF.
74341
-
74342
- DATA: BEGIN OF blah ##NEEDED,
74343
- test1 TYPE string,
74344
- test2 TYPE string,
74337
+ goodExample: `TRY.
74338
+ ...
74339
+ CATCH zcx_abapgit_exception.
74340
+ RETURN.
74341
+ ENDTRY.
74342
+ MESSAGE w125(zbar) WITH c_foo INTO message.
74343
+ SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
74344
+ IF sy-subrc <> 0.
74345
+ ENDIF.
74346
+
74347
+ DATA: BEGIN OF blah ##NEEDED,
74348
+ test1 TYPE string,
74349
+ test2 TYPE string,
74345
74350
  END OF blah.`,
74346
74351
  };
74347
74352
  }
@@ -74508,18 +74513,18 @@ class UnnecessaryReturn extends _abap_rule_1.ABAPRule {
74508
74513
  shortDescription: `Finds unnecessary RETURN statements`,
74509
74514
  extendedInformation: `Finds unnecessary RETURN statements`,
74510
74515
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
74511
- badExample: `FORM hello1.
74512
- WRITE 'world'.
74513
- RETURN.
74514
- ENDFORM.
74515
-
74516
- FORM foo.
74517
- IF 1 = 2.
74518
- RETURN.
74519
- ENDIF.
74516
+ badExample: `FORM hello1.
74517
+ WRITE 'world'.
74518
+ RETURN.
74519
+ ENDFORM.
74520
+
74521
+ FORM foo.
74522
+ IF 1 = 2.
74523
+ RETURN.
74524
+ ENDIF.
74520
74525
  ENDFORM.`,
74521
- goodExample: `FORM hello2.
74522
- WRITE 'world'.
74526
+ goodExample: `FORM hello2.
74527
+ WRITE 'world'.
74523
74528
  ENDFORM.`,
74524
74529
  };
74525
74530
  }
@@ -74870,13 +74875,13 @@ class UnusedMacros {
74870
74875
  title: "Unused macros",
74871
74876
  shortDescription: `Checks for unused macro definitions definitions`,
74872
74877
  tags: [_irule_1.RuleTag.Quickfix],
74873
- badExample: `DEFINE foobar1.
74874
- WRITE 'hello'.
74878
+ badExample: `DEFINE foobar1.
74879
+ WRITE 'hello'.
74875
74880
  END-OF-DEFINITION.`,
74876
- goodExample: `DEFINE foobar2.
74877
- WRITE 'hello'.
74878
- END-OF-DEFINITION.
74879
-
74881
+ goodExample: `DEFINE foobar2.
74882
+ WRITE 'hello'.
74883
+ END-OF-DEFINITION.
74884
+
74880
74885
  foobar2.`,
74881
74886
  };
74882
74887
  }
@@ -74988,18 +74993,18 @@ class UnusedMethods {
74988
74993
  key: "unused_methods",
74989
74994
  title: "Unused methods",
74990
74995
  shortDescription: `Checks for unused methods`,
74991
- extendedInformation: `Checks private and protected methods.
74992
-
74993
- Unused methods are not reported if the object contains parser or syntax errors.
74994
- Quick fixes only appears for private methods or projected methods where the class doesnt have any subclasses.
74995
-
74996
- Skips:
74997
- * methods FOR TESTING
74998
- * methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
74999
- * class_constructor + constructor methods
75000
- * event handlers
75001
- * methods that are redefined
75002
- * INCLUDEs
74996
+ extendedInformation: `Checks private and protected methods.
74997
+
74998
+ Unused methods are not reported if the object contains parser or syntax errors.
74999
+ Quick fixes only appears for private methods or projected methods where the class doesnt have any subclasses.
75000
+
75001
+ Skips:
75002
+ * methods FOR TESTING
75003
+ * methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
75004
+ * class_constructor + constructor methods
75005
+ * event handlers
75006
+ * methods that are redefined
75007
+ * INCLUDEs
75003
75008
  `,
75004
75009
  tags: [_irule_1.RuleTag.Quickfix],
75005
75010
  pragma: "##CALLED",
@@ -75475,23 +75480,23 @@ class UnusedVariables {
75475
75480
  key: "unused_variables",
75476
75481
  title: "Unused variables",
75477
75482
  shortDescription: `Checks for unused variables and constants`,
75478
- extendedInformation: `Skips event parameters.
75479
-
75480
- Note that this currently does not work if the source code uses macros.
75481
-
75482
- Unused variables are not reported if the object contains parser or syntax errors.
75483
-
75483
+ extendedInformation: `Skips event parameters.
75484
+
75485
+ Note that this currently does not work if the source code uses macros.
75486
+
75487
+ Unused variables are not reported if the object contains parser or syntax errors.
75488
+
75484
75489
  Errors found in INCLUDES are reported for the main program.`,
75485
75490
  tags: [_irule_1.RuleTag.Quickfix],
75486
75491
  pragma: "##NEEDED",
75487
75492
  pseudoComment: "EC NEEDED",
75488
- badExample: `DATA: BEGIN OF blah1,
75489
- test TYPE string,
75490
- test2 TYPE string,
75493
+ badExample: `DATA: BEGIN OF blah1,
75494
+ test TYPE string,
75495
+ test2 TYPE string,
75491
75496
  END OF blah1.`,
75492
- goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
75493
- test TYPE string,
75494
- test2 TYPE string,
75497
+ goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
75498
+ test TYPE string,
75499
+ test2 TYPE string,
75495
75500
  END OF blah2.`,
75496
75501
  };
75497
75502
  }
@@ -75710,15 +75715,15 @@ class UseBoolExpression extends _abap_rule_1.ABAPRule {
75710
75715
  shortDescription: `Use boolean expression, xsdbool from 740sp08 and up, boolc from 702 and up`,
75711
75716
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
75712
75717
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
75713
- badExample: `IF line IS INITIAL.
75714
- has_entries = abap_false.
75715
- ELSE.
75716
- has_entries = abap_true.
75717
- ENDIF.
75718
-
75718
+ badExample: `IF line IS INITIAL.
75719
+ has_entries = abap_false.
75720
+ ELSE.
75721
+ has_entries = abap_true.
75722
+ ENDIF.
75723
+
75719
75724
  DATA(fsdf) = COND #( WHEN foo <> bar THEN abap_true ELSE abap_false ).`,
75720
- goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
75721
-
75725
+ goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
75726
+
75722
75727
  DATA(fsdf) = xsdbool( foo <> bar ).`,
75723
75728
  };
75724
75729
  }
@@ -75836,15 +75841,15 @@ class UseClassBasedExceptions extends _abap_rule_1.ABAPRule {
75836
75841
  shortDescription: `Use class based exceptions, checks interface and class definitions`,
75837
75842
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-class-based-exceptions`,
75838
75843
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
75839
- badExample: `INTERFACE lif.
75840
- METHODS load_data
75841
- EXCEPTIONS
75842
- invalid_parameter.
75844
+ badExample: `INTERFACE lif.
75845
+ METHODS load_data
75846
+ EXCEPTIONS
75847
+ invalid_parameter.
75843
75848
  ENDINTERFACE.`,
75844
- goodExample: `INTERFACE lif.
75845
- METHODS load_data
75846
- RAISING
75847
- cx_something.
75849
+ goodExample: `INTERFACE lif.
75850
+ METHODS load_data
75851
+ RAISING
75852
+ cx_something.
75848
75853
  ENDINTERFACE.`,
75849
75854
  };
75850
75855
  }
@@ -75904,15 +75909,15 @@ class UseLineExists extends _abap_rule_1.ABAPRule {
75904
75909
  key: "use_line_exists",
75905
75910
  title: "Use line_exists",
75906
75911
  shortDescription: `Use line_exists, from 740sp02 and up`,
75907
- extendedInformation: `
75908
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
75909
-
75912
+ extendedInformation: `
75913
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
75914
+
75910
75915
  Not reported if the READ TABLE statement contains BINARY SEARCH.`,
75911
75916
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
75912
- badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
75913
- IF sy-subrc = 0.
75917
+ badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
75918
+ IF sy-subrc = 0.
75914
75919
  ENDIF.`,
75915
- goodExample: `IF line_exists( my_table[ key = 'A' ] ).
75920
+ goodExample: `IF line_exists( my_table[ key = 'A' ] ).
75916
75921
  ENDIF.`,
75917
75922
  };
75918
75923
  }
@@ -76022,10 +76027,10 @@ class UseNew extends _abap_rule_1.ABAPRule {
76022
76027
  key: "use_new",
76023
76028
  title: "Use NEW",
76024
76029
  shortDescription: `Checks for deprecated CREATE OBJECT statements.`,
76025
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
76026
-
76027
- If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
76028
-
76030
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
76031
+
76032
+ If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
76033
+
76029
76034
  Applicable from v740sp02 and up`,
76030
76035
  badExample: `CREATE OBJECT ref.`,
76031
76036
  goodExample: `ref = NEW #( ).`,
@@ -76123,13 +76128,13 @@ class WhenOthersLast extends _abap_rule_1.ABAPRule {
76123
76128
  title: "WHEN OTHERS last",
76124
76129
  shortDescription: `Checks that WHEN OTHERS is placed the last within a CASE statement.`,
76125
76130
  tags: [_irule_1.RuleTag.SingleFile],
76126
- badExample: `CASE bar.
76127
- WHEN OTHERS.
76128
- WHEN 2.
76131
+ badExample: `CASE bar.
76132
+ WHEN OTHERS.
76133
+ WHEN 2.
76129
76134
  ENDCASE.`,
76130
- goodExample: `CASE bar.
76131
- WHEN 2.
76132
- WHEN OTHERS.
76135
+ goodExample: `CASE bar.
76136
+ WHEN 2.
76137
+ WHEN OTHERS.
76133
76138
  ENDCASE.`,
76134
76139
  };
76135
76140
  }