@abaplint/cli 2.113.79 → 2.113.81

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 +854 -849
  4. package/package.json +63 -63
package/build/cli.js CHANGED
@@ -27697,7 +27697,12 @@ class Source {
27697
27697
  return foundType;
27698
27698
  }
27699
27699
  case "EXACT":
27700
- return this.determineType(node, input, targetType);
27700
+ {
27701
+ const foundType = this.determineType(node, input, targetType);
27702
+ new Source().runSyntax(node.findDirectExpression(Expressions.Source), input, foundType);
27703
+ this.addIfInferred(node, input, foundType);
27704
+ return foundType;
27705
+ }
27701
27706
  case "VALUE":
27702
27707
  {
27703
27708
  const foundType = this.determineType(node, input, targetType);
@@ -35668,13 +35673,13 @@ class FlowGraph {
35668
35673
  this.label = label;
35669
35674
  }
35670
35675
  toDigraph() {
35671
- return `digraph G {
35672
- labelloc="t";
35673
- label="${this.label}";
35674
- graph [fontname = "helvetica"];
35675
- node [fontname = "helvetica", shape="box"];
35676
- edge [fontname = "helvetica"];
35677
- ${this.toTextEdges()}
35676
+ return `digraph G {
35677
+ labelloc="t";
35678
+ label="${this.label}";
35679
+ graph [fontname = "helvetica"];
35680
+ node [fontname = "helvetica", shape="box"];
35681
+ edge [fontname = "helvetica"];
35682
+ ${this.toTextEdges()}
35678
35683
  }`;
35679
35684
  }
35680
35685
  listSources(node) {
@@ -40762,8 +40767,8 @@ class CDSCase extends combi_1.Expression {
40762
40767
  getRunnable() {
40763
40768
  const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.optPrio)((0, combi_1.seq)(".", _1.CDSName)));
40764
40769
  const value = (0, combi_1.alt)(name, _1.CDSString, _1.CDSFunction, CDSCase, _1.CDSCast, _1.CDSArithmetics);
40765
- const simple = (0, combi_1.seq)("CASE", (0, combi_1.alt)(name, _1.CDSFunction), (0, combi_1.plus)((0, combi_1.seq)("WHEN", value, "THEN", value)), "ELSE", value, "END");
40766
- const complex = (0, combi_1.seq)("CASE", (0, combi_1.plus)((0, combi_1.seq)("WHEN", _1.CDSCondition, "THEN", value)), (0, combi_1.opt)((0, combi_1.seq)("ELSE", value)), "END");
40770
+ const simple = (0, combi_1.seq)("CASE", (0, combi_1.alt)(name, _1.CDSFunction), (0, combi_1.plusPrio)((0, combi_1.seq)("WHEN", value, "THEN", value)), "ELSE", value, "END");
40771
+ const complex = (0, combi_1.seq)("CASE", (0, combi_1.plusPrio)((0, combi_1.seq)("WHEN", _1.CDSCondition, "THEN", value)), (0, combi_1.opt)((0, combi_1.seq)("ELSE", value)), "END");
40767
40772
  return (0, combi_1.altPrio)(simple, complex);
40768
40773
  }
40769
40774
  }
@@ -44097,13 +44102,13 @@ class Help {
44097
44102
  /////////////////////////////////////////////////
44098
44103
  static dumpABAP(file, reg, textDocument, position) {
44099
44104
  let content = "";
44100
- content = `
44101
- <a href="#_tokens" rel="no-refresh">Tokens</a> |
44102
- <a href="#_statements" rel="no-refresh">Statements</a> |
44103
- <a href="#_structure" rel="no-refresh">Structure</a> |
44104
- <a href="#_files" rel="no-refresh">Files</a> |
44105
- <a href="#_info" rel="no-refresh">Info Dump</a>
44106
- <hr>
44105
+ content = `
44106
+ <a href="#_tokens" rel="no-refresh">Tokens</a> |
44107
+ <a href="#_statements" rel="no-refresh">Statements</a> |
44108
+ <a href="#_structure" rel="no-refresh">Structure</a> |
44109
+ <a href="#_files" rel="no-refresh">Files</a> |
44110
+ <a href="#_info" rel="no-refresh">Info Dump</a>
44111
+ <hr>
44107
44112
  ` +
44108
44113
  "<tt>" + textDocument.uri + " (" +
44109
44114
  (position.line + 1) + ", " +
@@ -44258,9 +44263,9 @@ class Help {
44258
44263
  return ret + "</ul>";
44259
44264
  }
44260
44265
  static tokens(file) {
44261
- let inner = `<table><tr><td><b>String</b></td><td><b>Type</b></td>
44262
- <td><b>Row</b></td><td><b>Column</b></td>
44263
- <td><b>vRow</b></td><td><b>vColumn</b></td>
44266
+ let inner = `<table><tr><td><b>String</b></td><td><b>Type</b></td>
44267
+ <td><b>Row</b></td><td><b>Column</b></td>
44268
+ <td><b>vRow</b></td><td><b>vColumn</b></td>
44264
44269
  </tr>`;
44265
44270
  for (const token of file.getTokens()) {
44266
44271
  const tStart = token.getStart();
@@ -53576,7 +53581,7 @@ class Registry {
53576
53581
  }
53577
53582
  static abaplintVersion() {
53578
53583
  // magic, see build script "version.sh"
53579
- return "2.113.79";
53584
+ return "2.113.81";
53580
53585
  }
53581
53586
  getDDICReferences() {
53582
53587
  return this.ddicReferences;
@@ -53895,10 +53900,10 @@ class SevenBitAscii {
53895
53900
  key: "7bit_ascii",
53896
53901
  title: "Check for 7bit ascii",
53897
53902
  shortDescription: `Only allow characters from the 7bit ASCII set.`,
53898
- extendedInformation: `https://docs.abapopenchecks.org/checks/05/
53899
-
53900
- https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
53901
-
53903
+ extendedInformation: `https://docs.abapopenchecks.org/checks/05/
53904
+
53905
+ https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
53906
+
53902
53907
  Checkes files with extensions ".abap" and ".asddls"`,
53903
53908
  tags: [_irule_1.RuleTag.SingleFile],
53904
53909
  badExample: `WRITE '뽑'.`,
@@ -54104,10 +54109,10 @@ class Abapdoc extends _abap_rule_1.ABAPRule {
54104
54109
  key: "abapdoc",
54105
54110
  title: "Check abapdoc",
54106
54111
  shortDescription: `Various checks regarding abapdoc.`,
54107
- extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
54108
-
54109
- Plus class and interface definitions.
54110
-
54112
+ extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
54113
+
54114
+ Plus class and interface definitions.
54115
+
54111
54116
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#abap-doc-only-for-public-apis`,
54112
54117
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
54113
54118
  };
@@ -54244,27 +54249,27 @@ class AddTestAttributes extends _abap_rule_1.ABAPRule {
54244
54249
  title: "Add test attributes for tests classes with test methods",
54245
54250
  shortDescription: `Add test attributes DURATION and RISK LEVEL for tests classes with test methods`,
54246
54251
  tags: [_irule_1.RuleTag.SingleFile],
54247
- badExample: `CLASS ltcl_test1 DEFINITION FINAL FOR TESTING.
54248
- PUBLIC SECTION.
54249
- PROTECTED SECTION.
54250
- PRIVATE SECTION.
54251
- METHODS test FOR TESTING RAISING cx_static_check.
54252
- ENDCLASS.
54253
-
54254
- CLASS ltcl_test1 IMPLEMENTATION.
54255
- METHOD test.
54256
- ENDMETHOD.
54252
+ badExample: `CLASS ltcl_test1 DEFINITION FINAL FOR TESTING.
54253
+ PUBLIC SECTION.
54254
+ PROTECTED SECTION.
54255
+ PRIVATE SECTION.
54256
+ METHODS test FOR TESTING RAISING cx_static_check.
54257
+ ENDCLASS.
54258
+
54259
+ CLASS ltcl_test1 IMPLEMENTATION.
54260
+ METHOD test.
54261
+ ENDMETHOD.
54257
54262
  ENDCLASS.`,
54258
- goodExample: `CLASS ltcl_test2 DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
54259
- PUBLIC SECTION.
54260
- PROTECTED SECTION.
54261
- PRIVATE SECTION.
54262
- METHODS test FOR TESTING RAISING cx_static_check.
54263
- ENDCLASS.
54264
-
54265
- CLASS ltcl_test2 IMPLEMENTATION.
54266
- METHOD test.
54267
- ENDMETHOD.
54263
+ goodExample: `CLASS ltcl_test2 DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
54264
+ PUBLIC SECTION.
54265
+ PROTECTED SECTION.
54266
+ PRIVATE SECTION.
54267
+ METHODS test FOR TESTING RAISING cx_static_check.
54268
+ ENDCLASS.
54269
+
54270
+ CLASS ltcl_test2 IMPLEMENTATION.
54271
+ METHOD test.
54272
+ ENDMETHOD.
54268
54273
  ENDCLASS.`,
54269
54274
  };
54270
54275
  }
@@ -54350,49 +54355,49 @@ class AlignParameters extends _abap_rule_1.ABAPRule {
54350
54355
  key: "align_parameters",
54351
54356
  title: "Align Parameters",
54352
54357
  shortDescription: `Checks for vertially aligned parameters`,
54353
- extendedInformation: `Checks:
54354
- * function module calls
54355
- * method calls
54356
- * VALUE constructors
54357
- * NEW constructors
54358
- * RAISE EXCEPTION statements
54359
- * CREATE OBJECT statements
54360
- * RAISE EVENT statements
54361
-
54362
- https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
54363
-
54364
- Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
54365
-
54366
- If parameters are on the same row, no issues are reported, see
54358
+ extendedInformation: `Checks:
54359
+ * function module calls
54360
+ * method calls
54361
+ * VALUE constructors
54362
+ * NEW constructors
54363
+ * RAISE EXCEPTION statements
54364
+ * CREATE OBJECT statements
54365
+ * RAISE EVENT statements
54366
+
54367
+ https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
54368
+
54369
+ Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
54370
+
54371
+ If parameters are on the same row, no issues are reported, see
54367
54372
  https://rules.abaplint.org/max_one_method_parameter_per_line/ for splitting parameters to lines`,
54368
54373
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
54369
- badExample: `CALL FUNCTION 'FOOBAR'
54370
- EXPORTING
54371
- foo = 2
54372
- parameter = 3.
54373
-
54374
- foobar( moo = 1
54375
- param = 1 ).
54376
-
54377
- foo = VALUE #(
54378
- foo = bar
54374
+ badExample: `CALL FUNCTION 'FOOBAR'
54375
+ EXPORTING
54376
+ foo = 2
54377
+ parameter = 3.
54378
+
54379
+ foobar( moo = 1
54380
+ param = 1 ).
54381
+
54382
+ foo = VALUE #(
54383
+ foo = bar
54379
54384
  moo = 2 ).`,
54380
- goodExample: `CALL FUNCTION 'FOOBAR'
54381
- EXPORTING
54382
- foo = 2
54383
- parameter = 3.
54384
-
54385
- foobar( moo = 1
54386
- param = 1 ).
54387
-
54388
- foo = VALUE #(
54389
- foo = bar
54390
- moo = 2 ).
54391
-
54392
- DATA(sdf) = VALUE type(
54393
- common_val = 2
54394
- another_common = 5
54395
- ( row_value = 4
54385
+ goodExample: `CALL FUNCTION 'FOOBAR'
54386
+ EXPORTING
54387
+ foo = 2
54388
+ parameter = 3.
54389
+
54390
+ foobar( moo = 1
54391
+ param = 1 ).
54392
+
54393
+ foo = VALUE #(
54394
+ foo = bar
54395
+ moo = 2 ).
54396
+
54397
+ DATA(sdf) = VALUE type(
54398
+ common_val = 2
54399
+ another_common = 5
54400
+ ( row_value = 4
54396
54401
  value_foo = 5 ) ).`,
54397
54402
  };
54398
54403
  }
@@ -54826,37 +54831,37 @@ class AlignTypeExpressions extends _abap_rule_1.ABAPRule {
54826
54831
  key: "align_type_expressions",
54827
54832
  title: "Align TYPE expressions",
54828
54833
  shortDescription: `Align TYPE expressions in statements`,
54829
- extendedInformation: `
54830
- Currently works for METHODS + BEGIN OF
54831
-
54832
- If BEGIN OF has an INCLUDE TYPE its ignored
54833
-
54834
- Also note that clean ABAP does not recommend aligning TYPE clauses:
54834
+ extendedInformation: `
54835
+ Currently works for METHODS + BEGIN OF
54836
+
54837
+ If BEGIN OF has an INCLUDE TYPE its ignored
54838
+
54839
+ Also note that clean ABAP does not recommend aligning TYPE clauses:
54835
54840
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-align-type-clauses`,
54836
54841
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix],
54837
- badExample: `
54838
- TYPES: BEGIN OF foo,
54839
- bar TYPE i,
54840
- foobar TYPE i,
54841
- END OF foo.
54842
-
54843
- INTERFACE lif.
54844
- METHODS bar
54845
- IMPORTING
54846
- foo TYPE i
54847
- foobar TYPE i.
54842
+ badExample: `
54843
+ TYPES: BEGIN OF foo,
54844
+ bar TYPE i,
54845
+ foobar TYPE i,
54846
+ END OF foo.
54847
+
54848
+ INTERFACE lif.
54849
+ METHODS bar
54850
+ IMPORTING
54851
+ foo TYPE i
54852
+ foobar TYPE i.
54848
54853
  ENDINTERFACE.`,
54849
- goodExample: `
54850
- TYPES: BEGIN OF foo,
54851
- bar TYPE i,
54852
- foobar TYPE i,
54853
- END OF foo.
54854
-
54855
- INTERFACE lif.
54856
- METHODS bar
54857
- IMPORTING
54858
- foo TYPE i
54859
- foobar TYPE i.
54854
+ goodExample: `
54855
+ TYPES: BEGIN OF foo,
54856
+ bar TYPE i,
54857
+ foobar TYPE i,
54858
+ END OF foo.
54859
+
54860
+ INTERFACE lif.
54861
+ METHODS bar
54862
+ IMPORTING
54863
+ foo TYPE i
54864
+ foobar TYPE i.
54860
54865
  ENDINTERFACE.`,
54861
54866
  };
54862
54867
  }
@@ -55135,16 +55140,16 @@ class AmbiguousStatement extends _abap_rule_1.ABAPRule {
55135
55140
  return {
55136
55141
  key: "ambiguous_statement",
55137
55142
  title: "Check for ambigious statements",
55138
- shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
55139
- Add "TABLE" keyword or "@" for escaping SQL variables
55140
-
55143
+ shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
55144
+ Add "TABLE" keyword or "@" for escaping SQL variables
55145
+
55141
55146
  Only works if the target version is 740sp05 or above`,
55142
55147
  tags: [_irule_1.RuleTag.SingleFile],
55143
- badExample: `DELETE foo FROM bar.
55148
+ badExample: `DELETE foo FROM bar.
55144
55149
  MODIFY foo FROM bar.`,
55145
- goodExample: `DELETE foo FROM @bar.
55146
- DELETE TABLE itab FROM 2.
55147
- MODIFY zfoo FROM @wa.
55150
+ goodExample: `DELETE foo FROM @bar.
55151
+ DELETE TABLE itab FROM 2.
55152
+ MODIFY zfoo FROM @wa.
55148
55153
  MODIFY TABLE foo FROM bar.`,
55149
55154
  };
55150
55155
  }
