@abaplint/cli 2.113.15 → 2.113.17

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 +860 -845
  4. package/package.json +63 -63
package/build/cli.js CHANGED
@@ -35165,13 +35165,13 @@ class FlowGraph {
35165
35165
  this.label = label;
35166
35166
  }
35167
35167
  toDigraph() {
35168
- return `digraph G {
35169
- labelloc="t";
35170
- label="${this.label}";
35171
- graph [fontname = "helvetica"];
35172
- node [fontname = "helvetica", shape="box"];
35173
- edge [fontname = "helvetica"];
35174
- ${this.toTextEdges()}
35168
+ return `digraph G {
35169
+ labelloc="t";
35170
+ label="${this.label}";
35171
+ graph [fontname = "helvetica"];
35172
+ node [fontname = "helvetica", shape="box"];
35173
+ edge [fontname = "helvetica"];
35174
+ ${this.toTextEdges()}
35175
35175
  }`;
35176
35176
  }
35177
35177
  listSources(node) {
@@ -43421,13 +43421,13 @@ class Help {
43421
43421
  /////////////////////////////////////////////////
43422
43422
  static dumpABAP(file, reg, textDocument, position) {
43423
43423
  let content = "";
43424
- content = `
43425
- <a href="#_tokens" rel="no-refresh">Tokens</a> |
43426
- <a href="#_statements" rel="no-refresh">Statements</a> |
43427
- <a href="#_structure" rel="no-refresh">Structure</a> |
43428
- <a href="#_files" rel="no-refresh">Files</a> |
43429
- <a href="#_info" rel="no-refresh">Info Dump</a>
43430
- <hr>
43424
+ content = `
43425
+ <a href="#_tokens" rel="no-refresh">Tokens</a> |
43426
+ <a href="#_statements" rel="no-refresh">Statements</a> |
43427
+ <a href="#_structure" rel="no-refresh">Structure</a> |
43428
+ <a href="#_files" rel="no-refresh">Files</a> |
43429
+ <a href="#_info" rel="no-refresh">Info Dump</a>
43430
+ <hr>
43431
43431
  ` +
43432
43432
  "<tt>" + textDocument.uri + " (" +
43433
43433
  (position.line + 1) + ", " +
@@ -52747,7 +52747,7 @@ class Registry {
52747
52747
  }
52748
52748
  static abaplintVersion() {
52749
52749
  // magic, see build script "version.sh"
52750
- return "2.113.15";
52750
+ return "2.113.17";
52751
52751
  }
52752
52752
  getDDICReferences() {
52753
52753
  return this.ddicReferences;
@@ -53066,10 +53066,10 @@ class SevenBitAscii {
53066
53066
  key: "7bit_ascii",
53067
53067
  title: "Check for 7bit ascii",
53068
53068
  shortDescription: `Only allow characters from the 7bit ASCII set.`,
53069
- extendedInformation: `https://docs.abapopenchecks.org/checks/05/
53070
-
53071
- https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
53072
-
53069
+ extendedInformation: `https://docs.abapopenchecks.org/checks/05/
53070
+
53071
+ https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
53072
+
53073
53073
  Checkes files with extensions ".abap" and ".asddls"`,
53074
53074
  tags: [_irule_1.RuleTag.SingleFile],
53075
53075
  badExample: `WRITE '뽑'.`,
@@ -53275,10 +53275,10 @@ class Abapdoc extends _abap_rule_1.ABAPRule {
53275
53275
  key: "abapdoc",
53276
53276
  title: "Check abapdoc",
53277
53277
  shortDescription: `Various checks regarding abapdoc.`,
53278
- extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
53279
-
53280
- Plus class and interface definitions.
53281
-
53278
+ extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
53279
+
53280
+ Plus class and interface definitions.
53281
+
53282
53282
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#abap-doc-only-for-public-apis`,
53283
53283
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
53284
53284
  };
@@ -53415,27 +53415,27 @@ class AddTestAttributes extends _abap_rule_1.ABAPRule {
53415
53415
  title: "Add test attributes for tests classes with test methods",
53416
53416
  shortDescription: `Add test attributes DURATION and RISK LEVEL for tests classes with test methods`,
53417
53417
  tags: [_irule_1.RuleTag.SingleFile],
53418
- badExample: `CLASS ltcl_test1 DEFINITION FINAL FOR TESTING.
53419
- PUBLIC SECTION.
53420
- PROTECTED SECTION.
53421
- PRIVATE SECTION.
53422
- METHODS test FOR TESTING RAISING cx_static_check.
53423
- ENDCLASS.
53424
-
53425
- CLASS ltcl_test1 IMPLEMENTATION.
53426
- METHOD test.
53427
- ENDMETHOD.
53418
+ badExample: `CLASS ltcl_test1 DEFINITION FINAL FOR TESTING.
53419
+ PUBLIC SECTION.
53420
+ PROTECTED SECTION.
53421
+ PRIVATE SECTION.
53422
+ METHODS test FOR TESTING RAISING cx_static_check.
53423
+ ENDCLASS.
53424
+
53425
+ CLASS ltcl_test1 IMPLEMENTATION.
53426
+ METHOD test.
53427
+ ENDMETHOD.
53428
53428
  ENDCLASS.`,
53429
- goodExample: `CLASS ltcl_test2 DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
53430
- PUBLIC SECTION.
53431
- PROTECTED SECTION.
53432
- PRIVATE SECTION.
53433
- METHODS test FOR TESTING RAISING cx_static_check.
53434
- ENDCLASS.
53435
-
53436
- CLASS ltcl_test2 IMPLEMENTATION.
53437
- METHOD test.
53438
- ENDMETHOD.
53429
+ goodExample: `CLASS ltcl_test2 DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
53430
+ PUBLIC SECTION.
53431
+ PROTECTED SECTION.
53432
+ PRIVATE SECTION.
53433
+ METHODS test FOR TESTING RAISING cx_static_check.
53434
+ ENDCLASS.
53435
+
53436
+ CLASS ltcl_test2 IMPLEMENTATION.
53437
+ METHOD test.
53438
+ ENDMETHOD.
53439
53439
  ENDCLASS.`,
53440
53440
  };
53441
53441
  }
@@ -53521,49 +53521,49 @@ class AlignParameters extends _abap_rule_1.ABAPRule {
53521
53521
  key: "align_parameters",
53522
53522
  title: "Align Parameters",
53523
53523
  shortDescription: `Checks for vertially aligned parameters`,
53524
- extendedInformation: `Checks:
53525
- * function module calls
53526
- * method calls
53527
- * VALUE constructors
53528
- * NEW constructors
53529
- * RAISE EXCEPTION statements
53530
- * CREATE OBJECT statements
53531
- * RAISE EVENT statements
53532
-
53533
- https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
53534
-
53535
- Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
53536
-
53537
- If parameters are on the same row, no issues are reported, see
53524
+ extendedInformation: `Checks:
53525
+ * function module calls
53526
+ * method calls
53527
+ * VALUE constructors
53528
+ * NEW constructors
53529
+ * RAISE EXCEPTION statements
53530
+ * CREATE OBJECT statements
53531
+ * RAISE EVENT statements
53532
+
53533
+ https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
53534
+
53535
+ Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
53536
+
53537
+ If parameters are on the same row, no issues are reported, see
53538
53538
  https://rules.abaplint.org/max_one_method_parameter_per_line/ for splitting parameters to lines`,
53539
53539
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
53540
- badExample: `CALL FUNCTION 'FOOBAR'
53541
- EXPORTING
53542
- foo = 2
53543
- parameter = 3.
53544
-
53545
- foobar( moo = 1
53546
- param = 1 ).
53547
-
53548
- foo = VALUE #(
53549
- foo = bar
53540
+ badExample: `CALL FUNCTION 'FOOBAR'
53541
+ EXPORTING
53542
+ foo = 2
53543
+ parameter = 3.
53544
+
53545
+ foobar( moo = 1
53546
+ param = 1 ).
53547
+
53548
+ foo = VALUE #(
53549
+ foo = bar
53550
53550
  moo = 2 ).`,
53551
- goodExample: `CALL FUNCTION 'FOOBAR'
53552
- EXPORTING
53553
- foo = 2
53554
- parameter = 3.
53555
-
53556
- foobar( moo = 1
53557
- param = 1 ).
53558
-
53559
- foo = VALUE #(
53560
- foo = bar
53561
- moo = 2 ).
53562
-
53563
- DATA(sdf) = VALUE type(
53564
- common_val = 2
53565
- another_common = 5
53566
- ( row_value = 4
53551
+ goodExample: `CALL FUNCTION 'FOOBAR'
53552
+ EXPORTING
53553
+ foo = 2
53554
+ parameter = 3.
53555
+
53556
+ foobar( moo = 1
53557
+ param = 1 ).
53558
+
53559
+ foo = VALUE #(
53560
+ foo = bar
53561
+ moo = 2 ).
53562
+
53563
+ DATA(sdf) = VALUE type(
53564
+ common_val = 2
53565
+ another_common = 5
53566
+ ( row_value = 4
53567
53567
  value_foo = 5 ) ).`,
53568
53568
  };
53569
53569
  }
@@ -53997,37 +53997,37 @@ class AlignTypeExpressions extends _abap_rule_1.ABAPRule {
53997
53997
  key: "align_type_expressions",
53998
53998
  title: "Align TYPE expressions",
53999
53999
  shortDescription: `Align TYPE expressions in statements`,
54000
- extendedInformation: `
54001
- Currently works for METHODS + BEGIN OF
54002
-
54003
- If BEGIN OF has an INCLUDE TYPE its ignored
54004
-
54005
- Also note that clean ABAP does not recommend aligning TYPE clauses:
54000
+ extendedInformation: `
54001
+ Currently works for METHODS + BEGIN OF
54002
+
54003
+ If BEGIN OF has an INCLUDE TYPE its ignored
54004
+
54005
+ Also note that clean ABAP does not recommend aligning TYPE clauses:
54006
54006
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-align-type-clauses`,
54007
54007
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix],
54008
- badExample: `
54009
- TYPES: BEGIN OF foo,
54010
- bar TYPE i,
54011
- foobar TYPE i,
54012
- END OF foo.
54013
-
54014
- INTERFACE lif.
54015
- METHODS bar
54016
- IMPORTING
54017
- foo TYPE i
54018
- foobar TYPE i.
54008
+ badExample: `
54009
+ TYPES: BEGIN OF foo,
54010
+ bar TYPE i,
54011
+ foobar TYPE i,
54012
+ END OF foo.
54013
+
54014
+ INTERFACE lif.
54015
+ METHODS bar
54016
+ IMPORTING
54017
+ foo TYPE i
54018
+ foobar TYPE i.
54019
54019
  ENDINTERFACE.`,
54020
- goodExample: `
54021
- TYPES: BEGIN OF foo,
54022
- bar TYPE i,
54023
- foobar TYPE i,
54024
- END OF foo.
54025
-
54026
- INTERFACE lif.
54027
- METHODS bar
54028
- IMPORTING
54029
- foo TYPE i
54030
- foobar TYPE i.
54020
+ goodExample: `
54021
+ TYPES: BEGIN OF foo,
54022
+ bar TYPE i,
54023
+ foobar TYPE i,
54024
+ END OF foo.
54025
+
54026
+ INTERFACE lif.
54027
+ METHODS bar
54028
+ IMPORTING
54029
+ foo TYPE i
54030
+ foobar TYPE i.
54031
54031
  ENDINTERFACE.`,
54032
54032
  };
54033
54033
  }
@@ -54306,16 +54306,16 @@ class AmbiguousStatement extends _abap_rule_1.ABAPRule {
54306
54306
  return {
54307
54307
  key: "ambiguous_statement",
54308
54308
  title: "Check for ambigious statements",
54309
- shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
54310
- Add "TABLE" keyword or "@" for escaping SQL variables
54311
-
54309
+ shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
54310
+ Add "TABLE" keyword or "@" for escaping SQL variables
54311
+
54312
54312
  Only works if the target version is 740sp05 or above`,
54313
54313
  tags: [_irule_1.RuleTag.SingleFile],
54314
- badExample: `DELETE foo FROM bar.
54314
+ badExample: `DELETE foo FROM bar.
54315
54315
  MODIFY foo FROM bar.`,
54316
- goodExample: `DELETE foo FROM @bar.
54317
- DELETE TABLE itab FROM 2.
54318
- MODIFY zfoo FROM @wa.
54316
+ goodExample: `DELETE foo FROM @bar.
54317
+ DELETE TABLE itab FROM 2.
54318
+ MODIFY zfoo FROM @wa.
54319
54319
  MODIFY TABLE foo FROM bar.`,
54320
54320
  };
54321
54321
  }
