@abaplint/cli 2.110.4 → 2.110.6

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 +809 -806
  4. package/package.json +63 -63
package/build/cli.js CHANGED
@@ -7994,6 +7994,7 @@ exports.SQLCompare = void 0;
7994
7994
  const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
7995
7995
  const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
7996
7996
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
7997
+ const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
7997
7998
  class SQLCompare extends combi_1.Expression {
7998
7999
  getRunnable() {
7999
8000
  const subSelect = (0, combi_1.seq)("(", _1.Select, ")");
@@ -8003,7 +8004,9 @@ class SQLCompare extends combi_1.Expression {
8003
8004
  const source = new _1.SQLSource();
8004
8005
  const sub = (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.altPrio)("ALL", "ANY", "SOME")), subSelect);
8005
8006
  const arith = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.plusPrio)((0, combi_1.seq)((0, combi_1.altPrio)("+", "-", "*", "/"), _1.SQLFieldName)));
8006
- const rett = (0, combi_1.seq)((0, combi_1.altPrio)(_1.SQLFunction, (0, combi_1.seq)(_1.SQLFieldName, (0, combi_1.optPrio)(arith))), (0, combi_1.altPrio)((0, combi_1.seq)(_1.SQLCompareOperator, (0, combi_1.altPrio)(sub, source)), (0, combi_1.seq)((0, combi_1.optPrio)("NOT"), (0, combi_1.altPrio)(_1.SQLIn, like, between)), nul));
8007
+ const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeftW), _1.Source, (0, combi_1.tok)(tokens_1.WParenRightW));
8008
+ const at = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), (0, combi_1.altPrio)(_1.SimpleSource3, paren)));
8009
+ const rett = (0, combi_1.seq)((0, combi_1.altPrio)(_1.SQLFunction, (0, combi_1.seq)(_1.SQLFieldName, (0, combi_1.optPrio)(arith)), at), (0, combi_1.altPrio)((0, combi_1.seq)(_1.SQLCompareOperator, (0, combi_1.altPrio)(sub, source)), (0, combi_1.seq)((0, combi_1.optPrio)("NOT"), (0, combi_1.altPrio)(_1.SQLIn, like, between)), nul));
8007
8010
  const exists = (0, combi_1.seq)("EXISTS", subSelect);
8008
8011
  return (0, combi_1.altPrio)(exists, _1.Dynamic, rett);
8009
8012
  }
@@ -9276,7 +9279,7 @@ class TypeTable extends combi_1.Expression {
9276
9279
  const normal1 = (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.alt)("STANDARD", "HASHED", "INDEX", "SORTED", "ANY")), "TABLE OF", (0, combi_1.optPrio)("REF TO"), _1.TypeName);
9277
9280
  const likeType = (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.alt)("STANDARD", "HASHED", "INDEX", "SORTED", "ANY")), "TABLE OF", (0, combi_1.optPrio)("REF TO"), (0, combi_1.opt)(field_chain_1.FieldChain), (0, combi_1.opt)((0, combi_1.per)(header, initial, (0, combi_1.plusPrio)(type_table_key_1.TypeTableKey))));
9278
9281
  const rangeType = (0, combi_1.seq)("RANGE OF", _1.TypeName, (0, combi_1.optPrio)(header), (0, combi_1.optPrio)(initial));
9279
- const rangeLike = (0, combi_1.seq)("RANGE OF", _1.SimpleFieldChain, (0, combi_1.optPrio)(header), (0, combi_1.optPrio)(initial));
9282
+ const rangeLike = (0, combi_1.seq)("RANGE OF", field_chain_1.FieldChain, (0, combi_1.optPrio)(header), (0, combi_1.optPrio)(initial));
9280
9283
  // a maximum of 15 secondary table keys can be defined
9281
9284
  // "WITH" is not allowed as a field name in keys
9282
9285
  const typetable = (0, combi_1.alt)(generic, (0, combi_1.seq)(normal1, (0, combi_1.alt)((0, combi_1.opt)((0, combi_1.per)(header, initial, (0, combi_1.plusPrio)(type_table_key_1.TypeTableKey))), (0, combi_1.seq)((0, combi_1.plus)(type_table_key_1.TypeTableKey), (0, combi_1.optPrio)(initial)))));
@@ -23287,7 +23290,7 @@ class BasicTypes {
23287
23290
  return new Types.TableType(structure, options, name);
23288
23291
  }