@@ -55249,16 +55254,16 @@ class AvoidUse extends _abap_rule_1.ABAPRule {
55249
55254
  key: "avoid_use",
55250
55255
  title: "Avoid use of certain statements",
55251
55256
  shortDescription: `Detects usage of certain statements.`,
55252
- extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
55253
-
55254
- Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
55255
-
55256
- STATICS: use CLASS-DATA instead
55257
-
55258
- DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
55259
-
55260
- TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
55261
-
55257
+ extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
55258
+
55259
+ Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
55260
+
55261
+ STATICS: use CLASS-DATA instead
55262
+
55263
+ DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
55264
+
55265
+ TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
55266
+
55262
55267
  BREAK points`,
55263
55268
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
55264
55269
  };
@@ -55390,11 +55395,11 @@ class BeginEndNames extends _abap_rule_1.ABAPRule {
55390
55395
  title: "Check BEGIN END names",
55391
55396
  shortDescription: `Check BEGIN OF and END OF names match, plus there must be statements between BEGIN and END`,
55392
55397
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
55393
- badExample: `DATA: BEGIN OF stru,
55394
- field TYPE i,
55398
+ badExample: `DATA: BEGIN OF stru,
55399
+ field TYPE i,
55395
55400
  END OF structure_not_the_same.`,
55396
- goodExample: `DATA: BEGIN OF stru,
55397
- field TYPE i,
55401
+ goodExample: `DATA: BEGIN OF stru,
55402
+ field TYPE i,
55398
55403
  END OF stru.`,
55399
55404
  };
55400
55405
  }
@@ -55491,20 +55496,20 @@ class BeginSingleInclude extends _abap_rule_1.ABAPRule {
55491
55496
  title: "BEGIN contains single INCLUDE",
55492
55497
  shortDescription: `Finds TYPE BEGIN with just one INCLUDE TYPE, and DATA with single INCLUDE STRUCTURE`,
55493
55498
  tags: [_irule_1.RuleTag.SingleFile],
55494
- badExample: `TYPES: BEGIN OF dummy1.
55495
- INCLUDE TYPE dselc.
55496
- TYPES: END OF dummy1.
55497
-
55498
- DATA BEGIN OF foo.
55499
- INCLUDE STRUCTURE syst.
55500
- DATA END OF foo.
55501
-
55502
- STATICS BEGIN OF bar.
55503
- INCLUDE STRUCTURE syst.
55499
+ badExample: `TYPES: BEGIN OF dummy1.
55500
+ INCLUDE TYPE dselc.
55501
+ TYPES: END OF dummy1.
55502
+
55503
+ DATA BEGIN OF foo.
55504
+ INCLUDE STRUCTURE syst.
55505
+ DATA END OF foo.
55506
+
55507
+ STATICS BEGIN OF bar.
55508
+ INCLUDE STRUCTURE syst.
55504
55509
  STATICS END OF bar.`,
55505
- goodExample: `DATA BEGIN OF foo.
55506
- DATA field TYPE i.
55507
- INCLUDE STRUCTURE dselc.
55510
+ goodExample: `DATA BEGIN OF foo.
55511
+ DATA field TYPE i.
55512
+ INCLUDE STRUCTURE dselc.
55508
55513
  DATA END OF foo.`,
55509
55514
  };
55510
55515
  }
@@ -55594,9 +55599,9 @@ class CallTransactionAuthorityCheck extends _abap_rule_1.ABAPRule {
55594
55599
  extendedInformation: `https://docs.abapopenchecks.org/checks/54/`,
55595
55600
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
55596
55601
  badExample: `CALL TRANSACTION 'FOO'.`,
55597
- goodExample: `TRY.
55598
- CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
55599
- CATCH cx_sy_authorization_error.
55602
+ goodExample: `TRY.
55603
+ CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
55604
+ CATCH cx_sy_authorization_error.
55600
55605
  ENDTRY.`,
55601
55606
  };
55602
55607
  }
@@ -55661,10 +55666,10 @@ class CDSCommentStyle {
55661
55666
  key: "cds_comment_style",
55662
55667
  title: "CDS Comment Style",
55663
55668
  shortDescription: `Check for obsolete comment style`,
55664
- extendedInformation: `Check for obsolete comment style
55665
-
55666
- Comments starting with "--" are considered obsolete
55667
-
55669
+ extendedInformation: `Check for obsolete comment style
55670
+
55671
+ Comments starting with "--" are considered obsolete
55672
+
55668
55673
  https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abencds_general_syntax_rules.htm`,
55669
55674
  tags: [_irule_1.RuleTag.SingleFile],
55670
55675
  badExample: "-- this is a comment",
@@ -55730,10 +55735,10 @@ class CDSLegacyView {
55730
55735
  key: "cds_legacy_view",
55731
55736
  title: "CDS Legacy View",
55732
55737
  shortDescription: `Identify CDS Legacy Views`,
55733
- extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
55734
-
55735
- https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
55736
-
55738
+ extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
55739
+
55740
+ https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
55741
+
55737
55742
  v755 and up`,
55738
55743
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Upport],
55739
55744
  };
@@ -55888,10 +55893,10 @@ class ChainMainlyDeclarations extends _abap_rule_1.ABAPRule {
55888
55893
  key: "chain_mainly_declarations",
55889
55894
  title: "Chain mainly declarations",
55890
55895
  shortDescription: `Chain mainly declarations, allows chaining for the configured statements, reports errors for other statements.`,
55891
- extendedInformation: `
55892
- https://docs.abapopenchecks.org/checks/23/
55893
-
55894
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
55896
+ extendedInformation: `
55897
+ https://docs.abapopenchecks.org/checks/23/
55898
+
55899
+ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
55895
55900
  `,
55896
55901
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
55897
55902
  badExample: `CALL METHOD: bar.`,
@@ -56067,17 +56072,17 @@ class ChangeIfToCase extends _abap_rule_1.ABAPRule {
56067
56072
  title: "Change IF to CASE",
56068
56073
  shortDescription: `Finds IF constructs that can be changed to CASE`,
56069
56074
  // eslint-disable-next-line max-len
56070
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
56071
-
56075
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
56076
+
56072
56077
  If the first comparison is a boolean compare, no issue is reported.`,
56073
56078
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
56074
- badExample: `IF l_fcat-fieldname EQ 'FOO'.
56075
- ELSEIF l_fcat-fieldname = 'BAR'
56076
- OR l_fcat-fieldname = 'MOO'.
56079
+ badExample: `IF l_fcat-fieldname EQ 'FOO'.
56080
+ ELSEIF l_fcat-fieldname = 'BAR'
56081
+ OR l_fcat-fieldname = 'MOO'.
56077
56082
  ENDIF.`,
56078
- goodExample: `CASE l_fcat-fieldname.
56079
- WHEN 'FOO'.
56080
- WHEN 'BAR' OR 'MOO'.
56083
+ goodExample: `CASE l_fcat-fieldname.
56084
+ WHEN 'FOO'.
56085
+ WHEN 'BAR' OR 'MOO'.
56081
56086
  ENDCASE.`,
56082
56087
  };
56083
56088
  }
@@ -56214,8 +56219,8 @@ class CheckAbstract extends _abap_rule_1.ABAPRule {
56214
56219
  return {
56215
56220
  key: "check_abstract",
56216
56221
  title: "Check abstract methods and classes",
56217
- shortDescription: `Checks abstract methods and classes:
56218
- - class defined as abstract and final,
56222
+ shortDescription: `Checks abstract methods and classes:
56223
+ - class defined as abstract and final,
56219
56224
  - non-abstract class contains abstract methods`,
56220
56225
  extendedInformation: `If a class defines only constants, use an interface instead`,
56221
56226
  tags: [_irule_1.RuleTag.SingleFile],
@@ -56296,11 +56301,11 @@ class CheckComments extends _abap_rule_1.ABAPRule {
56296
56301
  return {
56297
56302
  key: "check_comments",
56298
56303
  title: "Check Comments",
56299
- shortDescription: `
56304
+ shortDescription: `
56300
56305
  Various checks for comment usage.`,
56301
- extendedInformation: `
56302
- Detects end of line comments. Comments starting with "#EC" or "##" are ignored
56303
-
56306
+ extendedInformation: `
56307
+ Detects end of line comments. Comments starting with "#EC" or "##" are ignored
56308
+
56304
56309
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#put-comments-before-the-statement-they-relate-to`,
56305
56310
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
56306
56311
  badExample: `WRITE 2. " descriptive comment`,
@@ -56462,9 +56467,9 @@ class CheckInclude {
56462
56467
  key: "check_include",
56463
56468
  title: "Check INCLUDEs",
56464
56469
  shortDescription: `Checks INCLUDE statements`,
56465
- extendedInformation: `
56466
- * Reports unused includes
56467
- * Errors if the includes are not found
56470
+ extendedInformation: `
56471
+ * Reports unused includes
56472
+ * Errors if the includes are not found
56468
56473
  * Error if including a main program`,
56469
56474
  tags: [_irule_1.RuleTag.Syntax],
56470
56475
  };
@@ -56540,14 +56545,14 @@ class CheckSubrc extends _abap_rule_1.ABAPRule {
56540
56545
  key: "check_subrc",
56541
56546
  title: "Check sy-subrc",
56542
56547
  shortDescription: `Check sy-subrc`,
56543
- extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
56544
-
56545
- If sy-dbcnt is checked after database statements, it is considered okay.
56546
-
56547
- "SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
56548
-
56549
- If IS ASSIGNED is checked after assigning, it is considered okay.
56550
-
56548
+ extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
56549
+
56550
+ If sy-dbcnt is checked after database statements, it is considered okay.
56551
+
56552
+ "SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
56553
+
56554
+ If IS ASSIGNED is checked after assigning, it is considered okay.
56555
+
56551
56556
  FIND statement with MATCH COUNT is considered okay if subrc is not checked`,
56552
56557
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
56553
56558
  pseudoComment: "EC CI_SUBRC",
@@ -57117,17 +57122,17 @@ class ClassicExceptionsOverlap extends _abap_rule_1.ABAPRule {
57117
57122
  shortDescription: `Find overlapping classic exceptions`,
57118
57123
  extendedInformation: `When debugging its typically good to know exactly which exception is caught`,
57119
57124
  tags: [_irule_1.RuleTag.SingleFile],
57120
- badExample: `CALL FUNCTION 'SOMETHING'
57121
- EXCEPTIONS
57122
- system_failure = 1 MESSAGE lv_message
57123
- communication_failure = 1 MESSAGE lv_message
57124
- resource_failure = 1
57125
+ badExample: `CALL FUNCTION 'SOMETHING'
57126
+ EXCEPTIONS
57127
+ system_failure = 1 MESSAGE lv_message
57128
+ communication_failure = 1 MESSAGE lv_message
57129
+ resource_failure = 1
57125
57130
  OTHERS = 1.`,
57126
- goodExample: `CALL FUNCTION 'SOMETHING'
57127
- EXCEPTIONS
57128
- system_failure = 1 MESSAGE lv_message
57129
- communication_failure = 2 MESSAGE lv_message
57130
- resource_failure = 3
57131
+ goodExample: `CALL FUNCTION 'SOMETHING'
57132
+ EXCEPTIONS
57133
+ system_failure = 1 MESSAGE lv_message
57134
+ communication_failure = 2 MESSAGE lv_message
57135
+ resource_failure = 3
57131
57136
  OTHERS = 4.`,
57132
57137
  };
57133
57138
  }
@@ -57385,7 +57390,7 @@ class CommentedCode extends _abap_rule_1.ABAPRule {
57385
57390
  key: "commented_code",
57386
57391
  title: "Find commented code",
57387
57392
  shortDescription: `Detects usage of commented out code.`,
57388
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it
57393
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it
57389
57394
  https://docs.abapopenchecks.org/checks/14/`,
57390
57395
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
57391
57396
  badExample: `* WRITE 'hello world'.`,
@@ -57618,10 +57623,10 @@ class ConstructorVisibilityPublic {
57618
57623
  key: "constructor_visibility_public",
57619
57624
  title: "Check constructor visibility is public",
57620
57625
  shortDescription: `Constructor must be placed in the public section, even if the class is not CREATE PUBLIC.`,
57621
- extendedInformation: `
57622
- This only applies to global classes.
57623
-
57624
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
57626
+ extendedInformation: `
57627
+ This only applies to global classes.
57628
+
57629
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
57625
57630
  https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abeninstance_constructor_guidl.htm`,
57626
57631
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
57627
57632
  };
@@ -57696,8 +57701,8 @@ class ContainsTab extends _abap_rule_1.ABAPRule {
57696
57701
  key: "contains_tab",
57697
57702
  title: "Code contains tab",
57698
57703
  shortDescription: `Checks for usage of tabs (enable to enforce spaces)`,
57699
- extendedInformation: `
57700
- https://docs.abapopenchecks.org/checks/09/
57704
+ extendedInformation: `
57705
+ https://docs.abapopenchecks.org/checks/09/
57701
57706
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
57702
57707
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
57703
57708
  badExample: `\tWRITE 'hello world'.`,
@@ -57784,10 +57789,10 @@ class CyclicOO {
57784
57789
  key: "cyclic_oo",
57785
57790
  title: "Cyclic OO",
57786
57791
  shortDescription: `Finds cyclic/circular OO references`,
57787
- extendedInformation: `Runs for global INTF + CLAS objects
57788
-
57789
- Objects must be without syntax errors for this rule to take effect
57790
-
57792
+ extendedInformation: `Runs for global INTF + CLAS objects
57793
+
57794
+ Objects must be without syntax errors for this rule to take effect
57795
+
57791
57796
  References in testclass includes are ignored`,
57792
57797
  };
57793
57798
  }
@@ -58030,7 +58035,7 @@ class DangerousStatement extends _abap_rule_1.ABAPRule {
58030
58035
  key: "dangerous_statement",
58031
58036
  title: "Dangerous statement",
58032
58037
  shortDescription: `Detects potentially dangerous statements`,
58033
- extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
58038
+ extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
58034
58039
  dynamic SQL can potentially create SQL injection problems`,
58035
58040
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
58036
58041
  };
@@ -58237,13 +58242,13 @@ class DefinitionsTop extends _abap_rule_1.ABAPRule {
58237
58242
  shortDescription: `Checks that definitions are placed at the beginning of METHODs, FORMs and FUNCTIONs.`,
58238
58243
  extendedInformation: `https://docs.abapopenchecks.org/checks/17/`,
58239
58244
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
58240
- badExample: `FROM foo.
58241
- WRITE 'hello'.
58242
- DATA int TYPE i.
58245
+ badExample: `FROM foo.
58246
+ WRITE 'hello'.
58247
+ DATA int TYPE i.
58243
58248
  ENDFORM.`,
58244
- goodExample: `FROM foo.
58245
- DATA int TYPE i.
58246
- WRITE 'hello'.
58249
+ goodExample: `FROM foo.
58250
+ DATA int TYPE i.
58251
+ WRITE 'hello'.
58247
58252
  ENDFORM.`,
58248
58253
  };
58249
58254
  }
@@ -58785,39 +58790,39 @@ class Downport {
58785
58790
  key: "downport",
58786
58791
  title: "Downport statement",
58787
58792
  shortDescription: `Downport functionality`,
58788
- extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with
58789
- a higher level language version. If successful, various rules are applied to downport the statement.
58790
- Target downport version is always v702, thus rule is only enabled if target version is v702.
58791
-
58792
- Current rules:
58793
- * NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/
58794
- * DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/
58795
- * FIELD-SYMBOL() definitions are outlined
58796
- * CONV is outlined
58797
- * COND is outlined
58798
- * REDUCE is outlined
58799
- * SWITCH is outlined
58800
- * FILTER is outlined
58801
- * APPEND expression is outlined
58802
- * INSERT expression is outlined
58803
- * EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/
58804
- * CAST changed to ?=
58805
- * LOOP AT method_call( ) is outlined
58806
- * VALUE # with structure fields
58807
- * VALUE # with internal table lines
58808
- * Table Expressions are outlined
58809
- * SELECT INTO @DATA definitions are outlined
58810
- * Some occurrences of string template formatting option ALPHA changed to function module call
58811
- * SELECT/INSERT/MODIFY/DELETE/UPDATE "," in field list removed, "@" in source/targets removed
58812
- * PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods
58813
- * RAISE EXCEPTION ... MESSAGE
58814
- * Moving with +=, -=, /=, *=, &&= is expanded
58815
- * line_exists and line_index is downported to READ TABLE
58816
- * ENUMs, but does not nessesarily give the correct type and value
58817
- * MESSAGE with non simple source
58818
-
58819
- Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.
58820
-
58793
+ extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with
58794
+ a higher level language version. If successful, various rules are applied to downport the statement.
58795
+ Target downport version is always v702, thus rule is only enabled if target version is v702.
58796
+
58797
+ Current rules:
58798
+ * NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/
58799
+ * DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/
58800
+ * FIELD-SYMBOL() definitions are outlined
58801
+ * CONV is outlined
58802
+ * COND is outlined
58803
+ * REDUCE is outlined
58804
+ * SWITCH is outlined
58805
+ * FILTER is outlined
58806
+ * APPEND expression is outlined
58807
+ * INSERT expression is outlined
58808
+ * EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/
58809
+ * CAST changed to ?=
58810
+ * LOOP AT method_call( ) is outlined
58811
+ * VALUE # with structure fields
58812
+ * VALUE # with internal table lines
58813
+ * Table Expressions are outlined
58814
+ * SELECT INTO @DATA definitions are outlined
58815
+ * Some occurrences of string template formatting option ALPHA changed to function module call
58816
+ * SELECT/INSERT/MODIFY/DELETE/UPDATE "," in field list removed, "@" in source/targets removed
58817
+ * PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods
58818
+ * RAISE EXCEPTION ... MESSAGE
58819
+ * Moving with +=, -=, /=, *=, &&= is expanded
58820
+ * line_exists and line_index is downported to READ TABLE
58821
+ * ENUMs, but does not nessesarily give the correct type and value
58822
+ * MESSAGE with non simple source
58823
+
58824
+ Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.
58825
+
58821
58826
  Make sure to test the downported code, it might not always be completely correct.`,
58822
58827
  tags: [_irule_1.RuleTag.Downport, _irule_1.RuleTag.Quickfix],
58823
58828
  };
@@ -59196,7 +59201,7 @@ Make sure to test the downported code, it might not always be completely correct
59196
59201
  return undefined;
59197
59202
  }
59198
59203
  //////////////////////////////////////////
59199
- /** removes @'s */
59204
+ /** removes @'s and commas */
59200
59205
  downportSQLExtras(low, high, lowFile, highSyntax) {
59201
59206
  if (!(low.get() instanceof _statement_1.Unknown)) {
59202
59207
  return undefined;
@@ -59240,7 +59245,7 @@ Make sure to test the downported code, it might not always be completely correct
59240
59245
  }
59241
59246
  }
59242
59247
  }
59243
- for (const fieldList of high.findAllExpressionsMulti([Expressions.SQLFieldList, Expressions.SQLFieldListLoop], true)) {
59248
+ for (const fieldList of high.findAllExpressionsMulti([Expressions.SQLFieldList, Expressions.SQLFieldListLoop, Expressions.SQLOrderBy], true)) {
59244
59249
  for (const token of fieldList.getDirectTokens()) {
59245
59250
  if (token.getStr() === ",") {
59246
59251
  addFix(token);
@@ -59395,10 +59400,10 @@ Make sure to test the downported code, it might not always be completely correct
59395
59400
  const fieldName = f.concatTokens();
59396
59401
  fieldDefinition += indentation + " " + fieldName + " TYPE " + tableName + "-" + fieldName + ",\n";
59397
59402
  }
59398
- fieldDefinition = `DATA: BEGIN OF ${name},
59403
+ fieldDefinition = `DATA: BEGIN OF ${name},
59399
59404
  ${fieldDefinition}${indentation} END OF ${name}.`;
59400
59405
  }
59401
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
59406
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
59402
59407
  ${indentation}`);
59403
59408
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
59404
59409
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -59457,12 +59462,12 @@ ${indentation}`);
59457
59462
  }
59458
59463
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59459
59464
  const name = ((_g = inlineData.findFirstExpression(Expressions.TargetField)) === null || _g === void 0 ? void 0 : _g.concatTokens()) || "error";
59460
- let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
59461
- ${fieldDefinitions}${indentation} END OF ${uniqueName}.
59462
- ${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.
59465
+ let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
59466
+ ${fieldDefinitions}${indentation} END OF ${uniqueName}.
59467
+ ${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.
59463
59468
  ${indentation}`);
59464
59469
  if (fieldDefinitions === "") {
59465
- fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.
59470
+ fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.
59466
59471
  ${indentation}`);
59467
59472
  }
59468
59473
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
@@ -59530,7 +59535,7 @@ ${indentation}`);
59530
59535
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59531
59536
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
59532
59537
  const firstToken = high.getFirstToken();
59533
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
59538
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
59534
59539
  ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
59535
59540
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
59536
59541
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -59584,7 +59589,7 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
59584
59589
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59585
59590
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
59586
59591
  const firstToken = high.getFirstToken();
59587
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
59592
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
59588
59593
  ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
59589
59594
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
59590
59595
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -59626,14 +59631,14 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
59626
59631
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
59627
59632
  const firstToken = high.getFirstToken();
59628
59633
  // note that the tabix restore should be done before throwing the exception
59629
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.
59630
- ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
59631
- ${indentation}${tabixBackup} = sy-tabix.
59632
- ${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.
59633
- ${indentation}sy-tabix = ${tabixBackup}.
59634
- ${indentation}IF sy-subrc <> 0.
59635
- ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59636
- ${indentation}ENDIF.
59634
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.
59635
+ ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
59636
+ ${indentation}${tabixBackup} = sy-tabix.
59637
+ ${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.
59638
+ ${indentation}sy-tabix = ${tabixBackup}.
59639
+ ${indentation}IF sy-subrc <> 0.
59640
+ ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59641
+ ${indentation}ENDIF.
59637
59642
  ${indentation}`);
59638
59643
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, startToken.getStart(), tableExpression.getLastToken().getEnd(), uniqueName);
59639
59644
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -59690,7 +59695,7 @@ ${indentation}`);
59690
59695
  const className = classNames[0].concatTokens();
59691
59696
  const targetName = (_b = target.findFirstExpression(Expressions.TargetField)) === null || _b === void 0 ? void 0 : _b.concatTokens();
59692
59697
  const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
59693
- const code = ` DATA ${targetName} TYPE REF TO ${className}.
59698
+ const code = ` DATA ${targetName} TYPE REF TO ${className}.
59694
59699
  ${indentation}CATCH ${className} INTO ${targetName}.`;