@@ -54420,16 +54420,16 @@ class AvoidUse extends _abap_rule_1.ABAPRule {
54420
54420
  key: "avoid_use",
54421
54421
  title: "Avoid use of certain statements",
54422
54422
  shortDescription: `Detects usage of certain statements.`,
54423
- extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
54424
-
54425
- Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
54426
-
54427
- STATICS: use CLASS-DATA instead
54428
-
54429
- DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
54430
-
54431
- TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
54432
-
54423
+ extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
54424
+
54425
+ Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
54426
+
54427
+ STATICS: use CLASS-DATA instead
54428
+
54429
+ DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
54430
+
54431
+ TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
54432
+
54433
54433
  BREAK points`,
54434
54434
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
54435
54435
  };
@@ -54561,11 +54561,11 @@ class BeginEndNames extends _abap_rule_1.ABAPRule {
54561
54561
  title: "Check BEGIN END names",
54562
54562
  shortDescription: `Check BEGIN OF and END OF names match, plus there must be statements between BEGIN and END`,
54563
54563
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
54564
- badExample: `DATA: BEGIN OF stru,
54565
- field TYPE i,
54564
+ badExample: `DATA: BEGIN OF stru,
54565
+ field TYPE i,
54566
54566
  END OF structure_not_the_same.`,
54567
- goodExample: `DATA: BEGIN OF stru,
54568
- field TYPE i,
54567
+ goodExample: `DATA: BEGIN OF stru,
54568
+ field TYPE i,
54569
54569
  END OF stru.`,
54570
54570
  };
54571
54571
  }
@@ -54662,20 +54662,20 @@ class BeginSingleInclude extends _abap_rule_1.ABAPRule {
54662
54662
  title: "BEGIN contains single INCLUDE",
54663
54663
  shortDescription: `Finds TYPE BEGIN with just one INCLUDE TYPE, and DATA with single INCLUDE STRUCTURE`,
54664
54664
  tags: [_irule_1.RuleTag.SingleFile],
54665
- badExample: `TYPES: BEGIN OF dummy1.
54666
- INCLUDE TYPE dselc.
54667
- TYPES: END OF dummy1.
54668
-
54669
- DATA BEGIN OF foo.
54670
- INCLUDE STRUCTURE syst.
54671
- DATA END OF foo.
54672
-
54673
- STATICS BEGIN OF bar.
54674
- INCLUDE STRUCTURE syst.
54665
+ badExample: `TYPES: BEGIN OF dummy1.
54666
+ INCLUDE TYPE dselc.
54667
+ TYPES: END OF dummy1.
54668
+
54669
+ DATA BEGIN OF foo.
54670
+ INCLUDE STRUCTURE syst.
54671
+ DATA END OF foo.
54672
+
54673
+ STATICS BEGIN OF bar.
54674
+ INCLUDE STRUCTURE syst.
54675
54675
  STATICS END OF bar.`,
54676
- goodExample: `DATA BEGIN OF foo.
54677
- DATA field TYPE i.
54678
- INCLUDE STRUCTURE dselc.
54676
+ goodExample: `DATA BEGIN OF foo.
54677
+ DATA field TYPE i.
54678
+ INCLUDE STRUCTURE dselc.
54679
54679
  DATA END OF foo.`,
54680
54680
  };
54681
54681
  }
@@ -54765,9 +54765,9 @@ class CallTransactionAuthorityCheck extends _abap_rule_1.ABAPRule {
54765
54765
  extendedInformation: `https://docs.abapopenchecks.org/checks/54/`,
54766
54766
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
54767
54767
  badExample: `CALL TRANSACTION 'FOO'.`,
54768
- goodExample: `TRY.
54769
- CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
54770
- CATCH cx_sy_authorization_error.
54768
+ goodExample: `TRY.
54769
+ CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
54770
+ CATCH cx_sy_authorization_error.
54771
54771
  ENDTRY.`,
54772
54772
  };
54773
54773
  }
@@ -54832,10 +54832,10 @@ class CDSCommentStyle {
54832
54832
  key: "cds_comment_style",
54833
54833
  title: "CDS Comment Style",
54834
54834
  shortDescription: `Check for obsolete comment style`,
54835
- extendedInformation: `Check for obsolete comment style
54836
-
54837
- Comments starting with "--" are considered obsolete
54838
-
54835
+ extendedInformation: `Check for obsolete comment style
54836
+
54837
+ Comments starting with "--" are considered obsolete
54838
+
54839
54839
  https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abencds_general_syntax_rules.htm`,
54840
54840
  tags: [_irule_1.RuleTag.SingleFile],
54841
54841
  badExample: "-- this is a comment",
@@ -54901,10 +54901,10 @@ class CDSLegacyView {
54901
54901
  key: "cds_legacy_view",
54902
54902
  title: "CDS Legacy View",
54903
54903
  shortDescription: `Identify CDS Legacy Views`,
54904
- extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
54905
-
54906
- https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
54907
-
54904
+ extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
54905
+
54906
+ https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
54907
+
54908
54908
  v755 and up`,
54909
54909
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Upport],
54910
54910
  };
@@ -55059,10 +55059,10 @@ class ChainMainlyDeclarations extends _abap_rule_1.ABAPRule {
55059
55059
  key: "chain_mainly_declarations",
55060
55060
  title: "Chain mainly declarations",
55061
55061
  shortDescription: `Chain mainly declarations, allows chaining for the configured statements, reports errors for other statements.`,
55062
- extendedInformation: `
55063
- https://docs.abapopenchecks.org/checks/23/
55064
-
55065
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
55062
+ extendedInformation: `
55063
+ https://docs.abapopenchecks.org/checks/23/
55064
+
55065
+ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
55066
55066
  `,
55067
55067
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
55068
55068
  badExample: `CALL METHOD: bar.`,
@@ -55238,17 +55238,17 @@ class ChangeIfToCase extends _abap_rule_1.ABAPRule {
55238
55238
  title: "Change IF to CASE",
55239
55239
  shortDescription: `Finds IF constructs that can be changed to CASE`,
55240
55240
  // eslint-disable-next-line max-len
55241
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
55242
-
55241
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
55242
+
55243
55243
  If the first comparison is a boolean compare, no issue is reported.`,
55244
55244
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
55245
- badExample: `IF l_fcat-fieldname EQ 'FOO'.
55246
- ELSEIF l_fcat-fieldname = 'BAR'
55247
- OR l_fcat-fieldname = 'MOO'.
55245
+ badExample: `IF l_fcat-fieldname EQ 'FOO'.
55246
+ ELSEIF l_fcat-fieldname = 'BAR'
55247
+ OR l_fcat-fieldname = 'MOO'.
55248
55248
  ENDIF.`,
55249
- goodExample: `CASE l_fcat-fieldname.
55250
- WHEN 'FOO'.
55251
- WHEN 'BAR' OR 'MOO'.
55249
+ goodExample: `CASE l_fcat-fieldname.
55250
+ WHEN 'FOO'.
55251
+ WHEN 'BAR' OR 'MOO'.
55252
55252
  ENDCASE.`,
55253
55253
  };
55254
55254
  }
@@ -55385,8 +55385,8 @@ class CheckAbstract extends _abap_rule_1.ABAPRule {
55385
55385
  return {
55386
55386
  key: "check_abstract",
55387
55387
  title: "Check abstract methods and classes",
55388
- shortDescription: `Checks abstract methods and classes:
55389
- - class defined as abstract and final,
55388
+ shortDescription: `Checks abstract methods and classes:
55389
+ - class defined as abstract and final,
55390
55390
  - non-abstract class contains abstract methods`,
55391
55391
  extendedInformation: `If a class defines only constants, use an interface instead`,
55392
55392
  tags: [_irule_1.RuleTag.SingleFile],
@@ -55467,11 +55467,11 @@ class CheckComments extends _abap_rule_1.ABAPRule {
55467
55467
  return {
55468
55468
  key: "check_comments",
55469
55469
  title: "Check Comments",
55470
- shortDescription: `
55470
+ shortDescription: `
55471
55471
  Various checks for comment usage.`,
55472
- extendedInformation: `
55473
- Detects end of line comments. Comments starting with "#EC" or "##" are ignored
55474
-
55472
+ extendedInformation: `
55473
+ Detects end of line comments. Comments starting with "#EC" or "##" are ignored
55474
+
55475
55475
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#put-comments-before-the-statement-they-relate-to`,
55476
55476
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
55477
55477
  badExample: `WRITE 2. " descriptive comment`,
@@ -55633,9 +55633,9 @@ class CheckInclude {
55633
55633
  key: "check_include",
55634
55634
  title: "Check INCLUDEs",
55635
55635
  shortDescription: `Checks INCLUDE statements`,
55636
- extendedInformation: `
55637
- * Reports unused includes
55638
- * Errors if the includes are not found
55636
+ extendedInformation: `
55637
+ * Reports unused includes
55638
+ * Errors if the includes are not found
55639
55639
  * Error if including a main program`,
55640
55640
  tags: [_irule_1.RuleTag.Syntax],
55641
55641
  };
@@ -55711,14 +55711,14 @@ class CheckSubrc extends _abap_rule_1.ABAPRule {
55711
55711
  key: "check_subrc",
55712
55712
  title: "Check sy-subrc",
55713
55713
  shortDescription: `Check sy-subrc`,
55714
- extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
55715
-
55716
- If sy-dbcnt is checked after database statements, it is considered okay.
55717
-
55718
- "SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
55719
-
55720
- If IS ASSIGNED is checked after assigning, it is considered okay.
55721
-
55714
+ extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
55715
+
55716
+ If sy-dbcnt is checked after database statements, it is considered okay.
55717
+
55718
+ "SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
55719
+
55720
+ If IS ASSIGNED is checked after assigning, it is considered okay.
55721
+
55722
55722
  FIND statement with MATCH COUNT is considered okay if subrc is not checked`,
55723
55723
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
55724
55724
  pseudoComment: "EC CI_SUBRC",
@@ -56288,17 +56288,17 @@ class ClassicExceptionsOverlap extends _abap_rule_1.ABAPRule {
56288
56288
  shortDescription: `Find overlapping classic exceptions`,
56289
56289
  extendedInformation: `When debugging its typically good to know exactly which exception is caught`,
56290
56290
  tags: [_irule_1.RuleTag.SingleFile],
56291
- badExample: `CALL FUNCTION 'SOMETHING'
56292
- EXCEPTIONS
56293
- system_failure = 1 MESSAGE lv_message
56294
- communication_failure = 1 MESSAGE lv_message
56295
- resource_failure = 1
56291
+ badExample: `CALL FUNCTION 'SOMETHING'
56292
+ EXCEPTIONS
56293
+ system_failure = 1 MESSAGE lv_message
56294
+ communication_failure = 1 MESSAGE lv_message
56295
+ resource_failure = 1
56296
56296
  OTHERS = 1.`,
56297
- goodExample: `CALL FUNCTION 'SOMETHING'
56298
- EXCEPTIONS
56299
- system_failure = 1 MESSAGE lv_message
56300
- communication_failure = 2 MESSAGE lv_message
56301
- resource_failure = 3
56297
+ goodExample: `CALL FUNCTION 'SOMETHING'
56298
+ EXCEPTIONS
56299
+ system_failure = 1 MESSAGE lv_message
56300
+ communication_failure = 2 MESSAGE lv_message
56301
+ resource_failure = 3
56302
56302
  OTHERS = 4.`,
56303
56303
  };
56304
56304
  }
@@ -56544,7 +56544,7 @@ class CommentedCode extends _abap_rule_1.ABAPRule {
56544
56544
  key: "commented_code",
56545
56545
  title: "Find commented code",
56546
56546
  shortDescription: `Detects usage of commented out code.`,
56547
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it
56547
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it
56548
56548
  https://docs.abapopenchecks.org/checks/14/`,
56549
56549
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
56550
56550
  badExample: `* WRITE 'hello world'.`,
@@ -56777,10 +56777,10 @@ class ConstructorVisibilityPublic {
56777
56777
  key: "constructor_visibility_public",
56778
56778
  title: "Check constructor visibility is public",
56779
56779
  shortDescription: `Constructor must be placed in the public section, even if the class is not CREATE PUBLIC.`,
56780
- extendedInformation: `
56781
- This only applies to global classes.
56782
-
56783
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
56780
+ extendedInformation: `
56781
+ This only applies to global classes.
56782
+
56783
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
56784
56784
  https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abeninstance_constructor_guidl.htm`,
56785
56785
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
56786
56786
  };
@@ -56855,8 +56855,8 @@ class ContainsTab extends _abap_rule_1.ABAPRule {
56855
56855
  key: "contains_tab",
56856
56856
  title: "Code contains tab",
56857
56857
  shortDescription: `Checks for usage of tabs (enable to enforce spaces)`,
56858
- extendedInformation: `
56859
- https://docs.abapopenchecks.org/checks/09/
56858
+ extendedInformation: `
56859
+ https://docs.abapopenchecks.org/checks/09/
56860
56860
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
56861
56861
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
56862
56862
  badExample: `\tWRITE 'hello world'.`,
@@ -56943,10 +56943,10 @@ class CyclicOO {
56943
56943
  key: "cyclic_oo",
56944
56944
  title: "Cyclic OO",
56945
56945
  shortDescription: `Finds cyclic/circular OO references`,
56946
- extendedInformation: `Runs for global INTF + CLAS objects
56947
-
56948
- Objects must be without syntax errors for this rule to take effect
56949
-
56946
+ extendedInformation: `Runs for global INTF + CLAS objects
56947
+
56948
+ Objects must be without syntax errors for this rule to take effect
56949
+
56950
56950
  References in testclass includes are ignored`,
56951
56951
  };
56952
56952
  }
@@ -57189,7 +57189,7 @@ class DangerousStatement extends _abap_rule_1.ABAPRule {
57189
57189
  key: "dangerous_statement",
57190
57190
  title: "Dangerous statement",
57191
57191
  shortDescription: `Detects potentially dangerous statements`,
57192
- extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
57192
+ extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
57193
57193
  dynamic SQL can potentially create SQL injection problems`,
57194
57194
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
57195
57195
  };
@@ -57396,13 +57396,13 @@ class DefinitionsTop extends _abap_rule_1.ABAPRule {
57396
57396
  shortDescription: `Checks that definitions are placed at the beginning of METHODs, FORMs and FUNCTIONs.`,
57397
57397
  extendedInformation: `https://docs.abapopenchecks.org/checks/17/`,
57398
57398
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
57399
- badExample: `FROM foo.
57400
- WRITE 'hello'.
57401
- DATA int TYPE i.
57399
+ badExample: `FROM foo.
57400
+ WRITE 'hello'.
57401
+ DATA int TYPE i.
57402
57402
  ENDFORM.`,
57403
- goodExample: `FROM foo.
57404
- DATA int TYPE i.
57405
- WRITE 'hello'.
57403
+ goodExample: `FROM foo.
57404
+ DATA int TYPE i.
57405
+ WRITE 'hello'.
57406
57406
  ENDFORM.`,
57407
57407
  };
57408
57408
  }
@@ -57941,39 +57941,39 @@ class Downport {
57941
57941
  key: "downport",
57942
57942
  title: "Downport statement",
57943
57943
  shortDescription: `Downport functionality`,
57944
- extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with
57945
- a higher level language version. If successful, various rules are applied to downport the statement.
57946
- Target downport version is always v702, thus rule is only enabled if target version is v702.
57947
-
57948
- Current rules:
57949
- * NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/
57950
- * DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/
57951
- * FIELD-SYMBOL() definitions are outlined
57952
- * CONV is outlined
57953
- * COND is outlined
57954
- * REDUCE is outlined
57955
- * SWITCH is outlined
57956
- * FILTER is outlined
57957
- * APPEND expression is outlined
57958
- * INSERT expression is outlined
57959
- * EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/
57960
- * CAST changed to ?=
57961
- * LOOP AT method_call( ) is outlined
57962
- * VALUE # with structure fields
57963
- * VALUE # with internal table lines
57964
- * Table Expressions are outlined
57965
- * SELECT INTO @DATA definitions are outlined
57966
- * Some occurrences of string template formatting option ALPHA changed to function module call
57967
- * SELECT/INSERT/MODIFY/DELETE/UPDATE "," in field list removed, "@" in source/targets removed
57968
- * PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods
57969
- * RAISE EXCEPTION ... MESSAGE
57970
- * Moving with +=, -=, /=, *=, &&= is expanded
57971
- * line_exists and line_index is downported to READ TABLE
57972
- * ENUMs, but does not nessesarily give the correct type and value
57973
- * MESSAGE with non simple source
57974
-
57975
- Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.
57976
-
57944
+ extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with
57945
+ a higher level language version. If successful, various rules are applied to downport the statement.
57946
+ Target downport version is always v702, thus rule is only enabled if target version is v702.
57947
+
57948
+ Current rules:
57949
+ * NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/
57950
+ * DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/
57951
+ * FIELD-SYMBOL() definitions are outlined
57952
+ * CONV is outlined
57953
+ * COND is outlined
57954
+ * REDUCE is outlined
57955
+ * SWITCH is outlined
57956
+ * FILTER is outlined
57957
+ * APPEND expression is outlined
57958
+ * INSERT expression is outlined
57959
+ * EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/
57960
+ * CAST changed to ?=
57961
+ * LOOP AT method_call( ) is outlined
57962
+ * VALUE # with structure fields
57963
+ * VALUE # with internal table lines
57964
+ * Table Expressions are outlined
57965
+ * SELECT INTO @DATA definitions are outlined
57966
+ * Some occurrences of string template formatting option ALPHA changed to function module call
57967
+ * SELECT/INSERT/MODIFY/DELETE/UPDATE "," in field list removed, "@" in source/targets removed
57968
+ * PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods
57969
+ * RAISE EXCEPTION ... MESSAGE
57970
+ * Moving with +=, -=, /=, *=, &&= is expanded
57971
+ * line_exists and line_index is downported to READ TABLE
57972
+ * ENUMs, but does not nessesarily give the correct type and value
57973
+ * MESSAGE with non simple source
57974
+
57975
+ Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.
57976
+
57977
57977
  Make sure to test the downported code, it might not always be completely correct.`,
57978
57978
  tags: [_irule_1.RuleTag.Downport, _irule_1.RuleTag.Quickfix],
57979
57979
  };
@@ -58551,17 +58551,17 @@ Make sure to test the downported code, it might not always be completely correct
58551
58551
  const fieldName = f.concatTokens();
58552
58552
  fieldDefinition += indentation + " " + fieldName + " TYPE " + tableName + "-" + fieldName + ",\n";
58553
58553
  }
58554
- fieldDefinition = `DATA: BEGIN OF ${name},
58554
+ fieldDefinition = `DATA: BEGIN OF ${name},
58555
58555
  ${fieldDefinition}${indentation} END OF ${name}.`;
58556
58556
  }
58557
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
58557
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
58558
58558
  ${indentation}`);
58559
58559
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
58560
58560
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
58561
58561
  return issue_1.Issue.atToken(lowFile, inlineData.getFirstToken(), "Outline SELECT @DATA", this.getMetadata().key, this.conf.severity, fix);
58562
58562
  }
58563
58563
  downportSelectTableInline(low, high, lowFile, highSyntax) {
58564
- var _a, _b, _c;
58564
+ var _a, _b, _c, _d, _e, _f, _g;
58565
58565
  if (!(low.get() instanceof _statement_1.Unknown)) {
58566
58566
  return undefined;
58567
58567
  }
@@ -58582,28 +58582,43 @@ ${indentation}`);
58582
58582
  if (tableName === undefined) {
58583
58583
  return undefined;
58584
58584
  }
58585
+ const tableMap = {};
58586
+ for (const from of sqlFrom) {
58587
+ const dbName = (_c = from.findDirectExpression(Expressions.DatabaseTable)) === null || _c === void 0 ? void 0 : _c.concatTokens().toUpperCase();
58588
+ if (dbName === undefined) {
58589
+ continue;
58590
+ }
58591
+ const asName = ((_d = from.findDirectExpression(Expressions.SQLAsName)) === null || _d === void 0 ? void 0 : _d.concatTokens().toUpperCase()) || dbName;
58592
+ tableMap[asName] = dbName;
58593
+ }
58585
58594
  const fieldList = high.findFirstExpression(Expressions.SQLFieldList);
58586
58595
  if (fieldList === undefined) {
58587
58596
  return undefined;
58588
58597
  }
58589
58598
  let fieldDefinitions = "";
58590
- for (const f of fieldList.findAllExpressions(Expressions.SQLFieldName)) {
58591
- let fieldName = f.concatTokens();
58599
+ for (const f of fieldList.findAllExpressions(Expressions.SQLField)) {
58600
+ let fieldName = (_e = f.findFirstExpression(Expressions.SQLFieldName)) === null || _e === void 0 ? void 0 : _e.concatTokens();
58601
+ if (fieldName === undefined) {
58602
+ continue;
58603
+ }
58592
58604
  if (fieldName.includes("~")) {
58593
58605
  const split = fieldName.split("~");
58594
58606
  tableName = split[0];
58595
58607
  fieldName = split[1];
58596
58608
  }
58597
- fieldDefinitions += indentation + " " + fieldName + " TYPE " + tableName + "-" + fieldName + ",\n";
58609
+ const translated = tableMap[tableName.toUpperCase()];
58610
+ const typeName = translated + "-" + fieldName;
58611
+ fieldName = ((_f = f.findFirstExpression(Expressions.SQLAsName)) === null || _f === void 0 ? void 0 : _f.concatTokens()) || fieldName;
58612
+ fieldDefinitions += indentation + " " + fieldName + " TYPE " + typeName.toLowerCase() + ",\n";
58598
58613
  }
58599
58614
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58600
- const name = ((_c = inlineData.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || "error";
58601
- let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
58602
- ${fieldDefinitions}${indentation} END OF ${uniqueName}.
58603
- ${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.
58615
+ const name = ((_g = inlineData.findFirstExpression(Expressions.TargetField)) === null || _g === void 0 ? void 0 : _g.concatTokens()) || "error";
58616
+ let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
58617
+ ${fieldDefinitions}${indentation} END OF ${uniqueName}.
58618
+ ${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.
58604
58619
  ${indentation}`);
58605
58620
  if (fieldDefinitions === "") {
58606
- fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.
58621
+ fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.
58607
58622
  ${indentation}`);
58608
58623
  }
58609
58624
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
@@ -58671,7 +58686,7 @@ ${indentation}`);
58671
58686
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58672
58687
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
58673
58688
  const firstToken = high.getFirstToken();
58674
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
58689
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
58675
58690
  ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
58676
58691
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
58677
58692
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -58725,7 +58740,7 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
58725
58740
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58726
58741
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
58727
58742
  const firstToken = high.getFirstToken();
58728
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
58743
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
58729
58744
  ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
58730
58745
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
58731
58746
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -58767,14 +58782,14 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
58767
58782
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
58768
58783
  const firstToken = high.getFirstToken();
58769
58784
  // note that the tabix restore should be done before throwing the exception
58770
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.
58771
- ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
58772
- ${indentation}${tabixBackup} = sy-tabix.
58773
- ${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.
58774
- ${indentation}sy-tabix = ${tabixBackup}.
58775
- ${indentation}IF sy-subrc <> 0.
58776
- ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
58777
- ${indentation}ENDIF.
58785
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.
58786
+ ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
58787
+ ${indentation}${tabixBackup} = sy-tabix.
58788
+ ${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.
58789
+ ${indentation}sy-tabix = ${tabixBackup}.
58790
+ ${indentation}IF sy-subrc <> 0.
58791
+ ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
58792
+ ${indentation}ENDIF.
58778
58793
  ${indentation}`);
58779
58794
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, startToken.getStart(), tableExpression.getLastToken().getEnd(), uniqueName);
58780
58795
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -58831,7 +58846,7 @@ ${indentation}`);
58831
58846
  const className = classNames[0].concatTokens();
58832
58847
  const targetName = (_b = target.findFirstExpression(Expressions.TargetField)) === null || _b === void 0 ? void 0 : _b.concatTokens();
58833
58848
  const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
58834
- const code = ` DATA ${targetName} TYPE REF TO ${className}.
58849
+ const code = ` DATA ${targetName} TYPE REF TO ${className}.
58835
58850
  ${indentation}CATCH ${className} INTO ${targetName}.`;
58836
58851
  const fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getStart(), node.getEnd(), code);
58837
58852
  return issue_1.Issue.atToken(lowFile, node.getFirstToken(), "Outline DATA", this.getMetadata().key, this.conf.severity, fix);
@@ -58993,16 +59008,16 @@ ${indentation}CATCH ${className} INTO ${targetName}.`;
58993
59008
  const uniqueName1 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58994
59009
  const uniqueName2 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58995
59010
  const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
58996
- let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
58997
- ${indentation}${uniqueName1}-msgid = ${id}.
59011
+ let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
59012
+ ${indentation}${uniqueName1}-msgid = ${id}.
58998
59013
  ${indentation}${uniqueName1}-msgno = ${number}.\n`;
58999
59014
  if (withs.length > 0) {
59000
- abap += `${indentation}${uniqueName1}-attr1 = 'IF_T100_DYN_MSG~MSGV1'.
59001
- ${indentation}${uniqueName1}-attr2 = 'IF_T100_DYN_MSG~MSGV2'.
59002
- ${indentation}${uniqueName1}-attr3 = 'IF_T100_DYN_MSG~MSGV3'.
59015
+ abap += `${indentation}${uniqueName1}-attr1 = 'IF_T100_DYN_MSG~MSGV1'.
59016
+ ${indentation}${uniqueName1}-attr2 = 'IF_T100_DYN_MSG~MSGV2'.
59017
+ ${indentation}${uniqueName1}-attr3 = 'IF_T100_DYN_MSG~MSGV3'.
59003
59018
  ${indentation}${uniqueName1}-attr4 = 'IF_T100_DYN_MSG~MSGV4'.\n`;
59004
59019
  }
59005
- abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
59020
+ abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
59006
59021
  ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`;
59007
59022
  if (withs.length > 0) {
59008
59023
  abap += `${indentation}${uniqueName2}->if_t100_dyn_msg~msgty = 'E'.\n`;
@@ -59114,10 +59129,10 @@ ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`
59114
59129
  let code = "";
59115
59130
  if (sourceRef.findFirstExpression(Expressions.TableExpression)) {
59116
59131
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59117
- code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).
59118
- IF sy-subrc <> 0.
59119
- RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59120
- ENDIF.
59132
+ code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).
59133
+ IF sy-subrc <> 0.
59134
+ RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59135
+ ENDIF.
59121
59136
  GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
59122
59137
  }
59123
59138
  else {
@@ -59206,20 +59221,20 @@ GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
59206
59221
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59207
59222
  const uniqueFS = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59208
59223
  const uniqueNameIndex = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59209
- code += ` items LIKE ${loopSourceName},
59210
- END OF ${groupTargetName}type.
59211
- DATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.
59212
- DATA ${uniqueName} LIKE LINE OF ${groupTargetName}tab.
59224
+ code += ` items LIKE ${loopSourceName},
59225
+ END OF ${groupTargetName}type.
59226
+ DATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.
59227
+ DATA ${uniqueName} LIKE LINE OF ${groupTargetName}tab.
59213
59228
  LOOP AT ${loopSourceName} ${(_l = high.findFirstExpression(Expressions.LoopTarget)) === null || _l === void 0 ? void 0 : _l.concatTokens()}.\n`;
59214
59229
  if (groupIndexName !== undefined) {
59215
59230
  code += `DATA(${uniqueNameIndex}) = sy-tabix.\n`;
59216
59231
  }
59217
- code += `READ TABLE ${groupTargetName}tab ASSIGNING FIELD-SYMBOL(<${uniqueFS}>) WITH KEY ${condition}.
59232
+ code += `READ TABLE ${groupTargetName}tab ASSIGNING FIELD-SYMBOL(<${uniqueFS}>) WITH KEY ${condition}.
59218
59233
  IF sy-subrc = 0.\n`;
59219
59234
  if (groupCountName !== undefined) {
59220
59235
  code += ` <${uniqueFS}>-${groupCountName} = <${uniqueFS}>-${groupCountName} + 1.\n`;
59221
59236
  }
59222
- code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
59237
+ code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
59223
59238
  ELSE.\n`;
59224
59239
  code += ` CLEAR ${uniqueName}.\n`;
59225
59240
  for (const c of group.findAllExpressions(Expressions.LoopGroupByComponent)) {
@@ -59240,8 +59255,8 @@ ELSE.\n`;
59240
59255
  }
59241
59256
  code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE ${uniqueName}-items.\n`;
59242
59257
  code += ` INSERT ${uniqueName} INTO TABLE ${groupTargetName}tab.\n`;
59243
- code += `ENDIF.
59244
- ENDLOOP.
59258
+ code += `ENDIF.
59259
+ ENDLOOP.
59245
59260
  LOOP AT ${groupTargetName}tab ${groupTarget}.`;
59246
59261
  let fix = edit_helper_1.EditHelper.replaceRange(lowFile, high.getFirstToken().getStart(), high.getLastToken().getEnd(), code);
59247
59262
  for (const l of ((_m = highFile.getStructure()) === null || _m === void 0 ? void 0 : _m.findAllStructures(Structures.Loop)) || []) {
@@ -59413,7 +59428,7 @@ LOOP AT ${groupTargetName}tab ${groupTarget}.`;
59413
59428
  const enumName = (_b = high.findExpressionAfterToken("ENUM")) === null || _b === void 0 ? void 0 : _b.concatTokens();
59414
59429
  const structureName = (_c = high.findExpressionAfterToken("STRUCTURE")) === null || _c === void 0 ? void 0 : _c.concatTokens();
59415
59430
  // all ENUMS are char like?
59416
- let code = `TYPES ${enumName} TYPE string.
59431
+ let code = `TYPES ${enumName} TYPE string.
59417
59432
  CONSTANTS: BEGIN OF ${structureName},\n`;
59418
59433
  let count = 1;
59419
59434
  for (const e of enumStructure.findDirectStatements(Statements.TypeEnum).concat(enumStructure.findDirectStatements(Statements.Type))) {
@@ -59457,14 +59472,14 @@ CONSTANTS: BEGIN OF ${structureName},\n`;
59457
59472
  const tabixBackup = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59458
59473
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
59459
59474
  // restore tabix before exeption
59460
- const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.
59461
- ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
59462
- ${indentation}${tabixBackup} = sy-tabix.
59463
- ${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.
59464
- ${indentation}sy-tabix = ${tabixBackup}.
59465
- ${indentation}IF sy-subrc <> 0.
59466
- ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59467
- ${indentation}ENDIF.
59475
+ const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.
59476
+ ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
59477
+ ${indentation}${tabixBackup} = sy-tabix.
59478
+ ${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.
59479
+ ${indentation}sy-tabix = ${tabixBackup}.
59480
+ ${indentation}IF sy-subrc <> 0.
59481
+ ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59482
+ ${indentation}ENDIF.
59468
59483
  ${indentation}${uniqueName}`;
59469
59484
  const start = target.getFirstToken().getStart();
59470
59485
  const end = (_a = tableExpression.findDirectTokenByText("]")) === null || _a === void 0 ? void 0 : _a.getEnd();
@@ -59548,11 +59563,11 @@ ${indentation}${uniqueName}`;
59548
59563
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
59549
59564
  const source = (_b = templateSource === null || templateSource === void 0 ? void 0 : templateSource.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens();
59550
59565
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59551
- const code = `DATA ${uniqueName} TYPE string.
59552
- ${indentation}CALL FUNCTION '${functionName}'
59553
- ${indentation} EXPORTING
59554
- ${indentation} input = ${source}
59555
- ${indentation} IMPORTING
59566
+ const code = `DATA ${uniqueName} TYPE string.
59567
+ ${indentation}CALL FUNCTION '${functionName}'
59568
+ ${indentation} EXPORTING
59569
+ ${indentation} input = ${source}
59570
+ ${indentation} IMPORTING
59556
59571
  ${indentation} output = ${uniqueName}.\n`;
59557
59572
  const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), code);
59558
59573
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, child.getFirstToken().getStart(), child.getLastToken().getEnd(), uniqueName);
@@ -60864,12 +60879,12 @@ class EasyToFindMessages {
60864
60879
  key: "easy_to_find_messages",
60865
60880
  title: "Easy to find messages",
60866
60881
  shortDescription: `Make messages easy to find`,
60867
- extendedInformation: `All messages must be statically referenced exactly once
60868
-
60869
- Only MESSAGE and RAISE statments are counted as static references
60870
-
60871
- Also see rule "message_exists"
60872
-
60882
+ extendedInformation: `All messages must be statically referenced exactly once
60883
+
60884
+ Only MESSAGE and RAISE statments are counted as static references
60885
+
60886
+ Also see rule "message_exists"
60887
+
60873
60888
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#make-messages-easy-to-find`,
60874
60889
  tags: [_irule_1.RuleTag.Styleguide],
60875
60890
  };
@@ -60950,13 +60965,13 @@ class EmptyEvent extends _abap_rule_1.ABAPRule {
60950
60965
  shortDescription: `Empty selection screen or list processing event block`,
60951
60966
  extendedInformation: ``,
60952
60967
  tags: [_irule_1.RuleTag.SingleFile],
60953
- badExample: `
60954
- INITIALIZATION.
60955
- WRITE 'hello'.
60968
+ badExample: `
60969
+ INITIALIZATION.
60970
+ WRITE 'hello'.
60956
60971
  END-OF-SELECTION.`,
60957
- goodExample: `
60958
- START-OF-SELECTION.
60959
- PERFORM sdf.
60972
+ goodExample: `
60973
+ START-OF-SELECTION.
60974
+ PERFORM sdf.
60960
60975
  COMMIT WORK.`,
60961
60976
  };
60962
60977
  }
@@ -61048,8 +61063,8 @@ class EmptyLineinStatement extends _abap_rule_1.ABAPRule {
61048
61063
  key: "empty_line_in_statement",
61049
61064
  title: "Find empty lines in statements",
61050
61065
  shortDescription: `Checks that statements do not contain empty lines.`,
61051
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
61052
-
61066
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
61067
+
61053
61068
  https://docs.abapopenchecks.org/checks/41/`,
61054
61069
  tags: [_irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
61055
61070
  badExample: `WRITE\n\nhello.`,
@@ -61225,13 +61240,13 @@ class EmptyStructure extends _abap_rule_1.ABAPRule {
61225
61240
  shortDescription: `Checks that the code does not contain empty blocks.`,
61226
61241
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-empty-if-branches`,
61227
61242
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
61228
- badExample: `IF foo = bar.
61229
- ENDIF.
61230
-
61231
- DO 2 TIMES.
61243
+ badExample: `IF foo = bar.
61244
+ ENDIF.
61245
+
61246
+ DO 2 TIMES.
61232
61247
  ENDDO.`,
61233
- goodExample: `LOOP AT itab WHERE qty = 0 OR date > sy-datum.
61234
- ENDLOOP.
61248
+ goodExample: `LOOP AT itab WHERE qty = 0 OR date > sy-datum.
61249
+ ENDLOOP.
61235
61250
  result = xsdbool( sy-subrc = 0 ).`,
61236
61251
  };
61237
61252
  }
@@ -61373,10 +61388,10 @@ class ExitOrCheck extends _abap_rule_1.ABAPRule {
61373
61388
  return {
61374
61389
  key: "exit_or_check",
61375
61390
  title: "Find EXIT or CHECK outside loops",
61376
- shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
61391
+ shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
61377
61392
  Use RETURN to leave procesing blocks instead.`,
61378
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
61379
- https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
61393
+ extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
61394
+ https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
61380
61395
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#check-vs-return`,
61381
61396
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
61382
61397
  };
@@ -61459,12 +61474,12 @@ class ExpandMacros extends _abap_rule_1.ABAPRule {
61459
61474
  key: "expand_macros",
61460
61475
  title: "Expand Macros",
61461
61476
  shortDescription: `Allows expanding macro calls with quick fixes`,
61462
- extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
61463
-
61477
+ extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
61478
+
61464
61479
  Note that macros/DEFINE cannot be used in the ABAP Cloud programming model`,
61465
- badExample: `DEFINE _hello.
61466
- WRITE 'hello'.
61467
- END-OF-DEFINITION.
61480
+ badExample: `DEFINE _hello.
61481
+ WRITE 'hello'.
61482
+ END-OF-DEFINITION.
61468
61483
  _hello.`,
61469
61484
  goodExample: `WRITE 'hello'.`,
61470
61485
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
@@ -61551,7 +61566,7 @@ class Exporting extends _abap_rule_1.ABAPRule {
61551
61566
  shortDescription: `Detects EXPORTING statements which can be omitted.`,
61552
61567
  badExample: `call_method( EXPORTING foo = bar ).`,
61553
61568
  goodExample: `call_method( foo = bar ).`,
61554
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-optional-keyword-exporting
61569
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-optional-keyword-exporting
61555
61570
  https://docs.abapopenchecks.org/checks/30/`,
61556
61571
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
61557
61572
  };
@@ -61649,7 +61664,7 @@ class ForbiddenIdentifier extends _abap_rule_1.ABAPRule {
61649
61664
  key: "forbidden_identifier",
61650
61665
  title: "Forbidden Identifier",
61651
61666
  shortDescription: `Forbid use of specified identifiers, list of regex.`,
61652
- extendedInformation: `Used in the transpiler to find javascript keywords in ABAP identifiers,
61667
+ extendedInformation: `Used in the transpiler to find javascript keywords in ABAP identifiers,
61653
61668
  https://github.com/abaplint/transpiler/blob/bda94b8b56e2b7f2f87be2168f12361aa530220e/packages/transpiler/src/validation.ts#L44`,
61654
61669
  tags: [_irule_1.RuleTag.SingleFile],
61655
61670
  };
@@ -61891,8 +61906,8 @@ class ForbiddenVoidType {
61891
61906
  key: "forbidden_void_type",
61892
61907
  title: "Forbidden Void Types",
61893
61908
  shortDescription: `Avoid usage of specified void types.`,
61894
- extendedInformation: `Inspiration:
61895
- BOOLEAN, BOOLE_D, CHAR01, CHAR1, CHAR10, CHAR12, CHAR128, CHAR2, CHAR20, CHAR4, CHAR70,
61909
+ extendedInformation: `Inspiration:
61910
+ BOOLEAN, BOOLE_D, CHAR01, CHAR1, CHAR10, CHAR12, CHAR128, CHAR2, CHAR20, CHAR4, CHAR70,
61896
61911
  DATS, TIMS, DATUM, FLAG, INT4, NUMC3, NUMC4, SAP_BOOL, TEXT25, TEXT80, X255, XFELD`,
61897
61912
  };
61898
61913
  }
@@ -62135,7 +62150,7 @@ class FullyTypeITabs extends _abap_rule_1.ABAPRule {
62135
62150
  key: "fully_type_itabs",
62136
62151
  title: "Fully type internal tables",
62137
62152
  shortDescription: `No implict table types or table keys`,
62138
- badExample: `DATA lt_foo TYPE TABLE OF ty.
62153
+ badExample: `DATA lt_foo TYPE TABLE OF ty.
62139
62154
  DATA lt_bar TYPE STANDARD TABLE OF ty.`,
62140
62155
  goodExample: `DATA lt_foo TYPE STANDARD TABLE OF ty WITH EMPTY KEY.`,
62141
62156
  tags: [_irule_1.RuleTag.SingleFile],
@@ -62320,26 +62335,26 @@ class FunctionalWriting extends _abap_rule_1.ABAPRule {
62320
62335
  key: "functional_writing",
62321
62336
  title: "Use functional writing",
62322
62337
  shortDescription: `Detects usage of call method when functional style calls can be used.`,
62323
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-calls
62338
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-calls
62324
62339
  https://docs.abapopenchecks.org/checks/07/`,
62325
62340
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
62326
- badExample: `CALL METHOD zcl_class=>method( ).
62327
- CALL METHOD cl_abap_typedescr=>describe_by_name
62328
- EXPORTING
62329
- p_name = 'NAME'
62330
- RECEIVING
62331
- p_descr_ref = lr_typedescr
62332
- EXCEPTIONS
62333
- type_not_found = 1
62341
+ badExample: `CALL METHOD zcl_class=>method( ).
62342
+ CALL METHOD cl_abap_typedescr=>describe_by_name
62343
+ EXPORTING
62344
+ p_name = 'NAME'
62345
+ RECEIVING
62346
+ p_descr_ref = lr_typedescr
62347
+ EXCEPTIONS
62348
+ type_not_found = 1
62334
62349
  OTHERS = 2.`,
62335
- goodExample: `zcl_class=>method( ).
62336
- cl_abap_typedescr=>describe_by_name(
62337
- EXPORTING
62338
- p_name = 'NAME'
62339
- RECEIVING
62340
- p_descr_ref = lr_typedescr
62341
- EXCEPTIONS
62342
- type_not_found = 1
62350
+ goodExample: `zcl_class=>method( ).
62351
+ cl_abap_typedescr=>describe_by_name(
62352
+ EXPORTING
62353
+ p_name = 'NAME'
62354
+ RECEIVING
62355
+ p_descr_ref = lr_typedescr
62356
+ EXCEPTIONS
62357
+ type_not_found = 1
62343
62358
  OTHERS = 2 ).`,
62344
62359
  };
62345
62360
  }
@@ -62450,14 +62465,14 @@ class GlobalClass extends _abap_rule_1.ABAPRule {
62450
62465
  key: "global_class",
62451
62466
  title: "Global class checks",
62452
62467
  shortDescription: `Checks related to global classes`,
62453
- extendedInformation: `* global classes must be in own files
62454
-
62455
- * file names must match class name
62456
-
62457
- * file names must match interface name
62458
-
62459
- * global classes must be global definitions
62460
-
62468
+ extendedInformation: `* global classes must be in own files
62469
+
62470
+ * file names must match class name
62471
+
62472
+ * file names must match interface name
62473
+
62474
+ * global classes must be global definitions
62475
+
62461
62476
  * global interfaces must be global definitions`,
62462
62477
  tags: [_irule_1.RuleTag.Syntax],
62463
62478
  };
@@ -62556,21 +62571,21 @@ class IdenticalConditions extends _abap_rule_1.ABAPRule {
62556
62571
  return {
62557
62572
  key: "identical_conditions",
62558
62573
  title: "Identical conditions",
62559
- shortDescription: `Find identical conditions in IF + CASE + WHILE etc
62560
-
62574
+ shortDescription: `Find identical conditions in IF + CASE + WHILE etc
62575
+
62561
62576
  Prerequsites: code is pretty printed with identical cAsE`,
62562
62577
  tags: [_irule_1.RuleTag.SingleFile],
62563
- badExample: `IF foo = bar OR 1 = a OR foo = bar.
62564
- ENDIF.
62565
- CASE bar.
62566
- WHEN '1'.
62567
- WHEN 'A' OR '1'.
62578
+ badExample: `IF foo = bar OR 1 = a OR foo = bar.
62579
+ ENDIF.
62580
+ CASE bar.
62581
+ WHEN '1'.
62582
+ WHEN 'A' OR '1'.
62568
62583
  ENDCASE.`,
62569
- goodExample: `IF foo = bar OR 1 = a.
62570
- ENDIF.
62571
- CASE bar.
62572
- WHEN '1'.
62573
- WHEN 'A'.
62584
+ goodExample: `IF foo = bar OR 1 = a.
62585
+ ENDIF.
62586
+ CASE bar.
62587
+ WHEN '1'.
62588
+ WHEN 'A'.
62574
62589
  ENDCASE.`,
62575
62590
  };
62576
62591
  }
@@ -62704,23 +62719,23 @@ class IdenticalContents extends _abap_rule_1.ABAPRule {
62704
62719
  key: "identical_contents",
62705
62720
  title: "Identical contents",
62706
62721
  shortDescription: `Find identical contents in blocks inside IFs, both in the beginning and in the end.`,
62707
- extendedInformation: `
62708
- Prerequsites: code is pretty printed with identical cAsE
62709
-
62722
+ extendedInformation: `
62723
+ Prerequsites: code is pretty printed with identical cAsE
62724
+
62710
62725
  Chained statments are ignored`,
62711
62726
  tags: [_irule_1.RuleTag.SingleFile],
62712
- badExample: `IF foo = bar.
62713
- WRITE 'bar'.
62714
- WRITE 'world'.
62715
- ELSE.
62716
- WRITE 'foo'.
62717
- WRITE 'world'.
62727
+ badExample: `IF foo = bar.
62728
+ WRITE 'bar'.
62729
+ WRITE 'world'.
62730
+ ELSE.
62731
+ WRITE 'foo'.
62732
+ WRITE 'world'.
62718
62733
  ENDIF.`,
62719
- goodExample: `IF foo = bar.
62720
- WRITE 'bar'.
62721
- ELSE.
62722
- WRITE 'foo'.
62723
- ENDIF.
62734
+ goodExample: `IF foo = bar.
62735
+ WRITE 'bar'.
62736
+ ELSE.
62737
+ WRITE 'foo'.
62738
+ ENDIF.
62724
62739
  WRITE 'world'.`,
62725
62740
  };
62726
62741
  }
@@ -62828,12 +62843,12 @@ class IdenticalDescriptions {
62828
62843
  key: "identical_descriptions",
62829
62844
  title: "Identical descriptions",
62830
62845
  shortDescription: `Searches for objects with the same type and same description`,
62831
- extendedInformation: `Case insensitive
62832
-
62833
- Only checks the master language descriptions
62834
-
62835
- Dependencies are skipped
62836
-
62846
+ extendedInformation: `Case insensitive
62847
+
62848
+ Only checks the master language descriptions
62849
+
62850
+ Dependencies are skipped
62851
+
62837
62852
  Works for: INTF, CLAS, DOMA, DTEL, FUNC in same FUGR`,
62838
62853
  tags: [],
62839
62854
  };
@@ -63007,43 +63022,43 @@ class IfInIf extends _abap_rule_1.ABAPRule {
63007
63022
  key: "if_in_if",
63008
63023
  title: "IF in IF",
63009
63024
  shortDescription: `Detects nested ifs which can be refactored.`,
63010
- extendedInformation: `
63011
- Directly nested IFs without ELSE can be refactored to a single condition using AND.
63012
-
63013
- ELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.
63014
-
63015
- https://docs.abapopenchecks.org/checks/01/
63025
+ extendedInformation: `
63026
+ Directly nested IFs without ELSE can be refactored to a single condition using AND.
63027
+
63028
+ ELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.
63029
+
63030
+ https://docs.abapopenchecks.org/checks/01/
63016
63031
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low`,
63017
- badExample: `IF condition1.
63018
- IF condition2.
63019
- ...
63020
- ENDIF.
63021
- ENDIF.
63022
-
63023
- IF condition1.
63024
- ...
63025
- ELSE.
63026
- IF condition2.
63027
- ...
63028
- ENDIF.
63032
+ badExample: `IF condition1.
63033
+ IF condition2.
63034
+ ...
63035
+ ENDIF.
63036
+ ENDIF.
63037
+
63038
+ IF condition1.
63039
+ ...
63040
+ ELSE.
63041
+ IF condition2.
63042
+ ...
63043
+ ENDIF.
63029
63044
  ENDIF.`,
63030
- goodExample: `IF ( condition1 ) AND ( condition2 ).
63031
- ...
63032
- ENDIF.
63033
-
63034
- IF condition1.
63035
- ...
63036
- ELSEIF condition2.
63037
- ...
63038
- ENDIF.
63039
-
63040
- CASE variable.
63041
- WHEN value1.
63042
- ...
63043
- WHEN value2.
63044
- IF condition2.
63045
- ...
63046
- ENDIF.
63045
+ goodExample: `IF ( condition1 ) AND ( condition2 ).
63046
+ ...
63047
+ ENDIF.
63048
+
63049
+ IF condition1.
63050
+ ...
63051
+ ELSEIF condition2.
63052
+ ...
63053
+ ENDIF.
63054
+
63055
+ CASE variable.
63056
+ WHEN value1.
63057
+ ...
63058
+ WHEN value2.
63059
+ IF condition2.
63060
+ ...
63061
+ ENDIF.
63047
63062
  ENDCASE.`,
63048
63063
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
63049
63064
  };
@@ -63228,9 +63243,9 @@ class ImplementMethods extends _abap_rule_1.ABAPRule {
63228
63243
  for (const i of ((_a = file.getStructure()) === null || _a === void 0 ? void 0 : _a.findAllStatements(Statements.ClassImplementation)) || []) {
63229
63244
  const name = (_b = i.findFirstExpression(Expressions.ClassName)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr().toUpperCase();
63230
63245
  if (name === impl.identifier.getName().toUpperCase()) {
63231
- return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
63232
- METHOD ${methodName.toLowerCase()}.
63233
- RETURN. " todo, implement method
63246
+ return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
63247
+ METHOD ${methodName.toLowerCase()}.
63248
+ RETURN. " todo, implement method
63234
63249
  ENDMETHOD.`);
63235
63250
  }
63236
63251
  }
@@ -63409,14 +63424,14 @@ class ImplicitStartOfSelection extends _abap_rule_1.ABAPRule {
63409
63424
  key: "implicit_start_of_selection",
63410
63425
  title: "Implicit START-OF-SELECTION",
63411
63426
  shortDescription: `Add explicit selection screen event handling`,
63412
- extendedInformation: `Only runs for executable programs
63413
-
63427
+ extendedInformation: `Only runs for executable programs
63428
+
63414
63429
  https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapstart-of-selection.htm`,
63415
63430
  tags: [_irule_1.RuleTag.SingleFile],
63416
- badExample: `REPORT zfoo.
63431
+ badExample: `REPORT zfoo.
63417
63432
  WRITE 'hello'.`,
63418
- goodExample: `
63419
- START-OF-SELECTION.
63433
+ goodExample: `
63434
+ START-OF-SELECTION.
63420
63435
  WRITE 'hello'.`,
63421
63436
  };
63422
63437
  }
@@ -63521,19 +63536,19 @@ class InStatementIndentation extends _abap_rule_1.ABAPRule {
63521
63536
  key: "in_statement_indentation",
63522
63537
  title: "In-statement indentation",
63523
63538
  shortDescription: "Checks alignment within statements which span multiple lines.",
63524
- extendedInformation: `Lines following the first line should be indented once (2 spaces).
63525
-
63526
- For block declaration statements, lines after the first should be indented an additional time (default: +2 spaces)
63539
+ extendedInformation: `Lines following the first line should be indented once (2 spaces).
63540
+
63541
+ For block declaration statements, lines after the first should be indented an additional time (default: +2 spaces)
63527
63542
  to distinguish them better from code within the block.`,
63528
- badExample: `IF 1 = 1
63529
- AND 2 = 2.
63530
- WRITE 'hello' &&
63531
- 'world'.
63543
+ badExample: `IF 1 = 1
63544
+ AND 2 = 2.
63545
+ WRITE 'hello' &&
63546
+ 'world'.
63532
63547
  ENDIF.`,
63533
- goodExample: `IF 1 = 1
63534
- AND 2 = 2.
63535
- WRITE 'hello' &&
63536
- 'world'.
63548
+ goodExample: `IF 1 = 1
63549
+ AND 2 = 2.
63550
+ WRITE 'hello' &&
63551
+ 'world'.
63537
63552
  ENDIF.`,
63538
63553
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
63539
63554
  };
@@ -63656,23 +63671,23 @@ class Indentation extends _abap_rule_1.ABAPRule {
63656
63671
  title: "Indentation",
63657
63672
  shortDescription: `Checks indentation`,
63658
63673
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
63659
- badExample: `CLASS lcl DEFINITION.
63660
- PRIVATE SECTION.
63661
- METHODS constructor.
63662
- ENDCLASS.
63663
-
63664
- CLASS lcl IMPLEMENTATION.
63665
- METHOD constructor.
63666
- ENDMETHOD.
63674
+ badExample: `CLASS lcl DEFINITION.
63675
+ PRIVATE SECTION.
63676
+ METHODS constructor.
63677
+ ENDCLASS.
63678
+
63679
+ CLASS lcl IMPLEMENTATION.
63680
+ METHOD constructor.
63681
+ ENDMETHOD.
63667
63682
  ENDCLASS.`,
63668
- goodExample: `CLASS lcl DEFINITION.
63669
- PRIVATE SECTION.
63670
- METHODS constructor.
63671
- ENDCLASS.
63672
-
63673
- CLASS lcl IMPLEMENTATION.
63674
- METHOD constructor.
63675
- ENDMETHOD.
63683
+ goodExample: `CLASS lcl DEFINITION.
63684
+ PRIVATE SECTION.
63685
+ METHODS constructor.
63686
+ ENDCLASS.
63687
+
63688
+ CLASS lcl IMPLEMENTATION.
63689
+ METHOD constructor.
63690
+ ENDMETHOD.
63676
63691
  ENDCLASS.`,
63677
63692
  };
63678
63693
  }
@@ -64073,9 +64088,9 @@ class IntfReferencingClas {
64073
64088
  key: "intf_referencing_clas",
64074
64089
  title: "INTF referencing CLAS",
64075
64090
  shortDescription: `Interface contains references to class`,
64076
- extendedInformation: `Only global interfaces are checked.
64077
- Only first level references are checked.
64078
- Exception class references are ignored.
64091
+ extendedInformation: `Only global interfaces are checked.
64092
+ Only first level references are checked.
64093
+ Exception class references are ignored.
64079
64094
  Void references are ignored.`,
64080
64095
  };
64081
64096
  }
@@ -64160,9 +64175,9 @@ class InvalidTableIndex extends _abap_rule_1.ABAPRule {
64160
64175
  title: "Invalid Table Index",
64161
64176
  shortDescription: `Issues error for constant table index zero, as ABAP starts from 1`,
64162
64177
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
64163
- badExample: `DATA(first) = table[ 0 ].
64178
+ badExample: `DATA(first) = table[ 0 ].
64164
64179
  READ TABLE gt_stack ASSIGNING <ls_stack> INDEX 0.`,
64165
- goodExample: `DATA(first) = table[ 1 ].
64180
+ goodExample: `DATA(first) = table[ 1 ].
64166
64181
  READ TABLE gt_stack ASSIGNING <ls_stack> INDEX 1.`,
64167
64182
  };
64168
64183
  }
@@ -64763,8 +64778,8 @@ class LineBreakStyle {
64763
64778
  return {
64764
64779
  key: "line_break_style",
64765
64780
  title: "Makes sure line breaks are consistent in the ABAP code",
64766
- shortDescription: `Enforces LF as newlines in ABAP files
64767
-
64781
+ shortDescription: `Enforces LF as newlines in ABAP files
64782
+
64768
64783
  abapGit does not work with CRLF`,
64769
64784
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
64770
64785
  };
@@ -64833,7 +64848,7 @@ class LineLength extends _abap_rule_1.ABAPRule {
64833
64848
  key: "line_length",
64834
64849
  title: "Line length",
64835
64850
  shortDescription: `Detects lines exceeding the provided maximum length.`,
64836
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length
64851
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length
64837
64852
  https://docs.abapopenchecks.org/checks/04/`,
64838
64853
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
64839
64854
  };
@@ -64904,7 +64919,7 @@ class LineOnlyPunc extends _abap_rule_1.ABAPRule {
64904
64919
  key: "line_only_punc",
64905
64920
  title: "Line containing only punctuation",
64906
64921
  shortDescription: `Detects lines containing only punctuation.`,
64907
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#close-brackets-at-line-end
64922
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#close-brackets-at-line-end
64908
64923
  https://docs.abapopenchecks.org/checks/16/`,
64909
64924
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
64910
64925
  badExample: "zcl_class=>method(\n).",
@@ -65167,15 +65182,15 @@ class LocalVariableNames extends _abap_rule_1.ABAPRule {
65167
65182
  return {
65168
65183
  key: "local_variable_names",
65169
65184
  title: "Local variable naming conventions",
65170
- shortDescription: `
65171
- Allows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols.
65185
+ shortDescription: `
65186
+ Allows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols.
65172
65187
  Regexes are case-insensitive.`,
65173
65188
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
65174
- badExample: `FORM bar.
65175
- DATA foo.
65189
+ badExample: `FORM bar.
65190
+ DATA foo.
65176
65191
  ENDFORM.`,
65177
- goodExample: `FORM bar.
65178
- DATA lv_foo.
65192
+ goodExample: `FORM bar.
65193
+ DATA lv_foo.
65179
65194
  ENDFORM.`,
65180
65195
  };
65181
65196
  }
@@ -65327,9 +65342,9 @@ class MacroNaming extends _abap_rule_1.ABAPRule {
65327
65342
  shortDescription: `Allows you to enforce a pattern for macro definitions`,
65328
65343
  extendedInformation: `Use rule "avoid_use" to avoid macros altogether.`,
65329
65344
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
65330
- badExample: `DEFINE something.
65345
+ badExample: `DEFINE something.
65331
65346
  END-OF-DEFINITION.`,
65332
- goodExample: `DEFINE _something.
65347
+ goodExample: `DEFINE _something.
65333
65348
  END-OF-DEFINITION.`,
65334
65349
  };
65335
65350
  }
@@ -65402,10 +65417,10 @@ class MainFileContents {
65402
65417
  key: "main_file_contents",
65403
65418
  title: "Main file contents",
65404
65419
  shortDescription: `Checks related to report declarations.`,
65405
- extendedInformation: `Does not run if the target version is Cloud
65406
-
65407
- * PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
65408
- * TYPEs must begin with "TYPE-POOL <name>."
65420
+ extendedInformation: `Does not run if the target version is Cloud
65421
+
65422
+ * PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
65423
+ * TYPEs must begin with "TYPE-POOL <name>."
65409
65424
  `,
65410
65425
  };
65411
65426
  }
@@ -65521,17 +65536,17 @@ class ManyParentheses extends _abap_rule_1.ABAPRule {
65521
65536
  title: "Too many parentheses",
65522
65537
  shortDescription: `Searches for expressions where extra parentheses can safely be removed`,
65523
65538
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
65524
- badExample: `
65525
- IF ( destination IS INITIAL ).
65526
- ENDIF.
65527
- IF foo = boo AND ( bar = lar AND moo = loo ).
65528
- ENDIF.
65539
+ badExample: `
65540
+ IF ( destination IS INITIAL ).
65541
+ ENDIF.
65542
+ IF foo = boo AND ( bar = lar AND moo = loo ).
65543
+ ENDIF.
65529
65544
  `,
65530
- goodExample: `
65531
- IF destination IS INITIAL.
65532
- ENDIF.
65533
- IF foo = boo AND bar = lar AND moo = loo.
65534
- ENDIF.
65545
+ goodExample: `
65546
+ IF destination IS INITIAL.
65547
+ ENDIF.
65548
+ IF foo = boo AND bar = lar AND moo = loo.
65549
+ ENDIF.
65535
65550
  `,
65536
65551
  };
65537
65552
  }
@@ -65705,14 +65720,14 @@ class MaxOneMethodParameterPerLine extends _abap_rule_1.ABAPRule {
65705
65720
  title: "Max one method parameter definition per line",
65706
65721
  shortDescription: `Keep max one method parameter description per line`,
65707
65722
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace],
65708
- badExample: `
65709
- METHODS apps_scope_token
65710
- IMPORTING
65723
+ badExample: `
65724
+ METHODS apps_scope_token
65725
+ IMPORTING
65711
65726
  body TYPE bodyapps_scope_token client_id TYPE str.`,
65712
- goodExample: `
65713
- METHODS apps_scope_token
65714
- IMPORTING
65715
- body TYPE bodyapps_scope_token
65727
+ goodExample: `
65728
+ METHODS apps_scope_token
65729
+ IMPORTING
65730
+ body TYPE bodyapps_scope_token
65716
65731
  client_id TYPE str.`,
65717
65732
  };
65718
65733
  }
@@ -65777,11 +65792,11 @@ class MaxOneStatement extends _abap_rule_1.ABAPRule {
65777
65792
  key: "max_one_statement",
65778
65793
  title: "Max one statement per line",
65779
65794
  shortDescription: `Checks that each line contains only a single statement.`,
65780
- extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
65781
-
65782
- Does not report anything for chained statements.
65783
-
65784
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line
65795
+ extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
65796
+
65797
+ Does not report anything for chained statements.
65798
+
65799
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line
65785
65800
  https://docs.abapopenchecks.org/checks/11/`,
65786
65801
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
65787
65802
  badExample: `WRITE foo. WRITE bar.`,
@@ -66119,8 +66134,8 @@ class MethodLength {
66119
66134
  key: "method_length",
66120
66135
  title: "Method/Form Length",
66121
66136
  shortDescription: `Checks relating to method/form length.`,
66122
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
66123
-
66137
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
66138
+
66124
66139
  Abstract methods without statements are considered okay.`,
66125
66140
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
66126
66141
  };
@@ -66225,20 +66240,20 @@ class MethodOverwritesBuiltIn extends _abap_rule_1.ABAPRule {
66225
66240
  key: "method_overwrites_builtin",
66226
66241
  title: "Method name overwrites builtin function",
66227
66242
  shortDescription: `Checks Method names that overwrite builtin SAP functions`,
66228
- extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
66229
-
66230
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
66231
-
66243
+ extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
66244
+
66245
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
66246
+
66232
66247
  Interface method names are ignored`,
66233
66248
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
66234
- badExample: `CLASS lcl DEFINITION.
66235
- PUBLIC SECTION.
66236
- METHODS matches.
66237
- ENDCLASS.
66238
-
66239
- CLASS lcl IMPLEMENTATION.
66240
- METHOD matches.
66241
- ENDMETHOD.
66249
+ badExample: `CLASS lcl DEFINITION.
66250
+ PUBLIC SECTION.
66251
+ METHODS matches.
66252
+ ENDCLASS.
66253
+
66254
+ CLASS lcl IMPLEMENTATION.
66255
+ METHOD matches.
66256
+ ENDMETHOD.
66242
66257
  ENDCLASS.`,
66243
66258
  };
66244
66259
  }
@@ -66429,12 +66444,12 @@ class MixReturning extends _abap_rule_1.ABAPRule {
66429
66444
  // eslint-disable-next-line max-len
66430
66445
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-either-returning-or-exporting-or-changing-but-not-a-combination`,
66431
66446
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
66432
- badExample: `CLASS lcl DEFINITION.
66433
- PUBLIC SECTION.
66434
- METHODS
66435
- foobar
66436
- EXPORTING foo TYPE i
66437
- RETURNING VALUE(rv_string) TYPE string.
66447
+ badExample: `CLASS lcl DEFINITION.
66448
+ PUBLIC SECTION.
66449
+ METHODS
66450
+ foobar
66451
+ EXPORTING foo TYPE i
66452
+ RETURNING VALUE(rv_string) TYPE string.
66438
66453
  ENDCLASS.`,
66439
66454
  };
66440
66455
  }
@@ -66814,7 +66829,7 @@ class Nesting extends _abap_rule_1.ABAPRule {
66814
66829
  key: "nesting",
66815
66830
  title: "Check nesting depth",
66816
66831
  shortDescription: `Checks for methods exceeding a maximum nesting depth`,
66817
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low
66832
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low
66818
66833
  https://docs.abapopenchecks.org/checks/74/`,
66819
66834
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
66820
66835
  };
@@ -67057,7 +67072,7 @@ class NoChainedAssignment extends _abap_rule_1.ABAPRule {
67057
67072
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-chain-assignments`,
67058
67073
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
67059
67074
  badExample: `var1 = var2 = var3.`,
67060
- goodExample: `var2 = var3.
67075
+ goodExample: `var2 = var3.
67061
67076
  var1 = var2.`,
67062
67077
  };
67063
67078
  }
@@ -67116,8 +67131,8 @@ class NoExternalFormCalls extends _abap_rule_1.ABAPRule {
67116
67131
  key: "no_external_form_calls",
67117
67132
  title: "No external FORM calls",
67118
67133
  shortDescription: `Detect external form calls`,
67119
- badExample: `PERFORM foo IN PROGRAM bar.
67120
-
67134
+ badExample: `PERFORM foo IN PROGRAM bar.
67135
+
67121
67136
  PERFORM foo(bar).`,
67122
67137
  tags: [_irule_1.RuleTag.SingleFile],
67123
67138
  };
@@ -67178,17 +67193,17 @@ class NoInlineInOptionalBranches extends _abap_rule_1.ABAPRule {
67178
67193
  key: "no_inline_in_optional_branches",
67179
67194
  title: "Don't declare inline in optional branches",
67180
67195
  shortDescription: `Don't declare inline in optional branches`,
67181
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
67182
-
67183
- Considered optional branches:
67184
- * inside IF/ELSEIF/ELSE
67185
- * inside LOOP
67186
- * inside WHILE
67187
- * inside CASE/WHEN, CASE TYPE OF
67188
- * inside DO
67189
- * inside SELECT loops
67190
-
67191
- Not considered optional branches:
67196
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
67197
+
67198
+ Considered optional branches:
67199
+ * inside IF/ELSEIF/ELSE
67200
+ * inside LOOP
67201
+ * inside WHILE
67202
+ * inside CASE/WHEN, CASE TYPE OF
67203
+ * inside DO
67204
+ * inside SELECT loops
67205
+
67206
+ Not considered optional branches:
67192
67207
  * TRY/CATCH/CLEANUP`,
67193
67208
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
67194
67209
  };
@@ -67288,12 +67303,12 @@ class NoPrefixes extends _abap_rule_1.ABAPRule {
67288
67303
  key: "no_prefixes",
67289
67304
  title: "No Prefixes",
67290
67305
  shortDescription: `Dont use hungarian notation`,
67291
- extendedInformation: `
67292
- Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
67293
- allowing all types to become voided, abaplint will then provide less precise syntax errors.
67294
-
67295
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
67296
-
67306
+ extendedInformation: `
67307
+ Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
67308
+ allowing all types to become voided, abaplint will then provide less precise syntax errors.
67309
+
67310
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
67311
+
67297
67312
  https://github.com/SAP/styleguides/blob/main/clean-abap/sub-sections/AvoidEncodings.md`,
67298
67313
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
67299
67314
  badExample: `DATA lv_foo TYPE i.`,
@@ -67472,7 +67487,7 @@ class NoPublicAttributes extends _abap_rule_1.ABAPRule {
67472
67487
  return {
67473
67488
  key: "no_public_attributes",
67474
67489
  title: "No public attributes",
67475
- shortDescription: `Checks that classes and interfaces don't contain any public attributes.
67490
+ shortDescription: `Checks that classes and interfaces don't contain any public attributes.
67476
67491
  Exceptions are excluded from this rule.`,
67477
67492
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#members-private-by-default-protected-only-if-needed`,
67478
67493
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
@@ -67573,13 +67588,13 @@ class NoYodaConditions extends _abap_rule_1.ABAPRule {
67573
67588
  key: "no_yoda_conditions",
67574
67589
  title: "No Yoda conditions",
67575
67590
  shortDescription: `Finds Yoda conditions and reports issues`,
67576
- extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
67577
-
67591
+ extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
67592
+
67578
67593
  Conditions with operators CP, NP, CS, NS, CA, NA, CO, CN are ignored`,
67579
67594
  tags: [_irule_1.RuleTag.SingleFile],
67580
- badExample: `IF 0 <> sy-subrc.
67595
+ badExample: `IF 0 <> sy-subrc.
67581
67596
  ENDIF.`,
67582
- goodExample: `IF sy-subrc <> 0.
67597
+ goodExample: `IF sy-subrc <> 0.
67583
67598
  ENDIF.`,
67584
67599
  };
67585
67600
  }
@@ -67680,8 +67695,8 @@ class NROBConsistency {
67680
67695
  key: "nrob_consistency",
67681
67696
  title: "Number range consistency",
67682
67697
  shortDescription: `Consistency checks for number ranges`,
67683
- extendedInformation: `Issue reported if percentage warning is over 50%
67684
-
67698
+ extendedInformation: `Issue reported if percentage warning is over 50%
67699
+
67685
67700
  Issue reported if the referenced domain is not found(taking error namespace into account)`,
67686
67701
  tags: [_irule_1.RuleTag.SingleFile],
67687
67702
  };
@@ -67958,58 +67973,58 @@ class ObsoleteStatement extends _abap_rule_1.ABAPRule {
67958
67973
  title: "Obsolete statements",
67959
67974
  shortDescription: `Checks for usages of certain obsolete statements`,
67960
67975
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
67961
- extendedInformation: `
67962
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
67963
-
67964
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
67965
-
67966
- SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
67967
-
67968
- IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
67969
-
67970
- WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
67971
-
67972
- FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
67973
-
67974
- TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
67975
-
67976
- LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
67977
-
67978
- COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
67979
-
67980
- OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
67981
-
67982
- PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
67983
-
67984
- RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
67985
-
67986
- PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
67987
-
67988
- MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
67989
-
67990
- SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
67991
- SELECT COUNT(*) is considered okay
67992
-
67993
- FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
67994
-
67995
- SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
67996
-
67997
- CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
67998
-
67999
- POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
68000
-
68001
- OCCURENCES: check for OCCURENCES vs OCCURRENCES
68002
-
67976
+ extendedInformation: `
67977
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
67978
+
67979
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
67980
+
67981
+ SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
67982
+
67983
+ IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
67984
+
67985
+ WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
67986
+
67987
+ FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
67988
+
67989
+ TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
67990
+
67991
+ LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
67992
+
67993
+ COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
67994
+
67995
+ OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
67996
+
67997
+ PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
67998
+
67999
+ RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
68000
+
68001
+ PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
68002
+
68003
+ MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
68004
+
68005
+ SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
68006
+ SELECT COUNT(*) is considered okay
68007
+
68008
+ FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
68009
+
68010
+ SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
68011
+
68012
+ CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
68013
+
68014
+ POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
68015
+
68016
+ OCCURENCES: check for OCCURENCES vs OCCURRENCES
68017
+
68003
68018
  CLIENT SPECIFIED, from 754: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abapselect_client_obsolete.htm`,
68004
- badExample: `REFRESH itab.
68005
-
68006
- COMPUTE foo = 2 + 2.
68007
-
68008
- MULTIPLY lv_foo BY 2.
68009
-
68010
- INTERFACE intf LOAD.
68011
-
68012
- IF foo IS SUPPLIED.
68019
+ badExample: `REFRESH itab.
68020
+
68021
+ COMPUTE foo = 2 + 2.
68022
+
68023
+ MULTIPLY lv_foo BY 2.
68024
+
68025
+ INTERFACE intf LOAD.
68026
+
68027
+ IF foo IS SUPPLIED.
68013
68028
  ENDIF.`,
68014
68029
  };
68015
68030
  }
@@ -68349,9 +68364,9 @@ class OmitParameterName {
68349
68364
  key: "omit_parameter_name",
68350
68365
  title: "Omit parameter name",
68351
68366
  shortDescription: `Omit the parameter name in single parameter calls`,
68352
- extendedInformation: `
68353
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
68354
-
68367
+ extendedInformation: `
68368
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
68369
+
68355
68370
  EXPORTING must already be omitted for this rule to take effect, https://rules.abaplint.org/exporting/`,
68356
68371
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
68357
68372
  badExample: `method( param = 2 ).`,
@@ -68557,20 +68572,20 @@ class OmitReceiving extends _abap_rule_1.ABAPRule {
68557
68572
  shortDescription: `Omit RECEIVING`,
68558
68573
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-receiving`,
68559
68574
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
68560
- badExample: `
68561
- upload_pack(
68562
- EXPORTING
68563
- io_client = lo_client
68564
- iv_url = iv_url
68565
- iv_deepen_level = iv_deepen_level
68566
- it_hashes = lt_hashes
68567
- RECEIVING
68575
+ badExample: `
68576
+ upload_pack(
68577
+ EXPORTING
68578
+ io_client = lo_client
68579
+ iv_url = iv_url
68580
+ iv_deepen_level = iv_deepen_level
68581
+ it_hashes = lt_hashes
68582
+ RECEIVING
68568
68583
  rt_objects = et_objects ).`,
68569
- goodExample: `
68570
- et_objects = upload_pack(
68571
- io_client = lo_client
68572
- iv_url = iv_url
68573
- iv_deepen_level = iv_deepen_level
68584
+ goodExample: `
68585
+ et_objects = upload_pack(
68586
+ io_client = lo_client
68587
+ iv_url = iv_url
68588
+ iv_deepen_level = iv_deepen_level
68574
68589
  it_hashes = lt_hashes ).`,
68575
68590
  };
68576
68591
  }
@@ -68634,8 +68649,8 @@ class Parser702Chaining extends _abap_rule_1.ABAPRule {
68634
68649
  return {
68635
68650
  key: "parser_702_chaining",
68636
68651
  title: "Parser Error, bad chanining on 702",
68637
- shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
68638
- this rule finds these and reports errors.
68652
+ shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
68653
+ this rule finds these and reports errors.
68639
68654
  Only active on target version 702 and below.`,
68640
68655
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
68641
68656
  };
@@ -68715,8 +68730,8 @@ class ParserError {
68715
68730
  return {
68716
68731
  key: "parser_error",
68717
68732
  title: "Parser error",
68718
- shortDescription: `Checks for syntax not recognized by abaplint.
68719
-
68733
+ shortDescription: `Checks for syntax not recognized by abaplint.
68734
+
68720
68735
  See recognized syntax at https://syntax.abaplint.org`,
68721
68736
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
68722
68737
  };
@@ -68801,7 +68816,7 @@ class ParserMissingSpace extends _abap_rule_1.ABAPRule {
68801
68816
  return {
68802
68817
  key: "parser_missing_space",
68803
68818
  title: "Parser Error, missing space",
68804
- shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.
68819
+ shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.
68805
68820
  This rule makes sure the spaces are consistently required across the language.`,
68806
68821
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
68807
68822
  badExample: `IF ( foo = 'bar').`,
@@ -69213,25 +69228,25 @@ class PreferInline {
69213
69228
  key: "prefer_inline",
69214
69229
  title: "Prefer Inline Declarations",
69215
69230
  shortDescription: `Prefer inline to up-front declarations.`,
69216
- extendedInformation: `EXPERIMENTAL
69217
-
69218
- Activates if language version is v740sp02 or above.
69219
-
69220
- Variables must be local(METHOD or FORM).
69221
-
69222
- No generic or void typed variables. No syntax errors.
69223
-
69224
- First position used must be a full/pure write.
69225
-
69226
- Move statment is not a cast(?=)
69227
-
69231
+ extendedInformation: `EXPERIMENTAL
69232
+
69233
+ Activates if language version is v740sp02 or above.
69234
+
69235
+ Variables must be local(METHOD or FORM).
69236
+
69237
+ No generic or void typed variables. No syntax errors.
69238
+
69239
+ First position used must be a full/pure write.
69240
+
69241
+ Move statment is not a cast(?=)
69242
+
69228
69243
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-inline-to-up-front-declarations`,
69229
69244
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Experimental, _irule_1.RuleTag.Quickfix],
69230
- badExample: `DATA foo TYPE i.
69231
- foo = 2.
69232
- DATA percentage TYPE decfloat34.
69245
+ badExample: `DATA foo TYPE i.
69246
+ foo = 2.
69247
+ DATA percentage TYPE decfloat34.
69233
69248
  percentage = ( comment_number / abs_statement_number ) * 100.`,
69234
- goodExample: `DATA(foo) = 2.
69249
+ goodExample: `DATA(foo) = 2.
69235
69250
  DATA(percentage) = CONV decfloat34( comment_number / abs_statement_number ) * 100.`,
69236
69251
  };
69237
69252
  }
@@ -69445,18 +69460,18 @@ class PreferIsNot extends _abap_rule_1.ABAPRule {
69445
69460
  key: "prefer_is_not",
69446
69461
  title: "Prefer IS NOT to NOT IS",
69447
69462
  shortDescription: `Prefer IS NOT to NOT IS`,
69448
- extendedInformation: `
69449
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
69450
-
69463
+ extendedInformation: `
69464
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
69465
+
69451
69466
  "if not is_valid( )." examples are skipped`,
69452
69467
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
69453
- goodExample: `IF variable IS NOT INITIAL.
69454
- IF variable NP 'TODO*'.
69455
- IF variable <> 42.
69468
+ goodExample: `IF variable IS NOT INITIAL.
69469
+ IF variable NP 'TODO*'.
69470
+ IF variable <> 42.
69456
69471
  IF variable CO 'hello'.`,
69457
- badExample: `IF NOT variable IS INITIAL.
69458
- IF NOT variable CP 'TODO*'.
69459
- IF NOT variable = 42.
69472
+ badExample: `IF NOT variable IS INITIAL.
69473
+ IF NOT variable CP 'TODO*'.
69474
+ IF NOT variable = 42.
69460
69475
  IF NOT variable CA 'hello'.`,
69461
69476
  };
69462
69477
  }
@@ -69644,14 +69659,14 @@ class PreferRaiseExceptionNew extends _abap_rule_1.ABAPRule {
69644
69659
  key: "prefer_raise_exception_new",
69645
69660
  title: "Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE",
69646
69661
  shortDescription: `Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE`,
69647
- extendedInformation: `
69648
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
69649
-
69662
+ extendedInformation: `
69663
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
69664
+
69650
69665
  From 752 and up`,
69651
69666
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
69652
69667
  goodExample: `RAISE EXCEPTION NEW cx_generation_error( previous = exception ).`,
69653
- badExample: `RAISE EXCEPTION TYPE cx_generation_error
69654
- EXPORTING
69668
+ badExample: `RAISE EXCEPTION TYPE cx_generation_error
69669
+ EXPORTING
69655
69670
  previous = exception.`,
69656
69671
  };
69657
69672
  }
@@ -69729,12 +69744,12 @@ class PreferReturningToExporting extends _abap_rule_1.ABAPRule {
69729
69744
  key: "prefer_returning_to_exporting",
69730
69745
  title: "Prefer RETURNING to EXPORTING",
69731
69746
  shortDescription: `Prefer RETURNING to EXPORTING. Generic types cannot be RETURNING.`,
69732
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting
69747
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting
69733
69748
  https://docs.abapopenchecks.org/checks/44/`,
69734
69749
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
69735
- badExample: `CLASS lcl DEFINITION.
69736
- PUBLIC SECTION.
69737
- METHODS test EXPORTING ev_foo TYPE i.
69750
+ badExample: `CLASS lcl DEFINITION.
69751
+ PUBLIC SECTION.
69752
+ METHODS test EXPORTING ev_foo TYPE i.
69738
69753
  ENDCLASS.`,
69739
69754
  };
69740
69755
  }
@@ -69830,8 +69845,8 @@ class PreferXsdbool extends _abap_rule_1.ABAPRule {
69830
69845
  key: "prefer_xsdbool",
69831
69846
  title: "Prefer xsdbool over boolc",
69832
69847
  shortDescription: `Prefer xsdbool over boolc`,
69833
- extendedInformation: `Activates if language version is v740sp08 or above.
69834
-
69848
+ extendedInformation: `Activates if language version is v740sp08 or above.
69849
+
69835
69850
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
69836
69851
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
69837
69852
  badExample: `DATA(sdf) = boolc( 1 = 2 ).`,
@@ -69903,9 +69918,9 @@ class PreferredCompareOperator extends _abap_rule_1.ABAPRule {
69903
69918
  title: "Preferred compare operator",
69904
69919
  shortDescription: `Configure undesired operator variants`,
69905
69920
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
69906
- badExample: `IF foo EQ bar.
69921
+ badExample: `IF foo EQ bar.
69907
69922
  ENDIF.`,
69908
- goodExample: `IF foo = bar.
69923
+ goodExample: `IF foo = bar.
69909
69924
  ENDIF.`,
69910
69925
  };
69911
69926
  }
@@ -70129,26 +70144,26 @@ class ReduceProceduralCode extends _abap_rule_1.ABAPRule {
70129
70144
  key: "reduce_procedural_code",
70130
70145
  title: "Reduce procedural code",
70131
70146
  shortDescription: `Checks FORM and FUNCTION-MODULE have few statements`,
70132
- extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
70133
-
70134
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
70135
-
70147
+ extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
70148
+
70149
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
70150
+
70136
70151
  Comments are not counted as statements.`,
70137
70152
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
70138
- badExample: `FORM foo.
70139
- DATA lv_bar TYPE i.
70140
- lv_bar = 2 + 2.
70141
- IF lv_bar = 4.
70142
- WRITE 'hello world'.
70143
- ENDIF.
70144
- DATA lv_bar TYPE i.
70145
- lv_bar = 2 + 2.
70146
- IF lv_bar = 4.
70147
- WRITE 'hello world'.
70148
- ENDIF.
70153
+ badExample: `FORM foo.
70154
+ DATA lv_bar TYPE i.
70155
+ lv_bar = 2 + 2.
70156
+ IF lv_bar = 4.
70157
+ WRITE 'hello world'.
70158
+ ENDIF.
70159
+ DATA lv_bar TYPE i.
70160
+ lv_bar = 2 + 2.
70161
+ IF lv_bar = 4.
70162
+ WRITE 'hello world'.
70163
+ ENDIF.
70149
70164
  ENDFORM.`,
70150
- goodExample: `FORM foo.
70151
- NEW zcl_global_class( )->run_logic( ).
70165
+ goodExample: `FORM foo.
70166
+ NEW zcl_global_class( )->run_logic( ).
70152
70167
  ENDFORM.`,
70153
70168
  };
70154
70169
  }
@@ -70392,10 +70407,10 @@ class RemoveDescriptions {
70392
70407
  return {
70393
70408
  key: "remove_descriptions",
70394
70409
  title: "Remove descriptions",
70395
- shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
70396
-
70397
- Class descriptions are required, see rule description_empty.
70398
-
70410
+ shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
70411
+
70412
+ Class descriptions are required, see rule description_empty.
70413
+
70399
70414
  Consider using ABAP Doc for documentation.`,
70400
70415
  tags: [],
70401
70416
  };
@@ -70520,14 +70535,14 @@ class RFCErrorHandling extends _abap_rule_1.ABAPRule {
70520
70535
  tags: [_irule_1.RuleTag.SingleFile],
70521
70536
  shortDescription: `Checks that exceptions 'system_failure' and 'communication_failure' are handled in RFC calls`,
70522
70537
  extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenrfc_exception.htm`,
70523
- badExample: `CALL FUNCTION 'ZRFC'
70538
+ badExample: `CALL FUNCTION 'ZRFC'
70524
70539
  DESTINATION lv_rfc.`,
70525
- goodExample: `CALL FUNCTION 'ZRFC'
70526
- DESTINATION lv_rfc
70527
- EXCEPTIONS
70528
- system_failure = 1 MESSAGE msg
70529
- communication_failure = 2 MESSAGE msg
70530
- resource_failure = 3
70540
+ goodExample: `CALL FUNCTION 'ZRFC'
70541
+ DESTINATION lv_rfc
70542
+ EXCEPTIONS
70543
+ system_failure = 1 MESSAGE msg
70544
+ communication_failure = 2 MESSAGE msg
70545
+ resource_failure = 3
70531
70546
  OTHERS = 4.`,
70532
70547
  };
70533
70548
  }
@@ -70611,11 +70626,11 @@ class SelectAddOrderBy {
70611
70626
  key: "select_add_order_by",
70612
70627
  title: "SELECT add ORDER BY",
70613
70628
  shortDescription: `SELECTs add ORDER BY clause`,
70614
- extendedInformation: `
70615
- This will make sure that the SELECT statement returns results in the same sequence on different databases
70616
-
70617
- add ORDER BY PRIMARY KEY if in doubt
70618
-
70629
+ extendedInformation: `
70630
+ This will make sure that the SELECT statement returns results in the same sequence on different databases
70631
+
70632
+ add ORDER BY PRIMARY KEY if in doubt
70633
+
70619
70634
  If the target is a sorted/hashed table, no issue is reported`,
70620
70635
  tags: [_irule_1.RuleTag.SingleFile],
70621
70636
  badExample: `SELECT * FROM db INTO TABLE @DATA(tab).`,
@@ -70746,14 +70761,14 @@ class SelectPerformance {
70746
70761
  key: "select_performance",
70747
70762
  title: "SELECT performance",
70748
70763
  shortDescription: `Various checks regarding SELECT performance.`,
70749
- extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
70750
-
70764
+ extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
70765
+
70751
70766
  SELECT *: not reported if using INTO/APPENDING CORRESPONDING FIELDS OF`,
70752
70767
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Performance],
70753
- badExample: `SELECT field1, field2 FROM table
70754
- INTO @DATA(structure) UP TO 1 ROWS ORDER BY field3 DESCENDING.
70768
+ badExample: `SELECT field1, field2 FROM table
70769
+ INTO @DATA(structure) UP TO 1 ROWS ORDER BY field3 DESCENDING.
70755
70770
  ENDSELECT.`,
70756
- goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
70771
+ goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
70757
70772
  INTO TABLE @DATA(table) ORDER BY field3 DESCENDING`,
70758
70773
  };
70759
70774
  }
@@ -70867,8 +70882,8 @@ class SelectSingleFullKey {
70867
70882
  key: "select_single_full_key",
70868
70883
  title: "Detect SELECT SINGLE which are possibily not unique",
70869
70884
  shortDescription: `Detect SELECT SINGLE which are possibily not unique`,
70870
- extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
70871
-
70885
+ extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
70886
+
70872
70887
  If the statement contains a JOIN it is not checked`,
70873
70888
  pseudoComment: "EC CI_NOORDER",
70874
70889
  tags: [_irule_1.RuleTag.Quickfix],
@@ -71292,8 +71307,8 @@ class SICFConsistency {
71292
71307
  key: "sicf_consistency",
71293
71308
  title: "SICF consistency",
71294
71309
  shortDescription: `Checks the validity of ICF services`,
71295
- extendedInformation: `* Class defined in handler must exist
71296
- * Class must not have any syntax errors
71310
+ extendedInformation: `* Class defined in handler must exist
71311
+ * Class must not have any syntax errors
71297
71312
  * Class must implement interface IF_HTTP_EXTENSION`,
71298
71313
  };
71299
71314
  }
@@ -71405,23 +71420,23 @@ class SlowParameterPassing {
71405
71420
  shortDescription: `Detects slow pass by value passing for methods where parameter is not changed`,
71406
71421
  extendedInformation: `Method parameters defined in interfaces is not checked`,
71407
71422
  tags: [_irule_1.RuleTag.Performance],
71408
- badExample: `CLASS lcl DEFINITION.
71409
- PUBLIC SECTION.
71410
- METHODS bar IMPORTING VALUE(sdf) TYPE string.
71411
- ENDCLASS.
71412
- CLASS lcl IMPLEMENTATION.
71413
- METHOD bar.
71414
- WRITE sdf.
71415
- ENDMETHOD.
71423
+ badExample: `CLASS lcl DEFINITION.
71424
+ PUBLIC SECTION.
71425
+ METHODS bar IMPORTING VALUE(sdf) TYPE string.
71426
+ ENDCLASS.
71427
+ CLASS lcl IMPLEMENTATION.
71428
+ METHOD bar.
71429
+ WRITE sdf.
71430
+ ENDMETHOD.
71416
71431
  ENDCLASS.`,
71417
- goodExample: `CLASS lcl DEFINITION.
71418
- PUBLIC SECTION.
71419
- METHODS bar IMPORTING sdf TYPE string.
71420
- ENDCLASS.
71421
- CLASS lcl IMPLEMENTATION.
71422
- METHOD bar.
71423
- WRITE sdf.
71424
- ENDMETHOD.
71432
+ goodExample: `CLASS lcl DEFINITION.
71433
+ PUBLIC SECTION.
71434
+ METHODS bar IMPORTING sdf TYPE string.
71435
+ ENDCLASS.
71436
+ CLASS lcl IMPLEMENTATION.
71437
+ METHOD bar.
71438
+ WRITE sdf.
71439
+ ENDMETHOD.
71425
71440
  ENDCLASS.`,
71426
71441
  };
71427
71442
  }
@@ -71678,8 +71693,8 @@ class SpaceBeforeDot extends _abap_rule_1.ABAPRule {
71678
71693
  key: "space_before_dot",
71679
71694
  title: "Space before dot",
71680
71695
  shortDescription: `Checks for extra spaces before dots at the ends of statements`,
71681
- extendedInformation: `
71682
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
71696
+ extendedInformation: `
71697
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
71683
71698
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#condense-your-code`,
71684
71699
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
71685
71700
  badExample: `WRITE bar .`,
@@ -71865,12 +71880,12 @@ class SQLValueConversion {
71865
71880
  key: "sql_value_conversion",
71866
71881
  title: "Implicit SQL Value Conversion",
71867
71882
  shortDescription: `Ensure types match when selecting from database`,
71868
- extendedInformation: `
71869
- * Integer to CHAR conversion
71870
- * Integer to NUMC conversion
71871
- * NUMC to Integer conversion
71872
- * CHAR to Integer conversion
71873
- * Source field longer than database field, CHAR -> CHAR
71883
+ extendedInformation: `
71884
+ * Integer to CHAR conversion
71885
+ * Integer to NUMC conversion
71886
+ * NUMC to Integer conversion
71887
+ * CHAR to Integer conversion
71888
+ * Source field longer than database field, CHAR -> CHAR
71874
71889
  * Source field longer than database field, NUMC -> NUMC`,
71875
71890
  tags: [],
71876
71891
  };
@@ -71942,7 +71957,7 @@ class StartAtTab extends _abap_rule_1.ABAPRule {
71942
71957
  key: "start_at_tab",
71943
71958
  title: "Start at tab",
71944
71959
  shortDescription: `Checks that statements start at tabstops.`,
71945
- extendedInformation: `Reports max 100 issues per file
71960
+ extendedInformation: `Reports max 100 issues per file
71946
71961
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
71947
71962
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
71948
71963
  badExample: ` WRITE a.`,
@@ -72119,12 +72134,12 @@ class StrictSQL extends _abap_rule_1.ABAPRule {
72119
72134
  key: "strict_sql",
72120
72135
  title: "Strict SQL",
72121
72136
  shortDescription: `Strict SQL`,
72122
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
72123
-
72124
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
72125
-
72126
- Also see separate rule sql_escape_host_variables
72127
-
72137
+ extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
72138
+
72139
+ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
72140
+
72141
+ Also see separate rule sql_escape_host_variables
72142
+
72128
72143
  Activates from v750 and up`,
72129
72144
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix],
72130
72145
  badExample: `SELECT * FROM ztabl INTO TABLE @rt_content WHERE type = @iv_type ORDER BY PRIMARY KEY.`,
@@ -72378,11 +72393,11 @@ class SyModification extends _abap_rule_1.ABAPRule {
72378
72393
  key: "sy_modification",
72379
72394
  title: "Modification of SY fields",
72380
72395
  shortDescription: `Finds modification of sy fields`,
72381
- extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
72382
-
72396
+ extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
72397
+
72383
72398
  Changes to SY-TVAR* fields are not reported`,
72384
72399
  tags: [_irule_1.RuleTag.SingleFile],
72385
- badExample: `sy-uname = 2.
72400
+ badExample: `sy-uname = 2.
72386
72401
  sy = sy.`,
72387
72402
  };
72388
72403
  }
@@ -72444,8 +72459,8 @@ class TABLEnhancementCategory {
72444
72459
  key: "tabl_enhancement_category",
72445
72460
  title: "TABL enhancement category must be set",
72446
72461
  shortDescription: `Checks that tables do not have the enhancement category 'not classified'.`,
72447
- extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
72448
-
72462
+ extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
72463
+
72449
72464
  You may use standard report RS_DDIC_CLASSIFICATION_FINAL for adjustment.`,
72450
72465
  tags: [],
72451
72466
  };
@@ -72510,8 +72525,8 @@ class TablesDeclaredLocally extends _abap_rule_1.ABAPRule {
72510
72525
  shortDescription: `TABLES are always global, so declare them globally`,
72511
72526
  extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abaptables.htm`,
72512
72527
  tags: [_irule_1.RuleTag.SingleFile],
72513
- badExample: `FORM foo.
72514
- TABLES t100.
72528
+ badExample: `FORM foo.
72529
+ TABLES t100.
72515
72530
  ENDFORM.`,
72516
72531
  goodExample: `TABLES t000.`,
72517
72532
  };
@@ -72639,9 +72654,9 @@ class TypeFormParameters extends _abap_rule_1.ABAPRule {
72639
72654
  title: "Type FORM parameters",
72640
72655
  shortDescription: `Checks for untyped FORM parameters`,
72641
72656
  tags: [_irule_1.RuleTag.SingleFile],
72642
- badExample: `FORM foo USING bar.
72657
+ badExample: `FORM foo USING bar.
72643
72658
  ENDFORM.`,
72644
- goodExample: `FORM foo USING bar TYPE string.
72659
+ goodExample: `FORM foo USING bar TYPE string.
72645
72660
  ENDFORM.`,
72646
72661
  };
72647
72662
  }
@@ -73314,38 +73329,38 @@ class UnnecessaryPragma extends _abap_rule_1.ABAPRule {
73314
73329
  key: "unnecessary_pragma",
73315
73330
  title: "Unnecessary Pragma",
73316
73331
  shortDescription: `Finds pragmas which can be removed`,
73317
- extendedInformation: `* NO_HANDLER with handler
73318
-
73319
- * NEEDED without definition
73320
-
73321
- * NO_TEXT without texts
73322
-
73323
- * SUBRC_OK where sy-subrc is checked
73324
-
73332
+ extendedInformation: `* NO_HANDLER with handler
73333
+
73334
+ * NEEDED without definition
73335
+
73336
+ * NO_TEXT without texts
73337
+
73338
+ * SUBRC_OK where sy-subrc is checked
73339
+
73325
73340
  NO_HANDLER inside macros are not checked`,
73326
73341
  tags: [_irule_1.RuleTag.SingleFile],
73327
- badExample: `TRY.
73328
- ...
73329
- CATCH zcx_abapgit_exception ##NO_HANDLER.
73330
- RETURN. " it has a handler
73331
- ENDTRY.
73332
- MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
73333
- SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
73334
- IF sy-subrc <> 0.
73342
+ badExample: `TRY.
73343
+ ...
73344
+ CATCH zcx_abapgit_exception ##NO_HANDLER.
73345
+ RETURN. " it has a handler
73346
+ ENDTRY.
73347
+ MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
73348
+ SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
73349
+ IF sy-subrc <> 0.
73335
73350
  ENDIF.`,
73336
- goodExample: `TRY.
73337
- ...
73338
- CATCH zcx_abapgit_exception.
73339
- RETURN.
73340
- ENDTRY.
73341
- MESSAGE w125(zbar) WITH c_foo INTO message.
73342
- SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
73343
- IF sy-subrc <> 0.
73344
- ENDIF.
73345
-
73346
- DATA: BEGIN OF blah ##NEEDED,
73347
- test1 TYPE string,
73348
- test2 TYPE string,
73351
+ goodExample: `TRY.
73352
+ ...
73353
+ CATCH zcx_abapgit_exception.
73354
+ RETURN.
73355
+ ENDTRY.
73356
+ MESSAGE w125(zbar) WITH c_foo INTO message.
73357
+ SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
73358
+ IF sy-subrc <> 0.
73359
+ ENDIF.
73360
+
73361
+ DATA: BEGIN OF blah ##NEEDED,
73362
+ test1 TYPE string,
73363
+ test2 TYPE string,
73349
73364
  END OF blah.`,
73350
73365
  };
73351
73366
  }
@@ -73512,18 +73527,18 @@ class UnnecessaryReturn extends _abap_rule_1.ABAPRule {
73512
73527
  shortDescription: `Finds unnecessary RETURN statements`,
73513
73528
  extendedInformation: `Finds unnecessary RETURN statements`,
73514
73529
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
73515
- badExample: `FORM hello1.
73516
- WRITE 'world'.
73517
- RETURN.
73518
- ENDFORM.
73519
-
73520
- FORM foo.
73521
- IF 1 = 2.
73522
- RETURN.
73523
- ENDIF.
73530
+ badExample: `FORM hello1.
73531
+ WRITE 'world'.
73532
+ RETURN.
73533
+ ENDFORM.
73534
+
73535
+ FORM foo.
73536
+ IF 1 = 2.
73537
+ RETURN.
73538
+ ENDIF.
73524
73539
  ENDFORM.`,
73525
- goodExample: `FORM hello2.
73526
- WRITE 'world'.
73540
+ goodExample: `FORM hello2.
73541
+ WRITE 'world'.
73527
73542
  ENDFORM.`,
73528
73543
  };
73529
73544
  }
@@ -73874,13 +73889,13 @@ class UnusedMacros {
73874
73889
  title: "Unused macros",
73875
73890
  shortDescription: `Checks for unused macro definitions definitions`,
73876
73891
  tags: [_irule_1.RuleTag.Quickfix],
73877
- badExample: `DEFINE foobar1.
73878
- WRITE 'hello'.
73892
+ badExample: `DEFINE foobar1.
73893
+ WRITE 'hello'.
73879
73894
  END-OF-DEFINITION.`,
73880
- goodExample: `DEFINE foobar2.
73881
- WRITE 'hello'.
73882
- END-OF-DEFINITION.
73883
-
73895
+ goodExample: `DEFINE foobar2.
73896
+ WRITE 'hello'.
73897
+ END-OF-DEFINITION.
73898
+
73884
73899
  foobar2.`,
73885
73900
  };
73886
73901
  }
@@ -73992,18 +74007,18 @@ class UnusedMethods {
73992
74007
  key: "unused_methods",
73993
74008
  title: "Unused methods",
73994
74009
  shortDescription: `Checks for unused methods`,
73995
- extendedInformation: `Checks private and protected methods.
73996
-
73997
- Unused methods are not reported if the object contains parser or syntax errors.
73998
- Quick fixes only appears for private methods or projected methods where the class doesnt have any subclasses.
73999
-
74000
- Skips:
74001
- * methods FOR TESTING
74002
- * methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
74003
- * class_constructor + constructor methods
74004
- * event handlers
74005
- * methods that are redefined
74006
- * INCLUDEs
74010
+ extendedInformation: `Checks private and protected methods.
74011
+
74012
+ Unused methods are not reported if the object contains parser or syntax errors.
74013
+ Quick fixes only appears for private methods or projected methods where the class doesnt have any subclasses.
74014
+
74015
+ Skips:
74016
+ * methods FOR TESTING
74017
+ * methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
74018
+ * class_constructor + constructor methods
74019
+ * event handlers
74020
+ * methods that are redefined
74021
+ * INCLUDEs
74007
74022
  `,
74008
74023
  tags: [_irule_1.RuleTag.Quickfix],
74009
74024
  pragma: "##CALLED",
@@ -74479,23 +74494,23 @@ class UnusedVariables {
74479
74494
  key: "unused_variables",
74480
74495
  title: "Unused variables",
74481
74496
  shortDescription: `Checks for unused variables and constants`,
74482
- extendedInformation: `Skips event parameters.
74483
-
74484
- Note that this currently does not work if the source code uses macros.
74485
-
74486
- Unused variables are not reported if the object contains parser or syntax errors.
74487
-
74497
+ extendedInformation: `Skips event parameters.
74498
+
74499
+ Note that this currently does not work if the source code uses macros.
74500
+
74501
+ Unused variables are not reported if the object contains parser or syntax errors.
74502
+
74488
74503
  Errors found in INCLUDES are reported for the main program.`,
74489
74504
  tags: [_irule_1.RuleTag.Quickfix],
74490
74505
  pragma: "##NEEDED",
74491
74506
  pseudoComment: "EC NEEDED",
74492
- badExample: `DATA: BEGIN OF blah1,
74493
- test TYPE string,
74494
- test2 TYPE string,
74507
+ badExample: `DATA: BEGIN OF blah1,
74508
+ test TYPE string,
74509
+ test2 TYPE string,
74495
74510
  END OF blah1.`,
74496
- goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
74497
- test TYPE string,
74498
- test2 TYPE string,
74511
+ goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
74512
+ test TYPE string,
74513
+ test2 TYPE string,
74499
74514
  END OF blah2.`,
74500
74515
  };
74501
74516
  }