23289
23292
  else if (text.startsWith("LIKE RANGE OF ")) {
23290
- const sub = node.findFirstExpression(Expressions.SimpleFieldChain);
23293
+ const sub = node.findFirstExpression(Expressions.FieldChain);
23291
23294
  found = this.resolveLikeName(sub);
23292
23295
  if (found === undefined) {
23293
23296
  return new Types.UnknownType("LIKE RANGE OF, could not resolve type");
@@ -34468,13 +34471,13 @@ class FlowGraph {
34468
34471
  this.label = label;
34469
34472
  }
34470
34473
  toDigraph() {
34471
- return `digraph G {
34472
- labelloc="t";
34473
- label="${this.label}";
34474
- graph [fontname = "helvetica"];
34475
- node [fontname = "helvetica", shape="box"];
34476
- edge [fontname = "helvetica"];
34477
- ${this.toTextEdges()}
34474
+ return `digraph G {
34475
+ labelloc="t";
34476
+ label="${this.label}";
34477
+ graph [fontname = "helvetica"];
34478
+ node [fontname = "helvetica", shape="box"];
34479
+ edge [fontname = "helvetica"];
34480
+ ${this.toTextEdges()}
34478
34481
  }`;
34479
34482
  }
34480
34483
  listSources(node) {
@@ -42573,13 +42576,13 @@ class Help {
42573
42576
  /////////////////////////////////////////////////
42574
42577
  static dumpABAP(file, reg, textDocument, position) {
42575
42578
  let content = "";
42576
- content = `
42577
- <a href="#_tokens" rel="no-refresh">Tokens</a> |
42578
- <a href="#_statements" rel="no-refresh">Statements</a> |
42579
- <a href="#_structure" rel="no-refresh">Structure</a> |
42580
- <a href="#_files" rel="no-refresh">Files</a> |
42581
- <a href="#_info" rel="no-refresh">Info Dump</a>
42582
- <hr>
42579
+ content = `
42580
+ <a href="#_tokens" rel="no-refresh">Tokens</a> |
42581
+ <a href="#_statements" rel="no-refresh">Statements</a> |
42582
+ <a href="#_structure" rel="no-refresh">Structure</a> |
42583
+ <a href="#_files" rel="no-refresh">Files</a> |
42584
+ <a href="#_info" rel="no-refresh">Info Dump</a>
42585
+ <hr>
42583
42586
  ` +
42584
42587
  "<tt>" + textDocument.uri + " (" +
42585
42588
  (position.line + 1) + ", " +
@@ -51781,7 +51784,7 @@ class Registry {
51781
51784
  }
51782
51785
  static abaplintVersion() {
51783
51786
  // magic, see build script "version.sh"
51784
- return "2.110.4";
51787
+ return "2.110.6";
51785
51788
  }
51786
51789
  getDDICReferences() {
51787
51790
  return this.ddicReferences;
@@ -52100,10 +52103,10 @@ class SevenBitAscii {
52100
52103
  key: "7bit_ascii",
52101
52104
  title: "Check for 7bit ascii",
52102
52105
  shortDescription: `Only allow characters from the 7bit ASCII set.`,
52103
- extendedInformation: `https://docs.abapopenchecks.org/checks/05/
52104
-
52105
- https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
52106
-
52106
+ extendedInformation: `https://docs.abapopenchecks.org/checks/05/
52107
+
52108
+ https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
52109
+
52107
52110
  Checkes files with extensions ".abap" and ".asddls"`,
52108
52111
  tags: [_irule_1.RuleTag.SingleFile],
52109
52112
  badExample: `WRITE '뽑'.`,
@@ -52309,10 +52312,10 @@ class Abapdoc extends _abap_rule_1.ABAPRule {
52309
52312
  key: "abapdoc",
52310
52313
  title: "Check abapdoc",
52311
52314
  shortDescription: `Various checks regarding abapdoc.`,
52312
- extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
52313
-
52314
- Plus class and interface definitions.
52315
-
52315
+ extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
52316
+
52317
+ Plus class and interface definitions.
52318
+
52316
52319
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#abap-doc-only-for-public-apis`,
52317
52320
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
52318
52321
  };
@@ -52450,49 +52453,49 @@ class AlignParameters extends _abap_rule_1.ABAPRule {
52450
52453
  key: "align_parameters",
52451
52454
  title: "Align Parameters",
52452
52455
  shortDescription: `Checks for vertially aligned parameters`,
52453
- extendedInformation: `Checks:
52454
- * function module calls
52455
- * method calls
52456
- * VALUE constructors
52457
- * NEW constructors
52458
- * RAISE EXCEPTION statements
52459
- * CREATE OBJECT statements
52460
- * RAISE EVENT statements
52461
-
52462
- https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
52463
-
52464
- Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
52465
-
52466
- If parameters are on the same row, no issues are reported, see
52456
+ extendedInformation: `Checks:
52457
+ * function module calls
52458
+ * method calls
52459
+ * VALUE constructors
52460
+ * NEW constructors
52461
+ * RAISE EXCEPTION statements
52462
+ * CREATE OBJECT statements
52463
+ * RAISE EVENT statements
52464
+
52465
+ https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
52466
+
52467
+ Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
52468
+
52469
+ If parameters are on the same row, no issues are reported, see
52467
52470
  https://rules.abaplint.org/max_one_method_parameter_per_line/ for splitting parameters to lines`,
52468
52471
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
52469
- badExample: `CALL FUNCTION 'FOOBAR'
52470
- EXPORTING
52471
- foo = 2
52472
- parameter = 3.
52473
-
52474
- foobar( moo = 1
52475
- param = 1 ).
52476
-
52477
- foo = VALUE #(
52478
- foo = bar
52472
+ badExample: `CALL FUNCTION 'FOOBAR'
52473
+ EXPORTING
52474
+ foo = 2
52475
+ parameter = 3.
52476
+
52477
+ foobar( moo = 1
52478
+ param = 1 ).
52479
+
52480
+ foo = VALUE #(
52481
+ foo = bar
52479
52482
  moo = 2 ).`,
52480
- goodExample: `CALL FUNCTION 'FOOBAR'
52481
- EXPORTING
52482
- foo = 2
52483
- parameter = 3.
52484
-
52485
- foobar( moo = 1
52486
- param = 1 ).
52487
-
52488
- foo = VALUE #(
52489
- foo = bar
52490
- moo = 2 ).
52491
-
52492
- DATA(sdf) = VALUE type(
52493
- common_val = 2
52494
- another_common = 5
52495
- ( row_value = 4
52483
+ goodExample: `CALL FUNCTION 'FOOBAR'
52484
+ EXPORTING
52485
+ foo = 2
52486
+ parameter = 3.
52487
+
52488
+ foobar( moo = 1
52489
+ param = 1 ).
52490
+
52491
+ foo = VALUE #(
52492
+ foo = bar
52493
+ moo = 2 ).
52494
+
52495
+ DATA(sdf) = VALUE type(
52496
+ common_val = 2
52497
+ another_common = 5
52498
+ ( row_value = 4
52496
52499
  value_foo = 5 ) ).`,
52497
52500
  };
52498
52501
  }
@@ -52926,37 +52929,37 @@ class AlignTypeExpressions extends _abap_rule_1.ABAPRule {
52926
52929
  key: "align_type_expressions",
52927
52930
  title: "Align TYPE expressions",
52928
52931
  shortDescription: `Align TYPE expressions in statements`,
52929
- extendedInformation: `
52930
- Currently works for METHODS + BEGIN OF
52931
-
52932
- If BEGIN OF has an INCLUDE TYPE its ignored
52933
-
52934
- Also note that clean ABAP does not recommend aligning TYPE clauses:
52932
+ extendedInformation: `
52933
+ Currently works for METHODS + BEGIN OF
52934
+
52935
+ If BEGIN OF has an INCLUDE TYPE its ignored
52936
+
52937
+ Also note that clean ABAP does not recommend aligning TYPE clauses:
52935
52938
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-align-type-clauses`,
52936
52939
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix],
52937
- badExample: `
52938
- TYPES: BEGIN OF foo,
52939
- bar TYPE i,
52940
- foobar TYPE i,
52941
- END OF foo.
52942
-
52943
- INTERFACE lif.
52944
- METHODS bar
52945
- IMPORTING
52946
- foo TYPE i
52947
- foobar TYPE i.
52940
+ badExample: `
52941
+ TYPES: BEGIN OF foo,
52942
+ bar TYPE i,
52943
+ foobar TYPE i,
52944
+ END OF foo.
52945
+
52946
+ INTERFACE lif.
52947
+ METHODS bar
52948
+ IMPORTING
52949
+ foo TYPE i
52950
+ foobar TYPE i.
52948
52951
  ENDINTERFACE.`,
52949
- goodExample: `
52950
- TYPES: BEGIN OF foo,
52951
- bar TYPE i,
52952
- foobar TYPE i,
52953
- END OF foo.
52954
-
52955
- INTERFACE lif.
52956
- METHODS bar
52957
- IMPORTING
52958
- foo TYPE i
52959
- foobar TYPE i.
52952
+ goodExample: `
52953
+ TYPES: BEGIN OF foo,
52954
+ bar TYPE i,
52955
+ foobar TYPE i,
52956
+ END OF foo.
52957
+
52958
+ INTERFACE lif.
52959
+ METHODS bar
52960
+ IMPORTING
52961
+ foo TYPE i
52962
+ foobar TYPE i.
52960
52963
  ENDINTERFACE.`,
52961
52964
  };
52962
52965
  }
@@ -53235,15 +53238,15 @@ class AmbiguousStatement extends _abap_rule_1.ABAPRule {
53235
53238
  return {
53236
53239
  key: "ambiguous_statement",
53237
53240
  title: "Check for ambigious statements",
53238
- shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
53239
- Add "TABLE" keyword or "@" for escaping SQL variables
53240
-
53241
+ shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
53242
+ Add "TABLE" keyword or "@" for escaping SQL variables
53243
+
53241
53244
  Only works if the target version is 740sp05 or above`,
53242
53245
  tags: [_irule_1.RuleTag.SingleFile],
53243
- badExample: `DELETE foo FROM bar.
53246
+ badExample: `DELETE foo FROM bar.
53244
53247
  MODIFY foo FROM bar.`,
53245
- goodExample: `DELETE foo FROM @bar.
53246
- MODIFY TABLE foo FROM bar.
53248
+ goodExample: `DELETE foo FROM @bar.
53249
+ MODIFY TABLE foo FROM bar.
53247
53250
  MODIFY zfoo FROM @wa.`,
53248
53251
  };
53249
53252
  }
@@ -53348,16 +53351,16 @@ class AvoidUse extends _abap_rule_1.ABAPRule {
53348
53351
  key: "avoid_use",
53349
53352
  title: "Avoid use of certain statements",
53350
53353
  shortDescription: `Detects usage of certain statements.`,
53351
- extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
53352
-
53353
- Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
53354
-
53355
- STATICS: use CLASS-DATA instead
53356
-
53357
- DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
53358
-
53359
- TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
53360
-
53354
+ extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
53355
+
53356
+ Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
53357
+
53358
+ STATICS: use CLASS-DATA instead
53359
+
53360
+ DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
53361
+
53362
+ TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
53363
+
53361
53364
  BREAK points`,
53362
53365
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
53363
53366
  };
@@ -53489,11 +53492,11 @@ class BeginEndNames extends _abap_rule_1.ABAPRule {
53489
53492
  title: "Check BEGIN END names",
53490
53493
  shortDescription: `Check BEGIN OF and END OF names match, plus there must be statements between BEGIN and END`,
53491
53494
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
53492
- badExample: `DATA: BEGIN OF stru,
53493
- field TYPE i,
53495
+ badExample: `DATA: BEGIN OF stru,
53496
+ field TYPE i,
53494
53497
  END OF structure_not_the_same.`,
53495
- goodExample: `DATA: BEGIN OF stru,
53496
- field TYPE i,
53498
+ goodExample: `DATA: BEGIN OF stru,
53499
+ field TYPE i,
53497
53500
  END OF stru.`,
53498
53501
  };
53499
53502
  }
@@ -53590,20 +53593,20 @@ class BeginSingleInclude extends _abap_rule_1.ABAPRule {
53590
53593
  title: "BEGIN contains single INCLUDE",
53591
53594
  shortDescription: `Finds TYPE BEGIN with just one INCLUDE TYPE, and DATA with single INCLUDE STRUCTURE`,
53592
53595
  tags: [_irule_1.RuleTag.SingleFile],
53593
- badExample: `TYPES: BEGIN OF dummy1.
53594
- INCLUDE TYPE dselc.
53595
- TYPES: END OF dummy1.
53596
-
53597
- DATA BEGIN OF foo.
53598
- INCLUDE STRUCTURE syst.
53599
- DATA END OF foo.
53600
-
53601
- STATICS BEGIN OF bar.
53602
- INCLUDE STRUCTURE syst.
53596
+ badExample: `TYPES: BEGIN OF dummy1.
53597
+ INCLUDE TYPE dselc.
53598
+ TYPES: END OF dummy1.
53599
+
53600
+ DATA BEGIN OF foo.
53601
+ INCLUDE STRUCTURE syst.
53602
+ DATA END OF foo.
53603
+
53604
+ STATICS BEGIN OF bar.
53605
+ INCLUDE STRUCTURE syst.
53603
53606
  STATICS END OF bar.`,
53604
- goodExample: `DATA BEGIN OF foo.
53605
- DATA field TYPE i.
53606
- INCLUDE STRUCTURE dselc.
53607
+ goodExample: `DATA BEGIN OF foo.
53608
+ DATA field TYPE i.
53609
+ INCLUDE STRUCTURE dselc.
53607
53610
  DATA END OF foo.`,
53608
53611
  };
53609
53612
  }
@@ -53693,9 +53696,9 @@ class CallTransactionAuthorityCheck extends _abap_rule_1.ABAPRule {
53693
53696
  extendedInformation: `https://docs.abapopenchecks.org/checks/54/`,
53694
53697
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
53695
53698
  badExample: `CALL TRANSACTION 'FOO'.`,
53696
- goodExample: `TRY.
53697
- CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
53698
- CATCH cx_sy_authorization_error.
53699
+ goodExample: `TRY.
53700
+ CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
53701
+ CATCH cx_sy_authorization_error.
53699
53702
  ENDTRY.`,
53700
53703
  };
53701
53704
  }
@@ -53760,10 +53763,10 @@ class CDSCommentStyle {
53760
53763
  key: "cds_comment_style",
53761
53764
  title: "CDS Comment Style",
53762
53765
  shortDescription: `Check for obsolete comment style`,
53763
- extendedInformation: `Check for obsolete comment style
53764
-
53765
- Comments starting with "--" are considered obsolete
53766
-
53766
+ extendedInformation: `Check for obsolete comment style
53767
+
53768
+ Comments starting with "--" are considered obsolete
53769
+
53767
53770
  https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abencds_general_syntax_rules.htm`,
53768
53771
  tags: [_irule_1.RuleTag.SingleFile],
53769
53772
  badExample: "-- this is a comment",
@@ -53830,10 +53833,10 @@ class CDSLegacyView {
53830
53833
  title: "CDS Legacy View",
53831
53834
  shortDescription: `Identify CDS Legacy Views`,
53832
53835
  // eslint-disable-next-line max-len
53833
- extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
53834
-
53835
- https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
53836
-
53836
+ extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
53837
+
53838
+ https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
53839
+
53837
53840
  v755 and up`,
53838
53841
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Upport],
53839
53842
  };
@@ -53988,10 +53991,10 @@ class ChainMainlyDeclarations extends _abap_rule_1.ABAPRule {
53988
53991
  key: "chain_mainly_declarations",
53989
53992
  title: "Chain mainly declarations",
53990
53993
  shortDescription: `Chain mainly declarations, allows chaining for the configured statements, reports errors for other statements.`,
53991
- extendedInformation: `
53992
- https://docs.abapopenchecks.org/checks/23/
53993
-
53994
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
53994
+ extendedInformation: `
53995
+ https://docs.abapopenchecks.org/checks/23/
53996
+
53997
+ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
53995
53998
  `,
53996
53999
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
53997
54000
  badExample: `CALL METHOD: bar.`,
@@ -54167,17 +54170,17 @@ class ChangeIfToCase extends _abap_rule_1.ABAPRule {
54167
54170
  title: "Change IF to CASE",
54168
54171
  shortDescription: `Finds IF constructs that can be changed to CASE`,
54169
54172
  // eslint-disable-next-line max-len
54170
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
54171
-
54173
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
54174
+
54172
54175
  If the first comparison is a boolean compare, no issue is reported.`,
54173
54176
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
54174
- badExample: `IF l_fcat-fieldname EQ 'FOO'.
54175
- ELSEIF l_fcat-fieldname = 'BAR'
54176
- OR l_fcat-fieldname = 'MOO'.
54177
+ badExample: `IF l_fcat-fieldname EQ 'FOO'.
54178
+ ELSEIF l_fcat-fieldname = 'BAR'
54179
+ OR l_fcat-fieldname = 'MOO'.
54177
54180
  ENDIF.`,
54178
- goodExample: `CASE l_fcat-fieldname.
54179
- WHEN 'FOO'.
54180
- WHEN 'BAR' OR 'MOO'.
54181
+ goodExample: `CASE l_fcat-fieldname.
54182
+ WHEN 'FOO'.
54183
+ WHEN 'BAR' OR 'MOO'.
54181
54184
  ENDCASE.`,
54182
54185
  };
54183
54186
  }
@@ -54314,8 +54317,8 @@ class CheckAbstract extends _abap_rule_1.ABAPRule {
54314
54317
  return {
54315
54318
  key: "check_abstract",
54316
54319
  title: "Check abstract methods and classes",
54317
- shortDescription: `Checks abstract methods and classes:
54318
- - class defined as abstract and final,
54320
+ shortDescription: `Checks abstract methods and classes:
54321
+ - class defined as abstract and final,
54319
54322
  - non-abstract class contains abstract methods`,
54320
54323
  extendedInformation: `If a class defines only constants, use an interface instead`,
54321
54324
  tags: [_irule_1.RuleTag.SingleFile],
@@ -54396,11 +54399,11 @@ class CheckComments extends _abap_rule_1.ABAPRule {
54396
54399
  return {
54397
54400
  key: "check_comments",
54398
54401
  title: "Check Comments",
54399
- shortDescription: `
54402
+ shortDescription: `
54400
54403
  Various checks for comment usage.`,
54401
- extendedInformation: `
54402
- Detects end of line comments. Comments starting with "#EC" or "##" are ignored
54403
-
54404
+ extendedInformation: `
54405
+ Detects end of line comments. Comments starting with "#EC" or "##" are ignored
54406
+
54404
54407
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#put-comments-before-the-statement-they-relate-to`,
54405
54408
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
54406
54409
  badExample: `WRITE 2. " descriptive comment`,
@@ -54562,9 +54565,9 @@ class CheckInclude {
54562
54565
  key: "check_include",
54563
54566
  title: "Check INCLUDEs",
54564
54567
  shortDescription: `Checks INCLUDE statements`,
54565
- extendedInformation: `
54566
- * Reports unused includes
54567
- * Errors if the includes are not found
54568
+ extendedInformation: `
54569
+ * Reports unused includes
54570
+ * Errors if the includes are not found
54568
54571
  * Error if including a main program`,
54569
54572
  tags: [_irule_1.RuleTag.Syntax],
54570
54573
  };
@@ -54640,14 +54643,14 @@ class CheckSubrc extends _abap_rule_1.ABAPRule {
54640
54643
  key: "check_subrc",
54641
54644
  title: "Check sy-subrc",
54642
54645
  shortDescription: `Check sy-subrc`,
54643
- extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
54644
-
54645
- If sy-dbcnt is checked after database statements, it is considered okay.
54646
-
54647
- "SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
54648
-
54649
- If IS ASSIGNED is checked after assigning, it is considered okay.
54650
-
54646
+ extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
54647
+
54648
+ If sy-dbcnt is checked after database statements, it is considered okay.
54649
+
54650
+ "SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
54651
+
54652
+ If IS ASSIGNED is checked after assigning, it is considered okay.
54653
+
54651
54654
  FIND statement with MATCH COUNT is considered okay if subrc is not checked`,
54652
54655
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
54653
54656
  pseudoComment: "EC CI_SUBRC",
@@ -55216,17 +55219,17 @@ class ClassicExceptionsOverlap extends _abap_rule_1.ABAPRule {
55216
55219
  shortDescription: `Find overlapping classic exceptions`,
55217
55220
  extendedInformation: `When debugging its typically good to know exactly which exception is caught`,
55218
55221
  tags: [_irule_1.RuleTag.SingleFile],
55219
- badExample: `CALL FUNCTION 'SOMETHING'
55220
- EXCEPTIONS
55221
- system_failure = 1 MESSAGE lv_message
55222
- communication_failure = 1 MESSAGE lv_message
55223
- resource_failure = 1
55222
+ badExample: `CALL FUNCTION 'SOMETHING'
55223
+ EXCEPTIONS
55224
+ system_failure = 1 MESSAGE lv_message
55225
+ communication_failure = 1 MESSAGE lv_message
55226
+ resource_failure = 1
55224
55227
  OTHERS = 1.`,
55225
- goodExample: `CALL FUNCTION 'SOMETHING'
55226
- EXCEPTIONS
55227
- system_failure = 1 MESSAGE lv_message
55228
- communication_failure = 2 MESSAGE lv_message
55229
- resource_failure = 3
55228
+ goodExample: `CALL FUNCTION 'SOMETHING'
55229
+ EXCEPTIONS
55230
+ system_failure = 1 MESSAGE lv_message
55231
+ communication_failure = 2 MESSAGE lv_message
55232
+ resource_failure = 3
55230
55233
  OTHERS = 4.`,
55231
55234
  };
55232
55235
  }
@@ -55472,7 +55475,7 @@ class CommentedCode extends _abap_rule_1.ABAPRule {
55472
55475
  key: "commented_code",
55473
55476
  title: "Find commented code",
55474
55477
  shortDescription: `Detects usage of commented out code.`,
55475
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it
55478
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it
55476
55479
  https://docs.abapopenchecks.org/checks/14/`,
55477
55480
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
55478
55481
  badExample: `* WRITE 'hello world'.`,
@@ -55705,10 +55708,10 @@ class ConstructorVisibilityPublic {
55705
55708
  key: "constructor_visibility_public",
55706
55709
  title: "Check constructor visibility is public",
55707
55710
  shortDescription: `Constructor must be placed in the public section, even if the class is not CREATE PUBLIC.`,
55708
- extendedInformation: `
55709
- This only applies to global classes.
55710
-
55711
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
55711
+ extendedInformation: `
55712
+ This only applies to global classes.
55713
+
55714
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
55712
55715
  https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abeninstance_constructor_guidl.htm`,
55713
55716
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
55714
55717
  };
@@ -55783,8 +55786,8 @@ class ContainsTab extends _abap_rule_1.ABAPRule {
55783
55786
  key: "contains_tab",
55784
55787
  title: "Code contains tab",
55785
55788
  shortDescription: `Checks for usage of tabs (enable to enforce spaces)`,
55786
- extendedInformation: `
55787
- https://docs.abapopenchecks.org/checks/09/
55789
+ extendedInformation: `
55790
+ https://docs.abapopenchecks.org/checks/09/
55788
55791
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
55789
55792
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
55790
55793
  badExample: `\tWRITE 'hello world'.`,
@@ -55871,10 +55874,10 @@ class CyclicOO {
55871
55874
  key: "cyclic_oo",
55872
55875
  title: "Cyclic OO",
55873
55876
  shortDescription: `Finds cyclic OO references`,
55874
- extendedInformation: `Runs for global INTF + CLAS objects
55875
-
55876
- Objects must be without syntax errors for this rule to take effect
55877
-
55877
+ extendedInformation: `Runs for global INTF + CLAS objects
55878
+
55879
+ Objects must be without syntax errors for this rule to take effect
55880
+
55878
55881
  References in testclass includes are ignored`,
55879
55882
  };
55880
55883
  }
@@ -56116,7 +56119,7 @@ class DangerousStatement extends _abap_rule_1.ABAPRule {
56116
56119
  key: "dangerous_statement",
56117
56120
  title: "Dangerous statement",
56118
56121
  shortDescription: `Detects potentially dangerous statements`,
56119
- extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
56122
+ extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
56120
56123
  dynamic SQL can potentially create SQL injection problems`,
56121
56124
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
56122
56125
  };
@@ -56320,13 +56323,13 @@ class DefinitionsTop extends _abap_rule_1.ABAPRule {
56320
56323
  shortDescription: `Checks that definitions are placed at the beginning of METHODs, FORMs and FUNCTIONs.`,
56321
56324
  extendedInformation: `https://docs.abapopenchecks.org/checks/17/`,
56322
56325
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
56323
- badExample: `FROM foo.
56324
- WRITE 'hello'.
56325
- DATA int TYPE i.
56326
+ badExample: `FROM foo.
56327
+ WRITE 'hello'.
56328
+ DATA int TYPE i.
56326
56329
  ENDFORM.`,
56327
- goodExample: `FROM foo.
56328
- DATA int TYPE i.
56329
- WRITE 'hello'.
56330
+ goodExample: `FROM foo.
56331
+ DATA int TYPE i.
56332
+ WRITE 'hello'.
56330
56333
  ENDFORM.`,
56331
56334
  };
56332
56335
  }
@@ -56862,39 +56865,39 @@ class Downport {
56862
56865
  key: "downport",
56863
56866
  title: "Downport statement",
56864
56867
  shortDescription: `Downport functionality`,
56865
- extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with
56866
- a higher level language version. If successful, various rules are applied to downport the statement.
56867
- Target downport version is always v702, thus rule is only enabled if target version is v702.
56868
-
56869
- Current rules:
56870
- * NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/
56871
- * DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/
56872
- * FIELD-SYMBOL() definitions are outlined
56873
- * CONV is outlined
56874
- * COND is outlined
56875
- * REDUCE is outlined
56876
- * SWITCH is outlined
56877
- * FILTER is outlined
56878
- * APPEND expression is outlined
56879
- * INSERT expression is outlined
56880
- * EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/
56881
- * CAST changed to ?=
56882
- * LOOP AT method_call( ) is outlined
56883
- * VALUE # with structure fields
56884
- * VALUE # with internal table lines
56885
- * Table Expressions are outlined
56886
- * SELECT INTO @DATA definitions are outlined
56887
- * Some occurrences of string template formatting option ALPHA changed to function module call
56888
- * SELECT/INSERT/MODIFY/DELETE/UPDATE "," in field list removed, "@" in source/targets removed
56889
- * PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods
56890
- * RAISE EXCEPTION ... MESSAGE
56891
- * Moving with +=, -=, /=, *=, &&= is expanded
56892
- * line_exists and line_index is downported to READ TABLE
56893
- * ENUMs, but does not nessesarily give the correct type and value
56894
- * MESSAGE with non simple source
56895
-
56896
- Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.
56897
-
56868
+ extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with
56869
+ a higher level language version. If successful, various rules are applied to downport the statement.
56870
+ Target downport version is always v702, thus rule is only enabled if target version is v702.
56871
+
56872
+ Current rules:
56873
+ * NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/
56874
+ * DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/
56875
+ * FIELD-SYMBOL() definitions are outlined
56876
+ * CONV is outlined
56877
+ * COND is outlined
56878
+ * REDUCE is outlined
56879
+ * SWITCH is outlined
56880
+ * FILTER is outlined
56881
+ * APPEND expression is outlined
56882
+ * INSERT expression is outlined
56883
+ * EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/
56884
+ * CAST changed to ?=
56885
+ * LOOP AT method_call( ) is outlined
56886
+ * VALUE # with structure fields
56887
+ * VALUE # with internal table lines
56888
+ * Table Expressions are outlined
56889
+ * SELECT INTO @DATA definitions are outlined
56890
+ * Some occurrences of string template formatting option ALPHA changed to function module call
56891
+ * SELECT/INSERT/MODIFY/DELETE/UPDATE "," in field list removed, "@" in source/targets removed
56892
+ * PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods
56893
+ * RAISE EXCEPTION ... MESSAGE
56894
+ * Moving with +=, -=, /=, *=, &&= is expanded
56895
+ * line_exists and line_index is downported to READ TABLE
56896
+ * ENUMs, but does not nessesarily give the correct type and value
56897
+ * MESSAGE with non simple source
56898
+
56899
+ Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.
56900
+
56898
56901
  Make sure to test the downported code, it might not always be completely correct.`,
56899
56902
  tags: [_irule_1.RuleTag.Downport, _irule_1.RuleTag.Quickfix],
56900
56903
  };
@@ -57472,10 +57475,10 @@ Make sure to test the downported code, it might not always be completely correct
57472
57475
  const fieldName = f.concatTokens();
57473
57476
  fieldDefinition += indentation + " " + fieldName + " TYPE " + tableName + "-" + fieldName + ",\n";
57474
57477
  }
57475
- fieldDefinition = `DATA: BEGIN OF ${name},
57478
+ fieldDefinition = `DATA: BEGIN OF ${name},
57476
57479
  ${fieldDefinition}${indentation} END OF ${name}.`;
57477
57480
  }
57478
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
57481
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
57479
57482
  ${indentation}`);
57480
57483
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
57481
57484
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -57519,12 +57522,12 @@ ${indentation}`);
57519
57522
  }
57520
57523
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
57521
57524
  const name = ((_c = inlineData.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || "error";
57522
- let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
57523
- ${fieldDefinitions}${indentation} END OF ${uniqueName}.
57524
- ${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.
57525
+ let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
57526
+ ${fieldDefinitions}${indentation} END OF ${uniqueName}.
57527
+ ${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.
57525
57528
  ${indentation}`);
57526
57529
  if (fieldDefinitions === "") {
57527
- fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.
57530
+ fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.
57528
57531
  ${indentation}`);
57529
57532
  }
57530
57533
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
@@ -57592,7 +57595,7 @@ ${indentation}`);
57592
57595
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
57593
57596
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
57594
57597
  const firstToken = high.getFirstToken();
57595
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
57598
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
57596
57599
  ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
57597
57600
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
57598
57601
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -57646,7 +57649,7 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
57646
57649
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
57647
57650
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
57648
57651
  const firstToken = high.getFirstToken();
57649
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
57652
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
57650
57653
  ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
57651
57654
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
57652
57655
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -57688,14 +57691,14 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
57688
57691
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
57689
57692
  const firstToken = high.getFirstToken();
57690
57693
  // note that the tabix restore should be done before throwing the exception
57691
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.
57692
- ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
57693
- ${indentation}${tabixBackup} = sy-tabix.
57694
- ${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.
57695
- ${indentation}sy-tabix = ${tabixBackup}.
57696
- ${indentation}IF sy-subrc <> 0.
57697
- ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
57698
- ${indentation}ENDIF.
57694
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.
57695
+ ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
57696
+ ${indentation}${tabixBackup} = sy-tabix.
57697
+ ${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.
57698
+ ${indentation}sy-tabix = ${tabixBackup}.
57699
+ ${indentation}IF sy-subrc <> 0.
57700
+ ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
57701
+ ${indentation}ENDIF.
57699
57702
  ${indentation}`);
57700
57703
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, startToken.getStart(), tableExpression.getLastToken().getEnd(), uniqueName);
57701
57704
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -57752,7 +57755,7 @@ ${indentation}`);
57752
57755
  const className = classNames[0].concatTokens();
57753
57756
  const targetName = (_b = target.findFirstExpression(Expressions.TargetField)) === null || _b === void 0 ? void 0 : _b.concatTokens();
57754
57757
  const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
57755
- const code = ` DATA ${targetName} TYPE REF TO ${className}.
57758
+ const code = ` DATA ${targetName} TYPE REF TO ${className}.
57756
57759
  ${indentation}CATCH ${className} INTO ${targetName}.`;
57757
57760
  const fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getStart(), node.getEnd(), code);
57758
57761
  return issue_1.Issue.atToken(lowFile, node.getFirstToken(), "Outline DATA", this.getMetadata().key, this.conf.severity, fix);
@@ -57914,16 +57917,16 @@ ${indentation}CATCH ${className} INTO ${targetName}.`;
57914
57917
  const uniqueName1 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
57915
57918
  const uniqueName2 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
57916
57919
  const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
57917
- let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
57918
- ${indentation}${uniqueName1}-msgid = ${id}.
57920
+ let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
57921
+ ${indentation}${uniqueName1}-msgid = ${id}.
57919
57922
  ${indentation}${uniqueName1}-msgno = ${number}.\n`;
57920
57923
  if (withs.length > 0) {
57921
- abap += `${indentation}${uniqueName1}-attr1 = 'IF_T100_DYN_MSG~MSGV1'.
57922
- ${indentation}${uniqueName1}-attr2 = 'IF_T100_DYN_MSG~MSGV2'.
57923
- ${indentation}${uniqueName1}-attr3 = 'IF_T100_DYN_MSG~MSGV3'.
57924
+ abap += `${indentation}${uniqueName1}-attr1 = 'IF_T100_DYN_MSG~MSGV1'.
57925
+ ${indentation}${uniqueName1}-attr2 = 'IF_T100_DYN_MSG~MSGV2'.
57926
+ ${indentation}${uniqueName1}-attr3 = 'IF_T100_DYN_MSG~MSGV3'.
57924
57927
  ${indentation}${uniqueName1}-attr4 = 'IF_T100_DYN_MSG~MSGV4'.\n`;
57925
57928
  }
57926
- abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
57929
+ abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
57927
57930
  ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`;
57928
57931
  if (withs.length > 0) {
57929
57932
  abap += `${indentation}${uniqueName2}->if_t100_dyn_msg~msgty = 'E'.\n`;
@@ -58035,10 +58038,10 @@ ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`
58035
58038
  let code = "";
58036
58039
  if (sourceRef.findFirstExpression(Expressions.TableExpression)) {
58037
58040
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58038
- code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).
58039
- IF sy-subrc <> 0.
58040
- RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
58041
- ENDIF.
58041
+ code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).
58042
+ IF sy-subrc <> 0.
58043
+ RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
58044
+ ENDIF.
58042
58045
  GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
58043
58046
  }
58044
58047
  else {
@@ -58127,20 +58130,20 @@ GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
58127
58130
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58128
58131
  const uniqueFS = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58129
58132
  const uniqueNameIndex = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58130
- code += ` items LIKE ${loopSourceName},
58131
- END OF ${groupTargetName}type.
58132
- DATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.
58133
- DATA ${uniqueName} LIKE LINE OF ${groupTargetName}tab.
58133
+ code += ` items LIKE ${loopSourceName},
58134
+ END OF ${groupTargetName}type.
58135
+ DATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.
58136
+ DATA ${uniqueName} LIKE LINE OF ${groupTargetName}tab.
58134
58137
  LOOP AT ${loopSourceName} ${(_l = high.findFirstExpression(Expressions.LoopTarget)) === null || _l === void 0 ? void 0 : _l.concatTokens()}.\n`;
58135
58138
  if (groupIndexName !== undefined) {
58136
58139
  code += `DATA(${uniqueNameIndex}) = sy-tabix.\n`;
58137
58140
  }
58138
- code += `READ TABLE ${groupTargetName}tab ASSIGNING FIELD-SYMBOL(<${uniqueFS}>) WITH KEY ${condition}.
58141
+ code += `READ TABLE ${groupTargetName}tab ASSIGNING FIELD-SYMBOL(<${uniqueFS}>) WITH KEY ${condition}.
58139
58142
  IF sy-subrc = 0.\n`;
58140
58143
  if (groupCountName !== undefined) {
58141
58144
  code += ` <${uniqueFS}>-${groupCountName} = <${uniqueFS}>-${groupCountName} + 1.\n`;
58142
58145
  }
58143
- code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
58146
+ code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
58144
58147
  ELSE.\n`;
58145
58148
  code += ` CLEAR ${uniqueName}.\n`;
58146
58149
  for (const c of group.findAllExpressions(Expressions.LoopGroupByComponent)) {
@@ -58161,8 +58164,8 @@ ELSE.\n`;
58161
58164
  }
58162
58165
  code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE ${uniqueName}-items.\n`;
58163
58166
  code += ` INSERT ${uniqueName} INTO TABLE ${groupTargetName}tab.\n`;
58164
- code += `ENDIF.
58165
- ENDLOOP.
58167
+ code += `ENDIF.
58168
+ ENDLOOP.
58166
58169
  LOOP AT ${groupTargetName}tab ${groupTarget}.`;
58167
58170
  let fix = edit_helper_1.EditHelper.replaceRange(lowFile, high.getFirstToken().getStart(), high.getLastToken().getEnd(), code);
58168
58171
  for (const l of ((_m = highFile.getStructure()) === null || _m === void 0 ? void 0 : _m.findAllStructures(Structures.Loop)) || []) {
@@ -58334,7 +58337,7 @@ LOOP AT ${groupTargetName}tab ${groupTarget}.`;
58334
58337
  const enumName = (_b = high.findExpressionAfterToken("ENUM")) === null || _b === void 0 ? void 0 : _b.concatTokens();
58335
58338
  const structureName = (_c = high.findExpressionAfterToken("STRUCTURE")) === null || _c === void 0 ? void 0 : _c.concatTokens();
58336
58339
  // all ENUMS are char like?
58337
- let code = `TYPES ${enumName} TYPE string.
58340
+ let code = `TYPES ${enumName} TYPE string.
58338
58341
  CONSTANTS: BEGIN OF ${structureName},\n`;
58339
58342
  let count = 1;
58340
58343
  for (const e of enumStructure.findDirectStatements(Statements.TypeEnum).concat(enumStructure.findDirectStatements(Statements.Type))) {
@@ -58378,14 +58381,14 @@ CONSTANTS: BEGIN OF ${structureName},\n`;
58378
58381
  const tabixBackup = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58379
58382
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
58380
58383
  // restore tabix before exeption
58381
- const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.
58382
- ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
58383
- ${indentation}${tabixBackup} = sy-tabix.
58384
- ${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.
58385
- ${indentation}sy-tabix = ${tabixBackup}.
58386
- ${indentation}IF sy-subrc <> 0.
58387
- ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
58388
- ${indentation}ENDIF.
58384
+ const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.
58385
+ ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
58386
+ ${indentation}${tabixBackup} = sy-tabix.
58387
+ ${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.
58388
+ ${indentation}sy-tabix = ${tabixBackup}.
58389
+ ${indentation}IF sy-subrc <> 0.
58390
+ ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
58391
+ ${indentation}ENDIF.
58389
58392
  ${indentation}${uniqueName}`;
58390
58393
  const start = target.getFirstToken().getStart();
58391
58394
  const end = (_a = tableExpression.findDirectTokenByText("]")) === null || _a === void 0 ? void 0 : _a.getEnd();
@@ -58469,11 +58472,11 @@ ${indentation}${uniqueName}`;
58469
58472
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
58470
58473
  const source = (_b = templateSource === null || templateSource === void 0 ? void 0 : templateSource.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens();
58471
58474
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58472
- const code = `DATA ${uniqueName} TYPE string.
58473
- ${indentation}CALL FUNCTION '${functionName}'
58474
- ${indentation} EXPORTING
58475
- ${indentation} input = ${source}
58476
- ${indentation} IMPORTING
58475
+ const code = `DATA ${uniqueName} TYPE string.
58476
+ ${indentation}CALL FUNCTION '${functionName}'
58477
+ ${indentation} EXPORTING
58478
+ ${indentation} input = ${source}
58479
+ ${indentation} IMPORTING
58477
58480
  ${indentation} output = ${uniqueName}.\n`;
58478
58481
  const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), code);
58479
58482
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, child.getFirstToken().getStart(), child.getLastToken().getEnd(), uniqueName);
@@ -59785,12 +59788,12 @@ class EasyToFindMessages {
59785
59788
  key: "easy_to_find_messages",
59786
59789
  title: "Easy to find messages",
59787
59790
  shortDescription: `Make messages easy to find`,
59788
- extendedInformation: `All messages must be statically referenced exactly once
59789
-
59790
- Only MESSAGE and RAISE statments are counted as static references
59791
-
59792
- Also see rule "message_exists"
59793
-
59791
+ extendedInformation: `All messages must be statically referenced exactly once
59792
+
59793
+ Only MESSAGE and RAISE statments are counted as static references
59794
+
59795
+ Also see rule "message_exists"
59796
+
59794
59797
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#make-messages-easy-to-find`,
59795
59798
  tags: [_irule_1.RuleTag.Styleguide],
59796
59799
  };
@@ -59875,8 +59878,8 @@ class EmptyLineinStatement extends _abap_rule_1.ABAPRule {
59875
59878
  key: "empty_line_in_statement",
59876
59879
  title: "Find empty lines in statements",
59877
59880
  shortDescription: `Checks that statements do not contain empty lines.`,
59878
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
59879
-
59881
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
59882
+
59880
59883
  https://docs.abapopenchecks.org/checks/41/`,
59881
59884
  tags: [_irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
59882
59885
  badExample: `WRITE\n\nhello.`,
@@ -60052,13 +60055,13 @@ class EmptyStructure extends _abap_rule_1.ABAPRule {
60052
60055
  shortDescription: `Checks that the code does not contain empty blocks.`,
60053
60056
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-empty-if-branches`,
60054
60057
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
60055
- badExample: `IF foo = bar.
60056
- ENDIF.
60057
-
60058
- DO 2 TIMES.
60058
+ badExample: `IF foo = bar.
60059
+ ENDIF.
60060
+
60061
+ DO 2 TIMES.
60059
60062
  ENDDO.`,
60060
- goodExample: `LOOP AT itab WHERE qty = 0 OR date > sy-datum.
60061
- ENDLOOP.
60063
+ goodExample: `LOOP AT itab WHERE qty = 0 OR date > sy-datum.
60064
+ ENDLOOP.
60062
60065
  result = xsdbool( sy-subrc = 0 ).`,
60063
60066
  };
60064
60067
  }
@@ -60200,10 +60203,10 @@ class ExitOrCheck extends _abap_rule_1.ABAPRule {
60200
60203
  return {
60201
60204
  key: "exit_or_check",
60202
60205
  title: "Find EXIT or CHECK outside loops",
60203
- shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
60206
+ shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
60204
60207
  Use RETURN to leave procesing blocks instead.`,
60205
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
60206
- https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
60208
+ extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
60209
+ https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
60207
60210
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#check-vs-return`,
60208
60211
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
60209
60212
  };
@@ -60286,12 +60289,12 @@ class ExpandMacros extends _abap_rule_1.ABAPRule {
60286
60289
  key: "expand_macros",
60287
60290
  title: "Expand Macros",
60288
60291
  shortDescription: `Allows expanding macro calls with quick fixes`,
60289
- extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
60290
-
60292
+ extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
60293
+
60291
60294
  Note that macros/DEFINE cannot be used in the ABAP Cloud programming model`,
60292
- badExample: `DEFINE _hello.
60293
- WRITE 'hello'.
60294
- END-OF-DEFINITION.
60295
+ badExample: `DEFINE _hello.
60296
+ WRITE 'hello'.
60297
+ END-OF-DEFINITION.
60295
60298
  _hello.`,
60296
60299
  goodExample: `WRITE 'hello'.`,
60297
60300
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
@@ -60378,7 +60381,7 @@ class Exporting extends _abap_rule_1.ABAPRule {
60378
60381
  shortDescription: `Detects EXPORTING statements which can be omitted.`,
60379
60382
  badExample: `call_method( EXPORTING foo = bar ).`,
60380
60383
  goodExample: `call_method( foo = bar ).`,
60381
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-optional-keyword-exporting
60384
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-optional-keyword-exporting
60382
60385
  https://docs.abapopenchecks.org/checks/30/`,
60383
60386
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
60384
60387
  };
@@ -60476,7 +60479,7 @@ class ForbiddenIdentifier extends _abap_rule_1.ABAPRule {
60476
60479
  key: "forbidden_identifier",
60477
60480
  title: "Forbidden Identifier",
60478
60481
  shortDescription: `Forbid use of specified identifiers, list of regex.`,
60479
- extendedInformation: `Used in the transpiler to find javascript keywords in ABAP identifiers,
60482
+ extendedInformation: `Used in the transpiler to find javascript keywords in ABAP identifiers,
60480
60483
  https://github.com/abaplint/transpiler/blob/bda94b8b56e2b7f2f87be2168f12361aa530220e/packages/transpiler/src/validation.ts#L44`,
60481
60484
  tags: [_irule_1.RuleTag.SingleFile],
60482
60485
  };
@@ -60718,8 +60721,8 @@ class ForbiddenVoidType {
60718
60721
  key: "forbidden_void_type",
60719
60722
  title: "Forbidden Void Types",
60720
60723
  shortDescription: `Avoid usage of specified void types.`,
60721
- extendedInformation: `Inspiration:
60722
- BOOLEAN, BOOLE_D, CHAR01, CHAR1, CHAR10, CHAR12, CHAR128, CHAR2, CHAR20, CHAR4, CHAR70,
60724
+ extendedInformation: `Inspiration:
60725
+ BOOLEAN, BOOLE_D, CHAR01, CHAR1, CHAR10, CHAR12, CHAR128, CHAR2, CHAR20, CHAR4, CHAR70,
60723
60726
  DATS, TIMS, DATUM, FLAG, INT4, NUMC3, NUMC4, SAP_BOOL, TEXT25, TEXT80, X255, XFELD`,
60724
60727
  };
60725
60728
  }
@@ -60962,7 +60965,7 @@ class FullyTypeITabs extends _abap_rule_1.ABAPRule {
60962
60965
  key: "fully_type_itabs",
60963
60966
  title: "Fully type internal tables",
60964
60967
  shortDescription: `No implict table types or table keys`,
60965
- badExample: `DATA lt_foo TYPE TABLE OF ty.
60968
+ badExample: `DATA lt_foo TYPE TABLE OF ty.
60966
60969
  DATA lt_bar TYPE STANDARD TABLE OF ty.`,
60967
60970
  goodExample: `DATA lt_foo TYPE STANDARD TABLE OF ty WITH EMPTY KEY.`,
60968
60971
  tags: [_irule_1.RuleTag.SingleFile],
@@ -61147,26 +61150,26 @@ class FunctionalWriting extends _abap_rule_1.ABAPRule {
61147
61150
  key: "functional_writing",
61148
61151
  title: "Use functional writing",
61149
61152
  shortDescription: `Detects usage of call method when functional style calls can be used.`,
61150
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-calls
61153
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-calls
61151
61154
  https://docs.abapopenchecks.org/checks/07/`,
61152
61155
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
61153
- badExample: `CALL METHOD zcl_class=>method( ).
61154
- CALL METHOD cl_abap_typedescr=>describe_by_name
61155
- EXPORTING
61156
- p_name = 'NAME'
61157
- RECEIVING
61158
- p_descr_ref = lr_typedescr
61159
- EXCEPTIONS
61160
- type_not_found = 1
61156
+ badExample: `CALL METHOD zcl_class=>method( ).
61157
+ CALL METHOD cl_abap_typedescr=>describe_by_name
61158
+ EXPORTING
61159
+ p_name = 'NAME'
61160
+ RECEIVING
61161
+ p_descr_ref = lr_typedescr
61162
+ EXCEPTIONS
61163
+ type_not_found = 1
61161
61164
  OTHERS = 2.`,
61162
- goodExample: `zcl_class=>method( ).
61163
- cl_abap_typedescr=>describe_by_name(
61164
- EXPORTING
61165
- p_name = 'NAME'
61166
- RECEIVING
61167
- p_descr_ref = lr_typedescr
61168
- EXCEPTIONS
61169
- type_not_found = 1
61165
+ goodExample: `zcl_class=>method( ).
61166
+ cl_abap_typedescr=>describe_by_name(
61167
+ EXPORTING
61168
+ p_name = 'NAME'
61169
+ RECEIVING
61170
+ p_descr_ref = lr_typedescr
61171
+ EXCEPTIONS
61172
+ type_not_found = 1
61170
61173
  OTHERS = 2 ).`,
61171
61174
  };
61172
61175
  }
@@ -61277,14 +61280,14 @@ class GlobalClass extends _abap_rule_1.ABAPRule {
61277
61280
  key: "global_class",
61278
61281
  title: "Global class checks",
61279
61282
  shortDescription: `Checks related to global classes`,
61280
- extendedInformation: `* global classes must be in own files
61281
-
61282
- * file names must match class name
61283
-
61284
- * file names must match interface name
61285
-
61286
- * global classes must be global definitions
61287
-
61283
+ extendedInformation: `* global classes must be in own files
61284
+
61285
+ * file names must match class name
61286
+
61287
+ * file names must match interface name
61288
+
61289
+ * global classes must be global definitions
61290
+
61288
61291
  * global interfaces must be global definitions`,
61289
61292
  tags: [_irule_1.RuleTag.Syntax],
61290
61293
  };
@@ -61383,21 +61386,21 @@ class IdenticalConditions extends _abap_rule_1.ABAPRule {
61383
61386
  return {
61384
61387
  key: "identical_conditions",
61385
61388
  title: "Identical conditions",
61386
- shortDescription: `Find identical conditions in IF + CASE + WHILE etc
61387
-
61389
+ shortDescription: `Find identical conditions in IF + CASE + WHILE etc
61390
+
61388
61391
  Prerequsites: code is pretty printed with identical cAsE`,
61389
61392
  tags: [_irule_1.RuleTag.SingleFile],
61390
- badExample: `IF foo = bar OR 1 = a OR foo = bar.
61391
- ENDIF.
61392
- CASE bar.
61393
- WHEN '1'.
61394
- WHEN 'A' OR '1'.
61393
+ badExample: `IF foo = bar OR 1 = a OR foo = bar.
61394
+ ENDIF.
61395
+ CASE bar.
61396
+ WHEN '1'.
61397
+ WHEN 'A' OR '1'.
61395
61398
  ENDCASE.`,
61396
- goodExample: `IF foo = bar OR 1 = a.
61397
- ENDIF.
61398
- CASE bar.
61399
- WHEN '1'.
61400
- WHEN 'A'.
61399
+ goodExample: `IF foo = bar OR 1 = a.
61400
+ ENDIF.
61401
+ CASE bar.
61402
+ WHEN '1'.
61403
+ WHEN 'A'.
61401
61404
  ENDCASE.`,
61402
61405
  };
61403
61406
  }
@@ -61531,23 +61534,23 @@ class IdenticalContents extends _abap_rule_1.ABAPRule {
61531
61534
  key: "identical_contents",
61532
61535
  title: "Identical contents",
61533
61536
  shortDescription: `Find identical contents in blocks inside IFs, both in the beginning and in the end.`,
61534
- extendedInformation: `
61535
- Prerequsites: code is pretty printed with identical cAsE
61536
-
61537
+ extendedInformation: `
61538
+ Prerequsites: code is pretty printed with identical cAsE
61539
+
61537
61540
  Chained statments are ignored`,
61538
61541
  tags: [_irule_1.RuleTag.SingleFile],
61539
- badExample: `IF foo = bar.
61540
- WRITE 'bar'.
61541
- WRITE 'world'.
61542
- ELSE.
61543
- WRITE 'foo'.
61544
- WRITE 'world'.
61542
+ badExample: `IF foo = bar.
61543
+ WRITE 'bar'.
61544
+ WRITE 'world'.
61545
+ ELSE.
61546
+ WRITE 'foo'.
61547
+ WRITE 'world'.
61545
61548
  ENDIF.`,
61546
- goodExample: `IF foo = bar.
61547
- WRITE 'bar'.
61548
- ELSE.
61549
- WRITE 'foo'.
61550
- ENDIF.
61549
+ goodExample: `IF foo = bar.
61550
+ WRITE 'bar'.
61551
+ ELSE.
61552
+ WRITE 'foo'.
61553
+ ENDIF.
61551
61554
  WRITE 'world'.`,
61552
61555
  };
61553
61556
  }
@@ -61655,12 +61658,12 @@ class IdenticalDescriptions {
61655
61658
  key: "identical_descriptions",
61656
61659
  title: "Identical descriptions",
61657
61660
  shortDescription: `Searches for objects with the same type and same description`,
61658
- extendedInformation: `Case insensitive
61659
-
61660
- Only checks the master language descriptions
61661
-
61662
- Dependencies are skipped
61663
-
61661
+ extendedInformation: `Case insensitive
61662
+
61663
+ Only checks the master language descriptions
61664
+
61665
+ Dependencies are skipped
61666
+
61664
61667
  Works for: INTF, CLAS, DOMA, DTEL, FUNC in same FUGR`,
61665
61668
  tags: [],
61666
61669
  };
@@ -61834,43 +61837,43 @@ class IfInIf extends _abap_rule_1.ABAPRule {
61834
61837
  key: "if_in_if",
61835
61838
  title: "IF in IF",
61836
61839
  shortDescription: `Detects nested ifs which can be refactored.`,
61837
- extendedInformation: `
61838
- Directly nested IFs without ELSE can be refactored to a single condition using AND.
61839
-
61840
- ELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.
61841
-
61842
- https://docs.abapopenchecks.org/checks/01/
61840
+ extendedInformation: `
61841
+ Directly nested IFs without ELSE can be refactored to a single condition using AND.
61842
+
61843
+ ELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.
61844
+
61845
+ https://docs.abapopenchecks.org/checks/01/
61843
61846
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low`,
61844
- badExample: `IF condition1.
61845
- IF condition2.
61846
- ...
61847
- ENDIF.
61848
- ENDIF.
61849
-
61850
- IF condition1.
61851
- ...
61852
- ELSE.
61853
- IF condition2.
61854
- ...
61855
- ENDIF.
61847
+ badExample: `IF condition1.
61848
+ IF condition2.
61849
+ ...
61850
+ ENDIF.
61851
+ ENDIF.
61852
+
61853
+ IF condition1.
61854
+ ...
61855
+ ELSE.
61856
+ IF condition2.
61857
+ ...
61858
+ ENDIF.
61856
61859
  ENDIF.`,
61857
- goodExample: `IF ( condition1 ) AND ( condition2 ).
61858
- ...
61859
- ENDIF.
61860
-
61861
- IF condition1.
61862
- ...
61863
- ELSEIF condition2.
61864
- ...
61865
- ENDIF.
61866
-
61867
- CASE variable.
61868
- WHEN value1.
61869
- ...
61870
- WHEN value2.
61871
- IF condition2.
61872
- ...
61873
- ENDIF.
61860
+ goodExample: `IF ( condition1 ) AND ( condition2 ).
61861
+ ...
61862
+ ENDIF.
61863
+
61864
+ IF condition1.
61865
+ ...
61866
+ ELSEIF condition2.
61867
+ ...
61868
+ ENDIF.
61869
+
61870
+ CASE variable.
61871
+ WHEN value1.
61872
+ ...
61873
+ WHEN value2.
61874
+ IF condition2.
61875
+ ...
61876
+ ENDIF.
61874
61877
  ENDCASE.`,
61875
61878
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
61876
61879
  };
@@ -62055,9 +62058,9 @@ class ImplementMethods extends _abap_rule_1.ABAPRule {
62055
62058
  for (const i of ((_a = file.getStructure()) === null || _a === void 0 ? void 0 : _a.findAllStatements(Statements.ClassImplementation)) || []) {
62056
62059
  const name = (_b = i.findFirstExpression(Expressions.ClassName)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr().toUpperCase();
62057
62060
  if (name === impl.identifier.getName().toUpperCase()) {
62058
- return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
62059
- METHOD ${methodName.toLowerCase()}.
62060
- RETURN. " todo, implement method
62061
+ return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
62062
+ METHOD ${methodName.toLowerCase()}.
62063
+ RETURN. " todo, implement method
62061
62064
  ENDMETHOD.`);
62062
62065
  }
62063
62066
  }
@@ -62245,19 +62248,19 @@ class InStatementIndentation extends _abap_rule_1.ABAPRule {
62245
62248
  key: "in_statement_indentation",
62246
62249
  title: "In-statement indentation",
62247
62250
  shortDescription: "Checks alignment within statements which span multiple lines.",
62248
- extendedInformation: `Lines following the first line should be indented once (2 spaces).
62249
-
62250
- For block declaration statements, lines after the first should be indented an additional time (default: +2 spaces)
62251
+ extendedInformation: `Lines following the first line should be indented once (2 spaces).
62252
+
62253
+ For block declaration statements, lines after the first should be indented an additional time (default: +2 spaces)
62251
62254
  to distinguish them better from code within the block.`,
62252
- badExample: `IF 1 = 1
62253
- AND 2 = 2.
62254
- WRITE 'hello' &&
62255
- 'world'.
62255
+ badExample: `IF 1 = 1
62256
+ AND 2 = 2.
62257
+ WRITE 'hello' &&
62258
+ 'world'.
62256
62259
  ENDIF.`,
62257
- goodExample: `IF 1 = 1
62258
- AND 2 = 2.
62259
- WRITE 'hello' &&
62260
- 'world'.
62260
+ goodExample: `IF 1 = 1
62261
+ AND 2 = 2.
62262
+ WRITE 'hello' &&
62263
+ 'world'.
62261
62264
  ENDIF.`,
62262
62265
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
62263
62266
  };
@@ -62380,23 +62383,23 @@ class Indentation extends _abap_rule_1.ABAPRule {
62380
62383
  title: "Indentation",
62381
62384
  shortDescription: `Checks indentation`,
62382
62385
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
62383
- badExample: `CLASS lcl DEFINITION.
62384
- PRIVATE SECTION.
62385
- METHODS constructor.
62386
- ENDCLASS.
62387
-
62388
- CLASS lcl IMPLEMENTATION.
62389
- METHOD constructor.
62390
- ENDMETHOD.
62386
+ badExample: `CLASS lcl DEFINITION.
62387
+ PRIVATE SECTION.
62388
+ METHODS constructor.
62389
+ ENDCLASS.
62390
+
62391
+ CLASS lcl IMPLEMENTATION.
62392
+ METHOD constructor.
62393
+ ENDMETHOD.
62391
62394
  ENDCLASS.`,
62392
- goodExample: `CLASS lcl DEFINITION.
62393
- PRIVATE SECTION.
62394
- METHODS constructor.
62395
- ENDCLASS.
62396
-
62397
- CLASS lcl IMPLEMENTATION.
62398
- METHOD constructor.
62399
- ENDMETHOD.
62395
+ goodExample: `CLASS lcl DEFINITION.
62396
+ PRIVATE SECTION.
62397
+ METHODS constructor.
62398
+ ENDCLASS.
62399
+
62400
+ CLASS lcl IMPLEMENTATION.
62401
+ METHOD constructor.
62402
+ ENDMETHOD.
62400
62403
  ENDCLASS.`,
62401
62404
  };
62402
62405
  }
@@ -62785,9 +62788,9 @@ class IntfReferencingClas {
62785
62788
  key: "intf_referencing_clas",
62786
62789
  title: "INTF referencing CLAS",
62787
62790
  shortDescription: `Interface contains references to class`,
62788
- extendedInformation: `Only global interfaces are checked.
62789
- Only first level references are checked.
62790
- Exception class references are ignored.
62791
+ extendedInformation: `Only global interfaces are checked.
62792
+ Only first level references are checked.
62793
+ Exception class references are ignored.
62791
62794
  Void references are ignored.`,
62792
62795
  };
62793
62796
  }
@@ -62872,9 +62875,9 @@ class InvalidTableIndex extends _abap_rule_1.ABAPRule {
62872
62875
  title: "Invalid Table Index",
62873
62876
  shortDescription: `Issues error for constant table index zero, as ABAP starts from 1`,
62874
62877
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
62875
- badExample: `DATA(first) = table[ 0 ].
62878
+ badExample: `DATA(first) = table[ 0 ].
62876
62879
  READ TABLE gt_stack ASSIGNING <ls_stack> INDEX 0.`,
62877
- goodExample: `DATA(first) = table[ 1 ].
62880
+ goodExample: `DATA(first) = table[ 1 ].
62878
62881
  READ TABLE gt_stack ASSIGNING <ls_stack> INDEX 1.`,
62879
62882
  };
62880
62883
  }
@@ -63475,8 +63478,8 @@ class LineBreakStyle {
63475
63478
  return {
63476
63479
  key: "line_break_style",
63477
63480
  title: "Makes sure line breaks are consistent in the ABAP code",
63478
- shortDescription: `Enforces LF as newlines in ABAP files
63479
-
63481
+ shortDescription: `Enforces LF as newlines in ABAP files
63482
+
63480
63483
  abapGit does not work with CRLF`,
63481
63484
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
63482
63485
  };
@@ -63545,7 +63548,7 @@ class LineLength extends _abap_rule_1.ABAPRule {
63545
63548
  key: "line_length",
63546
63549
  title: "Line length",
63547
63550
  shortDescription: `Detects lines exceeding the provided maximum length.`,
63548
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length
63551
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length
63549
63552
  https://docs.abapopenchecks.org/checks/04/`,
63550
63553
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
63551
63554
  };
@@ -63616,7 +63619,7 @@ class LineOnlyPunc extends _abap_rule_1.ABAPRule {
63616
63619
  key: "line_only_punc",
63617
63620
  title: "Line containing only punctuation",
63618
63621
  shortDescription: `Detects lines containing only punctuation.`,
63619
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#close-brackets-at-line-end
63622
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#close-brackets-at-line-end
63620
63623
  https://docs.abapopenchecks.org/checks/16/`,
63621
63624
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
63622
63625
  badExample: "zcl_class=>method(\n).",
@@ -63876,15 +63879,15 @@ class LocalVariableNames extends _abap_rule_1.ABAPRule {
63876
63879
  return {
63877
63880
  key: "local_variable_names",
63878
63881
  title: "Local variable naming conventions",
63879
- shortDescription: `
63880
- Allows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols.
63882
+ shortDescription: `
63883
+ Allows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols.
63881
63884
  Regexes are case-insensitive.`,
63882
63885
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
63883
- badExample: `FORM bar.
63884
- DATA foo.
63886
+ badExample: `FORM bar.
63887
+ DATA foo.
63885
63888
  ENDFORM.`,
63886
- goodExample: `FORM bar.
63887
- DATA lv_foo.
63889
+ goodExample: `FORM bar.
63890
+ DATA lv_foo.
63888
63891
  ENDFORM.`,
63889
63892
  };
63890
63893
  }
@@ -64107,10 +64110,10 @@ class MainFileContents {
64107
64110
  key: "main_file_contents",
64108
64111
  title: "Main file contents",
64109
64112
  shortDescription: `Checks related to report declarations.`,
64110
- extendedInformation: `Does not run if the target version is Cloud
64111
-
64112
- * PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
64113
- * TYPEs must begin with "TYPE-POOL <name>."
64113
+ extendedInformation: `Does not run if the target version is Cloud
64114
+
64115
+ * PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
64116
+ * TYPEs must begin with "TYPE-POOL <name>."
64114
64117
  `,
64115
64118
  };
64116
64119
  }
@@ -64226,17 +64229,17 @@ class ManyParentheses extends _abap_rule_1.ABAPRule {
64226
64229
  title: "Too many parentheses",
64227
64230
  shortDescription: `Searches for expressions where extra parentheses can safely be removed`,
64228
64231
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
64229
- badExample: `
64230
- IF ( destination IS INITIAL ).
64231
- ENDIF.
64232
- IF foo = boo AND ( bar = lar AND moo = loo ).
64233
- ENDIF.
64232
+ badExample: `
64233
+ IF ( destination IS INITIAL ).
64234
+ ENDIF.
64235
+ IF foo = boo AND ( bar = lar AND moo = loo ).
64236
+ ENDIF.
64234
64237
  `,
64235
- goodExample: `
64236
- IF destination IS INITIAL.
64237
- ENDIF.
64238
- IF foo = boo AND bar = lar AND moo = loo.
64239
- ENDIF.
64238
+ goodExample: `
64239
+ IF destination IS INITIAL.
64240
+ ENDIF.
64241
+ IF foo = boo AND bar = lar AND moo = loo.
64242
+ ENDIF.
64240
64243
  `,
64241
64244
  };
64242
64245
  }
@@ -64410,14 +64413,14 @@ class MaxOneMethodParameterPerLine extends _abap_rule_1.ABAPRule {
64410
64413
  title: "Max one method parameter definition per line",
64411
64414
  shortDescription: `Keep max one method parameter description per line`,
64412
64415
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace],
64413
- badExample: `
64414
- METHODS apps_scope_token
64415
- IMPORTING
64416
+ badExample: `
64417
+ METHODS apps_scope_token
64418
+ IMPORTING
64416
64419
  body TYPE bodyapps_scope_token client_id TYPE str.`,
64417
- goodExample: `
64418
- METHODS apps_scope_token
64419
- IMPORTING
64420
- body TYPE bodyapps_scope_token
64420
+ goodExample: `
64421
+ METHODS apps_scope_token
64422
+ IMPORTING
64423
+ body TYPE bodyapps_scope_token
64421
64424
  client_id TYPE str.`,
64422
64425
  };
64423
64426
  }
@@ -64482,11 +64485,11 @@ class MaxOneStatement extends _abap_rule_1.ABAPRule {
64482
64485
  key: "max_one_statement",
64483
64486
  title: "Max one statement per line",
64484
64487
  shortDescription: `Checks that each line contains only a single statement.`,
64485
- extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
64486
-
64487
- Does not report anything for chained statements.
64488
-
64489
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line
64488
+ extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
64489
+
64490
+ Does not report anything for chained statements.
64491
+
64492
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line
64490
64493
  https://docs.abapopenchecks.org/checks/11/`,
64491
64494
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
64492
64495
  badExample: `WRITE foo. WRITE bar.`,
@@ -64824,8 +64827,8 @@ class MethodLength {
64824
64827
  key: "method_length",
64825
64828
  title: "Method/Form Length",
64826
64829
  shortDescription: `Checks relating to method/form length.`,
64827
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
64828
-
64830
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
64831
+
64829
64832
  Abstract methods without statements are considered okay.`,
64830
64833
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
64831
64834
  };
@@ -64930,20 +64933,20 @@ class MethodOverwritesBuiltIn extends _abap_rule_1.ABAPRule {
64930
64933
  key: "method_overwrites_builtin",
64931
64934
  title: "Method name overwrites builtin function",
64932
64935
  shortDescription: `Checks Method names that overwrite builtin SAP functions`,
64933
- extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
64934
-
64935
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
64936
-
64936
+ extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
64937
+
64938
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
64939
+
64937
64940
  Interface method names are ignored`,
64938
64941
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
64939
- badExample: `CLASS lcl DEFINITION.
64940
- PUBLIC SECTION.
64941
- METHODS matches.
64942
- ENDCLASS.
64943
-
64944
- CLASS lcl IMPLEMENTATION.
64945
- METHOD matches.
64946
- ENDMETHOD.
64942
+ badExample: `CLASS lcl DEFINITION.
64943
+ PUBLIC SECTION.
64944
+ METHODS matches.
64945
+ ENDCLASS.
64946
+
64947
+ CLASS lcl IMPLEMENTATION.
64948
+ METHOD matches.
64949
+ ENDMETHOD.
64947
64950
  ENDCLASS.`,
64948
64951
  };
64949
64952
  }
@@ -65134,12 +65137,12 @@ class MixReturning extends _abap_rule_1.ABAPRule {
65134
65137
  // eslint-disable-next-line max-len
65135
65138
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-either-returning-or-exporting-or-changing-but-not-a-combination`,
65136
65139
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
65137
- badExample: `CLASS lcl DEFINITION.
65138
- PUBLIC SECTION.
65139
- METHODS
65140
- foobar
65141
- EXPORTING foo TYPE i
65142
- RETURNING VALUE(rv_string) TYPE string.
65140
+ badExample: `CLASS lcl DEFINITION.
65141
+ PUBLIC SECTION.
65142
+ METHODS
65143
+ foobar
65144
+ EXPORTING foo TYPE i
65145
+ RETURNING VALUE(rv_string) TYPE string.
65143
65146
  ENDCLASS.`,
65144
65147
  };
65145
65148
  }
@@ -65519,7 +65522,7 @@ class Nesting extends _abap_rule_1.ABAPRule {
65519
65522
  key: "nesting",
65520
65523
  title: "Check nesting depth",
65521
65524
  shortDescription: `Checks for methods exceeding a maximum nesting depth`,
65522
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low
65525
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low
65523
65526
  https://docs.abapopenchecks.org/checks/74/`,
65524
65527
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
65525
65528
  };
@@ -65762,7 +65765,7 @@ class NoChainedAssignment extends _abap_rule_1.ABAPRule {
65762
65765
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-chain-assignments`,
65763
65766
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
65764
65767
  badExample: `var1 = var2 = var3.`,
65765
- goodExample: `var2 = var3.
65768
+ goodExample: `var2 = var3.
65766
65769
  var1 = var2.`,
65767
65770
  };
65768
65771
  }
@@ -65821,8 +65824,8 @@ class NoExternalFormCalls extends _abap_rule_1.ABAPRule {
65821
65824
  key: "no_external_form_calls",
65822
65825
  title: "No external FORM calls",
65823
65826
  shortDescription: `Detect external form calls`,
65824
- badExample: `PERFORM foo IN PROGRAM bar.
65825
-
65827
+ badExample: `PERFORM foo IN PROGRAM bar.
65828
+
65826
65829
  PERFORM foo(bar).`,
65827
65830
  tags: [_irule_1.RuleTag.SingleFile],
65828
65831
  };
@@ -65883,17 +65886,17 @@ class NoInlineInOptionalBranches extends _abap_rule_1.ABAPRule {
65883
65886
  key: "no_inline_in_optional_branches",
65884
65887
  title: "Don't declare inline in optional branches",
65885
65888
  shortDescription: `Don't declare inline in optional branches`,
65886
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
65887
-
65888
- Considered optional branches:
65889
- * inside IF/ELSEIF/ELSE
65890
- * inside LOOP
65891
- * inside WHILE
65892
- * inside CASE/WHEN, CASE TYPE OF
65893
- * inside DO
65894
- * inside SELECT loops
65895
-
65896
- Not considered optional branches:
65889
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
65890
+
65891
+ Considered optional branches:
65892
+ * inside IF/ELSEIF/ELSE
65893
+ * inside LOOP
65894
+ * inside WHILE
65895
+ * inside CASE/WHEN, CASE TYPE OF
65896
+ * inside DO
65897
+ * inside SELECT loops
65898
+
65899
+ Not considered optional branches:
65897
65900
  * TRY/CATCH/CLEANUP`,
65898
65901
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
65899
65902
  };
@@ -65993,12 +65996,12 @@ class NoPrefixes extends _abap_rule_1.ABAPRule {
65993
65996
  key: "no_prefixes",
65994
65997
  title: "No Prefixes",
65995
65998
  shortDescription: `Dont use hungarian notation`,
65996
- extendedInformation: `
65997
- Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
65998
- allowing all types to become voided, abaplint will then provide less precise syntax errors.
65999
-
66000
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
66001
-
65999
+ extendedInformation: `
66000
+ Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
66001
+ allowing all types to become voided, abaplint will then provide less precise syntax errors.
66002
+
66003
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
66004
+
66002
66005
  https://github.com/SAP/styleguides/blob/main/clean-abap/sub-sections/AvoidEncodings.md`,
66003
66006
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
66004
66007
  badExample: `DATA lv_foo TYPE i.`,
@@ -66177,7 +66180,7 @@ class NoPublicAttributes extends _abap_rule_1.ABAPRule {
66177
66180
  return {
66178
66181
  key: "no_public_attributes",
66179
66182
  title: "No public attributes",
66180
- shortDescription: `Checks that classes and interfaces don't contain any public attributes.
66183
+ shortDescription: `Checks that classes and interfaces don't contain any public attributes.
66181
66184
  Exceptions are excluded from this rule.`,
66182
66185
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#members-private-by-default-protected-only-if-needed`,
66183
66186
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
@@ -66278,13 +66281,13 @@ class NoYodaConditions extends _abap_rule_1.ABAPRule {
66278
66281
  key: "no_yoda_conditions",
66279
66282
  title: "No Yoda conditions",
66280
66283
  shortDescription: `Finds Yoda conditions and reports issues`,
66281
- extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
66282
-
66284
+ extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
66285
+
66283
66286
  Conditions with operators CP, NP, CS, NS, CA, NA, CO, CN are ignored`,
66284
66287
  tags: [_irule_1.RuleTag.SingleFile],
66285
- badExample: `IF 0 <> sy-subrc.
66288
+ badExample: `IF 0 <> sy-subrc.
66286
66289
  ENDIF.`,
66287
- goodExample: `IF sy-subrc <> 0.
66290
+ goodExample: `IF sy-subrc <> 0.
66288
66291
  ENDIF.`,
66289
66292
  };
66290
66293
  }
@@ -66385,8 +66388,8 @@ class NROBConsistency {
66385
66388
  key: "nrob_consistency",
66386
66389
  title: "Number range consistency",
66387
66390
  shortDescription: `Consistency checks for number ranges`,
66388
- extendedInformation: `Issue reported if percentage warning is over 50%
66389
-
66391
+ extendedInformation: `Issue reported if percentage warning is over 50%
66392
+
66390
66393
  Issue reported if the referenced domain is not found(taking error namespace into account)`,
66391
66394
  tags: [_irule_1.RuleTag.SingleFile],
66392
66395
  };
@@ -66663,58 +66666,58 @@ class ObsoleteStatement extends _abap_rule_1.ABAPRule {
66663
66666
  title: "Obsolete statements",
66664
66667
  shortDescription: `Checks for usages of certain obsolete statements`,
66665
66668
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
66666
- extendedInformation: `
66667
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
66668
-
66669
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
66670
-
66671
- SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
66672
-
66673
- IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
66674
-
66675
- WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
66676
-
66677
- FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
66678
-
66679
- TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
66680
-
66681
- LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
66682
-
66683
- COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
66684
-
66685
- OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
66686
-
66687
- PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
66688
-
66689
- RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
66690
-
66691
- PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
66692
-
66693
- MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
66694
-
66695
- SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
66696
- SELECT COUNT(*) is considered okay
66697
-
66698
- FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
66699
-
66700
- SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
66701
-
66702
- CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
66703
-
66704
- POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
66705
-
66706
- OCCURENCES: check for OCCURENCES vs OCCURRENCES
66707
-
66669
+ extendedInformation: `
66670
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
66671
+
66672
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
66673
+
66674
+ SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
66675
+
66676
+ IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
66677
+
66678
+ WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
66679
+
66680
+ FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
66681
+
66682
+ TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
66683
+
66684
+ LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
66685
+
66686
+ COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
66687
+
66688
+ OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
66689
+
66690
+ PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
66691
+
66692
+ RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
66693
+
66694
+ PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
66695
+
66696
+ MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
66697
+
66698
+ SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
66699
+ SELECT COUNT(*) is considered okay
66700
+
66701
+ FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
66702
+
66703
+ SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
66704
+
66705
+ CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
66706
+
66707
+ POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
66708
+
66709
+ OCCURENCES: check for OCCURENCES vs OCCURRENCES
66710
+
66708
66711
  CLIENT SPECIFIED, from 754: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abapselect_client_obsolete.htm`,
66709
- badExample: `REFRESH itab.
66710
-
66711
- COMPUTE foo = 2 + 2.
66712
-
66713
- MULTIPLY lv_foo BY 2.
66714
-
66715
- INTERFACE intf LOAD.
66716
-
66717
- IF foo IS SUPPLIED.
66712
+ badExample: `REFRESH itab.
66713
+
66714
+ COMPUTE foo = 2 + 2.
66715
+
66716
+ MULTIPLY lv_foo BY 2.
66717
+
66718
+ INTERFACE intf LOAD.
66719
+
66720
+ IF foo IS SUPPLIED.
66718
66721
  ENDIF.`,
66719
66722
  };
66720
66723
  }
@@ -67054,9 +67057,9 @@ class OmitParameterName {
67054
67057
  key: "omit_parameter_name",
67055
67058
  title: "Omit parameter name",
67056
67059
  shortDescription: `Omit the parameter name in single parameter calls`,
67057
- extendedInformation: `
67058
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
67059
-
67060
+ extendedInformation: `
67061
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
67062
+
67060
67063
  EXPORTING must already be omitted for this rule to take effect, https://rules.abaplint.org/exporting/`,
67061
67064
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
67062
67065
  badExample: `method( param = 2 ).`,
@@ -67262,20 +67265,20 @@ class OmitReceiving extends _abap_rule_1.ABAPRule {
67262
67265
  shortDescription: `Omit RECEIVING`,
67263
67266
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-receiving`,
67264
67267
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
67265
- badExample: `
67266
- upload_pack(
67267
- EXPORTING
67268
- io_client = lo_client
67269
- iv_url = iv_url
67270
- iv_deepen_level = iv_deepen_level
67271
- it_hashes = lt_hashes
67272
- RECEIVING
67268
+ badExample: `
67269
+ upload_pack(
67270
+ EXPORTING
67271
+ io_client = lo_client
67272
+ iv_url = iv_url
67273
+ iv_deepen_level = iv_deepen_level
67274
+ it_hashes = lt_hashes
67275
+ RECEIVING
67273
67276
  rt_objects = et_objects ).`,
67274
- goodExample: `
67275
- et_objects = upload_pack(
67276
- io_client = lo_client
67277
- iv_url = iv_url
67278
- iv_deepen_level = iv_deepen_level
67277
+ goodExample: `
67278
+ et_objects = upload_pack(
67279
+ io_client = lo_client
67280
+ iv_url = iv_url
67281
+ iv_deepen_level = iv_deepen_level
67279
67282
  it_hashes = lt_hashes ).`,
67280
67283
  };
67281
67284
  }
@@ -67339,8 +67342,8 @@ class Parser702Chaining extends _abap_rule_1.ABAPRule {
67339
67342
  return {
67340
67343
  key: "parser_702_chaining",
67341
67344
  title: "Parser Error, bad chanining on 702",
67342
- shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
67343
- this rule finds these and reports errors.
67345
+ shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
67346
+ this rule finds these and reports errors.
67344
67347
  Only active on target version 702 and below.`,
67345
67348
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
67346
67349
  };
@@ -67420,8 +67423,8 @@ class ParserError {
67420
67423
  return {
67421
67424
  key: "parser_error",
67422
67425
  title: "Parser error",
67423
- shortDescription: `Checks for syntax not recognized by abaplint.
67424
-
67426
+ shortDescription: `Checks for syntax not recognized by abaplint.
67427
+
67425
67428
  See recognized syntax at https://syntax.abaplint.org`,
67426
67429
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
67427
67430
  };
@@ -67506,7 +67509,7 @@ class ParserMissingSpace extends _abap_rule_1.ABAPRule {
67506
67509
  return {
67507
67510
  key: "parser_missing_space",
67508
67511
  title: "Parser Error, missing space",
67509
- shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.
67512
+ shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.
67510
67513
  This rule makes sure the spaces are consistently required across the language.`,
67511
67514
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
67512
67515
  badExample: `IF ( foo = 'bar').`,
@@ -67918,25 +67921,25 @@ class PreferInline {
67918
67921
  key: "prefer_inline",
67919
67922
  title: "Prefer Inline Declarations",
67920
67923
  shortDescription: `Prefer inline to up-front declarations.`,
67921
- extendedInformation: `EXPERIMENTAL
67922
-
67923
- Activates if language version is v740sp02 or above.
67924
-
67925
- Variables must be local(METHOD or FORM).
67926
-
67927
- No generic or void typed variables. No syntax errors.
67928
-
67929
- First position used must be a full/pure write.
67930
-
67931
- Move statment is not a cast(?=)
67932
-
67924
+ extendedInformation: `EXPERIMENTAL
67925
+
67926
+ Activates if language version is v740sp02 or above.
67927
+
67928
+ Variables must be local(METHOD or FORM).
67929
+
67930
+ No generic or void typed variables. No syntax errors.
67931
+
67932
+ First position used must be a full/pure write.
67933
+
67934
+ Move statment is not a cast(?=)
67935
+
67933
67936
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-inline-to-up-front-declarations`,
67934
67937
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Experimental, _irule_1.RuleTag.Quickfix],
67935
- badExample: `DATA foo TYPE i.
67936
- foo = 2.
67937
- DATA percentage TYPE decfloat34.
67938
+ badExample: `DATA foo TYPE i.
67939
+ foo = 2.
67940
+ DATA percentage TYPE decfloat34.
67938
67941
  percentage = ( comment_number / abs_statement_number ) * 100.`,
67939
- goodExample: `DATA(foo) = 2.
67942
+ goodExample: `DATA(foo) = 2.
67940
67943
  DATA(percentage) = CONV decfloat34( comment_number / abs_statement_number ) * 100.`,
67941
67944
  };
67942
67945
  }
@@ -68150,18 +68153,18 @@ class PreferIsNot extends _abap_rule_1.ABAPRule {
68150
68153
  key: "prefer_is_not",
68151
68154
  title: "Prefer IS NOT to NOT IS",
68152
68155
  shortDescription: `Prefer IS NOT to NOT IS`,
68153
- extendedInformation: `
68154
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
68155
-
68156
+ extendedInformation: `
68157
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
68158
+
68156
68159
  "if not is_valid( )." examples are skipped`,
68157
68160
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
68158
- goodExample: `IF variable IS NOT INITIAL.
68159
- IF variable NP 'TODO*'.
68160
- IF variable <> 42.
68161
+ goodExample: `IF variable IS NOT INITIAL.
68162
+ IF variable NP 'TODO*'.
68163
+ IF variable <> 42.
68161
68164
  IF variable CO 'hello'.`,
68162
- badExample: `IF NOT variable IS INITIAL.
68163
- IF NOT variable CP 'TODO*'.
68164
- IF NOT variable = 42.
68165
+ badExample: `IF NOT variable IS INITIAL.
68166
+ IF NOT variable CP 'TODO*'.
68167
+ IF NOT variable = 42.
68165
68168
  IF NOT variable CA 'hello'.`,
68166
68169
  };
68167
68170
  }
@@ -68349,14 +68352,14 @@ class PreferRaiseExceptionNew extends _abap_rule_1.ABAPRule {
68349
68352
  key: "prefer_raise_exception_new",
68350
68353
  title: "Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE",
68351
68354
  shortDescription: `Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE`,
68352
- extendedInformation: `
68353
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
68354
-
68355
+ extendedInformation: `
68356
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
68357
+
68355
68358
  From 752 and up`,
68356
68359
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
68357
68360
  goodExample: `RAISE EXCEPTION NEW cx_generation_error( previous = exception ).`,
68358
- badExample: `RAISE EXCEPTION TYPE cx_generation_error
68359
- EXPORTING
68361
+ badExample: `RAISE EXCEPTION TYPE cx_generation_error
68362
+ EXPORTING
68360
68363
  previous = exception.`,
68361
68364
  };
68362
68365
  }
@@ -68434,12 +68437,12 @@ class PreferReturningToExporting extends _abap_rule_1.ABAPRule {
68434
68437
  key: "prefer_returning_to_exporting",
68435
68438
  title: "Prefer RETURNING to EXPORTING",
68436
68439
  shortDescription: `Prefer RETURNING to EXPORTING. Generic types cannot be RETURNING.`,
68437
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting
68440
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting
68438
68441
  https://docs.abapopenchecks.org/checks/44/`,
68439
68442
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
68440
- badExample: `CLASS lcl DEFINITION.
68441
- PUBLIC SECTION.
68442
- METHODS test EXPORTING ev_foo TYPE i.
68443
+ badExample: `CLASS lcl DEFINITION.
68444
+ PUBLIC SECTION.
68445
+ METHODS test EXPORTING ev_foo TYPE i.
68443
68446
  ENDCLASS.`,
68444
68447
  };
68445
68448
  }
@@ -68535,8 +68538,8 @@ class PreferXsdbool extends _abap_rule_1.ABAPRule {
68535
68538
  key: "prefer_xsdbool",
68536
68539
  title: "Prefer xsdbool over boolc",
68537
68540
  shortDescription: `Prefer xsdbool over boolc`,
68538
- extendedInformation: `Activates if language version is v740sp08 or above.
68539
-
68541
+ extendedInformation: `Activates if language version is v740sp08 or above.
68542
+
68540
68543
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
68541
68544
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
68542
68545
  badExample: `DATA(sdf) = boolc( 1 = 2 ).`,
@@ -68608,9 +68611,9 @@ class PreferredCompareOperator extends _abap_rule_1.ABAPRule {
68608
68611
  title: "Preferred compare operator",
68609
68612
  shortDescription: `Configure undesired operator variants`,
68610
68613
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
68611
- badExample: `IF foo EQ bar.
68614
+ badExample: `IF foo EQ bar.
68612
68615
  ENDIF.`,
68613
- goodExample: `IF foo = bar.
68616
+ goodExample: `IF foo = bar.
68614
68617
  ENDIF.`,
68615
68618
  };
68616
68619
  }
@@ -68834,26 +68837,26 @@ class ReduceProceduralCode extends _abap_rule_1.ABAPRule {
68834
68837
  key: "reduce_procedural_code",
68835
68838
  title: "Reduce procedural code",
68836
68839
  shortDescription: `Checks FORM and FUNCTION-MODULE have few statements`,
68837
- extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
68838
-
68839
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
68840
-
68840
+ extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
68841
+
68842
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
68843
+
68841
68844
  Comments are not counted as statements.`,
68842
68845
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
68843
- badExample: `FORM foo.
68844
- DATA lv_bar TYPE i.
68845
- lv_bar = 2 + 2.
68846
- IF lv_bar = 4.
68847
- WRITE 'hello world'.
68848
- ENDIF.
68849
- DATA lv_bar TYPE i.
68850
- lv_bar = 2 + 2.
68851
- IF lv_bar = 4.
68852
- WRITE 'hello world'.
68853
- ENDIF.
68846
+ badExample: `FORM foo.
68847
+ DATA lv_bar TYPE i.
68848
+ lv_bar = 2 + 2.
68849
+ IF lv_bar = 4.
68850
+ WRITE 'hello world'.
68851
+ ENDIF.
68852
+ DATA lv_bar TYPE i.
68853
+ lv_bar = 2 + 2.
68854
+ IF lv_bar = 4.
68855
+ WRITE 'hello world'.
68856
+ ENDIF.
68854
68857
  ENDFORM.`,
68855
- goodExample: `FORM foo.
68856
- NEW zcl_global_class( )->run_logic( ).
68858
+ goodExample: `FORM foo.
68859
+ NEW zcl_global_class( )->run_logic( ).
68857
68860
  ENDFORM.`,
68858
68861
  };
68859
68862
  }
@@ -69097,10 +69100,10 @@ class RemoveDescriptions {
69097
69100
  return {
69098
69101
  key: "remove_descriptions",
69099
69102
  title: "Remove descriptions",
69100
- shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
69101
-
69102
- Class descriptions are required, see rule description_empty.
69103
-
69103
+ shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
69104
+
69105
+ Class descriptions are required, see rule description_empty.
69106
+
69104
69107
  Consider using ABAP Doc for documentation.`,
69105
69108
  tags: [],
69106
69109
  };
@@ -69225,14 +69228,14 @@ class RFCErrorHandling extends _abap_rule_1.ABAPRule {
69225
69228
  tags: [_irule_1.RuleTag.SingleFile],
69226
69229
  shortDescription: `Checks that exceptions 'system_failure' and 'communication_failure' are handled in RFC calls`,
69227
69230
  extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenrfc_exception.htm`,
69228
- badExample: `CALL FUNCTION 'ZRFC'
69231
+ badExample: `CALL FUNCTION 'ZRFC'
69229
69232
  DESTINATION lv_rfc.`,
69230
- goodExample: `CALL FUNCTION 'ZRFC'
69231
- DESTINATION lv_rfc
69232
- EXCEPTIONS
69233
- system_failure = 1 MESSAGE msg
69234
- communication_failure = 2 MESSAGE msg
69235
- resource_failure = 3
69233
+ goodExample: `CALL FUNCTION 'ZRFC'
69234
+ DESTINATION lv_rfc
69235
+ EXCEPTIONS
69236
+ system_failure = 1 MESSAGE msg
69237
+ communication_failure = 2 MESSAGE msg
69238
+ resource_failure = 3
69236
69239
  OTHERS = 4.`,
69237
69240
  };
69238
69241
  }
@@ -69316,11 +69319,11 @@ class SelectAddOrderBy {
69316
69319
  key: "select_add_order_by",
69317
69320
  title: "SELECT add ORDER BY",
69318
69321
  shortDescription: `SELECTs add ORDER BY clause`,
69319
- extendedInformation: `
69320
- This will make sure that the SELECT statement returns results in the same sequence on different databases
69321
-
69322
- add ORDER BY PRIMARY KEY if in doubt
69323
-
69322
+ extendedInformation: `
69323
+ This will make sure that the SELECT statement returns results in the same sequence on different databases
69324
+
69325
+ add ORDER BY PRIMARY KEY if in doubt
69326
+
69324
69327
  If the target is a sorted/hashed table, no issue is reported`,
69325
69328
  tags: [_irule_1.RuleTag.SingleFile],
69326
69329
  badExample: `SELECT * FROM db INTO TABLE @DATA(tab).`,
@@ -69451,14 +69454,14 @@ class SelectPerformance {
69451
69454
  key: "select_performance",
69452
69455
  title: "SELECT performance",
69453
69456
  shortDescription: `Various checks regarding SELECT performance.`,
69454
- extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
69455
-
69457
+ extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
69458
+
69456
69459
  SELECT *: not reported if using INTO/APPENDING CORRESPONDING FIELDS OF`,
69457
69460
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Performance],
69458
- badExample: `SELECT field1, field2 FROM table
69459
- INTO @DATA(structure) UP TO 1 ROWS ORDER BY field3 DESCENDING.
69461
+ badExample: `SELECT field1, field2 FROM table
69462
+ INTO @DATA(structure) UP TO 1 ROWS ORDER BY field3 DESCENDING.
69460
69463
  ENDSELECT.`,
69461
- goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
69464
+ goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
69462
69465
  INTO TABLE @DATA(table) ORDER BY field3 DESCENDING`,
69463
69466
  };
69464
69467
  }
@@ -69572,8 +69575,8 @@ class SelectSingleFullKey {
69572
69575
  key: "select_single_full_key",
69573
69576
  title: "Detect SELECT SINGLE which are possibily not unique",
69574
69577
  shortDescription: `Detect SELECT SINGLE which are possibily not unique`,
69575
- extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
69576
-
69578
+ extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
69579
+
69577
69580
  If the statement contains a JOIN it is not checked`,
69578
69581
  pseudoComment: "EC CI_NOORDER",
69579
69582
  tags: [_irule_1.RuleTag.Quickfix],
@@ -69997,8 +70000,8 @@ class SICFConsistency {
69997
70000
  key: "sicf_consistency",
69998
70001
  title: "SICF consistency",
69999
70002
  shortDescription: `Checks the validity of ICF services`,
70000
- extendedInformation: `* Class defined in handler must exist
70001
- * Class must not have any syntax errors
70003
+ extendedInformation: `* Class defined in handler must exist
70004
+ * Class must not have any syntax errors
70002
70005
  * Class must implement interface IF_HTTP_EXTENSION`,
70003
70006
  };
70004
70007
  }
@@ -70110,23 +70113,23 @@ class SlowParameterPassing {
70110
70113
  shortDescription: `Detects slow pass by value passing for methods where parameter is not changed`,
70111
70114
  extendedInformation: `Method parameters defined in interfaces is not checked`,
70112
70115
  tags: [_irule_1.RuleTag.Performance],
70113
- badExample: `CLASS lcl DEFINITION.
70114
- PUBLIC SECTION.
70115
- METHODS bar IMPORTING VALUE(sdf) TYPE string.
70116
- ENDCLASS.
70117
- CLASS lcl IMPLEMENTATION.
70118
- METHOD bar.
70119
- WRITE sdf.
70120
- ENDMETHOD.
70116
+ badExample: `CLASS lcl DEFINITION.
70117
+ PUBLIC SECTION.
70118
+ METHODS bar IMPORTING VALUE(sdf) TYPE string.
70119
+ ENDCLASS.
70120
+ CLASS lcl IMPLEMENTATION.
70121
+ METHOD bar.
70122
+ WRITE sdf.
70123
+ ENDMETHOD.
70121
70124
  ENDCLASS.`,
70122
- goodExample: `CLASS lcl DEFINITION.
70123
- PUBLIC SECTION.
70124
- METHODS bar IMPORTING sdf TYPE string.
70125
- ENDCLASS.
70126
- CLASS lcl IMPLEMENTATION.
70127
- METHOD bar.
70128
- WRITE sdf.
70129
- ENDMETHOD.
70125
+ goodExample: `CLASS lcl DEFINITION.
70126
+ PUBLIC SECTION.
70127
+ METHODS bar IMPORTING sdf TYPE string.
70128
+ ENDCLASS.
70129
+ CLASS lcl IMPLEMENTATION.
70130
+ METHOD bar.
70131
+ WRITE sdf.
70132
+ ENDMETHOD.
70130
70133
  ENDCLASS.`,
70131
70134
  };
70132
70135
  }
@@ -70383,8 +70386,8 @@ class SpaceBeforeDot extends _abap_rule_1.ABAPRule {
70383
70386
  key: "space_before_dot",
70384
70387
  title: "Space before dot",
70385
70388
  shortDescription: `Checks for extra spaces before dots at the ends of statements`,
70386
- extendedInformation: `
70387
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
70389
+ extendedInformation: `
70390
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
70388
70391
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#condense-your-code`,
70389
70392
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
70390
70393
  badExample: `WRITE bar .`,
@@ -70570,12 +70573,12 @@ class SQLValueConversion {
70570
70573
  key: "sql_value_conversion",
70571
70574
  title: "Implicit SQL Value Conversion",
70572
70575
  shortDescription: `Ensure types match when selecting from database`,
70573
- extendedInformation: `
70574
- * Integer to CHAR conversion
70575
- * Integer to NUMC conversion
70576
- * NUMC to Integer conversion
70577
- * CHAR to Integer conversion
70578
- * Source field longer than database field, CHAR -> CHAR
70576
+ extendedInformation: `
70577
+ * Integer to CHAR conversion
70578
+ * Integer to NUMC conversion
70579
+ * NUMC to Integer conversion
70580
+ * CHAR to Integer conversion
70581
+ * Source field longer than database field, CHAR -> CHAR
70579
70582
  * Source field longer than database field, NUMC -> NUMC`,
70580
70583
  tags: [],
70581
70584
  };
@@ -70647,7 +70650,7 @@ class StartAtTab extends _abap_rule_1.ABAPRule {
70647
70650
  key: "start_at_tab",
70648
70651
  title: "Start at tab",
70649
70652
  shortDescription: `Checks that statements start at tabstops.`,
70650
- extendedInformation: `Reports max 100 issues per file
70653
+ extendedInformation: `Reports max 100 issues per file
70651
70654
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
70652
70655
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
70653
70656
  badExample: ` WRITE a.`,
@@ -70824,12 +70827,12 @@ class StrictSQL extends _abap_rule_1.ABAPRule {
70824
70827
  key: "strict_sql",
70825
70828
  title: "Strict SQL",
70826
70829
  shortDescription: `Strict SQL`,
70827
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
70828
-
70829
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
70830
-
70831
- Also see separate rule sql_escape_host_variables
70832
-
70830
+ extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
70831
+
70832
+ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
70833
+
70834
+ Also see separate rule sql_escape_host_variables
70835
+
70833
70836
  Activates from v750 and up`,
70834
70837
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix],
70835
70838
  badExample: `SELECT * FROM ztabl INTO TABLE @rt_content WHERE type = @iv_type ORDER BY PRIMARY KEY.`,
@@ -71083,11 +71086,11 @@ class SyModification extends _abap_rule_1.ABAPRule {
71083
71086
  key: "sy_modification",
71084
71087
  title: "Modification of SY fields",
71085
71088
  shortDescription: `Finds modification of sy fields`,
71086
- extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
71087
-
71089
+ extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
71090
+
71088
71091
  Changes to SY-TVAR* fields are not reported`,
71089
71092
  tags: [_irule_1.RuleTag.SingleFile],
71090
- badExample: `sy-uname = 2.
71093
+ badExample: `sy-uname = 2.
71091
71094
  sy = sy.`,
71092
71095
  };
71093
71096
  }
@@ -71149,8 +71152,8 @@ class TABLEnhancementCategory {
71149
71152
  key: "tabl_enhancement_category",
71150
71153
  title: "TABL enhancement category must be set",
71151
71154
  shortDescription: `Checks that tables do not have the enhancement category 'not classified'.`,
71152
- extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
71153
-
71155
+ extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
71156
+
71154
71157
  You may use standard report RS_DDIC_CLASSIFICATION_FINAL for adjustment.`,
71155
71158
  tags: [],
71156
71159
  };
@@ -71278,9 +71281,9 @@ class TypeFormParameters extends _abap_rule_1.ABAPRule {
71278
71281
  title: "Type FORM parameters",
71279
71282
  shortDescription: `Checks for untyped FORM parameters`,
71280
71283
  tags: [_irule_1.RuleTag.SingleFile],
71281
- badExample: `FORM foo USING bar.
71284
+ badExample: `FORM foo USING bar.
71282
71285
  ENDFORM.`,
71283
- goodExample: `FORM foo USING bar TYPE string.
71286
+ goodExample: `FORM foo USING bar TYPE string.
71284
71287
  ENDFORM.`,
71285
71288
  };
71286
71289
  }
@@ -71953,38 +71956,38 @@ class UnnecessaryPragma extends _abap_rule_1.ABAPRule {
71953
71956
  key: "unnecessary_pragma",
71954
71957
  title: "Unnecessary Pragma",
71955
71958
  shortDescription: `Finds pragmas which can be removed`,
71956
- extendedInformation: `* NO_HANDLER with handler
71957
-
71958
- * NEEDED without definition
71959
-
71960
- * NO_TEXT without texts
71961
-
71962
- * SUBRC_OK where sy-subrc is checked
71963
-
71959
+ extendedInformation: `* NO_HANDLER with handler
71960
+
71961
+ * NEEDED without definition
71962
+
71963
+ * NO_TEXT without texts
71964
+
71965
+ * SUBRC_OK where sy-subrc is checked
71966
+
71964
71967
  NO_HANDLER inside macros are not checked`,
71965
71968
  tags: [_irule_1.RuleTag.SingleFile],
71966
- badExample: `TRY.
71967
- ...
71968
- CATCH zcx_abapgit_exception ##NO_HANDLER.
71969
- RETURN. " it has a handler
71970
- ENDTRY.
71971
- MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
71972
- SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
71973
- IF sy-subrc <> 0.
71969
+ badExample: `TRY.
71970
+ ...
71971
+ CATCH zcx_abapgit_exception ##NO_HANDLER.
71972
+ RETURN. " it has a handler
71973
+ ENDTRY.
71974
+ MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
71975
+ SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
71976
+ IF sy-subrc <> 0.
71974
71977
  ENDIF.`,
71975
- goodExample: `TRY.
71976
- ...
71977
- CATCH zcx_abapgit_exception.
71978
- RETURN.
71979
- ENDTRY.
71980
- MESSAGE w125(zbar) WITH c_foo INTO message.
71981
- SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
71982
- IF sy-subrc <> 0.
71983
- ENDIF.
71984
-
71985
- DATA: BEGIN OF blah ##NEEDED,
71986
- test1 TYPE string,
71987
- test2 TYPE string,
71978
+ goodExample: `TRY.
71979
+ ...
71980
+ CATCH zcx_abapgit_exception.
71981
+ RETURN.
71982
+ ENDTRY.
71983
+ MESSAGE w125(zbar) WITH c_foo INTO message.
71984
+ SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
71985
+ IF sy-subrc <> 0.
71986
+ ENDIF.
71987
+
71988
+ DATA: BEGIN OF blah ##NEEDED,
71989
+ test1 TYPE string,
71990
+ test2 TYPE string,
71988
71991
  END OF blah.`,
71989
71992
  };
71990
71993
  }
@@ -72151,18 +72154,18 @@ class UnnecessaryReturn extends _abap_rule_1.ABAPRule {
72151
72154
  shortDescription: `Finds unnecessary RETURN statements`,
72152
72155
  extendedInformation: `Finds unnecessary RETURN statements`,
72153
72156
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
72154
- badExample: `FORM hello1.
72155
- WRITE 'world'.
72156
- RETURN.
72157
- ENDFORM.
72158
-
72159
- FORM foo.
72160
- IF 1 = 2.
72161
- RETURN.
72162
- ENDIF.
72157
+ badExample: `FORM hello1.
72158
+ WRITE 'world'.
72159
+ RETURN.
72160
+ ENDFORM.
72161
+
72162
+ FORM foo.
72163
+ IF 1 = 2.
72164
+ RETURN.
72165
+ ENDIF.
72163
72166
  ENDFORM.`,
72164
- goodExample: `FORM hello2.
72165
- WRITE 'world'.
72167
+ goodExample: `FORM hello2.
72168
+ WRITE 'world'.
72166
72169
  ENDFORM.`,
72167
72170
  };
72168
72171
  }
@@ -72513,13 +72516,13 @@ class UnusedMacros {
72513
72516
  title: "Unused macros",
72514
72517
  shortDescription: `Checks for unused macro definitions definitions`,
72515
72518
  tags: [_irule_1.RuleTag.Quickfix],
72516
- badExample: `DEFINE foobar1.
72517
- WRITE 'hello'.
72519
+ badExample: `DEFINE foobar1.
72520
+ WRITE 'hello'.
72518
72521
  END-OF-DEFINITION.`,
72519
- goodExample: `DEFINE foobar2.
72520
- WRITE 'hello'.
72521
- END-OF-DEFINITION.
72522
-
72522
+ goodExample: `DEFINE foobar2.
72523
+ WRITE 'hello'.
72524
+ END-OF-DEFINITION.
72525
+
72523
72526
  foobar2.`,
72524
72527
  };
72525
72528
  }
@@ -72627,17 +72630,17 @@ class UnusedMethods {
72627
72630
  key: "unused_methods",
72628
72631
  title: "Unused methods",
72629
72632
  shortDescription: `Checks for unused methods`,
72630
- extendedInformation: `Checks private and protected methods.
72631
-
72632
- Unused methods are not reported if the object contains parser or syntax errors.
72633
-
72634
- Skips:
72635
- * methods FOR TESTING
72636
- * methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
72637
- * class_constructor + constructor methods
72638
- * event handlers
72639
- * methods that are redefined
72640
- * INCLUDEs
72633
+ extendedInformation: `Checks private and protected methods.
72634
+
72635
+ Unused methods are not reported if the object contains parser or syntax errors.
72636
+
72637
+ Skips:
72638
+ * methods FOR TESTING
72639
+ * methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
72640
+ * class_constructor + constructor methods
72641
+ * event handlers
72642
+ * methods that are redefined
72643
+ * INCLUDEs
72641
72644
  `,
72642
72645
  tags: [],
72643
72646
  pragma: "##CALLED",
@@ -73071,23 +73074,23 @@ class UnusedVariables {
73071
73074
  key: "unused_variables",
73072
73075
  title: "Unused variables",
73073
73076
  shortDescription: `Checks for unused variables and constants`,
73074
- extendedInformation: `Skips event parameters.
73075
-
73076
- Note that this currently does not work if the source code uses macros.
73077
-
73078
- Unused variables are not reported if the object contains parser or syntax errors.
73079
-
73077
+ extendedInformation: `Skips event parameters.
73078
+
73079
+ Note that this currently does not work if the source code uses macros.
73080
+
73081
+ Unused variables are not reported if the object contains parser or syntax errors.
73082
+
73080
73083
  Errors found in INCLUDES are reported for the main program.`,
73081
73084
  tags: [_irule_1.RuleTag.Quickfix],
73082
73085
  pragma: "##NEEDED",
73083
73086
  pseudoComment: "EC NEEDED",
73084
- badExample: `DATA: BEGIN OF blah1,
73085
- test TYPE string,
73086
- test2 TYPE string,
73087
+ badExample: `DATA: BEGIN OF blah1,
73088
+ test TYPE string,
73089
+ test2 TYPE string,
73087
73090
  END OF blah1.`,
73088
- goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
73089
- test TYPE string,
73090
- test2 TYPE string,
73091
+ goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
73092
+ test TYPE string,
73093
+ test2 TYPE string,
73091
73094
  END OF blah2.`,
73092
73095
  };
73093
73096
  }
@@ -73306,15 +73309,15 @@ class UseBoolExpression extends _abap_rule_1.ABAPRule {
73306
73309
  shortDescription: `Use boolean expression, xsdbool from 740sp08 and up, boolc from 702 and up`,
73307
73310
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
73308
73311
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
73309
- badExample: `IF line IS INITIAL.
73310
- has_entries = abap_false.
73311
- ELSE.
73312
- has_entries = abap_true.
73313
- ENDIF.
73314
-
73312
+ badExample: `IF line IS INITIAL.
73313
+ has_entries = abap_false.
73314
+ ELSE.
73315
+ has_entries = abap_true.
73316
+ ENDIF.
73317
+
73315
73318
  DATA(fsdf) = COND #( WHEN foo <> bar THEN abap_true ELSE abap_false ).`,
73316
- goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
73317
-
73319
+ goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
73320
+
73318
73321
  DATA(fsdf) = xsdbool( foo <> bar ).`,
73319
73322
  };
73320
73323
  }
@@ -73432,15 +73435,15 @@ class UseClassBasedExceptions extends _abap_rule_1.ABAPRule {
73432
73435
  shortDescription: `Use class based exceptions, checks interface and class definitions`,
73433
73436
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-class-based-exceptions`,
73434
73437
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
73435
- badExample: `INTERFACE lif.
73436
- METHODS load_data
73437
- EXCEPTIONS
73438
- invalid_parameter.
73438
+ badExample: `INTERFACE lif.
73439
+ METHODS load_data
73440
+ EXCEPTIONS
73441
+ invalid_parameter.
73439
73442
  ENDINTERFACE.`,
73440
- goodExample: `INTERFACE lif.
73441
- METHODS load_data
73442
- RAISING
73443
- cx_something.
73443
+ goodExample: `INTERFACE lif.
73444
+ METHODS load_data
73445
+ RAISING
73446
+ cx_something.
73444
73447
  ENDINTERFACE.`,
73445
73448
  };
73446
73449
  }