59695
59700
  const fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getStart(), node.getEnd(), code);
59696
59701
  return issue_1.Issue.atToken(lowFile, node.getFirstToken(), "Outline DATA", this.getMetadata().key, this.conf.severity, fix);
@@ -59852,16 +59857,16 @@ ${indentation}CATCH ${className} INTO ${targetName}.`;
59852
59857
  const uniqueName1 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59853
59858
  const uniqueName2 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59854
59859
  const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
59855
- let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
59856
- ${indentation}${uniqueName1}-msgid = ${id}.
59860
+ let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
59861
+ ${indentation}${uniqueName1}-msgid = ${id}.
59857
59862
  ${indentation}${uniqueName1}-msgno = ${number}.\n`;
59858
59863
  if (withs.length > 0) {
59859
- abap += `${indentation}${uniqueName1}-attr1 = 'IF_T100_DYN_MSG~MSGV1'.
59860
- ${indentation}${uniqueName1}-attr2 = 'IF_T100_DYN_MSG~MSGV2'.
59861
- ${indentation}${uniqueName1}-attr3 = 'IF_T100_DYN_MSG~MSGV3'.
59864
+ abap += `${indentation}${uniqueName1}-attr1 = 'IF_T100_DYN_MSG~MSGV1'.
59865
+ ${indentation}${uniqueName1}-attr2 = 'IF_T100_DYN_MSG~MSGV2'.
59866
+ ${indentation}${uniqueName1}-attr3 = 'IF_T100_DYN_MSG~MSGV3'.
59862
59867
  ${indentation}${uniqueName1}-attr4 = 'IF_T100_DYN_MSG~MSGV4'.\n`;
59863
59868
  }
59864
- abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
59869
+ abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
59865
59870
  ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`;
59866
59871
  if (withs.length > 0) {
59867
59872
  abap += `${indentation}${uniqueName2}->if_t100_dyn_msg~msgty = 'E'.\n`;
@@ -59973,10 +59978,10 @@ ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`
59973
59978
  let code = "";
59974
59979
  if (sourceRef.findFirstExpression(Expressions.TableExpression)) {
59975
59980
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59976
- code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).
59977
- IF sy-subrc <> 0.
59978
- RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59979
- ENDIF.
59981
+ code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).
59982
+ IF sy-subrc <> 0.
59983
+ RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59984
+ ENDIF.
59980
59985
  GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
59981
59986
  }
59982
59987
  else {
@@ -60065,20 +60070,20 @@ GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
60065
60070
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
60066
60071
  const uniqueFS = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
60067
60072
  const uniqueNameIndex = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
60068
- code += ` items LIKE ${loopSourceName},
60069
- END OF ${groupTargetName}type.
60070
- DATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.
60071
- DATA ${uniqueName} LIKE LINE OF ${groupTargetName}tab.
60073
+ code += ` items LIKE ${loopSourceName},
60074
+ END OF ${groupTargetName}type.
60075
+ DATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.
60076
+ DATA ${uniqueName} LIKE LINE OF ${groupTargetName}tab.
60072
60077
  LOOP AT ${loopSourceName} ${(_l = high.findFirstExpression(Expressions.LoopTarget)) === null || _l === void 0 ? void 0 : _l.concatTokens()}.\n`;
60073
60078
  if (groupIndexName !== undefined) {
60074
60079
  code += `DATA(${uniqueNameIndex}) = sy-tabix.\n`;
60075
60080
  }
60076
- code += `READ TABLE ${groupTargetName}tab ASSIGNING FIELD-SYMBOL(<${uniqueFS}>) WITH KEY ${condition}.
60081
+ code += `READ TABLE ${groupTargetName}tab ASSIGNING FIELD-SYMBOL(<${uniqueFS}>) WITH KEY ${condition}.
60077
60082
  IF sy-subrc = 0.\n`;
60078
60083
  if (groupCountName !== undefined) {
60079
60084
  code += ` <${uniqueFS}>-${groupCountName} = <${uniqueFS}>-${groupCountName} + 1.\n`;
60080
60085
  }
60081
- code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
60086
+ code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
60082
60087
  ELSE.\n`;
60083
60088
  code += ` CLEAR ${uniqueName}.\n`;
60084
60089
  for (const c of group.findAllExpressions(Expressions.LoopGroupByComponent)) {
@@ -60099,8 +60104,8 @@ ELSE.\n`;
60099
60104
  }
60100
60105
  code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE ${uniqueName}-items.\n`;
60101
60106
  code += ` INSERT ${uniqueName} INTO TABLE ${groupTargetName}tab.\n`;
60102
- code += `ENDIF.
60103
- ENDLOOP.
60107
+ code += `ENDIF.
60108
+ ENDLOOP.
60104
60109
  LOOP AT ${groupTargetName}tab ${groupTarget}.`;
60105
60110
  let fix = edit_helper_1.EditHelper.replaceRange(lowFile, high.getFirstToken().getStart(), high.getLastToken().getEnd(), code);
60106
60111
  for (const l of ((_m = highFile.getStructure()) === null || _m === void 0 ? void 0 : _m.findAllStructures(Structures.Loop)) || []) {
@@ -60272,7 +60277,7 @@ LOOP AT ${groupTargetName}tab ${groupTarget}.`;
60272
60277
  const enumName = (_b = high.findExpressionAfterToken("ENUM")) === null || _b === void 0 ? void 0 : _b.concatTokens();
60273
60278
  const structureName = (_c = high.findExpressionAfterToken("STRUCTURE")) === null || _c === void 0 ? void 0 : _c.concatTokens();
60274
60279
  // all ENUMS are char like?
60275
- let code = `TYPES ${enumName} TYPE string.
60280
+ let code = `TYPES ${enumName} TYPE string.
60276
60281
  CONSTANTS: BEGIN OF ${structureName},\n`;
60277
60282
  let count = 1;
60278
60283
  for (const e of enumStructure.findDirectStatements(Statements.TypeEnum).concat(enumStructure.findDirectStatements(Statements.Type))) {
@@ -60316,14 +60321,14 @@ CONSTANTS: BEGIN OF ${structureName},\n`;
60316
60321
  const tabixBackup = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
60317
60322
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
60318
60323
  // restore tabix before exeption
60319
- const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.
60320
- ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
60321
- ${indentation}${tabixBackup} = sy-tabix.
60322
- ${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.
60323
- ${indentation}sy-tabix = ${tabixBackup}.
60324
- ${indentation}IF sy-subrc <> 0.
60325
- ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
60326
- ${indentation}ENDIF.
60324
+ const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.
60325
+ ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
60326
+ ${indentation}${tabixBackup} = sy-tabix.
60327
+ ${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.
60328
+ ${indentation}sy-tabix = ${tabixBackup}.
60329
+ ${indentation}IF sy-subrc <> 0.
60330
+ ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
60331
+ ${indentation}ENDIF.
60327
60332
  ${indentation}${uniqueName}`;
60328
60333
  const start = target.getFirstToken().getStart();
60329
60334
  const end = (_a = tableExpression.findDirectTokenByText("]")) === null || _a === void 0 ? void 0 : _a.getEnd();
@@ -60403,11 +60408,11 @@ ${indentation}${uniqueName}`;
60403
60408
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
60404
60409
  const source = (_b = child.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens();
60405
60410
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
60406
- const code = `DATA ${uniqueName} TYPE string.
60407
- ${indentation}CALL FUNCTION '${functionName}'
60408
- ${indentation} EXPORTING
60409
- ${indentation} input = ${source}
60410
- ${indentation} IMPORTING
60411
+ const code = `DATA ${uniqueName} TYPE string.
60412
+ ${indentation}CALL FUNCTION '${functionName}'
60413
+ ${indentation} EXPORTING
60414
+ ${indentation} input = ${source}
60415
+ ${indentation} IMPORTING
60411
60416
  ${indentation} output = ${uniqueName}.\n`;
60412
60417
  const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), code);
60413
60418
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, child.getFirstToken().getStart(), child.getLastToken().getEnd(), uniqueName);
@@ -61719,12 +61724,12 @@ class EasyToFindMessages {
61719
61724
  key: "easy_to_find_messages",
61720
61725
  title: "Easy to find messages",
61721
61726
  shortDescription: `Make messages easy to find`,
61722
- extendedInformation: `All messages must be statically referenced exactly once
61723
-
61724
- Only MESSAGE and RAISE statments are counted as static references
61725
-
61726
- Also see rule "message_exists"
61727
-
61727
+ extendedInformation: `All messages must be statically referenced exactly once
61728
+
61729
+ Only MESSAGE and RAISE statments are counted as static references
61730
+
61731
+ Also see rule "message_exists"
61732
+
61728
61733
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#make-messages-easy-to-find`,
61729
61734
  tags: [_irule_1.RuleTag.Styleguide],
61730
61735
  };
@@ -61805,13 +61810,13 @@ class EmptyEvent extends _abap_rule_1.ABAPRule {
61805
61810
  shortDescription: `Empty selection screen or list processing event block`,
61806
61811
  extendedInformation: ``,
61807
61812
  tags: [_irule_1.RuleTag.SingleFile],
61808
- badExample: `
61809
- INITIALIZATION.
61810
- WRITE 'hello'.
61813
+ badExample: `
61814
+ INITIALIZATION.
61815
+ WRITE 'hello'.
61811
61816
  END-OF-SELECTION.`,
61812
- goodExample: `
61813
- START-OF-SELECTION.
61814
- PERFORM sdf.
61817
+ goodExample: `
61818
+ START-OF-SELECTION.
61819
+ PERFORM sdf.
61815
61820
  COMMIT WORK.`,
61816
61821
  };
61817
61822
  }
@@ -61903,8 +61908,8 @@ class EmptyLineinStatement extends _abap_rule_1.ABAPRule {
61903
61908
  key: "empty_line_in_statement",
61904
61909
  title: "Find empty lines in statements",
61905
61910
  shortDescription: `Checks that statements do not contain empty lines.`,
61906
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
61907
-
61911
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
61912
+
61908
61913
  https://docs.abapopenchecks.org/checks/41/`,
61909
61914
  tags: [_irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
61910
61915
  badExample: `WRITE\n\nhello.`,
@@ -62080,13 +62085,13 @@ class EmptyStructure extends _abap_rule_1.ABAPRule {
62080
62085
  shortDescription: `Checks that the code does not contain empty blocks.`,
62081
62086
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-empty-if-branches`,
62082
62087
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
62083
- badExample: `IF foo = bar.
62084
- ENDIF.
62085
-
62086
- DO 2 TIMES.
62088
+ badExample: `IF foo = bar.
62089
+ ENDIF.
62090
+
62091
+ DO 2 TIMES.
62087
62092
  ENDDO.`,
62088
- goodExample: `LOOP AT itab WHERE qty = 0 OR date > sy-datum.
62089
- ENDLOOP.
62093
+ goodExample: `LOOP AT itab WHERE qty = 0 OR date > sy-datum.
62094
+ ENDLOOP.
62090
62095
  result = xsdbool( sy-subrc = 0 ).`,
62091
62096
  };
62092
62097
  }
@@ -62228,10 +62233,10 @@ class ExitOrCheck extends _abap_rule_1.ABAPRule {
62228
62233
  return {
62229
62234
  key: "exit_or_check",
62230
62235
  title: "Find EXIT or CHECK outside loops",
62231
- shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
62236
+ shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
62232
62237
  Use RETURN to leave procesing blocks instead.`,
62233
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
62234
- https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
62238
+ extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
62239
+ https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
62235
62240
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#check-vs-return`,
62236
62241
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
62237
62242
  };
@@ -62314,12 +62319,12 @@ class ExpandMacros extends _abap_rule_1.ABAPRule {
62314
62319
  key: "expand_macros",
62315
62320
  title: "Expand Macros",
62316
62321
  shortDescription: `Allows expanding macro calls with quick fixes`,
62317
- extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
62318
-
62322
+ extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
62323
+
62319
62324
  Note that macros/DEFINE cannot be used in the ABAP Cloud programming model`,
62320
- badExample: `DEFINE _hello.
62321
- WRITE 'hello'.
62322
- END-OF-DEFINITION.
62325
+ badExample: `DEFINE _hello.
62326
+ WRITE 'hello'.
62327
+ END-OF-DEFINITION.
62323
62328
  _hello.`,
62324
62329
  goodExample: `WRITE 'hello'.`,
62325
62330
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
@@ -62406,7 +62411,7 @@ class Exporting extends _abap_rule_1.ABAPRule {
62406
62411
  shortDescription: `Detects EXPORTING statements which can be omitted.`,
62407
62412
  badExample: `call_method( EXPORTING foo = bar ).`,
62408
62413
  goodExample: `call_method( foo = bar ).`,
62409
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-optional-keyword-exporting
62414
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-optional-keyword-exporting
62410
62415
  https://docs.abapopenchecks.org/checks/30/`,
62411
62416
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
62412
62417
  };
@@ -62504,7 +62509,7 @@ class ForbiddenIdentifier extends _abap_rule_1.ABAPRule {
62504
62509
  key: "forbidden_identifier",
62505
62510
  title: "Forbidden Identifier",
62506
62511
  shortDescription: `Forbid use of specified identifiers, list of regex.`,
62507
- extendedInformation: `Used in the transpiler to find javascript keywords in ABAP identifiers,
62512
+ extendedInformation: `Used in the transpiler to find javascript keywords in ABAP identifiers,
62508
62513
  https://github.com/abaplint/transpiler/blob/bda94b8b56e2b7f2f87be2168f12361aa530220e/packages/transpiler/src/validation.ts#L44`,
62509
62514
  tags: [_irule_1.RuleTag.SingleFile],
62510
62515
  };
@@ -62746,8 +62751,8 @@ class ForbiddenVoidType {
62746
62751
  key: "forbidden_void_type",
62747
62752
  title: "Forbidden Void Types",
62748
62753
  shortDescription: `Avoid usage of specified void types.`,
62749
- extendedInformation: `Inspiration:
62750
- BOOLEAN, BOOLE_D, CHAR01, CHAR1, CHAR10, CHAR12, CHAR128, CHAR2, CHAR20, CHAR4, CHAR70,
62754
+ extendedInformation: `Inspiration:
62755
+ BOOLEAN, BOOLE_D, CHAR01, CHAR1, CHAR10, CHAR12, CHAR128, CHAR2, CHAR20, CHAR4, CHAR70,
62751
62756
  DATS, TIMS, DATUM, FLAG, INT4, NUMC3, NUMC4, SAP_BOOL, TEXT25, TEXT80, X255, XFELD`,
62752
62757
  };
62753
62758
  }
@@ -62990,9 +62995,9 @@ class FullyTypeITabs extends _abap_rule_1.ABAPRule {
62990
62995
  key: "fully_type_itabs",
62991
62996
  title: "Fully type internal tables",
62992
62997
  shortDescription: `No implict table types or table keys`,
62993
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-the-right-table-type
62998
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-the-right-table-type
62994
62999
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key`,
62995
- badExample: `DATA lt_foo TYPE TABLE OF ty.
63000
+ badExample: `DATA lt_foo TYPE TABLE OF ty.
62996
63001
  DATA lt_bar TYPE STANDARD TABLE OF ty.`,
62997
63002
  goodExample: `DATA lt_foo TYPE STANDARD TABLE OF ty WITH EMPTY KEY.`,
62998
63003
  tags: [_irule_1.RuleTag.SingleFile],
@@ -63177,26 +63182,26 @@ class FunctionalWriting extends _abap_rule_1.ABAPRule {
63177
63182
  key: "functional_writing",
63178
63183
  title: "Use functional writing",
63179
63184
  shortDescription: `Detects usage of call method when functional style calls can be used.`,
63180
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-calls
63185
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-calls
63181
63186
  https://docs.abapopenchecks.org/checks/07/`,
63182
63187
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
63183
- badExample: `CALL METHOD zcl_class=>method( ).
63184
- CALL METHOD cl_abap_typedescr=>describe_by_name
63185
- EXPORTING
63186
- p_name = 'NAME'
63187
- RECEIVING
63188
- p_descr_ref = lr_typedescr
63189
- EXCEPTIONS
63190
- type_not_found = 1
63188
+ badExample: `CALL METHOD zcl_class=>method( ).
63189
+ CALL METHOD cl_abap_typedescr=>describe_by_name
63190
+ EXPORTING
63191
+ p_name = 'NAME'
63192
+ RECEIVING
63193
+ p_descr_ref = lr_typedescr
63194
+ EXCEPTIONS
63195
+ type_not_found = 1
63191
63196
  OTHERS = 2.`,
63192
- goodExample: `zcl_class=>method( ).
63193
- cl_abap_typedescr=>describe_by_name(
63194
- EXPORTING
63195
- p_name = 'NAME'
63196
- RECEIVING
63197
- p_descr_ref = lr_typedescr
63198
- EXCEPTIONS
63199
- type_not_found = 1
63197
+ goodExample: `zcl_class=>method( ).
63198
+ cl_abap_typedescr=>describe_by_name(
63199
+ EXPORTING
63200
+ p_name = 'NAME'
63201
+ RECEIVING
63202
+ p_descr_ref = lr_typedescr
63203
+ EXCEPTIONS
63204
+ type_not_found = 1
63200
63205
  OTHERS = 2 ).`,
63201
63206
  };
63202
63207
  }
@@ -63307,14 +63312,14 @@ class GlobalClass extends _abap_rule_1.ABAPRule {
63307
63312
  key: "global_class",
63308
63313
  title: "Global class checks",
63309
63314
  shortDescription: `Checks related to global classes`,
63310
- extendedInformation: `* global classes must be in own files
63311
-
63312
- * file names must match class name
63313
-
63314
- * file names must match interface name
63315
-
63316
- * global classes must be global definitions
63317
-
63315
+ extendedInformation: `* global classes must be in own files
63316
+
63317
+ * file names must match class name
63318
+
63319
+ * file names must match interface name
63320
+
63321
+ * global classes must be global definitions
63322
+
63318
63323
  * global interfaces must be global definitions`,
63319
63324
  tags: [_irule_1.RuleTag.Syntax],
63320
63325
  };
@@ -63413,21 +63418,21 @@ class IdenticalConditions extends _abap_rule_1.ABAPRule {
63413
63418
  return {
63414
63419
  key: "identical_conditions",
63415
63420
  title: "Identical conditions",
63416
- shortDescription: `Find identical conditions in IF + CASE + WHILE etc
63417
-
63421
+ shortDescription: `Find identical conditions in IF + CASE + WHILE etc
63422
+
63418
63423
  Prerequsites: code is pretty printed with identical cAsE`,
63419
63424
  tags: [_irule_1.RuleTag.SingleFile],
63420
- badExample: `IF foo = bar OR 1 = a OR foo = bar.
63421
- ENDIF.
63422
- CASE bar.
63423
- WHEN '1'.
63424
- WHEN 'A' OR '1'.
63425
+ badExample: `IF foo = bar OR 1 = a OR foo = bar.
63426
+ ENDIF.
63427
+ CASE bar.
63428
+ WHEN '1'.
63429
+ WHEN 'A' OR '1'.
63425
63430
  ENDCASE.`,
63426
- goodExample: `IF foo = bar OR 1 = a.
63427
- ENDIF.
63428
- CASE bar.
63429
- WHEN '1'.
63430
- WHEN 'A'.
63431
+ goodExample: `IF foo = bar OR 1 = a.
63432
+ ENDIF.
63433
+ CASE bar.
63434
+ WHEN '1'.
63435
+ WHEN 'A'.
63431
63436
  ENDCASE.`,
63432
63437
  };
63433
63438
  }
@@ -63561,23 +63566,23 @@ class IdenticalContents extends _abap_rule_1.ABAPRule {
63561
63566
  key: "identical_contents",
63562
63567
  title: "Identical contents",
63563
63568
  shortDescription: `Find identical contents in blocks inside IFs, both in the beginning and in the end.`,
63564
- extendedInformation: `
63565
- Prerequsites: code is pretty printed with identical cAsE
63566
-
63569
+ extendedInformation: `
63570
+ Prerequsites: code is pretty printed with identical cAsE
63571
+
63567
63572
  Chained statments are ignored`,
63568
63573
  tags: [_irule_1.RuleTag.SingleFile],
63569
- badExample: `IF foo = bar.
63570
- WRITE 'bar'.
63571
- WRITE 'world'.
63572
- ELSE.
63573
- WRITE 'foo'.
63574
- WRITE 'world'.
63574
+ badExample: `IF foo = bar.
63575
+ WRITE 'bar'.
63576
+ WRITE 'world'.
63577
+ ELSE.
63578
+ WRITE 'foo'.
63579
+ WRITE 'world'.
63575
63580
  ENDIF.`,
63576
- goodExample: `IF foo = bar.
63577
- WRITE 'bar'.
63578
- ELSE.
63579
- WRITE 'foo'.
63580
- ENDIF.
63581
+ goodExample: `IF foo = bar.
63582
+ WRITE 'bar'.
63583
+ ELSE.
63584
+ WRITE 'foo'.
63585
+ ENDIF.
63581
63586
  WRITE 'world'.`,
63582
63587
  };
63583
63588
  }
@@ -63685,12 +63690,12 @@ class IdenticalDescriptions {
63685
63690
  key: "identical_descriptions",
63686
63691
  title: "Identical descriptions",
63687
63692
  shortDescription: `Searches for objects with the same type and same description`,
63688
- extendedInformation: `Case insensitive
63689
-
63690
- Only checks the master language descriptions
63691
-
63692
- Dependencies are skipped
63693
-
63693
+ extendedInformation: `Case insensitive
63694
+
63695
+ Only checks the master language descriptions
63696
+
63697
+ Dependencies are skipped
63698
+
63694
63699
  Works for: INTF, CLAS, DOMA, DTEL, FUNC in same FUGR`,
63695
63700
  tags: [],
63696
63701
  };
@@ -63864,43 +63869,43 @@ class IfInIf extends _abap_rule_1.ABAPRule {
63864
63869
  key: "if_in_if",
63865
63870
  title: "IF in IF",
63866
63871
  shortDescription: `Detects nested ifs which can be refactored.`,
63867
- extendedInformation: `
63868
- Directly nested IFs without ELSE can be refactored to a single condition using AND.
63869
-
63870
- ELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.
63871
-
63872
- https://docs.abapopenchecks.org/checks/01/
63872
+ extendedInformation: `
63873
+ Directly nested IFs without ELSE can be refactored to a single condition using AND.
63874
+
63875
+ ELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.
63876
+
63877
+ https://docs.abapopenchecks.org/checks/01/
63873
63878
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low`,
63874
- badExample: `IF condition1.
63875
- IF condition2.
63876
- ...
63877
- ENDIF.
63878
- ENDIF.
63879
-
63880
- IF condition1.
63881
- ...
63882
- ELSE.
63883
- IF condition2.
63884
- ...
63885
- ENDIF.
63879
+ badExample: `IF condition1.
63880
+ IF condition2.
63881
+ ...
63882
+ ENDIF.
63883
+ ENDIF.
63884
+
63885
+ IF condition1.
63886
+ ...
63887
+ ELSE.
63888
+ IF condition2.
63889
+ ...
63890
+ ENDIF.
63886
63891
  ENDIF.`,
63887
- goodExample: `IF ( condition1 ) AND ( condition2 ).
63888
- ...
63889
- ENDIF.
63890
-
63891
- IF condition1.
63892
- ...
63893
- ELSEIF condition2.
63894
- ...
63895
- ENDIF.
63896
-
63897
- CASE variable.
63898
- WHEN value1.
63899
- ...
63900
- WHEN value2.
63901
- IF condition2.
63902
- ...
63903
- ENDIF.
63892
+ goodExample: `IF ( condition1 ) AND ( condition2 ).
63893
+ ...
63894
+ ENDIF.
63895
+
63896
+ IF condition1.
63897
+ ...
63898
+ ELSEIF condition2.
63899
+ ...
63900
+ ENDIF.
63901
+
63902
+ CASE variable.
63903
+ WHEN value1.
63904
+ ...
63905
+ WHEN value2.
63906
+ IF condition2.
63907
+ ...
63908
+ ENDIF.
63904
63909
  ENDCASE.`,
63905
63910
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
63906
63911
  };
@@ -64085,9 +64090,9 @@ class ImplementMethods extends _abap_rule_1.ABAPRule {
64085
64090
  for (const i of ((_a = file.getStructure()) === null || _a === void 0 ? void 0 : _a.findAllStatements(Statements.ClassImplementation)) || []) {
64086
64091
  const name = (_b = i.findFirstExpression(Expressions.ClassName)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr().toUpperCase();
64087
64092
  if (name === impl.identifier.getName().toUpperCase()) {
64088
- return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
64089
- METHOD ${methodName.toLowerCase()}.
64090
- RETURN. " todo, implement method
64093
+ return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
64094
+ METHOD ${methodName.toLowerCase()}.
64095
+ RETURN. " todo, implement method
64091
64096
  ENDMETHOD.`);
64092
64097
  }
64093
64098
  }
@@ -64266,14 +64271,14 @@ class ImplicitStartOfSelection extends _abap_rule_1.ABAPRule {
64266
64271
  key: "implicit_start_of_selection",
64267
64272
  title: "Implicit START-OF-SELECTION",
64268
64273
  shortDescription: `Add explicit selection screen event handling`,
64269
- extendedInformation: `Only runs for executable programs
64270
-
64274
+ extendedInformation: `Only runs for executable programs
64275
+
64271
64276
  https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapstart-of-selection.htm`,
64272
64277
  tags: [_irule_1.RuleTag.SingleFile],
64273
- badExample: `REPORT zfoo.
64278
+ badExample: `REPORT zfoo.
64274
64279
  WRITE 'hello'.`,
64275
- goodExample: `
64276
- START-OF-SELECTION.
64280
+ goodExample: `
64281
+ START-OF-SELECTION.
64277
64282
  WRITE 'hello'.`,
64278
64283
  };
64279
64284
  }
@@ -64378,19 +64383,19 @@ class InStatementIndentation extends _abap_rule_1.ABAPRule {
64378
64383
  key: "in_statement_indentation",
64379
64384
  title: "In-statement indentation",
64380
64385
  shortDescription: "Checks alignment within statements which span multiple lines.",
64381
- extendedInformation: `Lines following the first line should be indented once (2 spaces).
64382
-
64383
- For block declaration statements, lines after the first should be indented an additional time (default: +2 spaces)
64386
+ extendedInformation: `Lines following the first line should be indented once (2 spaces).
64387
+
64388
+ For block declaration statements, lines after the first should be indented an additional time (default: +2 spaces)
64384
64389
  to distinguish them better from code within the block.`,
64385
- badExample: `IF 1 = 1
64386
- AND 2 = 2.
64387
- WRITE 'hello' &&
64388
- 'world'.
64390
+ badExample: `IF 1 = 1
64391
+ AND 2 = 2.
64392
+ WRITE 'hello' &&
64393
+ 'world'.
64389
64394
  ENDIF.`,
64390
- goodExample: `IF 1 = 1
64391
- AND 2 = 2.
64392
- WRITE 'hello' &&
64393
- 'world'.
64395
+ goodExample: `IF 1 = 1
64396
+ AND 2 = 2.
64397
+ WRITE 'hello' &&
64398
+ 'world'.
64394
64399
  ENDIF.`,
64395
64400
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
64396
64401
  };
@@ -64516,23 +64521,23 @@ class Indentation extends _abap_rule_1.ABAPRule {
64516
64521
  title: "Indentation",
64517
64522
  shortDescription: `Checks indentation`,
64518
64523
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
64519
- badExample: `CLASS lcl DEFINITION.
64520
- PRIVATE SECTION.
64521
- METHODS constructor.
64522
- ENDCLASS.
64523
-
64524
- CLASS lcl IMPLEMENTATION.
64525
- METHOD constructor.
64526
- ENDMETHOD.
64524
+ badExample: `CLASS lcl DEFINITION.
64525
+ PRIVATE SECTION.
64526
+ METHODS constructor.
64527
+ ENDCLASS.
64528
+
64529
+ CLASS lcl IMPLEMENTATION.
64530
+ METHOD constructor.
64531
+ ENDMETHOD.
64527
64532
  ENDCLASS.`,
64528
- goodExample: `CLASS lcl DEFINITION.
64529
- PRIVATE SECTION.
64530
- METHODS constructor.
64531
- ENDCLASS.
64532
-
64533
- CLASS lcl IMPLEMENTATION.
64534
- METHOD constructor.
64535
- ENDMETHOD.
64533
+ goodExample: `CLASS lcl DEFINITION.
64534
+ PRIVATE SECTION.
64535
+ METHODS constructor.
64536
+ ENDCLASS.
64537
+
64538
+ CLASS lcl IMPLEMENTATION.
64539
+ METHOD constructor.
64540
+ ENDMETHOD.
64536
64541
  ENDCLASS.`,
64537
64542
  };
64538
64543
  }
@@ -64936,9 +64941,9 @@ class IntfReferencingClas {
64936
64941
  key: "intf_referencing_clas",
64937
64942
  title: "INTF referencing CLAS",
64938
64943
  shortDescription: `Interface contains references to class`,
64939
- extendedInformation: `Only global interfaces are checked.
64940
- Only first level references are checked.
64941
- Exception class references are ignored.
64944
+ extendedInformation: `Only global interfaces are checked.
64945
+ Only first level references are checked.
64946
+ Exception class references are ignored.
64942
64947
  Void references are ignored.`,
64943
64948
  };
64944
64949
  }
@@ -65023,9 +65028,9 @@ class InvalidTableIndex extends _abap_rule_1.ABAPRule {
65023
65028
  title: "Invalid Table Index",
65024
65029
  shortDescription: `Issues error for constant table index zero, as ABAP starts from 1`,
65025
65030
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
65026
- badExample: `DATA(first) = table[ 0 ].
65031
+ badExample: `DATA(first) = table[ 0 ].
65027
65032
  READ TABLE gt_stack ASSIGNING <ls_stack> INDEX 0.`,
65028
- goodExample: `DATA(first) = table[ 1 ].
65033
+ goodExample: `DATA(first) = table[ 1 ].
65029
65034
  READ TABLE gt_stack ASSIGNING <ls_stack> INDEX 1.`,
65030
65035
  };
65031
65036
  }
@@ -65627,8 +65632,8 @@ class LineBreakStyle {
65627
65632
  return {
65628
65633
  key: "line_break_style",
65629
65634
  title: "Makes sure line breaks are consistent in the ABAP code",
65630
- shortDescription: `Enforces LF as newlines in ABAP files
65631
-
65635
+ shortDescription: `Enforces LF as newlines in ABAP files
65636
+
65632
65637
  abapGit does not work with CRLF`,
65633
65638
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
65634
65639
  };
@@ -65697,7 +65702,7 @@ class LineLength extends _abap_rule_1.ABAPRule {
65697
65702
  key: "line_length",
65698
65703
  title: "Line length",
65699
65704
  shortDescription: `Detects lines exceeding the provided maximum length.`,
65700
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length
65705
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length
65701
65706
  https://docs.abapopenchecks.org/checks/04/`,
65702
65707
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
65703
65708
  };
@@ -65768,7 +65773,7 @@ class LineOnlyPunc extends _abap_rule_1.ABAPRule {
65768
65773
  key: "line_only_punc",
65769
65774
  title: "Line containing only punctuation",
65770
65775
  shortDescription: `Detects lines containing only punctuation.`,
65771
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#close-brackets-at-line-end
65776
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#close-brackets-at-line-end
65772
65777
  https://docs.abapopenchecks.org/checks/16/`,
65773
65778
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
65774
65779
  badExample: "zcl_class=>method(\n).",
@@ -66031,15 +66036,15 @@ class LocalVariableNames extends _abap_rule_1.ABAPRule {
66031
66036
  return {
66032
66037
  key: "local_variable_names",
66033
66038
  title: "Local variable naming conventions",
66034
- shortDescription: `
66035
- Allows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols.
66039
+ shortDescription: `
66040
+ Allows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols.
66036
66041
  Regexes are case-insensitive.`,
66037
66042
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
66038
- badExample: `FORM bar.
66039
- DATA foo.
66043
+ badExample: `FORM bar.
66044
+ DATA foo.
66040
66045
  ENDFORM.`,
66041
- goodExample: `FORM bar.
66042
- DATA lv_foo.
66046
+ goodExample: `FORM bar.
66047
+ DATA lv_foo.
66043
66048
  ENDFORM.`,
66044
66049
  };
66045
66050
  }
@@ -66191,9 +66196,9 @@ class MacroNaming extends _abap_rule_1.ABAPRule {
66191
66196
  shortDescription: `Allows you to enforce a pattern for macro definitions`,
66192
66197
  extendedInformation: `Use rule "avoid_use" to avoid macros altogether.`,
66193
66198
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
66194
- badExample: `DEFINE something.
66199
+ badExample: `DEFINE something.
66195
66200
  END-OF-DEFINITION.`,
66196
- goodExample: `DEFINE _something.
66201
+ goodExample: `DEFINE _something.
66197
66202
  END-OF-DEFINITION.`,
66198
66203
  };
66199
66204
  }
@@ -66266,10 +66271,10 @@ class MainFileContents {
66266
66271
  key: "main_file_contents",
66267
66272
  title: "Main file contents",
66268
66273
  shortDescription: `Checks related to report declarations.`,
66269
- extendedInformation: `Does not run if the target version is Cloud
66270
-
66271
- * PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
66272
- * TYPEs must begin with "TYPE-POOL <name>."
66274
+ extendedInformation: `Does not run if the target version is Cloud
66275
+
66276
+ * PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
66277
+ * TYPEs must begin with "TYPE-POOL <name>."
66273
66278
  `,
66274
66279
  };
66275
66280
  }
@@ -66385,17 +66390,17 @@ class ManyParentheses extends _abap_rule_1.ABAPRule {
66385
66390
  title: "Too many parentheses",
66386
66391
  shortDescription: `Searches for expressions where extra parentheses can safely be removed`,
66387
66392
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
66388
- badExample: `
66389
- IF ( destination IS INITIAL ).
66390
- ENDIF.
66391
- IF foo = boo AND ( bar = lar AND moo = loo ).
66392
- ENDIF.
66393
+ badExample: `
66394
+ IF ( destination IS INITIAL ).
66395
+ ENDIF.
66396
+ IF foo = boo AND ( bar = lar AND moo = loo ).
66397
+ ENDIF.
66393
66398
  `,
66394
- goodExample: `
66395
- IF destination IS INITIAL.
66396
- ENDIF.
66397
- IF foo = boo AND bar = lar AND moo = loo.
66398
- ENDIF.
66399
+ goodExample: `
66400
+ IF destination IS INITIAL.
66401
+ ENDIF.
66402
+ IF foo = boo AND bar = lar AND moo = loo.
66403
+ ENDIF.
66399
66404
  `,
66400
66405
  };
66401
66406
  }
@@ -66569,14 +66574,14 @@ class MaxOneMethodParameterPerLine extends _abap_rule_1.ABAPRule {
66569
66574
  title: "Max one method parameter definition per line",
66570
66575
  shortDescription: `Keep max one method parameter description per line`,
66571
66576
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace],
66572
- badExample: `
66573
- METHODS apps_scope_token
66574
- IMPORTING
66577
+ badExample: `
66578
+ METHODS apps_scope_token
66579
+ IMPORTING
66575
66580
  body TYPE bodyapps_scope_token client_id TYPE str.`,
66576
- goodExample: `
66577
- METHODS apps_scope_token
66578
- IMPORTING
66579
- body TYPE bodyapps_scope_token
66581
+ goodExample: `
66582
+ METHODS apps_scope_token
66583
+ IMPORTING
66584
+ body TYPE bodyapps_scope_token
66580
66585
  client_id TYPE str.`,
66581
66586
  };
66582
66587
  }
@@ -66641,11 +66646,11 @@ class MaxOneStatement extends _abap_rule_1.ABAPRule {
66641
66646
  key: "max_one_statement",
66642
66647
  title: "Max one statement per line",
66643
66648
  shortDescription: `Checks that each line contains only a single statement.`,
66644
- extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
66645
-
66646
- Does not report anything for chained statements.
66647
-
66648
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line
66649
+ extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
66650
+
66651
+ Does not report anything for chained statements.
66652
+
66653
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line
66649
66654
  https://docs.abapopenchecks.org/checks/11/`,
66650
66655
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
66651
66656
  badExample: `WRITE foo. WRITE bar.`,
@@ -66983,8 +66988,8 @@ class MethodLength {
66983
66988
  key: "method_length",
66984
66989
  title: "Method/Form Length",
66985
66990
  shortDescription: `Checks relating to method/form length.`,
66986
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
66987
-
66991
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
66992
+
66988
66993
  Abstract methods without statements are considered okay.`,
66989
66994
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
66990
66995
  };
@@ -67089,20 +67094,20 @@ class MethodOverwritesBuiltIn extends _abap_rule_1.ABAPRule {
67089
67094
  key: "method_overwrites_builtin",
67090
67095
  title: "Method name overwrites builtin function",
67091
67096
  shortDescription: `Checks Method names that overwrite builtin SAP functions`,
67092
- extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
67093
-
67094
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
67095
-
67097
+ extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
67098
+
67099
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
67100
+
67096
67101
  Interface method names are ignored`,
67097
67102
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
67098
- badExample: `CLASS lcl DEFINITION.
67099
- PUBLIC SECTION.
67100
- METHODS matches.
67101
- ENDCLASS.
67102
-
67103
- CLASS lcl IMPLEMENTATION.
67104
- METHOD matches.
67105
- ENDMETHOD.
67103
+ badExample: `CLASS lcl DEFINITION.
67104
+ PUBLIC SECTION.
67105
+ METHODS matches.
67106
+ ENDCLASS.
67107
+
67108
+ CLASS lcl IMPLEMENTATION.
67109
+ METHOD matches.
67110
+ ENDMETHOD.
67106
67111
  ENDCLASS.`,
67107
67112
  };
67108
67113
  }
@@ -67293,12 +67298,12 @@ class MixReturning extends _abap_rule_1.ABAPRule {
67293
67298
  // eslint-disable-next-line max-len
67294
67299
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-either-returning-or-exporting-or-changing-but-not-a-combination`,
67295
67300
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
67296
- badExample: `CLASS lcl DEFINITION.
67297
- PUBLIC SECTION.
67298
- METHODS
67299
- foobar
67300
- EXPORTING foo TYPE i
67301
- RETURNING VALUE(rv_string) TYPE string.
67301
+ badExample: `CLASS lcl DEFINITION.
67302
+ PUBLIC SECTION.
67303
+ METHODS
67304
+ foobar
67305
+ EXPORTING foo TYPE i
67306
+ RETURNING VALUE(rv_string) TYPE string.
67302
67307
  ENDCLASS.`,
67303
67308
  };
67304
67309
  }
@@ -67678,7 +67683,7 @@ class Nesting extends _abap_rule_1.ABAPRule {
67678
67683
  key: "nesting",
67679
67684
  title: "Check nesting depth",
67680
67685
  shortDescription: `Checks for methods exceeding a maximum nesting depth`,
67681
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low
67686
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low
67682
67687
  https://docs.abapopenchecks.org/checks/74/`,
67683
67688
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
67684
67689
  };
@@ -67921,7 +67926,7 @@ class NoChainedAssignment extends _abap_rule_1.ABAPRule {
67921
67926
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-chain-assignments`,
67922
67927
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
67923
67928
  badExample: `var1 = var2 = var3.`,
67924
- goodExample: `var2 = var3.
67929
+ goodExample: `var2 = var3.
67925
67930
  var1 = var2.`,
67926
67931
  };
67927
67932
  }
@@ -67980,8 +67985,8 @@ class NoExternalFormCalls extends _abap_rule_1.ABAPRule {
67980
67985
  key: "no_external_form_calls",
67981
67986
  title: "No external FORM calls",
67982
67987
  shortDescription: `Detect external form calls`,
67983
- badExample: `PERFORM foo IN PROGRAM bar.
67984
-
67988
+ badExample: `PERFORM foo IN PROGRAM bar.
67989
+
67985
67990
  PERFORM foo(bar).`,
67986
67991
  tags: [_irule_1.RuleTag.SingleFile],
67987
67992
  };
@@ -68042,17 +68047,17 @@ class NoInlineInOptionalBranches extends _abap_rule_1.ABAPRule {
68042
68047
  key: "no_inline_in_optional_branches",
68043
68048
  title: "Don't declare inline in optional branches",
68044
68049
  shortDescription: `Don't declare inline in optional branches`,
68045
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
68046
-
68047
- Considered optional branches:
68048
- * inside IF/ELSEIF/ELSE
68049
- * inside LOOP
68050
- * inside WHILE
68051
- * inside CASE/WHEN, CASE TYPE OF
68052
- * inside DO
68053
- * inside SELECT loops
68054
-
68055
- Not considered optional branches:
68050
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
68051
+
68052
+ Considered optional branches:
68053
+ * inside IF/ELSEIF/ELSE
68054
+ * inside LOOP
68055
+ * inside WHILE
68056
+ * inside CASE/WHEN, CASE TYPE OF
68057
+ * inside DO
68058
+ * inside SELECT loops
68059
+
68060
+ Not considered optional branches:
68056
68061
  * TRY/CATCH/CLEANUP`,
68057
68062
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
68058
68063
  };
@@ -68152,12 +68157,12 @@ class NoPrefixes extends _abap_rule_1.ABAPRule {
68152
68157
  key: "no_prefixes",
68153
68158
  title: "No Prefixes",
68154
68159
  shortDescription: `Dont use hungarian notation`,
68155
- extendedInformation: `
68156
- Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
68157
- allowing all types to become voided, abaplint will then provide less precise syntax errors.
68158
-
68159
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
68160
-
68160
+ extendedInformation: `
68161
+ Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
68162
+ allowing all types to become voided, abaplint will then provide less precise syntax errors.
68163
+
68164
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
68165
+
68161
68166
  https://github.com/SAP/styleguides/blob/main/clean-abap/sub-sections/AvoidEncodings.md`,
68162
68167
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
68163
68168
  badExample: `DATA lv_foo TYPE i.`,
@@ -68336,7 +68341,7 @@ class NoPublicAttributes extends _abap_rule_1.ABAPRule {
68336
68341
  return {
68337
68342
  key: "no_public_attributes",
68338
68343
  title: "No public attributes",
68339
- shortDescription: `Checks that classes and interfaces don't contain any public attributes.
68344
+ shortDescription: `Checks that classes and interfaces don't contain any public attributes.
68340
68345
  Exceptions are excluded from this rule.`,
68341
68346
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#members-private-by-default-protected-only-if-needed`,
68342
68347
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
@@ -68437,13 +68442,13 @@ class NoYodaConditions extends _abap_rule_1.ABAPRule {
68437
68442
  key: "no_yoda_conditions",
68438
68443
  title: "No Yoda conditions",
68439
68444
  shortDescription: `Finds Yoda conditions and reports issues`,
68440
- extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
68441
-
68445
+ extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
68446
+
68442
68447
  Conditions with operators CP, NP, CS, NS, CA, NA, CO, CN are ignored`,
68443
68448
  tags: [_irule_1.RuleTag.SingleFile],
68444
- badExample: `IF 0 <> sy-subrc.
68449
+ badExample: `IF 0 <> sy-subrc.
68445
68450
  ENDIF.`,
68446
- goodExample: `IF sy-subrc <> 0.
68451
+ goodExample: `IF sy-subrc <> 0.
68447
68452
  ENDIF.`,
68448
68453
  };
68449
68454
  }
@@ -68544,8 +68549,8 @@ class NROBConsistency {
68544
68549
  key: "nrob_consistency",
68545
68550
  title: "Number range consistency",
68546
68551
  shortDescription: `Consistency checks for number ranges`,
68547
- extendedInformation: `Issue reported if percentage warning is over 50%
68548
-
68552
+ extendedInformation: `Issue reported if percentage warning is over 50%
68553
+
68549
68554
  Issue reported if the referenced domain is not found(taking error namespace into account)`,
68550
68555
  tags: [_irule_1.RuleTag.SingleFile],
68551
68556
  };
@@ -68822,58 +68827,58 @@ class ObsoleteStatement extends _abap_rule_1.ABAPRule {
68822
68827
  title: "Obsolete statements",
68823
68828
  shortDescription: `Checks for usages of certain obsolete statements`,
68824
68829
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
68825
- extendedInformation: `
68826
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
68827
-
68828
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
68829
-
68830
- SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
68831
-
68832
- IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
68833
-
68834
- WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
68835
-
68836
- FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
68837
-
68838
- TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
68839
-
68840
- LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
68841
-
68842
- COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
68843
-
68844
- OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
68845
-
68846
- PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
68847
-
68848
- RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
68849
-
68850
- PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
68851
-
68852
- MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
68853
-
68854
- SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
68855
- SELECT COUNT(*) is considered okay
68856
-
68857
- FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
68858
-
68859
- SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
68860
-
68861
- CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
68862
-
68863
- POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
68864
-
68865
- OCCURENCES: check for OCCURENCES vs OCCURRENCES
68866
-
68830
+ extendedInformation: `
68831
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
68832
+
68833
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
68834
+
68835
+ SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
68836
+
68837
+ IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
68838
+
68839
+ WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
68840
+
68841
+ FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
68842
+
68843
+ TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
68844
+
68845
+ LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
68846
+
68847
+ COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
68848
+
68849
+ OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
68850
+
68851
+ PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
68852
+
68853
+ RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
68854
+
68855
+ PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
68856
+
68857
+ MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
68858
+
68859
+ SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
68860
+ SELECT COUNT(*) is considered okay
68861
+
68862
+ FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
68863
+
68864
+ SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
68865
+
68866
+ CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
68867
+
68868
+ POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
68869
+
68870
+ OCCURENCES: check for OCCURENCES vs OCCURRENCES
68871
+
68867
68872
  CLIENT SPECIFIED, from 754: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abapselect_client_obsolete.htm`,
68868
- badExample: `REFRESH itab.
68869
-
68870
- COMPUTE foo = 2 + 2.
68871
-
68872
- MULTIPLY lv_foo BY 2.
68873
-
68874
- INTERFACE intf LOAD.
68875
-
68876
- IF foo IS SUPPLIED.
68873
+ badExample: `REFRESH itab.
68874
+
68875
+ COMPUTE foo = 2 + 2.
68876
+
68877
+ MULTIPLY lv_foo BY 2.
68878
+
68879
+ INTERFACE intf LOAD.
68880
+
68881
+ IF foo IS SUPPLIED.
68877
68882
  ENDIF.`,
68878
68883
  };
68879
68884
  }
@@ -69213,9 +69218,9 @@ class OmitParameterName {
69213
69218
  key: "omit_parameter_name",
69214
69219
  title: "Omit parameter name",
69215
69220
  shortDescription: `Omit the parameter name in single parameter calls`,
69216
- extendedInformation: `
69217
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
69218
-
69221
+ extendedInformation: `
69222
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
69223
+
69219
69224
  EXPORTING must already be omitted for this rule to take effect, https://rules.abaplint.org/exporting/`,
69220
69225
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
69221
69226
  badExample: `method( param = 2 ).`,
@@ -69421,20 +69426,20 @@ class OmitReceiving extends _abap_rule_1.ABAPRule {
69421
69426
  shortDescription: `Omit RECEIVING`,
69422
69427
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-receiving`,
69423
69428
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
69424
- badExample: `
69425
- upload_pack(
69426
- EXPORTING
69427
- io_client = lo_client
69428
- iv_url = iv_url
69429
- iv_deepen_level = iv_deepen_level
69430
- it_hashes = lt_hashes
69431
- RECEIVING
69429
+ badExample: `
69430
+ upload_pack(
69431
+ EXPORTING
69432
+ io_client = lo_client
69433
+ iv_url = iv_url
69434
+ iv_deepen_level = iv_deepen_level
69435
+ it_hashes = lt_hashes
69436
+ RECEIVING
69432
69437
  rt_objects = et_objects ).`,
69433
- goodExample: `
69434
- et_objects = upload_pack(
69435
- io_client = lo_client
69436
- iv_url = iv_url
69437
- iv_deepen_level = iv_deepen_level
69438
+ goodExample: `
69439
+ et_objects = upload_pack(
69440
+ io_client = lo_client
69441
+ iv_url = iv_url
69442
+ iv_deepen_level = iv_deepen_level
69438
69443
  it_hashes = lt_hashes ).`,
69439
69444
  };
69440
69445
  }
@@ -69498,8 +69503,8 @@ class Parser702Chaining extends _abap_rule_1.ABAPRule {
69498
69503
  return {
69499
69504
  key: "parser_702_chaining",
69500
69505
  title: "Parser Error, bad chanining on 702",
69501
- shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
69502
- this rule finds these and reports errors.
69506
+ shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
69507
+ this rule finds these and reports errors.
69503
69508
  Only active on target version 702 and below.`,
69504
69509
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
69505
69510
  };
@@ -69579,8 +69584,8 @@ class ParserError {
69579
69584
  return {
69580
69585
  key: "parser_error",
69581
69586
  title: "Parser error",
69582
- shortDescription: `Checks for syntax not recognized by abaplint.
69583
-
69587
+ shortDescription: `Checks for syntax not recognized by abaplint.
69588
+
69584
69589
  See recognized syntax at https://syntax.abaplint.org`,
69585
69590
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
69586
69591
  };
@@ -69665,7 +69670,7 @@ class ParserMissingSpace extends _abap_rule_1.ABAPRule {
69665
69670
  return {
69666
69671
  key: "parser_missing_space",
69667
69672
  title: "Parser Error, missing space",
69668
- shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.
69673
+ shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.
69669
69674
  This rule makes sure the spaces are consistently required across the language.`,
69670
69675
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
69671
69676
  badExample: `IF ( foo = 'bar').`,
@@ -70088,25 +70093,25 @@ class PreferInline {
70088
70093
  key: "prefer_inline",
70089
70094
  title: "Prefer Inline Declarations",
70090
70095
  shortDescription: `Prefer inline to up-front declarations.`,
70091
- extendedInformation: `EXPERIMENTAL
70092
-
70093
- Activates if language version is v740sp02 or above.
70094
-
70095
- Variables must be local(METHOD or FORM).
70096
-
70097
- No generic or void typed variables. No syntax errors.
70098
-
70099
- First position used must be a full/pure write.
70100
-
70101
- Move statment is not a cast(?=)
70102
-
70096
+ extendedInformation: `EXPERIMENTAL
70097
+
70098
+ Activates if language version is v740sp02 or above.
70099
+
70100
+ Variables must be local(METHOD or FORM).
70101
+
70102
+ No generic or void typed variables. No syntax errors.
70103
+
70104
+ First position used must be a full/pure write.
70105
+
70106
+ Move statment is not a cast(?=)
70107
+
70103
70108
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-inline-to-up-front-declarations`,
70104
70109
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Experimental, _irule_1.RuleTag.Quickfix],
70105
- badExample: `DATA foo TYPE i.
70106
- foo = 2.
70107
- DATA percentage TYPE decfloat34.
70110
+ badExample: `DATA foo TYPE i.
70111
+ foo = 2.
70112
+ DATA percentage TYPE decfloat34.
70108
70113
  percentage = ( comment_number / abs_statement_number ) * 100.`,
70109
- goodExample: `DATA(foo) = 2.
70114
+ goodExample: `DATA(foo) = 2.
70110
70115
  DATA(percentage) = CONV decfloat34( comment_number / abs_statement_number ) * 100.`,
70111
70116
  };
70112
70117
  }
@@ -70320,18 +70325,18 @@ class PreferIsNot extends _abap_rule_1.ABAPRule {
70320
70325
  key: "prefer_is_not",
70321
70326
  title: "Prefer IS NOT to NOT IS",
70322
70327
  shortDescription: `Prefer IS NOT to NOT IS`,
70323
- extendedInformation: `
70324
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
70325
-
70328
+ extendedInformation: `
70329
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
70330
+
70326
70331
  "if not is_valid( )." examples are skipped`,
70327
70332
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
70328
- goodExample: `IF variable IS NOT INITIAL.
70329
- IF variable NP 'TODO*'.
70330
- IF variable <> 42.
70333
+ goodExample: `IF variable IS NOT INITIAL.
70334
+ IF variable NP 'TODO*'.
70335
+ IF variable <> 42.
70331
70336
  IF variable CO 'hello'.`,
70332
- badExample: `IF NOT variable IS INITIAL.
70333
- IF NOT variable CP 'TODO*'.
70334
- IF NOT variable = 42.
70337
+ badExample: `IF NOT variable IS INITIAL.
70338
+ IF NOT variable CP 'TODO*'.
70339
+ IF NOT variable = 42.
70335
70340
  IF NOT variable CA 'hello'.`,
70336
70341
  };
70337
70342
  }
@@ -70519,14 +70524,14 @@ class PreferRaiseExceptionNew extends _abap_rule_1.ABAPRule {
70519
70524
  key: "prefer_raise_exception_new",
70520
70525
  title: "Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE",
70521
70526
  shortDescription: `Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE`,
70522
- extendedInformation: `
70523
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
70524
-
70527
+ extendedInformation: `
70528
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
70529
+
70525
70530
  From 752 and up`,
70526
70531
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
70527
70532
  goodExample: `RAISE EXCEPTION NEW cx_generation_error( previous = exception ).`,
70528
- badExample: `RAISE EXCEPTION TYPE cx_generation_error
70529
- EXPORTING
70533
+ badExample: `RAISE EXCEPTION TYPE cx_generation_error
70534
+ EXPORTING
70530
70535
  previous = exception.`,
70531
70536
  };
70532
70537
  }
@@ -70604,12 +70609,12 @@ class PreferReturningToExporting extends _abap_rule_1.ABAPRule {
70604
70609
  key: "prefer_returning_to_exporting",
70605
70610
  title: "Prefer RETURNING to EXPORTING",
70606
70611
  shortDescription: `Prefer RETURNING to EXPORTING. Generic types cannot be RETURNING.`,
70607
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting
70612
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting
70608
70613
  https://docs.abapopenchecks.org/checks/44/`,
70609
70614
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
70610
- badExample: `CLASS lcl DEFINITION.
70611
- PUBLIC SECTION.
70612
- METHODS test EXPORTING ev_foo TYPE i.
70615
+ badExample: `CLASS lcl DEFINITION.
70616
+ PUBLIC SECTION.
70617
+ METHODS test EXPORTING ev_foo TYPE i.
70613
70618
  ENDCLASS.`,
70614
70619
  };
70615
70620
  }
@@ -70705,8 +70710,8 @@ class PreferXsdbool extends _abap_rule_1.ABAPRule {
70705
70710
  key: "prefer_xsdbool",
70706
70711
  title: "Prefer xsdbool over boolc",
70707
70712
  shortDescription: `Prefer xsdbool over boolc`,
70708
- extendedInformation: `Activates if language version is v740sp08 or above.
70709
-
70713
+ extendedInformation: `Activates if language version is v740sp08 or above.
70714
+
70710
70715
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
70711
70716
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
70712
70717
  badExample: `DATA(sdf) = boolc( 1 = 2 ).`,
@@ -70778,9 +70783,9 @@ class PreferredCompareOperator extends _abap_rule_1.ABAPRule {
70778
70783
  title: "Preferred compare operator",
70779
70784
  shortDescription: `Configure undesired operator variants`,
70780
70785
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
70781
- badExample: `IF foo EQ bar.
70786
+ badExample: `IF foo EQ bar.
70782
70787
  ENDIF.`,
70783
- goodExample: `IF foo = bar.
70788
+ goodExample: `IF foo = bar.
70784
70789
  ENDIF.`,
70785
70790
  };
70786
70791
  }
@@ -71004,26 +71009,26 @@ class ReduceProceduralCode extends _abap_rule_1.ABAPRule {
71004
71009
  key: "reduce_procedural_code",
71005
71010
  title: "Reduce procedural code",
71006
71011
  shortDescription: `Checks FORM and FUNCTION-MODULE have few statements`,
71007
- extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
71008
-
71009
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
71010
-
71012
+ extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
71013
+
71014
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
71015
+
71011
71016
  Comments are not counted as statements.`,
71012
71017
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
71013
- badExample: `FORM foo.
71014
- DATA lv_bar TYPE i.
71015
- lv_bar = 2 + 2.
71016
- IF lv_bar = 4.
71017
- WRITE 'hello world'.
71018
- ENDIF.
71019
- DATA lv_bar TYPE i.
71020
- lv_bar = 2 + 2.
71021
- IF lv_bar = 4.
71022
- WRITE 'hello world'.
71023
- ENDIF.
71018
+ badExample: `FORM foo.
71019
+ DATA lv_bar TYPE i.
71020
+ lv_bar = 2 + 2.
71021
+ IF lv_bar = 4.
71022
+ WRITE 'hello world'.
71023
+ ENDIF.
71024
+ DATA lv_bar TYPE i.
71025
+ lv_bar = 2 + 2.
71026
+ IF lv_bar = 4.
71027
+ WRITE 'hello world'.
71028
+ ENDIF.
71024
71029
  ENDFORM.`,
71025
- goodExample: `FORM foo.
71026
- NEW zcl_global_class( )->run_logic( ).
71030
+ goodExample: `FORM foo.
71031
+ NEW zcl_global_class( )->run_logic( ).
71027
71032
  ENDFORM.`,
71028
71033
  };
71029
71034
  }
@@ -71267,10 +71272,10 @@ class RemoveDescriptions {
71267
71272
  return {
71268
71273
  key: "remove_descriptions",
71269
71274
  title: "Remove descriptions",
71270
- shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
71271
-
71272
- Class descriptions are required, see rule description_empty.
71273
-
71275
+ shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
71276
+
71277
+ Class descriptions are required, see rule description_empty.
71278
+
71274
71279
  Consider using ABAP Doc for documentation.`,
71275
71280
  tags: [],
71276
71281
  };
@@ -71395,14 +71400,14 @@ class RFCErrorHandling extends _abap_rule_1.ABAPRule {
71395
71400
  tags: [_irule_1.RuleTag.SingleFile],
71396
71401
  shortDescription: `Checks that exceptions 'system_failure' and 'communication_failure' are handled in RFC calls`,
71397
71402
  extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenrfc_exception.htm`,
71398
- badExample: `CALL FUNCTION 'ZRFC'
71403
+ badExample: `CALL FUNCTION 'ZRFC'
71399
71404
  DESTINATION lv_rfc.`,
71400
- goodExample: `CALL FUNCTION 'ZRFC'
71401
- DESTINATION lv_rfc
71402
- EXCEPTIONS
71403
- system_failure = 1 MESSAGE msg
71404
- communication_failure = 2 MESSAGE msg
71405
- resource_failure = 3
71405
+ goodExample: `CALL FUNCTION 'ZRFC'
71406
+ DESTINATION lv_rfc
71407
+ EXCEPTIONS
71408
+ system_failure = 1 MESSAGE msg
71409
+ communication_failure = 2 MESSAGE msg
71410
+ resource_failure = 3
71406
71411
  OTHERS = 4.`,
71407
71412
  };
71408
71413
  }
@@ -71486,11 +71491,11 @@ class SelectAddOrderBy {
71486
71491
  key: "select_add_order_by",
71487
71492
  title: "SELECT add ORDER BY",
71488
71493
  shortDescription: `SELECTs add ORDER BY clause`,
71489
- extendedInformation: `
71490
- This will make sure that the SELECT statement returns results in the same sequence on different databases
71491
-
71492
- add ORDER BY PRIMARY KEY if in doubt
71493
-
71494
+ extendedInformation: `
71495
+ This will make sure that the SELECT statement returns results in the same sequence on different databases
71496
+
71497
+ add ORDER BY PRIMARY KEY if in doubt
71498
+
71494
71499
  If the target is a sorted/hashed table, no issue is reported`,
71495
71500
  tags: [_irule_1.RuleTag.SingleFile],
71496
71501
  badExample: `SELECT * FROM db INTO TABLE @DATA(tab).`,
@@ -71621,14 +71626,14 @@ class SelectPerformance {
71621
71626
  key: "select_performance",
71622
71627
  title: "SELECT performance",
71623
71628
  shortDescription: `Various checks regarding SELECT performance.`,
71624
- extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
71625
-
71629
+ extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
71630
+
71626
71631
  SELECT *: not reported if using INTO/APPENDING CORRESPONDING FIELDS OF`,
71627
71632
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Performance],
71628
- badExample: `SELECT field1, field2 FROM table
71629
- INTO @DATA(structure) UP TO 1 ROWS ORDER BY field3 DESCENDING.
71633
+ badExample: `SELECT field1, field2 FROM table
71634
+ INTO @DATA(structure) UP TO 1 ROWS ORDER BY field3 DESCENDING.
71630
71635
  ENDSELECT.`,
71631
- goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
71636
+ goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
71632
71637
  INTO TABLE @DATA(table) ORDER BY field3 DESCENDING`,
71633
71638
  };
71634
71639
  }
@@ -71742,8 +71747,8 @@ class SelectSingleFullKey {
71742
71747
  key: "select_single_full_key",
71743
71748
  title: "Detect SELECT SINGLE which are possibily not unique",
71744
71749
  shortDescription: `Detect SELECT SINGLE which are possibily not unique`,
71745
- extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
71746
-
71750
+ extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
71751
+
71747
71752
  If the statement contains a JOIN it is not checked`,
71748
71753
  pseudoComment: "EC CI_NOORDER",
71749
71754
  tags: [_irule_1.RuleTag.Quickfix],
@@ -72171,8 +72176,8 @@ class SICFConsistency {
72171
72176
  key: "sicf_consistency",
72172
72177
  title: "SICF consistency",
72173
72178
  shortDescription: `Checks the validity of ICF services`,
72174
- extendedInformation: `* Class defined in handler must exist
72175
- * Class must not have any syntax errors
72179
+ extendedInformation: `* Class defined in handler must exist
72180
+ * Class must not have any syntax errors
72176
72181
  * Class must implement interface IF_HTTP_EXTENSION`,
72177
72182
  };
72178
72183
  }
@@ -72284,23 +72289,23 @@ class SlowParameterPassing {
72284
72289
  shortDescription: `Detects slow pass by value passing for methods where parameter is not changed`,
72285
72290
  extendedInformation: `Method parameters defined in interfaces is not checked`,
72286
72291
  tags: [_irule_1.RuleTag.Performance],
72287
- badExample: `CLASS lcl DEFINITION.
72288
- PUBLIC SECTION.
72289
- METHODS bar IMPORTING VALUE(sdf) TYPE string.
72290
- ENDCLASS.
72291
- CLASS lcl IMPLEMENTATION.
72292
- METHOD bar.
72293
- WRITE sdf.
72294
- ENDMETHOD.
72292
+ badExample: `CLASS lcl DEFINITION.
72293
+ PUBLIC SECTION.
72294
+ METHODS bar IMPORTING VALUE(sdf) TYPE string.
72295
+ ENDCLASS.
72296
+ CLASS lcl IMPLEMENTATION.
72297
+ METHOD bar.
72298
+ WRITE sdf.
72299
+ ENDMETHOD.
72295
72300
  ENDCLASS.`,
72296
- goodExample: `CLASS lcl DEFINITION.
72297
- PUBLIC SECTION.
72298
- METHODS bar IMPORTING sdf TYPE string.
72299
- ENDCLASS.
72300
- CLASS lcl IMPLEMENTATION.
72301
- METHOD bar.
72302
- WRITE sdf.
72303
- ENDMETHOD.
72301
+ goodExample: `CLASS lcl DEFINITION.
72302
+ PUBLIC SECTION.
72303
+ METHODS bar IMPORTING sdf TYPE string.
72304
+ ENDCLASS.
72305
+ CLASS lcl IMPLEMENTATION.
72306
+ METHOD bar.
72307
+ WRITE sdf.
72308
+ ENDMETHOD.
72304
72309
  ENDCLASS.`,
72305
72310
  };
72306
72311
  }