@@ -74714,15 +74729,15 @@ class UseBoolExpression extends _abap_rule_1.ABAPRule {
74714
74729
  shortDescription: `Use boolean expression, xsdbool from 740sp08 and up, boolc from 702 and up`,
74715
74730
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
74716
74731
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
74717
- badExample: `IF line IS INITIAL.
74718
- has_entries = abap_false.
74719
- ELSE.
74720
- has_entries = abap_true.
74721
- ENDIF.
74722
-
74732
+ badExample: `IF line IS INITIAL.
74733
+ has_entries = abap_false.
74734
+ ELSE.
74735
+ has_entries = abap_true.
74736
+ ENDIF.
74737
+
74723
74738
  DATA(fsdf) = COND #( WHEN foo <> bar THEN abap_true ELSE abap_false ).`,
74724
- goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
74725
-
74739
+ goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
74740
+
74726
74741
  DATA(fsdf) = xsdbool( foo <> bar ).`,
74727
74742
  };
74728
74743
  }
@@ -74840,15 +74855,15 @@ class UseClassBasedExceptions extends _abap_rule_1.ABAPRule {
74840
74855
  shortDescription: `Use class based exceptions, checks interface and class definitions`,
74841
74856
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-class-based-exceptions`,
74842
74857
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
74843
- badExample: `INTERFACE lif.
74844
- METHODS load_data
74845
- EXCEPTIONS
74846
- invalid_parameter.
74858
+ badExample: `INTERFACE lif.
74859
+ METHODS load_data
74860
+ EXCEPTIONS
74861
+ invalid_parameter.
74847
74862
  ENDINTERFACE.`,
74848
- goodExample: `INTERFACE lif.
74849
- METHODS load_data
74850
- RAISING
74851
- cx_something.
74863
+ goodExample: `INTERFACE lif.
74864
+ METHODS load_data
74865
+ RAISING
74866
+ cx_something.
74852
74867
  ENDINTERFACE.`,
74853
74868
  };