@@ -73500,15 +73503,15 @@ class UseLineExists extends _abap_rule_1.ABAPRule {
73500
73503
  key: "use_line_exists",
73501
73504
  title: "Use line_exists",
73502
73505
  shortDescription: `Use line_exists, from 740sp02 and up`,
73503
- extendedInformation: `
73504
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
73505
-
73506
+ extendedInformation: `
73507
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
73508
+
73506
73509
  Not reported if the READ TABLE statement contains BINARY SEARCH.`,
73507
73510
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
73508
- badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
73509
- IF sy-subrc = 0.
73511
+ badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
73512
+ IF sy-subrc = 0.
73510
73513
  ENDIF.`,
73511
- goodExample: `IF line_exists( my_table[ key = 'A' ] ).
73514
+ goodExample: `IF line_exists( my_table[ key = 'A' ] ).
73512
73515
  ENDIF.`,
73513
73516
  };
73514
73517
  }
@@ -73618,10 +73621,10 @@ class UseNew extends _abap_rule_1.ABAPRule {
73618
73621
  key: "use_new",
73619
73622
  title: "Use NEW",
73620
73623
  shortDescription: `Checks for deprecated CREATE OBJECT statements.`,
73621
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
73622
-
73623
- If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
73624
-
73624
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
73625
+
73626
+ If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
73627
+
73625
73628
  Applicable from v740sp02 and up`,
73626
73629
  badExample: `CREATE OBJECT ref.`,
73627
73630
  goodExample: `ref = NEW #( ).`,
@@ -73719,13 +73722,13 @@ class WhenOthersLast extends _abap_rule_1.ABAPRule {
73719
73722
  title: "WHEN OTHERS last",
73720
73723
  shortDescription: `Checks that WHEN OTHERS is placed the last within a CASE statement.`,
73721
73724
  tags: [_irule_1.RuleTag.SingleFile],
73722
- badExample: `CASE bar.
73723
- WHEN OTHERS.
73724
- WHEN 2.
73725
+ badExample: `CASE bar.
73726
+ WHEN OTHERS.
73727
+ WHEN 2.
73725
73728
  ENDCASE.`,
73726
- goodExample: `CASE bar.
73727
- WHEN 2.
73728
- WHEN OTHERS.
73729
+ goodExample: `CASE bar.
73730
+ WHEN 2.
73731
+ WHEN OTHERS.
73729
73732
  ENDCASE.`,
73730
73733
  };
73731
73734
  }