@@ -72571,8 +72576,8 @@ class SpaceBeforeDot extends _abap_rule_1.ABAPRule {
72571
72576
  key: "space_before_dot",
72572
72577
  title: "Space before dot",
72573
72578
  shortDescription: `Checks for extra spaces before dots at the ends of statements`,
72574
- extendedInformation: `
72575
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
72579
+ extendedInformation: `
72580
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
72576
72581
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#condense-your-code`,
72577
72582
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
72578
72583
  badExample: `WRITE bar .`,
@@ -72758,12 +72763,12 @@ class SQLValueConversion {
72758
72763
  key: "sql_value_conversion",
72759
72764
  title: "Implicit SQL Value Conversion",
72760
72765
  shortDescription: `Ensure types match when selecting from database`,
72761
- extendedInformation: `
72762
- * Integer to CHAR conversion
72763
- * Integer to NUMC conversion
72764
- * NUMC to Integer conversion
72765
- * CHAR to Integer conversion
72766
- * Source field longer than database field, CHAR -> CHAR
72766
+ extendedInformation: `
72767
+ * Integer to CHAR conversion
72768
+ * Integer to NUMC conversion
72769
+ * NUMC to Integer conversion
72770
+ * CHAR to Integer conversion
72771
+ * Source field longer than database field, CHAR -> CHAR
72767
72772
  * Source field longer than database field, NUMC -> NUMC`,
72768
72773
  tags: [],
72769
72774
  };
@@ -72835,7 +72840,7 @@ class StartAtTab extends _abap_rule_1.ABAPRule {
72835
72840
  key: "start_at_tab",
72836
72841
  title: "Start at tab",
72837
72842
  shortDescription: `Checks that statements start at tabstops.`,
72838
- extendedInformation: `Reports max 100 issues per file
72843
+ extendedInformation: `Reports max 100 issues per file
72839
72844
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
72840
72845
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
72841
72846
  badExample: ` WRITE a.`,
@@ -73012,12 +73017,12 @@ class StrictSQL extends _abap_rule_1.ABAPRule {
73012
73017
  key: "strict_sql",
73013
73018
  title: "Strict SQL",
73014
73019
  shortDescription: `Strict SQL`,
73015
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
73016
-
73017
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
73018
-
73019
- Also see separate rule sql_escape_host_variables
73020
-
73020
+ extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
73021
+
73022
+ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
73023
+
73024
+ Also see separate rule sql_escape_host_variables
73025
+
73021
73026
  Activates from v750 and up`,
73022
73027
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix],
73023
73028
  badExample: `SELECT * FROM ztabl INTO TABLE @rt_content WHERE type = @iv_type ORDER BY PRIMARY KEY.`,
@@ -73271,11 +73276,11 @@ class SyModification extends _abap_rule_1.ABAPRule {
73271
73276
  key: "sy_modification",
73272
73277
  title: "Modification of SY fields",
73273
73278
  shortDescription: `Finds modification of sy fields`,
73274
- extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
73275
-
73279
+ extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
73280
+
73276
73281
  Changes to SY-TVAR* fields are not reported`,
73277
73282
  tags: [_irule_1.RuleTag.SingleFile],
73278
- badExample: `sy-uname = 2.
73283
+ badExample: `sy-uname = 2.
73279
73284
  sy = sy.`,
73280
73285
  };
73281
73286
  }