74854
74869
  }
@@ -74908,15 +74923,15 @@ class UseLineExists extends _abap_rule_1.ABAPRule {
74908
74923
  key: "use_line_exists",
74909
74924
  title: "Use line_exists",
74910
74925
  shortDescription: `Use line_exists, from 740sp02 and up`,
74911
- extendedInformation: `
74912
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
74913
-
74926
+ extendedInformation: `
74927
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
74928
+
74914
74929
  Not reported if the READ TABLE statement contains BINARY SEARCH.`,
74915
74930
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
74916
- badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
74917
- IF sy-subrc = 0.
74931
+ badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
74932
+ IF sy-subrc = 0.
74918
74933
  ENDIF.`,
74919
- goodExample: `IF line_exists( my_table[ key = 'A' ] ).
74934
+ goodExample: `IF line_exists( my_table[ key = 'A' ] ).
74920
74935
  ENDIF.`,
74921
74936
  };
74922
74937
  }
@@ -75026,10 +75041,10 @@ class UseNew extends _abap_rule_1.ABAPRule {
75026
75041
  key: "use_new",
75027
75042
  title: "Use NEW",
75028
75043
  shortDescription: `Checks for deprecated CREATE OBJECT statements.`,
75029
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
75030
-
75031
- If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
75032
-
75044
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
75045
+
75046
+ If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
75047
+
75033
75048
  Applicable from v740sp02 and up`,
75034
75049
  badExample: `CREATE OBJECT ref.`,
75035
75050
  goodExample: `ref = NEW #( ).`,
@@ -75127,13 +75142,13 @@ class WhenOthersLast extends _abap_rule_1.ABAPRule {
75127
75142
  title: "WHEN OTHERS last",
75128
75143
  shortDescription: `Checks that WHEN OTHERS is placed the last within a CASE statement.`,
75129
75144
  tags: [_irule_1.RuleTag.SingleFile],
75130
- badExample: `CASE bar.
75131
- WHEN OTHERS.
75132
- WHEN 2.
75145
+ badExample: `CASE bar.
75146
+ WHEN OTHERS.
75147
+ WHEN 2.
75133
75148
  ENDCASE.`,
75134
- goodExample: `CASE bar.
75135
- WHEN 2.
75136
- WHEN OTHERS.
75149
+ goodExample: `CASE bar.
75150
+ WHEN 2.
75151
+ WHEN OTHERS.
75137
75152
  ENDCASE.`,
75138
75153
  };
75139
75154
  }