@@ -73337,8 +73342,8 @@ class TABLEnhancementCategory {
73337
73342
  key: "tabl_enhancement_category",
73338
73343
  title: "TABL enhancement category must be set",
73339
73344
  shortDescription: `Checks that tables do not have the enhancement category 'not classified'.`,
73340
- extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
73341
-
73345
+ extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
73346
+
73342
73347
  You may use standard report RS_DDIC_CLASSIFICATION_FINAL for adjustment.`,
73343
73348
  tags: [],
73344
73349
  };
@@ -73403,8 +73408,8 @@ class TablesDeclaredLocally extends _abap_rule_1.ABAPRule {
73403
73408
  shortDescription: `TABLES are always global, so declare them globally`,
73404
73409
  extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abaptables.htm`,
73405
73410
  tags: [_irule_1.RuleTag.SingleFile],
73406
- badExample: `FORM foo.
73407
- TABLES t100.
73411
+ badExample: `FORM foo.
73412
+ TABLES t100.
73408
73413
  ENDFORM.`,
73409
73414
  goodExample: `TABLES t000.`,
73410
73415
  };
@@ -73532,9 +73537,9 @@ class TypeFormParameters extends _abap_rule_1.ABAPRule {
73532
73537
  title: "Type FORM parameters",
73533
73538
  shortDescription: `Checks for untyped FORM parameters`,
73534
73539
  tags: [_irule_1.RuleTag.SingleFile],
73535
- badExample: `FORM foo USING bar.
73540
+ badExample: `FORM foo USING bar.
73536
73541
  ENDFORM.`,
73537
- goodExample: `FORM foo USING bar TYPE string.
73542
+ goodExample: `FORM foo USING bar TYPE string.
73538
73543
  ENDFORM.`,
73539
73544
  };
73540
73545
  }
@@ -74207,38 +74212,38 @@ class UnnecessaryPragma extends _abap_rule_1.ABAPRule {
74207
74212
  key: "unnecessary_pragma",
74208
74213
  title: "Unnecessary Pragma",
74209
74214
  shortDescription: `Finds pragmas which can be removed`,
74210
- extendedInformation: `* NO_HANDLER with handler
74211
-
74212
- * NEEDED without definition
74213
-
74214
- * NO_TEXT without texts
74215
-
74216
- * SUBRC_OK where sy-subrc is checked
74217
-
74215
+ extendedInformation: `* NO_HANDLER with handler
74216
+
74217
+ * NEEDED without definition
74218
+
74219
+ * NO_TEXT without texts
74220
+
74221
+ * SUBRC_OK where sy-subrc is checked
74222
+
74218
74223
  NO_HANDLER inside macros are not checked`,
74219
74224
  tags: [_irule_1.RuleTag.SingleFile],
74220
- badExample: `TRY.
74221
- ...
74222
- CATCH zcx_abapgit_exception ##NO_HANDLER.
74223
- RETURN. " it has a handler
74224
- ENDTRY.
74225
- MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
74226
- SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
74227
- IF sy-subrc <> 0.
74225
+ badExample: `TRY.
74226
+ ...
74227
+ CATCH zcx_abapgit_exception ##NO_HANDLER.
74228
+ RETURN. " it has a handler
74229
+ ENDTRY.
74230
+ MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
74231
+ SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
74232
+ IF sy-subrc <> 0.
74228
74233
  ENDIF.`,
74229
- goodExample: `TRY.
74230
- ...
74231
- CATCH zcx_abapgit_exception.
74232
- RETURN.
74233
- ENDTRY.
74234
- MESSAGE w125(zbar) WITH c_foo INTO message.
74235
- SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
74236
- IF sy-subrc <> 0.
74237
- ENDIF.
74238
-
74239
- DATA: BEGIN OF blah ##NEEDED,
74240
- test1 TYPE string,
74241
- test2 TYPE string,
74234
+ goodExample: `TRY.
74235
+ ...
74236
+ CATCH zcx_abapgit_exception.
74237
+ RETURN.
74238
+ ENDTRY.
74239
+ MESSAGE w125(zbar) WITH c_foo INTO message.
74240
+ SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
74241
+ IF sy-subrc <> 0.
74242
+ ENDIF.
74243
+
74244
+ DATA: BEGIN OF blah ##NEEDED,
74245
+ test1 TYPE string,
74246
+ test2 TYPE string,
74242
74247
  END OF blah.`,
74243
74248
  };
74244
74249
  }
@@ -74405,18 +74410,18 @@ class UnnecessaryReturn extends _abap_rule_1.ABAPRule {
74405
74410
  shortDescription: `Finds unnecessary RETURN statements`,
74406
74411
  extendedInformation: `Finds unnecessary RETURN statements`,
74407
74412
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
74408
- badExample: `FORM hello1.
74409
- WRITE 'world'.
74410
- RETURN.
74411
- ENDFORM.
74412
-
74413
- FORM foo.
74414
- IF 1 = 2.
74415
- RETURN.
74416
- ENDIF.
74413
+ badExample: `FORM hello1.
74414
+ WRITE 'world'.
74415
+ RETURN.
74416
+ ENDFORM.
74417
+
74418
+ FORM foo.
74419
+ IF 1 = 2.
74420
+ RETURN.
74421
+ ENDIF.
74417
74422
  ENDFORM.`,
74418
- goodExample: `FORM hello2.
74419
- WRITE 'world'.
74423
+ goodExample: `FORM hello2.
74424
+ WRITE 'world'.
74420
74425
  ENDFORM.`,
74421
74426
  };
74422
74427
  }
@@ -74767,13 +74772,13 @@ class UnusedMacros {
74767
74772
  title: "Unused macros",
74768
74773
  shortDescription: `Checks for unused macro definitions definitions`,
74769
74774
  tags: [_irule_1.RuleTag.Quickfix],
74770
- badExample: `DEFINE foobar1.
74771
- WRITE 'hello'.
74775
+ badExample: `DEFINE foobar1.
74776
+ WRITE 'hello'.
74772
74777
  END-OF-DEFINITION.`,
74773
- goodExample: `DEFINE foobar2.
74774
- WRITE 'hello'.
74775
- END-OF-DEFINITION.
74776
-
74778
+ goodExample: `DEFINE foobar2.
74779
+ WRITE 'hello'.
74780
+ END-OF-DEFINITION.
74781
+
74777
74782
  foobar2.`,
74778
74783
  };
74779
74784
  }
@@ -74885,18 +74890,18 @@ class UnusedMethods {
74885
74890
  key: "unused_methods",
74886
74891
  title: "Unused methods",
74887
74892
  shortDescription: `Checks for unused methods`,
74888
- extendedInformation: `Checks private and protected methods.
74889
-
74890
- Unused methods are not reported if the object contains parser or syntax errors.
74891
- Quick fixes only appears for private methods or projected methods where the class doesnt have any subclasses.
74892
-
74893
- Skips:
74894
- * methods FOR TESTING
74895
- * methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
74896
- * class_constructor + constructor methods
74897
- * event handlers
74898
- * methods that are redefined
74899
- * INCLUDEs
74893
+ extendedInformation: `Checks private and protected methods.
74894
+
74895
+ Unused methods are not reported if the object contains parser or syntax errors.
74896
+ Quick fixes only appears for private methods or projected methods where the class doesnt have any subclasses.
74897
+
74898
+ Skips:
74899
+ * methods FOR TESTING
74900
+ * methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
74901
+ * class_constructor + constructor methods
74902
+ * event handlers
74903
+ * methods that are redefined
74904
+ * INCLUDEs
74900
74905
  `,
74901
74906
  tags: [_irule_1.RuleTag.Quickfix],
74902
74907
  pragma: "##CALLED",
@@ -75372,23 +75377,23 @@ class UnusedVariables {
75372
75377
  key: "unused_variables",
75373
75378
  title: "Unused variables",
75374
75379
  shortDescription: `Checks for unused variables and constants`,
75375
- extendedInformation: `Skips event parameters.
75376
-
75377
- Note that this currently does not work if the source code uses macros.
75378
-
75379
- Unused variables are not reported if the object contains parser or syntax errors.
75380
-
75380
+ extendedInformation: `Skips event parameters.
75381
+
75382
+ Note that this currently does not work if the source code uses macros.
75383
+
75384
+ Unused variables are not reported if the object contains parser or syntax errors.
75385
+
75381
75386
  Errors found in INCLUDES are reported for the main program.`,
75382
75387
  tags: [_irule_1.RuleTag.Quickfix],
75383
75388
  pragma: "##NEEDED",
75384
75389
  pseudoComment: "EC NEEDED",
75385
- badExample: `DATA: BEGIN OF blah1,
75386
- test TYPE string,
75387
- test2 TYPE string,
75390
+ badExample: `DATA: BEGIN OF blah1,
75391
+ test TYPE string,
75392
+ test2 TYPE string,
75388
75393
  END OF blah1.`,
75389
- goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
75390
- test TYPE string,
75391
- test2 TYPE string,
75394
+ goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
75395
+ test TYPE string,
75396
+ test2 TYPE string,
75392
75397
  END OF blah2.`,
75393
75398
  };
75394
75399
  }
@@ -75607,15 +75612,15 @@ class UseBoolExpression extends _abap_rule_1.ABAPRule {
75607
75612
  shortDescription: `Use boolean expression, xsdbool from 740sp08 and up, boolc from 702 and up`,
75608
75613
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
75609
75614
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
75610
- badExample: `IF line IS INITIAL.
75611
- has_entries = abap_false.
75612
- ELSE.
75613
- has_entries = abap_true.
75614
- ENDIF.
75615
-
75615
+ badExample: `IF line IS INITIAL.
75616
+ has_entries = abap_false.
75617
+ ELSE.
75618
+ has_entries = abap_true.
75619
+ ENDIF.
75620
+
75616
75621
  DATA(fsdf) = COND #( WHEN foo <> bar THEN abap_true ELSE abap_false ).`,
75617
- goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
75618
-
75622
+ goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
75623
+
75619
75624
  DATA(fsdf) = xsdbool( foo <> bar ).`,
75620
75625
  };
75621
75626
  }
@@ -75733,15 +75738,15 @@ class UseClassBasedExceptions extends _abap_rule_1.ABAPRule {
75733
75738
  shortDescription: `Use class based exceptions, checks interface and class definitions`,
75734
75739
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-class-based-exceptions`,
75735
75740
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
75736
- badExample: `INTERFACE lif.
75737
- METHODS load_data
75738
- EXCEPTIONS
75739
- invalid_parameter.
75741
+ badExample: `INTERFACE lif.
75742
+ METHODS load_data
75743
+ EXCEPTIONS
75744
+ invalid_parameter.
75740
75745
  ENDINTERFACE.`,
75741
- goodExample: `INTERFACE lif.
75742
- METHODS load_data
75743
- RAISING
75744
- cx_something.
75746
+ goodExample: `INTERFACE lif.
75747
+ METHODS load_data
75748
+ RAISING
75749
+ cx_something.
75745
75750
  ENDINTERFACE.`,
75746
75751
  };
75747
75752
  }
@@ -75801,15 +75806,15 @@ class UseLineExists extends _abap_rule_1.ABAPRule {
75801
75806
  key: "use_line_exists",
75802
75807
  title: "Use line_exists",
75803
75808
  shortDescription: `Use line_exists, from 740sp02 and up`,
75804
- extendedInformation: `
75805
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
75806
-
75809
+ extendedInformation: `
75810
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
75811
+
75807
75812
  Not reported if the READ TABLE statement contains BINARY SEARCH.`,
75808
75813
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
75809
- badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
75810
- IF sy-subrc = 0.
75814
+ badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
75815
+ IF sy-subrc = 0.
75811
75816
  ENDIF.`,
75812
- goodExample: `IF line_exists( my_table[ key = 'A' ] ).
75817
+ goodExample: `IF line_exists( my_table[ key = 'A' ] ).
75813
75818
  ENDIF.`,
75814
75819
  };
75815
75820
  }
@@ -75919,10 +75924,10 @@ class UseNew extends _abap_rule_1.ABAPRule {
75919
75924
  key: "use_new",
75920
75925
  title: "Use NEW",
75921
75926
  shortDescription: `Checks for deprecated CREATE OBJECT statements.`,
75922
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
75923
-
75924
- If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
75925
-
75927
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
75928
+
75929
+ If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
75930
+
75926
75931
  Applicable from v740sp02 and up`,
75927
75932
  badExample: `CREATE OBJECT ref.`,
75928
75933
  goodExample: `ref = NEW #( ).`,
@@ -76020,13 +76025,13 @@ class WhenOthersLast extends _abap_rule_1.ABAPRule {
76020
76025
  title: "WHEN OTHERS last",
76021
76026
  shortDescription: `Checks that WHEN OTHERS is placed the last within a CASE statement.`,
76022
76027
  tags: [_irule_1.RuleTag.SingleFile],
76023
- badExample: `CASE bar.
76024
- WHEN OTHERS.
76025
- WHEN 2.
76028
+ badExample: `CASE bar.
76029
+ WHEN OTHERS.
76030
+ WHEN 2.
76026
76031
  ENDCASE.`,
76027
- goodExample: `CASE bar.
76028
- WHEN 2.
76029
- WHEN OTHERS.
76032
+ goodExample: `CASE bar.
76033
+ WHEN 2.
76034
+ WHEN OTHERS.
76030
76035
  ENDCASE.`,
76031
76036
  };
76032
76037
  }