@abaplint/transpiler-cli 2.8.28 → 2.8.29

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 (2) hide show
  1. package/build/bundle.js +810 -807
  2. package/package.json +4 -4
package/build/bundle.js CHANGED
@@ -6935,6 +6935,7 @@ exports.SQLCompare = void 0;
6935
6935
  const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
6936
6936
  const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
6937
6937
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
6938
+ const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
6938
6939
  class SQLCompare extends combi_1.Expression {
6939
6940
  getRunnable() {
6940
6941
  const subSelect = (0, combi_1.seq)("(", _1.Select, ")");
@@ -6944,7 +6945,9 @@ class SQLCompare extends combi_1.Expression {
6944
6945
  const source = new _1.SQLSource();
6945
6946
  const sub = (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.altPrio)("ALL", "ANY", "SOME")), subSelect);
6946
6947
  const arith = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.plusPrio)((0, combi_1.seq)((0, combi_1.altPrio)("+", "-", "*", "/"), _1.SQLFieldName)));
6947
- 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));
6948
+ const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeftW), _1.Source, (0, combi_1.tok)(tokens_1.WParenRightW));
6949
+ 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)));
6950
+ 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));
6948
6951
  const exists = (0, combi_1.seq)("EXISTS", subSelect);
6949
6952
  return (0, combi_1.altPrio)(exists, _1.Dynamic, rett);
6950
6953
  }
@@ -8217,7 +8220,7 @@ class TypeTable extends combi_1.Expression {
8217
8220
  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);
8218
8221
  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))));
8219
8222
  const rangeType = (0, combi_1.seq)("RANGE OF", _1.TypeName, (0, combi_1.optPrio)(header), (0, combi_1.optPrio)(initial));
8220
- const rangeLike = (0, combi_1.seq)("RANGE OF", _1.SimpleFieldChain, (0, combi_1.optPrio)(header), (0, combi_1.optPrio)(initial));
8223
+ const rangeLike = (0, combi_1.seq)("RANGE OF", field_chain_1.FieldChain, (0, combi_1.optPrio)(header), (0, combi_1.optPrio)(initial));
8221
8224
  // a maximum of 15 secondary table keys can be defined
8222
8225
  // "WITH" is not allowed as a field name in keys
8223
8226
  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)))));
@@ -22228,7 +22231,7 @@ class BasicTypes {
22228
22231
  return new Types.TableType(structure, options, name);
22229
22232
  }
22230
22233
  else if (text.startsWith("LIKE RANGE OF ")) {
22231
- const sub = node.findFirstExpression(Expressions.SimpleFieldChain);
22234
+ const sub = node.findFirstExpression(Expressions.FieldChain);
22232
22235
  found = this.resolveLikeName(sub);
22233
22236
  if (found === undefined) {
22234
22237
  return new Types.UnknownType("LIKE RANGE OF, could not resolve type");
@@ -33409,13 +33412,13 @@ class FlowGraph {
33409
33412
  this.label = label;
33410
33413
  }
33411
33414
  toDigraph() {
33412
- return `digraph G {
33413
- labelloc="t";
33414
- label="${this.label}";
33415
- graph [fontname = "helvetica"];
33416
- node [fontname = "helvetica", shape="box"];
33417
- edge [fontname = "helvetica"];
33418
- ${this.toTextEdges()}
33415
+ return `digraph G {
33416
+ labelloc="t";
33417
+ label="${this.label}";
33418
+ graph [fontname = "helvetica"];
33419
+ node [fontname = "helvetica", shape="box"];
33420
+ edge [fontname = "helvetica"];
33421
+ ${this.toTextEdges()}
33419
33422
  }`;
33420
33423
  }
33421
33424
  listSources(node) {
@@ -41514,13 +41517,13 @@ class Help {
41514
41517
  /////////////////////////////////////////////////
41515
41518
  static dumpABAP(file, reg, textDocument, position) {
41516
41519
  let content = "";
41517
- content = `
41518
- <a href="#_tokens" rel="no-refresh">Tokens</a> |
41519
- <a href="#_statements" rel="no-refresh">Statements</a> |
41520
- <a href="#_structure" rel="no-refresh">Structure</a> |
41521
- <a href="#_files" rel="no-refresh">Files</a> |
41522
- <a href="#_info" rel="no-refresh">Info Dump</a>
41523
- <hr>
41520
+ content = `
41521
+ <a href="#_tokens" rel="no-refresh">Tokens</a> |
41522
+ <a href="#_statements" rel="no-refresh">Statements</a> |
41523
+ <a href="#_structure" rel="no-refresh">Structure</a> |
41524
+ <a href="#_files" rel="no-refresh">Files</a> |
41525
+ <a href="#_info" rel="no-refresh">Info Dump</a>
41526
+ <hr>
41524
41527
  ` +
41525
41528
  "<tt>" + textDocument.uri + " (" +
41526
41529
  (position.line + 1) + ", " +
@@ -50722,7 +50725,7 @@ class Registry {
50722
50725
  }
50723
50726
  static abaplintVersion() {
50724
50727
  // magic, see build script "version.sh"
50725
- return "2.110.4";
50728
+ return "2.110.6";
50726
50729
  }
50727
50730
  getDDICReferences() {
50728
50731
  return this.ddicReferences;
@@ -51041,10 +51044,10 @@ class SevenBitAscii {
51041
51044
  key: "7bit_ascii",
51042
51045
  title: "Check for 7bit ascii",
51043
51046
  shortDescription: `Only allow characters from the 7bit ASCII set.`,
51044
- extendedInformation: `https://docs.abapopenchecks.org/checks/05/
51045
-
51046
- https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
51047
-
51047
+ extendedInformation: `https://docs.abapopenchecks.org/checks/05/
51048
+
51049
+ https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
51050
+
51048
51051
  Checkes files with extensions ".abap" and ".asddls"`,
51049
51052
  tags: [_irule_1.RuleTag.SingleFile],
51050
51053
  badExample: `WRITE '뽑'.`,
@@ -51250,10 +51253,10 @@ class Abapdoc extends _abap_rule_1.ABAPRule {
51250
51253
  key: "abapdoc",
51251
51254
  title: "Check abapdoc",
51252
51255
  shortDescription: `Various checks regarding abapdoc.`,
51253
- extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
51254
-
51255
- Plus class and interface definitions.
51256
-
51256
+ extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
51257
+
51258
+ Plus class and interface definitions.
51259
+
51257
51260
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#abap-doc-only-for-public-apis`,
51258
51261
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
51259
51262
  };
@@ -51391,49 +51394,49 @@ class AlignParameters extends _abap_rule_1.ABAPRule {
51391
51394
  key: "align_parameters",
51392
51395
  title: "Align Parameters",
51393
51396
  shortDescription: `Checks for vertially aligned parameters`,
51394
- extendedInformation: `Checks:
51395
- * function module calls
51396
- * method calls
51397
- * VALUE constructors
51398
- * NEW constructors
51399
- * RAISE EXCEPTION statements
51400
- * CREATE OBJECT statements
51401
- * RAISE EVENT statements
51402
-
51403
- https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
51404
-
51405
- Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
51406
-
51407
- If parameters are on the same row, no issues are reported, see
51397
+ extendedInformation: `Checks:
51398
+ * function module calls
51399
+ * method calls
51400
+ * VALUE constructors
51401
+ * NEW constructors
51402
+ * RAISE EXCEPTION statements
51403
+ * CREATE OBJECT statements
51404
+ * RAISE EVENT statements
51405
+
51406
+ https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
51407
+
51408
+ Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
51409
+
51410
+ If parameters are on the same row, no issues are reported, see
51408
51411
  https://rules.abaplint.org/max_one_method_parameter_per_line/ for splitting parameters to lines`,
51409
51412
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
51410
- badExample: `CALL FUNCTION 'FOOBAR'
51411
- EXPORTING
51412
- foo = 2
51413
- parameter = 3.
51414
-
51415
- foobar( moo = 1
51416
- param = 1 ).
51417
-
51418
- foo = VALUE #(
51419
- foo = bar
51413
+ badExample: `CALL FUNCTION 'FOOBAR'
51414
+ EXPORTING
51415
+ foo = 2
51416
+ parameter = 3.
51417
+
51418
+ foobar( moo = 1
51419
+ param = 1 ).
51420
+
51421
+ foo = VALUE #(
51422
+ foo = bar
51420
51423
  moo = 2 ).`,
51421
- goodExample: `CALL FUNCTION 'FOOBAR'
51422
- EXPORTING
51423
- foo = 2
51424
- parameter = 3.
51425
-
51426
- foobar( moo = 1
51427
- param = 1 ).
51428
-
51429
- foo = VALUE #(
51430
- foo = bar
51431
- moo = 2 ).
51432
-
51433
- DATA(sdf) = VALUE type(
51434
- common_val = 2
51435
- another_common = 5
51436
- ( row_value = 4
51424
+ goodExample: `CALL FUNCTION 'FOOBAR'
51425
+ EXPORTING
51426
+ foo = 2
51427
+ parameter = 3.
51428
+
51429
+ foobar( moo = 1
51430
+ param = 1 ).
51431
+
51432
+ foo = VALUE #(
51433
+ foo = bar
51434
+ moo = 2 ).
51435
+
51436
+ DATA(sdf) = VALUE type(
51437
+ common_val = 2
51438
+ another_common = 5
51439
+ ( row_value = 4
51437
51440
  value_foo = 5 ) ).`,
51438
51441
  };
51439
51442
  }
@@ -51867,37 +51870,37 @@ class AlignTypeExpressions extends _abap_rule_1.ABAPRule {
51867
51870
  key: "align_type_expressions",
51868
51871
  title: "Align TYPE expressions",
51869
51872
  shortDescription: `Align TYPE expressions in statements`,
51870
- extendedInformation: `
51871
- Currently works for METHODS + BEGIN OF
51872
-
51873
- If BEGIN OF has an INCLUDE TYPE its ignored
51874
-
51875
- Also note that clean ABAP does not recommend aligning TYPE clauses:
51873
+ extendedInformation: `
51874
+ Currently works for METHODS + BEGIN OF
51875
+
51876
+ If BEGIN OF has an INCLUDE TYPE its ignored
51877
+
51878
+ Also note that clean ABAP does not recommend aligning TYPE clauses:
51876
51879
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-align-type-clauses`,
51877
51880
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix],
51878
- badExample: `
51879
- TYPES: BEGIN OF foo,
51880
- bar TYPE i,
51881
- foobar TYPE i,
51882
- END OF foo.
51883
-
51884
- INTERFACE lif.
51885
- METHODS bar
51886
- IMPORTING
51887
- foo TYPE i
51888
- foobar TYPE i.
51881
+ badExample: `
51882
+ TYPES: BEGIN OF foo,
51883
+ bar TYPE i,
51884
+ foobar TYPE i,
51885
+ END OF foo.
51886
+
51887
+ INTERFACE lif.
51888
+ METHODS bar
51889
+ IMPORTING
51890
+ foo TYPE i
51891
+ foobar TYPE i.
51889
51892
  ENDINTERFACE.`,
51890
- goodExample: `
51891
- TYPES: BEGIN OF foo,
51892
- bar TYPE i,
51893
- foobar TYPE i,
51894
- END OF foo.
51895
-
51896
- INTERFACE lif.
51897
- METHODS bar
51898
- IMPORTING
51899
- foo TYPE i
51900
- foobar TYPE i.
51893
+ goodExample: `
51894
+ TYPES: BEGIN OF foo,
51895
+ bar TYPE i,
51896
+ foobar TYPE i,
51897
+ END OF foo.
51898
+
51899
+ INTERFACE lif.
51900
+ METHODS bar
51901
+ IMPORTING
51902
+ foo TYPE i
51903
+ foobar TYPE i.
51901
51904
  ENDINTERFACE.`,
51902
51905
  };
51903
51906
  }
@@ -52176,15 +52179,15 @@ class AmbiguousStatement extends _abap_rule_1.ABAPRule {
52176
52179
  return {
52177
52180
  key: "ambiguous_statement",
52178
52181
  title: "Check for ambigious statements",
52179
- shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
52180
- Add "TABLE" keyword or "@" for escaping SQL variables
52181
-
52182
+ shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
52183
+ Add "TABLE" keyword or "@" for escaping SQL variables
52184
+
52182
52185
  Only works if the target version is 740sp05 or above`,
52183
52186
  tags: [_irule_1.RuleTag.SingleFile],
52184
- badExample: `DELETE foo FROM bar.
52187
+ badExample: `DELETE foo FROM bar.
52185
52188
  MODIFY foo FROM bar.`,
52186
- goodExample: `DELETE foo FROM @bar.
52187
- MODIFY TABLE foo FROM bar.
52189
+ goodExample: `DELETE foo FROM @bar.
52190
+ MODIFY TABLE foo FROM bar.
52188
52191
  MODIFY zfoo FROM @wa.`,
52189
52192
  };
52190
52193
  }
@@ -52289,16 +52292,16 @@ class AvoidUse extends _abap_rule_1.ABAPRule {
52289
52292
  key: "avoid_use",
52290
52293
  title: "Avoid use of certain statements",
52291
52294
  shortDescription: `Detects usage of certain statements.`,
52292
- extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
52293
-
52294
- Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
52295
-
52296
- STATICS: use CLASS-DATA instead
52297
-
52298
- DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
52299
-
52300
- TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
52301
-
52295
+ extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
52296
+
52297
+ Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
52298
+
52299
+ STATICS: use CLASS-DATA instead
52300
+
52301
+ DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
52302
+
52303
+ TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
52304
+
52302
52305
  BREAK points`,
52303
52306
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
52304
52307
  };
@@ -52430,11 +52433,11 @@ class BeginEndNames extends _abap_rule_1.ABAPRule {
52430
52433
  title: "Check BEGIN END names",
52431
52434
  shortDescription: `Check BEGIN OF and END OF names match, plus there must be statements between BEGIN and END`,
52432
52435
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
52433
- badExample: `DATA: BEGIN OF stru,
52434
- field TYPE i,
52436
+ badExample: `DATA: BEGIN OF stru,
52437
+ field TYPE i,
52435
52438
  END OF structure_not_the_same.`,
52436
- goodExample: `DATA: BEGIN OF stru,
52437
- field TYPE i,
52439
+ goodExample: `DATA: BEGIN OF stru,
52440
+ field TYPE i,
52438
52441
  END OF stru.`,
52439
52442
  };
52440
52443
  }
@@ -52531,20 +52534,20 @@ class BeginSingleInclude extends _abap_rule_1.ABAPRule {
52531
52534
  title: "BEGIN contains single INCLUDE",
52532
52535
  shortDescription: `Finds TYPE BEGIN with just one INCLUDE TYPE, and DATA with single INCLUDE STRUCTURE`,
52533
52536
  tags: [_irule_1.RuleTag.SingleFile],
52534
- badExample: `TYPES: BEGIN OF dummy1.
52535
- INCLUDE TYPE dselc.
52536
- TYPES: END OF dummy1.
52537
-
52538
- DATA BEGIN OF foo.
52539
- INCLUDE STRUCTURE syst.
52540
- DATA END OF foo.
52541
-
52542
- STATICS BEGIN OF bar.
52543
- INCLUDE STRUCTURE syst.
52537
+ badExample: `TYPES: BEGIN OF dummy1.
52538
+ INCLUDE TYPE dselc.
52539
+ TYPES: END OF dummy1.
52540
+
52541
+ DATA BEGIN OF foo.
52542
+ INCLUDE STRUCTURE syst.
52543
+ DATA END OF foo.
52544
+
52545
+ STATICS BEGIN OF bar.
52546
+ INCLUDE STRUCTURE syst.
52544
52547
  STATICS END OF bar.`,
52545
- goodExample: `DATA BEGIN OF foo.
52546
- DATA field TYPE i.
52547
- INCLUDE STRUCTURE dselc.
52548
+ goodExample: `DATA BEGIN OF foo.
52549
+ DATA field TYPE i.
52550
+ INCLUDE STRUCTURE dselc.
52548
52551
  DATA END OF foo.`,
52549
52552
  };
52550
52553
  }
@@ -52634,9 +52637,9 @@ class CallTransactionAuthorityCheck extends _abap_rule_1.ABAPRule {
52634
52637
  extendedInformation: `https://docs.abapopenchecks.org/checks/54/`,
52635
52638
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
52636
52639
  badExample: `CALL TRANSACTION 'FOO'.`,
52637
- goodExample: `TRY.
52638
- CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
52639
- CATCH cx_sy_authorization_error.
52640
+ goodExample: `TRY.
52641
+ CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
52642
+ CATCH cx_sy_authorization_error.
52640
52643
  ENDTRY.`,
52641
52644
  };
52642
52645
  }
@@ -52701,10 +52704,10 @@ class CDSCommentStyle {
52701
52704
  key: "cds_comment_style",
52702
52705
  title: "CDS Comment Style",
52703
52706
  shortDescription: `Check for obsolete comment style`,
52704
- extendedInformation: `Check for obsolete comment style
52705
-
52706
- Comments starting with "--" are considered obsolete
52707
-
52707
+ extendedInformation: `Check for obsolete comment style
52708
+
52709
+ Comments starting with "--" are considered obsolete
52710
+
52708
52711
  https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abencds_general_syntax_rules.htm`,
52709
52712
  tags: [_irule_1.RuleTag.SingleFile],
52710
52713
  badExample: "-- this is a comment",
@@ -52771,10 +52774,10 @@ class CDSLegacyView {
52771
52774
  title: "CDS Legacy View",
52772
52775
  shortDescription: `Identify CDS Legacy Views`,
52773
52776
  // eslint-disable-next-line max-len
52774
- extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
52775
-
52776
- https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
52777
-
52777
+ extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
52778
+
52779
+ https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
52780
+
52778
52781
  v755 and up`,
52779
52782
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Upport],
52780
52783
  };
@@ -52929,10 +52932,10 @@ class ChainMainlyDeclarations extends _abap_rule_1.ABAPRule {
52929
52932
  key: "chain_mainly_declarations",
52930
52933
  title: "Chain mainly declarations",
52931
52934
  shortDescription: `Chain mainly declarations, allows chaining for the configured statements, reports errors for other statements.`,
52932
- extendedInformation: `
52933
- https://docs.abapopenchecks.org/checks/23/
52934
-
52935
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
52935
+ extendedInformation: `
52936
+ https://docs.abapopenchecks.org/checks/23/
52937
+
52938
+ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
52936
52939
  `,
52937
52940
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
52938
52941
  badExample: `CALL METHOD: bar.`,
@@ -53108,17 +53111,17 @@ class ChangeIfToCase extends _abap_rule_1.ABAPRule {
53108
53111
  title: "Change IF to CASE",
53109
53112
  shortDescription: `Finds IF constructs that can be changed to CASE`,
53110
53113
  // eslint-disable-next-line max-len
53111
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
53112
-
53114
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
53115
+
53113
53116
  If the first comparison is a boolean compare, no issue is reported.`,
53114
53117
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
53115
- badExample: `IF l_fcat-fieldname EQ 'FOO'.
53116
- ELSEIF l_fcat-fieldname = 'BAR'
53117
- OR l_fcat-fieldname = 'MOO'.
53118
+ badExample: `IF l_fcat-fieldname EQ 'FOO'.
53119
+ ELSEIF l_fcat-fieldname = 'BAR'
53120
+ OR l_fcat-fieldname = 'MOO'.
53118
53121
  ENDIF.`,
53119
- goodExample: `CASE l_fcat-fieldname.
53120
- WHEN 'FOO'.
53121
- WHEN 'BAR' OR 'MOO'.
53122
+ goodExample: `CASE l_fcat-fieldname.
53123
+ WHEN 'FOO'.
53124
+ WHEN 'BAR' OR 'MOO'.
53122
53125
  ENDCASE.`,
53123
53126
  };
53124
53127
  }
@@ -53255,8 +53258,8 @@ class CheckAbstract extends _abap_rule_1.ABAPRule {
53255
53258
  return {
53256
53259
  key: "check_abstract",
53257
53260
  title: "Check abstract methods and classes",
53258
- shortDescription: `Checks abstract methods and classes:
53259
- - class defined as abstract and final,
53261
+ shortDescription: `Checks abstract methods and classes:
53262
+ - class defined as abstract and final,
53260
53263
  - non-abstract class contains abstract methods`,
53261
53264
  extendedInformation: `If a class defines only constants, use an interface instead`,
53262
53265
  tags: [_irule_1.RuleTag.SingleFile],
@@ -53337,11 +53340,11 @@ class CheckComments extends _abap_rule_1.ABAPRule {
53337
53340
  return {
53338
53341
  key: "check_comments",
53339
53342
  title: "Check Comments",
53340
- shortDescription: `
53343
+ shortDescription: `
53341
53344
  Various checks for comment usage.`,
53342
- extendedInformation: `
53343
- Detects end of line comments. Comments starting with "#EC" or "##" are ignored
53344
-
53345
+ extendedInformation: `
53346
+ Detects end of line comments. Comments starting with "#EC" or "##" are ignored
53347
+
53345
53348
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#put-comments-before-the-statement-they-relate-to`,
53346
53349
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
53347
53350
  badExample: `WRITE 2. " descriptive comment`,
@@ -53503,9 +53506,9 @@ class CheckInclude {
53503
53506
  key: "check_include",
53504
53507
  title: "Check INCLUDEs",
53505
53508
  shortDescription: `Checks INCLUDE statements`,
53506
- extendedInformation: `
53507
- * Reports unused includes
53508
- * Errors if the includes are not found
53509
+ extendedInformation: `
53510
+ * Reports unused includes
53511
+ * Errors if the includes are not found
53509
53512
  * Error if including a main program`,
53510
53513
  tags: [_irule_1.RuleTag.Syntax],
53511
53514
  };
@@ -53581,14 +53584,14 @@ class CheckSubrc extends _abap_rule_1.ABAPRule {
53581
53584
  key: "check_subrc",
53582
53585
  title: "Check sy-subrc",
53583
53586
  shortDescription: `Check sy-subrc`,
53584
- extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
53585
-
53586
- If sy-dbcnt is checked after database statements, it is considered okay.
53587
-
53588
- "SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
53589
-
53590
- If IS ASSIGNED is checked after assigning, it is considered okay.
53591
-
53587
+ extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
53588
+
53589
+ If sy-dbcnt is checked after database statements, it is considered okay.
53590
+
53591
+ "SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
53592
+
53593
+ If IS ASSIGNED is checked after assigning, it is considered okay.
53594
+
53592
53595
  FIND statement with MATCH COUNT is considered okay if subrc is not checked`,
53593
53596
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
53594
53597
  pseudoComment: "EC CI_SUBRC",
@@ -54157,17 +54160,17 @@ class ClassicExceptionsOverlap extends _abap_rule_1.ABAPRule {
54157
54160
  shortDescription: `Find overlapping classic exceptions`,
54158
54161
  extendedInformation: `When debugging its typically good to know exactly which exception is caught`,
54159
54162
  tags: [_irule_1.RuleTag.SingleFile],
54160
- badExample: `CALL FUNCTION 'SOMETHING'
54161
- EXCEPTIONS
54162
- system_failure = 1 MESSAGE lv_message
54163
- communication_failure = 1 MESSAGE lv_message
54164
- resource_failure = 1
54163
+ badExample: `CALL FUNCTION 'SOMETHING'
54164
+ EXCEPTIONS
54165
+ system_failure = 1 MESSAGE lv_message
54166
+ communication_failure = 1 MESSAGE lv_message
54167
+ resource_failure = 1
54165
54168
  OTHERS = 1.`,
54166
- goodExample: `CALL FUNCTION 'SOMETHING'
54167
- EXCEPTIONS
54168
- system_failure = 1 MESSAGE lv_message
54169
- communication_failure = 2 MESSAGE lv_message
54170
- resource_failure = 3
54169
+ goodExample: `CALL FUNCTION 'SOMETHING'
54170
+ EXCEPTIONS
54171
+ system_failure = 1 MESSAGE lv_message
54172
+ communication_failure = 2 MESSAGE lv_message
54173
+ resource_failure = 3
54171
54174
  OTHERS = 4.`,
54172
54175
  };
54173
54176
  }
@@ -54413,7 +54416,7 @@ class CommentedCode extends _abap_rule_1.ABAPRule {
54413
54416
  key: "commented_code",
54414
54417
  title: "Find commented code",
54415
54418
  shortDescription: `Detects usage of commented out code.`,
54416
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it
54419
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it
54417
54420
  https://docs.abapopenchecks.org/checks/14/`,
54418
54421
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
54419
54422
  badExample: `* WRITE 'hello world'.`,
@@ -54646,10 +54649,10 @@ class ConstructorVisibilityPublic {
54646
54649
  key: "constructor_visibility_public",
54647
54650
  title: "Check constructor visibility is public",
54648
54651
  shortDescription: `Constructor must be placed in the public section, even if the class is not CREATE PUBLIC.`,
54649
- extendedInformation: `
54650
- This only applies to global classes.
54651
-
54652
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
54652
+ extendedInformation: `
54653
+ This only applies to global classes.
54654
+
54655
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
54653
54656
  https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abeninstance_constructor_guidl.htm`,
54654
54657
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
54655
54658
  };
@@ -54724,8 +54727,8 @@ class ContainsTab extends _abap_rule_1.ABAPRule {
54724
54727
  key: "contains_tab",
54725
54728
  title: "Code contains tab",
54726
54729
  shortDescription: `Checks for usage of tabs (enable to enforce spaces)`,
54727
- extendedInformation: `
54728
- https://docs.abapopenchecks.org/checks/09/
54730
+ extendedInformation: `
54731
+ https://docs.abapopenchecks.org/checks/09/
54729
54732
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
54730
54733
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
54731
54734
  badExample: `\tWRITE 'hello world'.`,
@@ -54812,10 +54815,10 @@ class CyclicOO {
54812
54815
  key: "cyclic_oo",
54813
54816
  title: "Cyclic OO",
54814
54817
  shortDescription: `Finds cyclic OO references`,
54815
- extendedInformation: `Runs for global INTF + CLAS objects
54816
-
54817
- Objects must be without syntax errors for this rule to take effect
54818
-
54818
+ extendedInformation: `Runs for global INTF + CLAS objects
54819
+
54820
+ Objects must be without syntax errors for this rule to take effect
54821
+
54819
54822
  References in testclass includes are ignored`,
54820
54823
  };
54821
54824
  }
@@ -55057,7 +55060,7 @@ class DangerousStatement extends _abap_rule_1.ABAPRule {
55057
55060
  key: "dangerous_statement",
55058
55061
  title: "Dangerous statement",
55059
55062
  shortDescription: `Detects potentially dangerous statements`,
55060
- extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
55063
+ extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
55061
55064
  dynamic SQL can potentially create SQL injection problems`,
55062
55065
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
55063
55066
  };
@@ -55261,13 +55264,13 @@ class DefinitionsTop extends _abap_rule_1.ABAPRule {
55261
55264
  shortDescription: `Checks that definitions are placed at the beginning of METHODs, FORMs and FUNCTIONs.`,
55262
55265
  extendedInformation: `https://docs.abapopenchecks.org/checks/17/`,
55263
55266
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
55264
- badExample: `FROM foo.
55265
- WRITE 'hello'.
55266
- DATA int TYPE i.
55267
+ badExample: `FROM foo.
55268
+ WRITE 'hello'.
55269
+ DATA int TYPE i.
55267
55270
  ENDFORM.`,
55268
- goodExample: `FROM foo.
55269
- DATA int TYPE i.
55270
- WRITE 'hello'.
55271
+ goodExample: `FROM foo.
55272
+ DATA int TYPE i.
55273
+ WRITE 'hello'.
55271
55274
  ENDFORM.`,
55272
55275
  };
55273
55276
  }
@@ -55803,39 +55806,39 @@ class Downport {
55803
55806
  key: "downport",
55804
55807
  title: "Downport statement",
55805
55808
  shortDescription: `Downport functionality`,
55806
- extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with
55807
- a higher level language version. If successful, various rules are applied to downport the statement.
55808
- Target downport version is always v702, thus rule is only enabled if target version is v702.
55809
-
55810
- Current rules:
55811
- * NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/
55812
- * DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/
55813
- * FIELD-SYMBOL() definitions are outlined
55814
- * CONV is outlined
55815
- * COND is outlined
55816
- * REDUCE is outlined
55817
- * SWITCH is outlined
55818
- * FILTER is outlined
55819
- * APPEND expression is outlined
55820
- * INSERT expression is outlined
55821
- * EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/
55822
- * CAST changed to ?=
55823
- * LOOP AT method_call( ) is outlined
55824
- * VALUE # with structure fields
55825
- * VALUE # with internal table lines
55826
- * Table Expressions are outlined
55827
- * SELECT INTO @DATA definitions are outlined
55828
- * Some occurrences of string template formatting option ALPHA changed to function module call
55829
- * SELECT/INSERT/MODIFY/DELETE/UPDATE "," in field list removed, "@" in source/targets removed
55830
- * PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods
55831
- * RAISE EXCEPTION ... MESSAGE
55832
- * Moving with +=, -=, /=, *=, &&= is expanded
55833
- * line_exists and line_index is downported to READ TABLE
55834
- * ENUMs, but does not nessesarily give the correct type and value
55835
- * MESSAGE with non simple source
55836
-
55837
- Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.
55838
-
55809
+ extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with
55810
+ a higher level language version. If successful, various rules are applied to downport the statement.
55811
+ Target downport version is always v702, thus rule is only enabled if target version is v702.
55812
+
55813
+ Current rules:
55814
+ * NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/
55815
+ * DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/
55816
+ * FIELD-SYMBOL() definitions are outlined
55817
+ * CONV is outlined
55818
+ * COND is outlined
55819
+ * REDUCE is outlined
55820
+ * SWITCH is outlined
55821
+ * FILTER is outlined
55822
+ * APPEND expression is outlined
55823
+ * INSERT expression is outlined
55824
+ * EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/
55825
+ * CAST changed to ?=
55826
+ * LOOP AT method_call( ) is outlined
55827
+ * VALUE # with structure fields
55828
+ * VALUE # with internal table lines
55829
+ * Table Expressions are outlined
55830
+ * SELECT INTO @DATA definitions are outlined
55831
+ * Some occurrences of string template formatting option ALPHA changed to function module call
55832
+ * SELECT/INSERT/MODIFY/DELETE/UPDATE "," in field list removed, "@" in source/targets removed
55833
+ * PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods
55834
+ * RAISE EXCEPTION ... MESSAGE
55835
+ * Moving with +=, -=, /=, *=, &&= is expanded
55836
+ * line_exists and line_index is downported to READ TABLE
55837
+ * ENUMs, but does not nessesarily give the correct type and value
55838
+ * MESSAGE with non simple source
55839
+
55840
+ Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.
55841
+
55839
55842
  Make sure to test the downported code, it might not always be completely correct.`,
55840
55843
  tags: [_irule_1.RuleTag.Downport, _irule_1.RuleTag.Quickfix],
55841
55844
  };
@@ -56413,10 +56416,10 @@ Make sure to test the downported code, it might not always be completely correct
56413
56416
  const fieldName = f.concatTokens();
56414
56417
  fieldDefinition += indentation + " " + fieldName + " TYPE " + tableName + "-" + fieldName + ",\n";
56415
56418
  }
56416
- fieldDefinition = `DATA: BEGIN OF ${name},
56419
+ fieldDefinition = `DATA: BEGIN OF ${name},
56417
56420
  ${fieldDefinition}${indentation} END OF ${name}.`;
56418
56421
  }
56419
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
56422
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
56420
56423
  ${indentation}`);
56421
56424
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
56422
56425
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -56460,12 +56463,12 @@ ${indentation}`);
56460
56463
  }
56461
56464
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
56462
56465
  const name = ((_c = inlineData.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || "error";
56463
- let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
56464
- ${fieldDefinitions}${indentation} END OF ${uniqueName}.
56465
- ${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.
56466
+ let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
56467
+ ${fieldDefinitions}${indentation} END OF ${uniqueName}.
56468
+ ${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.
56466
56469
  ${indentation}`);
56467
56470
  if (fieldDefinitions === "") {
56468
- fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.
56471
+ fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.
56469
56472
  ${indentation}`);
56470
56473
  }
56471
56474
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
@@ -56533,7 +56536,7 @@ ${indentation}`);
56533
56536
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
56534
56537
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
56535
56538
  const firstToken = high.getFirstToken();
56536
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
56539
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
56537
56540
  ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
56538
56541
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
56539
56542
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -56587,7 +56590,7 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
56587
56590
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
56588
56591
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
56589
56592
  const firstToken = high.getFirstToken();
56590
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
56593
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
56591
56594
  ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
56592
56595
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
56593
56596
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -56629,14 +56632,14 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
56629
56632
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
56630
56633
  const firstToken = high.getFirstToken();
56631
56634
  // note that the tabix restore should be done before throwing the exception
56632
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.
56633
- ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
56634
- ${indentation}${tabixBackup} = sy-tabix.
56635
- ${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.
56636
- ${indentation}sy-tabix = ${tabixBackup}.
56637
- ${indentation}IF sy-subrc <> 0.
56638
- ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
56639
- ${indentation}ENDIF.
56635
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.
56636
+ ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
56637
+ ${indentation}${tabixBackup} = sy-tabix.
56638
+ ${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.
56639
+ ${indentation}sy-tabix = ${tabixBackup}.
56640
+ ${indentation}IF sy-subrc <> 0.
56641
+ ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
56642
+ ${indentation}ENDIF.
56640
56643
  ${indentation}`);
56641
56644
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, startToken.getStart(), tableExpression.getLastToken().getEnd(), uniqueName);
56642
56645
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -56693,7 +56696,7 @@ ${indentation}`);
56693
56696
  const className = classNames[0].concatTokens();
56694
56697
  const targetName = (_b = target.findFirstExpression(Expressions.TargetField)) === null || _b === void 0 ? void 0 : _b.concatTokens();
56695
56698
  const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
56696
- const code = ` DATA ${targetName} TYPE REF TO ${className}.
56699
+ const code = ` DATA ${targetName} TYPE REF TO ${className}.
56697
56700
  ${indentation}CATCH ${className} INTO ${targetName}.`;
56698
56701
  const fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getStart(), node.getEnd(), code);
56699
56702
  return issue_1.Issue.atToken(lowFile, node.getFirstToken(), "Outline DATA", this.getMetadata().key, this.conf.severity, fix);
@@ -56855,16 +56858,16 @@ ${indentation}CATCH ${className} INTO ${targetName}.`;
56855
56858
  const uniqueName1 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
56856
56859
  const uniqueName2 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
56857
56860
  const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
56858
- let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
56859
- ${indentation}${uniqueName1}-msgid = ${id}.
56861
+ let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
56862
+ ${indentation}${uniqueName1}-msgid = ${id}.
56860
56863
  ${indentation}${uniqueName1}-msgno = ${number}.\n`;
56861
56864
  if (withs.length > 0) {
56862
- abap += `${indentation}${uniqueName1}-attr1 = 'IF_T100_DYN_MSG~MSGV1'.
56863
- ${indentation}${uniqueName1}-attr2 = 'IF_T100_DYN_MSG~MSGV2'.
56864
- ${indentation}${uniqueName1}-attr3 = 'IF_T100_DYN_MSG~MSGV3'.
56865
+ abap += `${indentation}${uniqueName1}-attr1 = 'IF_T100_DYN_MSG~MSGV1'.
56866
+ ${indentation}${uniqueName1}-attr2 = 'IF_T100_DYN_MSG~MSGV2'.
56867
+ ${indentation}${uniqueName1}-attr3 = 'IF_T100_DYN_MSG~MSGV3'.
56865
56868
  ${indentation}${uniqueName1}-attr4 = 'IF_T100_DYN_MSG~MSGV4'.\n`;
56866
56869
  }
56867
- abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
56870
+ abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
56868
56871
  ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`;
56869
56872
  if (withs.length > 0) {
56870
56873
  abap += `${indentation}${uniqueName2}->if_t100_dyn_msg~msgty = 'E'.\n`;
@@ -56976,10 +56979,10 @@ ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`
56976
56979
  let code = "";
56977
56980
  if (sourceRef.findFirstExpression(Expressions.TableExpression)) {
56978
56981
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
56979
- code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).
56980
- IF sy-subrc <> 0.
56981
- RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
56982
- ENDIF.
56982
+ code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).
56983
+ IF sy-subrc <> 0.
56984
+ RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
56985
+ ENDIF.
56983
56986
  GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
56984
56987
  }
56985
56988
  else {
@@ -57068,20 +57071,20 @@ GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
57068
57071
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
57069
57072
  const uniqueFS = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
57070
57073
  const uniqueNameIndex = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
57071
- code += ` items LIKE ${loopSourceName},
57072
- END OF ${groupTargetName}type.
57073
- DATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.
57074
- DATA ${uniqueName} LIKE LINE OF ${groupTargetName}tab.
57074
+ code += ` items LIKE ${loopSourceName},
57075
+ END OF ${groupTargetName}type.
57076
+ DATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.
57077
+ DATA ${uniqueName} LIKE LINE OF ${groupTargetName}tab.
57075
57078
  LOOP AT ${loopSourceName} ${(_l = high.findFirstExpression(Expressions.LoopTarget)) === null || _l === void 0 ? void 0 : _l.concatTokens()}.\n`;
57076
57079
  if (groupIndexName !== undefined) {
57077
57080
  code += `DATA(${uniqueNameIndex}) = sy-tabix.\n`;
57078
57081
  }
57079
- code += `READ TABLE ${groupTargetName}tab ASSIGNING FIELD-SYMBOL(<${uniqueFS}>) WITH KEY ${condition}.
57082
+ code += `READ TABLE ${groupTargetName}tab ASSIGNING FIELD-SYMBOL(<${uniqueFS}>) WITH KEY ${condition}.
57080
57083
  IF sy-subrc = 0.\n`;
57081
57084
  if (groupCountName !== undefined) {
57082
57085
  code += ` <${uniqueFS}>-${groupCountName} = <${uniqueFS}>-${groupCountName} + 1.\n`;
57083
57086
  }
57084
- code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
57087
+ code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
57085
57088
  ELSE.\n`;
57086
57089
  code += ` CLEAR ${uniqueName}.\n`;
57087
57090
  for (const c of group.findAllExpressions(Expressions.LoopGroupByComponent)) {
@@ -57102,8 +57105,8 @@ ELSE.\n`;
57102
57105
  }
57103
57106
  code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE ${uniqueName}-items.\n`;
57104
57107
  code += ` INSERT ${uniqueName} INTO TABLE ${groupTargetName}tab.\n`;
57105
- code += `ENDIF.
57106
- ENDLOOP.
57108
+ code += `ENDIF.
57109
+ ENDLOOP.
57107
57110
  LOOP AT ${groupTargetName}tab ${groupTarget}.`;
57108
57111
  let fix = edit_helper_1.EditHelper.replaceRange(lowFile, high.getFirstToken().getStart(), high.getLastToken().getEnd(), code);
57109
57112
  for (const l of ((_m = highFile.getStructure()) === null || _m === void 0 ? void 0 : _m.findAllStructures(Structures.Loop)) || []) {
@@ -57275,7 +57278,7 @@ LOOP AT ${groupTargetName}tab ${groupTarget}.`;
57275
57278
  const enumName = (_b = high.findExpressionAfterToken("ENUM")) === null || _b === void 0 ? void 0 : _b.concatTokens();
57276
57279
  const structureName = (_c = high.findExpressionAfterToken("STRUCTURE")) === null || _c === void 0 ? void 0 : _c.concatTokens();
57277
57280
  // all ENUMS are char like?
57278
- let code = `TYPES ${enumName} TYPE string.
57281
+ let code = `TYPES ${enumName} TYPE string.
57279
57282
  CONSTANTS: BEGIN OF ${structureName},\n`;
57280
57283
  let count = 1;
57281
57284
  for (const e of enumStructure.findDirectStatements(Statements.TypeEnum).concat(enumStructure.findDirectStatements(Statements.Type))) {
@@ -57319,14 +57322,14 @@ CONSTANTS: BEGIN OF ${structureName},\n`;
57319
57322
  const tabixBackup = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
57320
57323
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
57321
57324
  // restore tabix before exeption
57322
- const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.
57323
- ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
57324
- ${indentation}${tabixBackup} = sy-tabix.
57325
- ${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.
57326
- ${indentation}sy-tabix = ${tabixBackup}.
57327
- ${indentation}IF sy-subrc <> 0.
57328
- ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
57329
- ${indentation}ENDIF.
57325
+ const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.
57326
+ ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
57327
+ ${indentation}${tabixBackup} = sy-tabix.
57328
+ ${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.
57329
+ ${indentation}sy-tabix = ${tabixBackup}.
57330
+ ${indentation}IF sy-subrc <> 0.
57331
+ ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
57332
+ ${indentation}ENDIF.
57330
57333
  ${indentation}${uniqueName}`;
57331
57334
  const start = target.getFirstToken().getStart();
57332
57335
  const end = (_a = tableExpression.findDirectTokenByText("]")) === null || _a === void 0 ? void 0 : _a.getEnd();
@@ -57410,11 +57413,11 @@ ${indentation}${uniqueName}`;
57410
57413
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
57411
57414
  const source = (_b = templateSource === null || templateSource === void 0 ? void 0 : templateSource.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens();
57412
57415
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
57413
- const code = `DATA ${uniqueName} TYPE string.
57414
- ${indentation}CALL FUNCTION '${functionName}'
57415
- ${indentation} EXPORTING
57416
- ${indentation} input = ${source}
57417
- ${indentation} IMPORTING
57416
+ const code = `DATA ${uniqueName} TYPE string.
57417
+ ${indentation}CALL FUNCTION '${functionName}'
57418
+ ${indentation} EXPORTING
57419
+ ${indentation} input = ${source}
57420
+ ${indentation} IMPORTING
57418
57421
  ${indentation} output = ${uniqueName}.\n`;
57419
57422
  const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), code);
57420
57423
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, child.getFirstToken().getStart(), child.getLastToken().getEnd(), uniqueName);
@@ -58726,12 +58729,12 @@ class EasyToFindMessages {
58726
58729
  key: "easy_to_find_messages",
58727
58730
  title: "Easy to find messages",
58728
58731
  shortDescription: `Make messages easy to find`,
58729
- extendedInformation: `All messages must be statically referenced exactly once
58730
-
58731
- Only MESSAGE and RAISE statments are counted as static references
58732
-
58733
- Also see rule "message_exists"
58734
-
58732
+ extendedInformation: `All messages must be statically referenced exactly once
58733
+
58734
+ Only MESSAGE and RAISE statments are counted as static references
58735
+
58736
+ Also see rule "message_exists"
58737
+
58735
58738
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#make-messages-easy-to-find`,
58736
58739
  tags: [_irule_1.RuleTag.Styleguide],
58737
58740
  };
@@ -58816,8 +58819,8 @@ class EmptyLineinStatement extends _abap_rule_1.ABAPRule {
58816
58819
  key: "empty_line_in_statement",
58817
58820
  title: "Find empty lines in statements",
58818
58821
  shortDescription: `Checks that statements do not contain empty lines.`,
58819
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
58820
-
58822
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
58823
+
58821
58824
  https://docs.abapopenchecks.org/checks/41/`,
58822
58825
  tags: [_irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
58823
58826
  badExample: `WRITE\n\nhello.`,
@@ -58993,13 +58996,13 @@ class EmptyStructure extends _abap_rule_1.ABAPRule {
58993
58996
  shortDescription: `Checks that the code does not contain empty blocks.`,
58994
58997
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-empty-if-branches`,
58995
58998
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
58996
- badExample: `IF foo = bar.
58997
- ENDIF.
58998
-
58999
- DO 2 TIMES.
58999
+ badExample: `IF foo = bar.
59000
+ ENDIF.
59001
+
59002
+ DO 2 TIMES.
59000
59003
  ENDDO.`,
59001
- goodExample: `LOOP AT itab WHERE qty = 0 OR date > sy-datum.
59002
- ENDLOOP.
59004
+ goodExample: `LOOP AT itab WHERE qty = 0 OR date > sy-datum.
59005
+ ENDLOOP.
59003
59006
  result = xsdbool( sy-subrc = 0 ).`,
59004
59007
  };
59005
59008
  }
@@ -59141,10 +59144,10 @@ class ExitOrCheck extends _abap_rule_1.ABAPRule {
59141
59144
  return {
59142
59145
  key: "exit_or_check",
59143
59146
  title: "Find EXIT or CHECK outside loops",
59144
- shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
59147
+ shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
59145
59148
  Use RETURN to leave procesing blocks instead.`,
59146
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
59147
- https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
59149
+ extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
59150
+ https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
59148
59151
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#check-vs-return`,
59149
59152
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
59150
59153
  };
@@ -59227,12 +59230,12 @@ class ExpandMacros extends _abap_rule_1.ABAPRule {
59227
59230
  key: "expand_macros",
59228
59231
  title: "Expand Macros",
59229
59232
  shortDescription: `Allows expanding macro calls with quick fixes`,
59230
- extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
59231
-
59233
+ extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
59234
+
59232
59235
  Note that macros/DEFINE cannot be used in the ABAP Cloud programming model`,
59233
- badExample: `DEFINE _hello.
59234
- WRITE 'hello'.
59235
- END-OF-DEFINITION.
59236
+ badExample: `DEFINE _hello.
59237
+ WRITE 'hello'.
59238
+ END-OF-DEFINITION.
59236
59239
  _hello.`,
59237
59240
  goodExample: `WRITE 'hello'.`,
59238
59241
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
@@ -59319,7 +59322,7 @@ class Exporting extends _abap_rule_1.ABAPRule {
59319
59322
  shortDescription: `Detects EXPORTING statements which can be omitted.`,
59320
59323
  badExample: `call_method( EXPORTING foo = bar ).`,
59321
59324
  goodExample: `call_method( foo = bar ).`,
59322
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-optional-keyword-exporting
59325
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-optional-keyword-exporting
59323
59326
  https://docs.abapopenchecks.org/checks/30/`,
59324
59327
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
59325
59328
  };
@@ -59417,7 +59420,7 @@ class ForbiddenIdentifier extends _abap_rule_1.ABAPRule {
59417
59420
  key: "forbidden_identifier",
59418
59421
  title: "Forbidden Identifier",
59419
59422
  shortDescription: `Forbid use of specified identifiers, list of regex.`,
59420
- extendedInformation: `Used in the transpiler to find javascript keywords in ABAP identifiers,
59423
+ extendedInformation: `Used in the transpiler to find javascript keywords in ABAP identifiers,
59421
59424
  https://github.com/abaplint/transpiler/blob/bda94b8b56e2b7f2f87be2168f12361aa530220e/packages/transpiler/src/validation.ts#L44`,
59422
59425
  tags: [_irule_1.RuleTag.SingleFile],
59423
59426
  };
@@ -59659,8 +59662,8 @@ class ForbiddenVoidType {
59659
59662
  key: "forbidden_void_type",
59660
59663
  title: "Forbidden Void Types",
59661
59664
  shortDescription: `Avoid usage of specified void types.`,
59662
- extendedInformation: `Inspiration:
59663
- BOOLEAN, BOOLE_D, CHAR01, CHAR1, CHAR10, CHAR12, CHAR128, CHAR2, CHAR20, CHAR4, CHAR70,
59665
+ extendedInformation: `Inspiration:
59666
+ BOOLEAN, BOOLE_D, CHAR01, CHAR1, CHAR10, CHAR12, CHAR128, CHAR2, CHAR20, CHAR4, CHAR70,
59664
59667
  DATS, TIMS, DATUM, FLAG, INT4, NUMC3, NUMC4, SAP_BOOL, TEXT25, TEXT80, X255, XFELD`,
59665
59668
  };
59666
59669
  }
@@ -59903,7 +59906,7 @@ class FullyTypeITabs extends _abap_rule_1.ABAPRule {
59903
59906
  key: "fully_type_itabs",
59904
59907
  title: "Fully type internal tables",
59905
59908
  shortDescription: `No implict table types or table keys`,
59906
- badExample: `DATA lt_foo TYPE TABLE OF ty.
59909
+ badExample: `DATA lt_foo TYPE TABLE OF ty.
59907
59910
  DATA lt_bar TYPE STANDARD TABLE OF ty.`,
59908
59911
  goodExample: `DATA lt_foo TYPE STANDARD TABLE OF ty WITH EMPTY KEY.`,
59909
59912
  tags: [_irule_1.RuleTag.SingleFile],
@@ -60088,26 +60091,26 @@ class FunctionalWriting extends _abap_rule_1.ABAPRule {
60088
60091
  key: "functional_writing",
60089
60092
  title: "Use functional writing",
60090
60093
  shortDescription: `Detects usage of call method when functional style calls can be used.`,
60091
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-calls
60094
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-calls
60092
60095
  https://docs.abapopenchecks.org/checks/07/`,
60093
60096
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
60094
- badExample: `CALL METHOD zcl_class=>method( ).
60095
- CALL METHOD cl_abap_typedescr=>describe_by_name
60096
- EXPORTING
60097
- p_name = 'NAME'
60098
- RECEIVING
60099
- p_descr_ref = lr_typedescr
60100
- EXCEPTIONS
60101
- type_not_found = 1
60097
+ badExample: `CALL METHOD zcl_class=>method( ).
60098
+ CALL METHOD cl_abap_typedescr=>describe_by_name
60099
+ EXPORTING
60100
+ p_name = 'NAME'
60101
+ RECEIVING
60102
+ p_descr_ref = lr_typedescr
60103
+ EXCEPTIONS
60104
+ type_not_found = 1
60102
60105
  OTHERS = 2.`,
60103
- goodExample: `zcl_class=>method( ).
60104
- cl_abap_typedescr=>describe_by_name(
60105
- EXPORTING
60106
- p_name = 'NAME'
60107
- RECEIVING
60108
- p_descr_ref = lr_typedescr
60109
- EXCEPTIONS
60110
- type_not_found = 1
60106
+ goodExample: `zcl_class=>method( ).
60107
+ cl_abap_typedescr=>describe_by_name(
60108
+ EXPORTING
60109
+ p_name = 'NAME'
60110
+ RECEIVING
60111
+ p_descr_ref = lr_typedescr
60112
+ EXCEPTIONS
60113
+ type_not_found = 1
60111
60114
  OTHERS = 2 ).`,
60112
60115
  };
60113
60116
  }
@@ -60218,14 +60221,14 @@ class GlobalClass extends _abap_rule_1.ABAPRule {
60218
60221
  key: "global_class",
60219
60222
  title: "Global class checks",
60220
60223
  shortDescription: `Checks related to global classes`,
60221
- extendedInformation: `* global classes must be in own files
60222
-
60223
- * file names must match class name
60224
-
60225
- * file names must match interface name
60226
-
60227
- * global classes must be global definitions
60228
-
60224
+ extendedInformation: `* global classes must be in own files
60225
+
60226
+ * file names must match class name
60227
+
60228
+ * file names must match interface name
60229
+
60230
+ * global classes must be global definitions
60231
+
60229
60232
  * global interfaces must be global definitions`,
60230
60233
  tags: [_irule_1.RuleTag.Syntax],
60231
60234
  };
@@ -60324,21 +60327,21 @@ class IdenticalConditions extends _abap_rule_1.ABAPRule {
60324
60327
  return {
60325
60328
  key: "identical_conditions",
60326
60329
  title: "Identical conditions",
60327
- shortDescription: `Find identical conditions in IF + CASE + WHILE etc
60328
-
60330
+ shortDescription: `Find identical conditions in IF + CASE + WHILE etc
60331
+
60329
60332
  Prerequsites: code is pretty printed with identical cAsE`,
60330
60333
  tags: [_irule_1.RuleTag.SingleFile],
60331
- badExample: `IF foo = bar OR 1 = a OR foo = bar.
60332
- ENDIF.
60333
- CASE bar.
60334
- WHEN '1'.
60335
- WHEN 'A' OR '1'.
60334
+ badExample: `IF foo = bar OR 1 = a OR foo = bar.
60335
+ ENDIF.
60336
+ CASE bar.
60337
+ WHEN '1'.
60338
+ WHEN 'A' OR '1'.
60336
60339
  ENDCASE.`,
60337
- goodExample: `IF foo = bar OR 1 = a.
60338
- ENDIF.
60339
- CASE bar.
60340
- WHEN '1'.
60341
- WHEN 'A'.
60340
+ goodExample: `IF foo = bar OR 1 = a.
60341
+ ENDIF.
60342
+ CASE bar.
60343
+ WHEN '1'.
60344
+ WHEN 'A'.
60342
60345
  ENDCASE.`,
60343
60346
  };
60344
60347
  }
@@ -60472,23 +60475,23 @@ class IdenticalContents extends _abap_rule_1.ABAPRule {
60472
60475
  key: "identical_contents",
60473
60476
  title: "Identical contents",
60474
60477
  shortDescription: `Find identical contents in blocks inside IFs, both in the beginning and in the end.`,
60475
- extendedInformation: `
60476
- Prerequsites: code is pretty printed with identical cAsE
60477
-
60478
+ extendedInformation: `
60479
+ Prerequsites: code is pretty printed with identical cAsE
60480
+
60478
60481
  Chained statments are ignored`,
60479
60482
  tags: [_irule_1.RuleTag.SingleFile],
60480
- badExample: `IF foo = bar.
60481
- WRITE 'bar'.
60482
- WRITE 'world'.
60483
- ELSE.
60484
- WRITE 'foo'.
60485
- WRITE 'world'.
60483
+ badExample: `IF foo = bar.
60484
+ WRITE 'bar'.
60485
+ WRITE 'world'.
60486
+ ELSE.
60487
+ WRITE 'foo'.
60488
+ WRITE 'world'.
60486
60489
  ENDIF.`,
60487
- goodExample: `IF foo = bar.
60488
- WRITE 'bar'.
60489
- ELSE.
60490
- WRITE 'foo'.
60491
- ENDIF.
60490
+ goodExample: `IF foo = bar.
60491
+ WRITE 'bar'.
60492
+ ELSE.
60493
+ WRITE 'foo'.
60494
+ ENDIF.
60492
60495
  WRITE 'world'.`,
60493
60496
  };
60494
60497
  }
@@ -60596,12 +60599,12 @@ class IdenticalDescriptions {
60596
60599
  key: "identical_descriptions",
60597
60600
  title: "Identical descriptions",
60598
60601
  shortDescription: `Searches for objects with the same type and same description`,
60599
- extendedInformation: `Case insensitive
60600
-
60601
- Only checks the master language descriptions
60602
-
60603
- Dependencies are skipped
60604
-
60602
+ extendedInformation: `Case insensitive
60603
+
60604
+ Only checks the master language descriptions
60605
+
60606
+ Dependencies are skipped
60607
+
60605
60608
  Works for: INTF, CLAS, DOMA, DTEL, FUNC in same FUGR`,
60606
60609
  tags: [],
60607
60610
  };
@@ -60775,43 +60778,43 @@ class IfInIf extends _abap_rule_1.ABAPRule {
60775
60778
  key: "if_in_if",
60776
60779
  title: "IF in IF",
60777
60780
  shortDescription: `Detects nested ifs which can be refactored.`,
60778
- extendedInformation: `
60779
- Directly nested IFs without ELSE can be refactored to a single condition using AND.
60780
-
60781
- ELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.
60782
-
60783
- https://docs.abapopenchecks.org/checks/01/
60781
+ extendedInformation: `
60782
+ Directly nested IFs without ELSE can be refactored to a single condition using AND.
60783
+
60784
+ ELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.
60785
+
60786
+ https://docs.abapopenchecks.org/checks/01/
60784
60787
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low`,
60785
- badExample: `IF condition1.
60786
- IF condition2.
60787
- ...
60788
- ENDIF.
60789
- ENDIF.
60790
-
60791
- IF condition1.
60792
- ...
60793
- ELSE.
60794
- IF condition2.
60795
- ...
60796
- ENDIF.
60788
+ badExample: `IF condition1.
60789
+ IF condition2.
60790
+ ...
60791
+ ENDIF.
60792
+ ENDIF.
60793
+
60794
+ IF condition1.
60795
+ ...
60796
+ ELSE.
60797
+ IF condition2.
60798
+ ...
60799
+ ENDIF.
60797
60800
  ENDIF.`,
60798
- goodExample: `IF ( condition1 ) AND ( condition2 ).
60799
- ...
60800
- ENDIF.
60801
-
60802
- IF condition1.
60803
- ...
60804
- ELSEIF condition2.
60805
- ...
60806
- ENDIF.
60807
-
60808
- CASE variable.
60809
- WHEN value1.
60810
- ...
60811
- WHEN value2.
60812
- IF condition2.
60813
- ...
60814
- ENDIF.
60801
+ goodExample: `IF ( condition1 ) AND ( condition2 ).
60802
+ ...
60803
+ ENDIF.
60804
+
60805
+ IF condition1.
60806
+ ...
60807
+ ELSEIF condition2.
60808
+ ...
60809
+ ENDIF.
60810
+
60811
+ CASE variable.
60812
+ WHEN value1.
60813
+ ...
60814
+ WHEN value2.
60815
+ IF condition2.
60816
+ ...
60817
+ ENDIF.
60815
60818
  ENDCASE.`,
60816
60819
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
60817
60820
  };
@@ -60996,9 +60999,9 @@ class ImplementMethods extends _abap_rule_1.ABAPRule {
60996
60999
  for (const i of ((_a = file.getStructure()) === null || _a === void 0 ? void 0 : _a.findAllStatements(Statements.ClassImplementation)) || []) {
60997
61000
  const name = (_b = i.findFirstExpression(Expressions.ClassName)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr().toUpperCase();
60998
61001
  if (name === impl.identifier.getName().toUpperCase()) {
60999
- return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
61000
- METHOD ${methodName.toLowerCase()}.
61001
- RETURN. " todo, implement method
61002
+ return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
61003
+ METHOD ${methodName.toLowerCase()}.
61004
+ RETURN. " todo, implement method
61002
61005
  ENDMETHOD.`);
61003
61006
  }
61004
61007
  }
@@ -61186,19 +61189,19 @@ class InStatementIndentation extends _abap_rule_1.ABAPRule {
61186
61189
  key: "in_statement_indentation",
61187
61190
  title: "In-statement indentation",
61188
61191
  shortDescription: "Checks alignment within statements which span multiple lines.",
61189
- extendedInformation: `Lines following the first line should be indented once (2 spaces).
61190
-
61191
- For block declaration statements, lines after the first should be indented an additional time (default: +2 spaces)
61192
+ extendedInformation: `Lines following the first line should be indented once (2 spaces).
61193
+
61194
+ For block declaration statements, lines after the first should be indented an additional time (default: +2 spaces)
61192
61195
  to distinguish them better from code within the block.`,
61193
- badExample: `IF 1 = 1
61194
- AND 2 = 2.
61195
- WRITE 'hello' &&
61196
- 'world'.
61196
+ badExample: `IF 1 = 1
61197
+ AND 2 = 2.
61198
+ WRITE 'hello' &&
61199
+ 'world'.
61197
61200
  ENDIF.`,
61198
- goodExample: `IF 1 = 1
61199
- AND 2 = 2.
61200
- WRITE 'hello' &&
61201
- 'world'.
61201
+ goodExample: `IF 1 = 1
61202
+ AND 2 = 2.
61203
+ WRITE 'hello' &&
61204
+ 'world'.
61202
61205
  ENDIF.`,
61203
61206
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
61204
61207
  };
@@ -61321,23 +61324,23 @@ class Indentation extends _abap_rule_1.ABAPRule {
61321
61324
  title: "Indentation",
61322
61325
  shortDescription: `Checks indentation`,
61323
61326
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
61324
- badExample: `CLASS lcl DEFINITION.
61325
- PRIVATE SECTION.
61326
- METHODS constructor.
61327
- ENDCLASS.
61328
-
61329
- CLASS lcl IMPLEMENTATION.
61330
- METHOD constructor.
61331
- ENDMETHOD.
61327
+ badExample: `CLASS lcl DEFINITION.
61328
+ PRIVATE SECTION.
61329
+ METHODS constructor.
61330
+ ENDCLASS.
61331
+
61332
+ CLASS lcl IMPLEMENTATION.
61333
+ METHOD constructor.
61334
+ ENDMETHOD.
61332
61335
  ENDCLASS.`,
61333
- goodExample: `CLASS lcl DEFINITION.
61334
- PRIVATE SECTION.
61335
- METHODS constructor.
61336
- ENDCLASS.
61337
-
61338
- CLASS lcl IMPLEMENTATION.
61339
- METHOD constructor.
61340
- ENDMETHOD.
61336
+ goodExample: `CLASS lcl DEFINITION.
61337
+ PRIVATE SECTION.
61338
+ METHODS constructor.
61339
+ ENDCLASS.
61340
+
61341
+ CLASS lcl IMPLEMENTATION.
61342
+ METHOD constructor.
61343
+ ENDMETHOD.
61341
61344
  ENDCLASS.`,
61342
61345
  };
61343
61346
  }
@@ -61726,9 +61729,9 @@ class IntfReferencingClas {
61726
61729
  key: "intf_referencing_clas",
61727
61730
  title: "INTF referencing CLAS",
61728
61731
  shortDescription: `Interface contains references to class`,
61729
- extendedInformation: `Only global interfaces are checked.
61730
- Only first level references are checked.
61731
- Exception class references are ignored.
61732
+ extendedInformation: `Only global interfaces are checked.
61733
+ Only first level references are checked.
61734
+ Exception class references are ignored.
61732
61735
  Void references are ignored.`,
61733
61736
  };
61734
61737
  }
@@ -61813,9 +61816,9 @@ class InvalidTableIndex extends _abap_rule_1.ABAPRule {
61813
61816
  title: "Invalid Table Index",
61814
61817
  shortDescription: `Issues error for constant table index zero, as ABAP starts from 1`,
61815
61818
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
61816
- badExample: `DATA(first) = table[ 0 ].
61819
+ badExample: `DATA(first) = table[ 0 ].
61817
61820
  READ TABLE gt_stack ASSIGNING <ls_stack> INDEX 0.`,
61818
- goodExample: `DATA(first) = table[ 1 ].
61821
+ goodExample: `DATA(first) = table[ 1 ].
61819
61822
  READ TABLE gt_stack ASSIGNING <ls_stack> INDEX 1.`,
61820
61823
  };
61821
61824
  }
@@ -62416,8 +62419,8 @@ class LineBreakStyle {
62416
62419
  return {
62417
62420
  key: "line_break_style",
62418
62421
  title: "Makes sure line breaks are consistent in the ABAP code",
62419
- shortDescription: `Enforces LF as newlines in ABAP files
62420
-
62422
+ shortDescription: `Enforces LF as newlines in ABAP files
62423
+
62421
62424
  abapGit does not work with CRLF`,
62422
62425
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
62423
62426
  };
@@ -62486,7 +62489,7 @@ class LineLength extends _abap_rule_1.ABAPRule {
62486
62489
  key: "line_length",
62487
62490
  title: "Line length",
62488
62491
  shortDescription: `Detects lines exceeding the provided maximum length.`,
62489
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length
62492
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length
62490
62493
  https://docs.abapopenchecks.org/checks/04/`,
62491
62494
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
62492
62495
  };
@@ -62557,7 +62560,7 @@ class LineOnlyPunc extends _abap_rule_1.ABAPRule {
62557
62560
  key: "line_only_punc",
62558
62561
  title: "Line containing only punctuation",
62559
62562
  shortDescription: `Detects lines containing only punctuation.`,
62560
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#close-brackets-at-line-end
62563
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#close-brackets-at-line-end
62561
62564
  https://docs.abapopenchecks.org/checks/16/`,
62562
62565
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
62563
62566
  badExample: "zcl_class=>method(\n).",
@@ -62817,15 +62820,15 @@ class LocalVariableNames extends _abap_rule_1.ABAPRule {
62817
62820
  return {
62818
62821
  key: "local_variable_names",
62819
62822
  title: "Local variable naming conventions",
62820
- shortDescription: `
62821
- Allows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols.
62823
+ shortDescription: `
62824
+ Allows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols.
62822
62825
  Regexes are case-insensitive.`,
62823
62826
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
62824
- badExample: `FORM bar.
62825
- DATA foo.
62827
+ badExample: `FORM bar.
62828
+ DATA foo.
62826
62829
  ENDFORM.`,
62827
- goodExample: `FORM bar.
62828
- DATA lv_foo.
62830
+ goodExample: `FORM bar.
62831
+ DATA lv_foo.
62829
62832
  ENDFORM.`,
62830
62833
  };
62831
62834
  }
@@ -63048,10 +63051,10 @@ class MainFileContents {
63048
63051
  key: "main_file_contents",
63049
63052
  title: "Main file contents",
63050
63053
  shortDescription: `Checks related to report declarations.`,
63051
- extendedInformation: `Does not run if the target version is Cloud
63052
-
63053
- * PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
63054
- * TYPEs must begin with "TYPE-POOL <name>."
63054
+ extendedInformation: `Does not run if the target version is Cloud
63055
+
63056
+ * PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
63057
+ * TYPEs must begin with "TYPE-POOL <name>."
63055
63058
  `,
63056
63059
  };
63057
63060
  }
@@ -63167,17 +63170,17 @@ class ManyParentheses extends _abap_rule_1.ABAPRule {
63167
63170
  title: "Too many parentheses",
63168
63171
  shortDescription: `Searches for expressions where extra parentheses can safely be removed`,
63169
63172
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
63170
- badExample: `
63171
- IF ( destination IS INITIAL ).
63172
- ENDIF.
63173
- IF foo = boo AND ( bar = lar AND moo = loo ).
63174
- ENDIF.
63173
+ badExample: `
63174
+ IF ( destination IS INITIAL ).
63175
+ ENDIF.
63176
+ IF foo = boo AND ( bar = lar AND moo = loo ).
63177
+ ENDIF.
63175
63178
  `,
63176
- goodExample: `
63177
- IF destination IS INITIAL.
63178
- ENDIF.
63179
- IF foo = boo AND bar = lar AND moo = loo.
63180
- ENDIF.
63179
+ goodExample: `
63180
+ IF destination IS INITIAL.
63181
+ ENDIF.
63182
+ IF foo = boo AND bar = lar AND moo = loo.
63183
+ ENDIF.
63181
63184
  `,
63182
63185
  };
63183
63186
  }
@@ -63351,14 +63354,14 @@ class MaxOneMethodParameterPerLine extends _abap_rule_1.ABAPRule {
63351
63354
  title: "Max one method parameter definition per line",
63352
63355
  shortDescription: `Keep max one method parameter description per line`,
63353
63356
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace],
63354
- badExample: `
63355
- METHODS apps_scope_token
63356
- IMPORTING
63357
+ badExample: `
63358
+ METHODS apps_scope_token
63359
+ IMPORTING
63357
63360
  body TYPE bodyapps_scope_token client_id TYPE str.`,
63358
- goodExample: `
63359
- METHODS apps_scope_token
63360
- IMPORTING
63361
- body TYPE bodyapps_scope_token
63361
+ goodExample: `
63362
+ METHODS apps_scope_token
63363
+ IMPORTING
63364
+ body TYPE bodyapps_scope_token
63362
63365
  client_id TYPE str.`,
63363
63366
  };
63364
63367
  }
@@ -63423,11 +63426,11 @@ class MaxOneStatement extends _abap_rule_1.ABAPRule {
63423
63426
  key: "max_one_statement",
63424
63427
  title: "Max one statement per line",
63425
63428
  shortDescription: `Checks that each line contains only a single statement.`,
63426
- extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
63427
-
63428
- Does not report anything for chained statements.
63429
-
63430
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line
63429
+ extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
63430
+
63431
+ Does not report anything for chained statements.
63432
+
63433
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line
63431
63434
  https://docs.abapopenchecks.org/checks/11/`,
63432
63435
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
63433
63436
  badExample: `WRITE foo. WRITE bar.`,
@@ -63765,8 +63768,8 @@ class MethodLength {
63765
63768
  key: "method_length",
63766
63769
  title: "Method/Form Length",
63767
63770
  shortDescription: `Checks relating to method/form length.`,
63768
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
63769
-
63771
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
63772
+
63770
63773
  Abstract methods without statements are considered okay.`,
63771
63774
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
63772
63775
  };
@@ -63871,20 +63874,20 @@ class MethodOverwritesBuiltIn extends _abap_rule_1.ABAPRule {
63871
63874
  key: "method_overwrites_builtin",
63872
63875
  title: "Method name overwrites builtin function",
63873
63876
  shortDescription: `Checks Method names that overwrite builtin SAP functions`,
63874
- extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
63875
-
63876
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
63877
-
63877
+ extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
63878
+
63879
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
63880
+
63878
63881
  Interface method names are ignored`,
63879
63882
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
63880
- badExample: `CLASS lcl DEFINITION.
63881
- PUBLIC SECTION.
63882
- METHODS matches.
63883
- ENDCLASS.
63884
-
63885
- CLASS lcl IMPLEMENTATION.
63886
- METHOD matches.
63887
- ENDMETHOD.
63883
+ badExample: `CLASS lcl DEFINITION.
63884
+ PUBLIC SECTION.
63885
+ METHODS matches.
63886
+ ENDCLASS.
63887
+
63888
+ CLASS lcl IMPLEMENTATION.
63889
+ METHOD matches.
63890
+ ENDMETHOD.
63888
63891
  ENDCLASS.`,
63889
63892
  };
63890
63893
  }
@@ -64075,12 +64078,12 @@ class MixReturning extends _abap_rule_1.ABAPRule {
64075
64078
  // eslint-disable-next-line max-len
64076
64079
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-either-returning-or-exporting-or-changing-but-not-a-combination`,
64077
64080
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
64078
- badExample: `CLASS lcl DEFINITION.
64079
- PUBLIC SECTION.
64080
- METHODS
64081
- foobar
64082
- EXPORTING foo TYPE i
64083
- RETURNING VALUE(rv_string) TYPE string.
64081
+ badExample: `CLASS lcl DEFINITION.
64082
+ PUBLIC SECTION.
64083
+ METHODS
64084
+ foobar
64085
+ EXPORTING foo TYPE i
64086
+ RETURNING VALUE(rv_string) TYPE string.
64084
64087
  ENDCLASS.`,
64085
64088
  };
64086
64089
  }
@@ -64460,7 +64463,7 @@ class Nesting extends _abap_rule_1.ABAPRule {
64460
64463
  key: "nesting",
64461
64464
  title: "Check nesting depth",
64462
64465
  shortDescription: `Checks for methods exceeding a maximum nesting depth`,
64463
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low
64466
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low
64464
64467
  https://docs.abapopenchecks.org/checks/74/`,
64465
64468
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
64466
64469
  };
@@ -64703,7 +64706,7 @@ class NoChainedAssignment extends _abap_rule_1.ABAPRule {
64703
64706
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-chain-assignments`,
64704
64707
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
64705
64708
  badExample: `var1 = var2 = var3.`,
64706
- goodExample: `var2 = var3.
64709
+ goodExample: `var2 = var3.
64707
64710
  var1 = var2.`,
64708
64711
  };
64709
64712
  }
@@ -64762,8 +64765,8 @@ class NoExternalFormCalls extends _abap_rule_1.ABAPRule {
64762
64765
  key: "no_external_form_calls",
64763
64766
  title: "No external FORM calls",
64764
64767
  shortDescription: `Detect external form calls`,
64765
- badExample: `PERFORM foo IN PROGRAM bar.
64766
-
64768
+ badExample: `PERFORM foo IN PROGRAM bar.
64769
+
64767
64770
  PERFORM foo(bar).`,
64768
64771
  tags: [_irule_1.RuleTag.SingleFile],
64769
64772
  };
@@ -64824,17 +64827,17 @@ class NoInlineInOptionalBranches extends _abap_rule_1.ABAPRule {
64824
64827
  key: "no_inline_in_optional_branches",
64825
64828
  title: "Don't declare inline in optional branches",
64826
64829
  shortDescription: `Don't declare inline in optional branches`,
64827
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
64828
-
64829
- Considered optional branches:
64830
- * inside IF/ELSEIF/ELSE
64831
- * inside LOOP
64832
- * inside WHILE
64833
- * inside CASE/WHEN, CASE TYPE OF
64834
- * inside DO
64835
- * inside SELECT loops
64836
-
64837
- Not considered optional branches:
64830
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
64831
+
64832
+ Considered optional branches:
64833
+ * inside IF/ELSEIF/ELSE
64834
+ * inside LOOP
64835
+ * inside WHILE
64836
+ * inside CASE/WHEN, CASE TYPE OF
64837
+ * inside DO
64838
+ * inside SELECT loops
64839
+
64840
+ Not considered optional branches:
64838
64841
  * TRY/CATCH/CLEANUP`,
64839
64842
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
64840
64843
  };
@@ -64934,12 +64937,12 @@ class NoPrefixes extends _abap_rule_1.ABAPRule {
64934
64937
  key: "no_prefixes",
64935
64938
  title: "No Prefixes",
64936
64939
  shortDescription: `Dont use hungarian notation`,
64937
- extendedInformation: `
64938
- Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
64939
- allowing all types to become voided, abaplint will then provide less precise syntax errors.
64940
-
64941
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
64942
-
64940
+ extendedInformation: `
64941
+ Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
64942
+ allowing all types to become voided, abaplint will then provide less precise syntax errors.
64943
+
64944
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
64945
+
64943
64946
  https://github.com/SAP/styleguides/blob/main/clean-abap/sub-sections/AvoidEncodings.md`,
64944
64947
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
64945
64948
  badExample: `DATA lv_foo TYPE i.`,
@@ -65118,7 +65121,7 @@ class NoPublicAttributes extends _abap_rule_1.ABAPRule {
65118
65121
  return {
65119
65122
  key: "no_public_attributes",
65120
65123
  title: "No public attributes",
65121
- shortDescription: `Checks that classes and interfaces don't contain any public attributes.
65124
+ shortDescription: `Checks that classes and interfaces don't contain any public attributes.
65122
65125
  Exceptions are excluded from this rule.`,
65123
65126
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#members-private-by-default-protected-only-if-needed`,
65124
65127
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
@@ -65219,13 +65222,13 @@ class NoYodaConditions extends _abap_rule_1.ABAPRule {
65219
65222
  key: "no_yoda_conditions",
65220
65223
  title: "No Yoda conditions",
65221
65224
  shortDescription: `Finds Yoda conditions and reports issues`,
65222
- extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
65223
-
65225
+ extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
65226
+
65224
65227
  Conditions with operators CP, NP, CS, NS, CA, NA, CO, CN are ignored`,
65225
65228
  tags: [_irule_1.RuleTag.SingleFile],
65226
- badExample: `IF 0 <> sy-subrc.
65229
+ badExample: `IF 0 <> sy-subrc.
65227
65230
  ENDIF.`,
65228
- goodExample: `IF sy-subrc <> 0.
65231
+ goodExample: `IF sy-subrc <> 0.
65229
65232
  ENDIF.`,
65230
65233
  };
65231
65234
  }
@@ -65326,8 +65329,8 @@ class NROBConsistency {
65326
65329
  key: "nrob_consistency",
65327
65330
  title: "Number range consistency",
65328
65331
  shortDescription: `Consistency checks for number ranges`,
65329
- extendedInformation: `Issue reported if percentage warning is over 50%
65330
-
65332
+ extendedInformation: `Issue reported if percentage warning is over 50%
65333
+
65331
65334
  Issue reported if the referenced domain is not found(taking error namespace into account)`,
65332
65335
  tags: [_irule_1.RuleTag.SingleFile],
65333
65336
  };
@@ -65604,58 +65607,58 @@ class ObsoleteStatement extends _abap_rule_1.ABAPRule {
65604
65607
  title: "Obsolete statements",
65605
65608
  shortDescription: `Checks for usages of certain obsolete statements`,
65606
65609
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
65607
- extendedInformation: `
65608
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
65609
-
65610
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
65611
-
65612
- SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
65613
-
65614
- IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
65615
-
65616
- WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
65617
-
65618
- FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
65619
-
65620
- TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
65621
-
65622
- LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
65623
-
65624
- COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
65625
-
65626
- OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
65627
-
65628
- PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
65629
-
65630
- RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
65631
-
65632
- PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
65633
-
65634
- MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
65635
-
65636
- SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
65637
- SELECT COUNT(*) is considered okay
65638
-
65639
- FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
65640
-
65641
- SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
65642
-
65643
- CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
65644
-
65645
- POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
65646
-
65647
- OCCURENCES: check for OCCURENCES vs OCCURRENCES
65648
-
65610
+ extendedInformation: `
65611
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
65612
+
65613
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
65614
+
65615
+ SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
65616
+
65617
+ IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
65618
+
65619
+ WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
65620
+
65621
+ FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
65622
+
65623
+ TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
65624
+
65625
+ LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
65626
+
65627
+ COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
65628
+
65629
+ OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
65630
+
65631
+ PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
65632
+
65633
+ RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
65634
+
65635
+ PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
65636
+
65637
+ MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
65638
+
65639
+ SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
65640
+ SELECT COUNT(*) is considered okay
65641
+
65642
+ FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
65643
+
65644
+ SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
65645
+
65646
+ CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
65647
+
65648
+ POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
65649
+
65650
+ OCCURENCES: check for OCCURENCES vs OCCURRENCES
65651
+
65649
65652
  CLIENT SPECIFIED, from 754: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abapselect_client_obsolete.htm`,
65650
- badExample: `REFRESH itab.
65651
-
65652
- COMPUTE foo = 2 + 2.
65653
-
65654
- MULTIPLY lv_foo BY 2.
65655
-
65656
- INTERFACE intf LOAD.
65657
-
65658
- IF foo IS SUPPLIED.
65653
+ badExample: `REFRESH itab.
65654
+
65655
+ COMPUTE foo = 2 + 2.
65656
+
65657
+ MULTIPLY lv_foo BY 2.
65658
+
65659
+ INTERFACE intf LOAD.
65660
+
65661
+ IF foo IS SUPPLIED.
65659
65662
  ENDIF.`,
65660
65663
  };
65661
65664
  }
@@ -65995,9 +65998,9 @@ class OmitParameterName {
65995
65998
  key: "omit_parameter_name",
65996
65999
  title: "Omit parameter name",
65997
66000
  shortDescription: `Omit the parameter name in single parameter calls`,
65998
- extendedInformation: `
65999
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
66000
-
66001
+ extendedInformation: `
66002
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
66003
+
66001
66004
  EXPORTING must already be omitted for this rule to take effect, https://rules.abaplint.org/exporting/`,
66002
66005
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
66003
66006
  badExample: `method( param = 2 ).`,
@@ -66203,20 +66206,20 @@ class OmitReceiving extends _abap_rule_1.ABAPRule {
66203
66206
  shortDescription: `Omit RECEIVING`,
66204
66207
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-receiving`,
66205
66208
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
66206
- badExample: `
66207
- upload_pack(
66208
- EXPORTING
66209
- io_client = lo_client
66210
- iv_url = iv_url
66211
- iv_deepen_level = iv_deepen_level
66212
- it_hashes = lt_hashes
66213
- RECEIVING
66209
+ badExample: `
66210
+ upload_pack(
66211
+ EXPORTING
66212
+ io_client = lo_client
66213
+ iv_url = iv_url
66214
+ iv_deepen_level = iv_deepen_level
66215
+ it_hashes = lt_hashes
66216
+ RECEIVING
66214
66217
  rt_objects = et_objects ).`,
66215
- goodExample: `
66216
- et_objects = upload_pack(
66217
- io_client = lo_client
66218
- iv_url = iv_url
66219
- iv_deepen_level = iv_deepen_level
66218
+ goodExample: `
66219
+ et_objects = upload_pack(
66220
+ io_client = lo_client
66221
+ iv_url = iv_url
66222
+ iv_deepen_level = iv_deepen_level
66220
66223
  it_hashes = lt_hashes ).`,
66221
66224
  };
66222
66225
  }
@@ -66280,8 +66283,8 @@ class Parser702Chaining extends _abap_rule_1.ABAPRule {
66280
66283
  return {
66281
66284
  key: "parser_702_chaining",
66282
66285
  title: "Parser Error, bad chanining on 702",
66283
- shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
66284
- this rule finds these and reports errors.
66286
+ shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
66287
+ this rule finds these and reports errors.
66285
66288
  Only active on target version 702 and below.`,
66286
66289
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
66287
66290
  };
@@ -66361,8 +66364,8 @@ class ParserError {
66361
66364
  return {
66362
66365
  key: "parser_error",
66363
66366
  title: "Parser error",
66364
- shortDescription: `Checks for syntax not recognized by abaplint.
66365
-
66367
+ shortDescription: `Checks for syntax not recognized by abaplint.
66368
+
66366
66369
  See recognized syntax at https://syntax.abaplint.org`,
66367
66370
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
66368
66371
  };
@@ -66447,7 +66450,7 @@ class ParserMissingSpace extends _abap_rule_1.ABAPRule {
66447
66450
  return {
66448
66451
  key: "parser_missing_space",
66449
66452
  title: "Parser Error, missing space",
66450
- shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.
66453
+ shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.
66451
66454
  This rule makes sure the spaces are consistently required across the language.`,
66452
66455
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
66453
66456
  badExample: `IF ( foo = 'bar').`,
@@ -66859,25 +66862,25 @@ class PreferInline {
66859
66862
  key: "prefer_inline",
66860
66863
  title: "Prefer Inline Declarations",
66861
66864
  shortDescription: `Prefer inline to up-front declarations.`,
66862
- extendedInformation: `EXPERIMENTAL
66863
-
66864
- Activates if language version is v740sp02 or above.
66865
-
66866
- Variables must be local(METHOD or FORM).
66867
-
66868
- No generic or void typed variables. No syntax errors.
66869
-
66870
- First position used must be a full/pure write.
66871
-
66872
- Move statment is not a cast(?=)
66873
-
66865
+ extendedInformation: `EXPERIMENTAL
66866
+
66867
+ Activates if language version is v740sp02 or above.
66868
+
66869
+ Variables must be local(METHOD or FORM).
66870
+
66871
+ No generic or void typed variables. No syntax errors.
66872
+
66873
+ First position used must be a full/pure write.
66874
+
66875
+ Move statment is not a cast(?=)
66876
+
66874
66877
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-inline-to-up-front-declarations`,
66875
66878
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Experimental, _irule_1.RuleTag.Quickfix],
66876
- badExample: `DATA foo TYPE i.
66877
- foo = 2.
66878
- DATA percentage TYPE decfloat34.
66879
+ badExample: `DATA foo TYPE i.
66880
+ foo = 2.
66881
+ DATA percentage TYPE decfloat34.
66879
66882
  percentage = ( comment_number / abs_statement_number ) * 100.`,
66880
- goodExample: `DATA(foo) = 2.
66883
+ goodExample: `DATA(foo) = 2.
66881
66884
  DATA(percentage) = CONV decfloat34( comment_number / abs_statement_number ) * 100.`,
66882
66885
  };
66883
66886
  }
@@ -67091,18 +67094,18 @@ class PreferIsNot extends _abap_rule_1.ABAPRule {
67091
67094
  key: "prefer_is_not",
67092
67095
  title: "Prefer IS NOT to NOT IS",
67093
67096
  shortDescription: `Prefer IS NOT to NOT IS`,
67094
- extendedInformation: `
67095
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
67096
-
67097
+ extendedInformation: `
67098
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
67099
+
67097
67100
  "if not is_valid( )." examples are skipped`,
67098
67101
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
67099
- goodExample: `IF variable IS NOT INITIAL.
67100
- IF variable NP 'TODO*'.
67101
- IF variable <> 42.
67102
+ goodExample: `IF variable IS NOT INITIAL.
67103
+ IF variable NP 'TODO*'.
67104
+ IF variable <> 42.
67102
67105
  IF variable CO 'hello'.`,
67103
- badExample: `IF NOT variable IS INITIAL.
67104
- IF NOT variable CP 'TODO*'.
67105
- IF NOT variable = 42.
67106
+ badExample: `IF NOT variable IS INITIAL.
67107
+ IF NOT variable CP 'TODO*'.
67108
+ IF NOT variable = 42.
67106
67109
  IF NOT variable CA 'hello'.`,
67107
67110
  };
67108
67111
  }
@@ -67290,14 +67293,14 @@ class PreferRaiseExceptionNew extends _abap_rule_1.ABAPRule {
67290
67293
  key: "prefer_raise_exception_new",
67291
67294
  title: "Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE",
67292
67295
  shortDescription: `Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE`,
67293
- extendedInformation: `
67294
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
67295
-
67296
+ extendedInformation: `
67297
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
67298
+
67296
67299
  From 752 and up`,
67297
67300
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
67298
67301
  goodExample: `RAISE EXCEPTION NEW cx_generation_error( previous = exception ).`,
67299
- badExample: `RAISE EXCEPTION TYPE cx_generation_error
67300
- EXPORTING
67302
+ badExample: `RAISE EXCEPTION TYPE cx_generation_error
67303
+ EXPORTING
67301
67304
  previous = exception.`,
67302
67305
  };
67303
67306
  }
@@ -67375,12 +67378,12 @@ class PreferReturningToExporting extends _abap_rule_1.ABAPRule {
67375
67378
  key: "prefer_returning_to_exporting",
67376
67379
  title: "Prefer RETURNING to EXPORTING",
67377
67380
  shortDescription: `Prefer RETURNING to EXPORTING. Generic types cannot be RETURNING.`,
67378
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting
67381
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting
67379
67382
  https://docs.abapopenchecks.org/checks/44/`,
67380
67383
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
67381
- badExample: `CLASS lcl DEFINITION.
67382
- PUBLIC SECTION.
67383
- METHODS test EXPORTING ev_foo TYPE i.
67384
+ badExample: `CLASS lcl DEFINITION.
67385
+ PUBLIC SECTION.
67386
+ METHODS test EXPORTING ev_foo TYPE i.
67384
67387
  ENDCLASS.`,
67385
67388
  };
67386
67389
  }
@@ -67476,8 +67479,8 @@ class PreferXsdbool extends _abap_rule_1.ABAPRule {
67476
67479
  key: "prefer_xsdbool",
67477
67480
  title: "Prefer xsdbool over boolc",
67478
67481
  shortDescription: `Prefer xsdbool over boolc`,
67479
- extendedInformation: `Activates if language version is v740sp08 or above.
67480
-
67482
+ extendedInformation: `Activates if language version is v740sp08 or above.
67483
+
67481
67484
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
67482
67485
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
67483
67486
  badExample: `DATA(sdf) = boolc( 1 = 2 ).`,
@@ -67549,9 +67552,9 @@ class PreferredCompareOperator extends _abap_rule_1.ABAPRule {
67549
67552
  title: "Preferred compare operator",
67550
67553
  shortDescription: `Configure undesired operator variants`,
67551
67554
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
67552
- badExample: `IF foo EQ bar.
67555
+ badExample: `IF foo EQ bar.
67553
67556
  ENDIF.`,
67554
- goodExample: `IF foo = bar.
67557
+ goodExample: `IF foo = bar.
67555
67558
  ENDIF.`,
67556
67559
  };
67557
67560
  }
@@ -67775,26 +67778,26 @@ class ReduceProceduralCode extends _abap_rule_1.ABAPRule {
67775
67778
  key: "reduce_procedural_code",
67776
67779
  title: "Reduce procedural code",
67777
67780
  shortDescription: `Checks FORM and FUNCTION-MODULE have few statements`,
67778
- extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
67779
-
67780
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
67781
-
67781
+ extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
67782
+
67783
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
67784
+
67782
67785
  Comments are not counted as statements.`,
67783
67786
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
67784
- badExample: `FORM foo.
67785
- DATA lv_bar TYPE i.
67786
- lv_bar = 2 + 2.
67787
- IF lv_bar = 4.
67788
- WRITE 'hello world'.
67789
- ENDIF.
67790
- DATA lv_bar TYPE i.
67791
- lv_bar = 2 + 2.
67792
- IF lv_bar = 4.
67793
- WRITE 'hello world'.
67794
- ENDIF.
67787
+ badExample: `FORM foo.
67788
+ DATA lv_bar TYPE i.
67789
+ lv_bar = 2 + 2.
67790
+ IF lv_bar = 4.
67791
+ WRITE 'hello world'.
67792
+ ENDIF.
67793
+ DATA lv_bar TYPE i.
67794
+ lv_bar = 2 + 2.
67795
+ IF lv_bar = 4.
67796
+ WRITE 'hello world'.
67797
+ ENDIF.
67795
67798
  ENDFORM.`,
67796
- goodExample: `FORM foo.
67797
- NEW zcl_global_class( )->run_logic( ).
67799
+ goodExample: `FORM foo.
67800
+ NEW zcl_global_class( )->run_logic( ).
67798
67801
  ENDFORM.`,
67799
67802
  };
67800
67803
  }
@@ -68038,10 +68041,10 @@ class RemoveDescriptions {
68038
68041
  return {
68039
68042
  key: "remove_descriptions",
68040
68043
  title: "Remove descriptions",
68041
- shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
68042
-
68043
- Class descriptions are required, see rule description_empty.
68044
-
68044
+ shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
68045
+
68046
+ Class descriptions are required, see rule description_empty.
68047
+
68045
68048
  Consider using ABAP Doc for documentation.`,
68046
68049
  tags: [],
68047
68050
  };
@@ -68166,14 +68169,14 @@ class RFCErrorHandling extends _abap_rule_1.ABAPRule {
68166
68169
  tags: [_irule_1.RuleTag.SingleFile],
68167
68170
  shortDescription: `Checks that exceptions 'system_failure' and 'communication_failure' are handled in RFC calls`,
68168
68171
  extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenrfc_exception.htm`,
68169
- badExample: `CALL FUNCTION 'ZRFC'
68172
+ badExample: `CALL FUNCTION 'ZRFC'
68170
68173
  DESTINATION lv_rfc.`,
68171
- goodExample: `CALL FUNCTION 'ZRFC'
68172
- DESTINATION lv_rfc
68173
- EXCEPTIONS
68174
- system_failure = 1 MESSAGE msg
68175
- communication_failure = 2 MESSAGE msg
68176
- resource_failure = 3
68174
+ goodExample: `CALL FUNCTION 'ZRFC'
68175
+ DESTINATION lv_rfc
68176
+ EXCEPTIONS
68177
+ system_failure = 1 MESSAGE msg
68178
+ communication_failure = 2 MESSAGE msg
68179
+ resource_failure = 3
68177
68180
  OTHERS = 4.`,
68178
68181
  };
68179
68182
  }
@@ -68257,11 +68260,11 @@ class SelectAddOrderBy {
68257
68260
  key: "select_add_order_by",
68258
68261
  title: "SELECT add ORDER BY",
68259
68262
  shortDescription: `SELECTs add ORDER BY clause`,
68260
- extendedInformation: `
68261
- This will make sure that the SELECT statement returns results in the same sequence on different databases
68262
-
68263
- add ORDER BY PRIMARY KEY if in doubt
68264
-
68263
+ extendedInformation: `
68264
+ This will make sure that the SELECT statement returns results in the same sequence on different databases
68265
+
68266
+ add ORDER BY PRIMARY KEY if in doubt
68267
+
68265
68268
  If the target is a sorted/hashed table, no issue is reported`,
68266
68269
  tags: [_irule_1.RuleTag.SingleFile],
68267
68270
  badExample: `SELECT * FROM db INTO TABLE @DATA(tab).`,
@@ -68392,14 +68395,14 @@ class SelectPerformance {
68392
68395
  key: "select_performance",
68393
68396
  title: "SELECT performance",
68394
68397
  shortDescription: `Various checks regarding SELECT performance.`,
68395
- extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
68396
-
68398
+ extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
68399
+
68397
68400
  SELECT *: not reported if using INTO/APPENDING CORRESPONDING FIELDS OF`,
68398
68401
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Performance],
68399
- badExample: `SELECT field1, field2 FROM table
68400
- INTO @DATA(structure) UP TO 1 ROWS ORDER BY field3 DESCENDING.
68402
+ badExample: `SELECT field1, field2 FROM table
68403
+ INTO @DATA(structure) UP TO 1 ROWS ORDER BY field3 DESCENDING.
68401
68404
  ENDSELECT.`,
68402
- goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
68405
+ goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
68403
68406
  INTO TABLE @DATA(table) ORDER BY field3 DESCENDING`,
68404
68407
  };
68405
68408
  }
@@ -68513,8 +68516,8 @@ class SelectSingleFullKey {
68513
68516
  key: "select_single_full_key",
68514
68517
  title: "Detect SELECT SINGLE which are possibily not unique",
68515
68518
  shortDescription: `Detect SELECT SINGLE which are possibily not unique`,
68516
- extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
68517
-
68519
+ extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
68520
+
68518
68521
  If the statement contains a JOIN it is not checked`,
68519
68522
  pseudoComment: "EC CI_NOORDER",
68520
68523
  tags: [_irule_1.RuleTag.Quickfix],
@@ -68938,8 +68941,8 @@ class SICFConsistency {
68938
68941
  key: "sicf_consistency",
68939
68942
  title: "SICF consistency",
68940
68943
  shortDescription: `Checks the validity of ICF services`,
68941
- extendedInformation: `* Class defined in handler must exist
68942
- * Class must not have any syntax errors
68944
+ extendedInformation: `* Class defined in handler must exist
68945
+ * Class must not have any syntax errors
68943
68946
  * Class must implement interface IF_HTTP_EXTENSION`,
68944
68947
  };
68945
68948
  }
@@ -69051,23 +69054,23 @@ class SlowParameterPassing {
69051
69054
  shortDescription: `Detects slow pass by value passing for methods where parameter is not changed`,
69052
69055
  extendedInformation: `Method parameters defined in interfaces is not checked`,
69053
69056
  tags: [_irule_1.RuleTag.Performance],
69054
- badExample: `CLASS lcl DEFINITION.
69055
- PUBLIC SECTION.
69056
- METHODS bar IMPORTING VALUE(sdf) TYPE string.
69057
- ENDCLASS.
69058
- CLASS lcl IMPLEMENTATION.
69059
- METHOD bar.
69060
- WRITE sdf.
69061
- ENDMETHOD.
69057
+ badExample: `CLASS lcl DEFINITION.
69058
+ PUBLIC SECTION.
69059
+ METHODS bar IMPORTING VALUE(sdf) TYPE string.
69060
+ ENDCLASS.
69061
+ CLASS lcl IMPLEMENTATION.
69062
+ METHOD bar.
69063
+ WRITE sdf.
69064
+ ENDMETHOD.
69062
69065
  ENDCLASS.`,
69063
- goodExample: `CLASS lcl DEFINITION.
69064
- PUBLIC SECTION.
69065
- METHODS bar IMPORTING sdf TYPE string.
69066
- ENDCLASS.
69067
- CLASS lcl IMPLEMENTATION.
69068
- METHOD bar.
69069
- WRITE sdf.
69070
- ENDMETHOD.
69066
+ goodExample: `CLASS lcl DEFINITION.
69067
+ PUBLIC SECTION.
69068
+ METHODS bar IMPORTING sdf TYPE string.
69069
+ ENDCLASS.
69070
+ CLASS lcl IMPLEMENTATION.
69071
+ METHOD bar.
69072
+ WRITE sdf.
69073
+ ENDMETHOD.
69071
69074
  ENDCLASS.`,
69072
69075
  };
69073
69076
  }
@@ -69324,8 +69327,8 @@ class SpaceBeforeDot extends _abap_rule_1.ABAPRule {
69324
69327
  key: "space_before_dot",
69325
69328
  title: "Space before dot",
69326
69329
  shortDescription: `Checks for extra spaces before dots at the ends of statements`,
69327
- extendedInformation: `
69328
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
69330
+ extendedInformation: `
69331
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
69329
69332
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#condense-your-code`,
69330
69333
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
69331
69334
  badExample: `WRITE bar .`,
@@ -69511,12 +69514,12 @@ class SQLValueConversion {
69511
69514
  key: "sql_value_conversion",
69512
69515
  title: "Implicit SQL Value Conversion",
69513
69516
  shortDescription: `Ensure types match when selecting from database`,
69514
- extendedInformation: `
69515
- * Integer to CHAR conversion
69516
- * Integer to NUMC conversion
69517
- * NUMC to Integer conversion
69518
- * CHAR to Integer conversion
69519
- * Source field longer than database field, CHAR -> CHAR
69517
+ extendedInformation: `
69518
+ * Integer to CHAR conversion
69519
+ * Integer to NUMC conversion
69520
+ * NUMC to Integer conversion
69521
+ * CHAR to Integer conversion
69522
+ * Source field longer than database field, CHAR -> CHAR
69520
69523
  * Source field longer than database field, NUMC -> NUMC`,
69521
69524
  tags: [],
69522
69525
  };
@@ -69588,7 +69591,7 @@ class StartAtTab extends _abap_rule_1.ABAPRule {
69588
69591
  key: "start_at_tab",
69589
69592
  title: "Start at tab",
69590
69593
  shortDescription: `Checks that statements start at tabstops.`,
69591
- extendedInformation: `Reports max 100 issues per file
69594
+ extendedInformation: `Reports max 100 issues per file
69592
69595
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
69593
69596
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
69594
69597
  badExample: ` WRITE a.`,
@@ -69765,12 +69768,12 @@ class StrictSQL extends _abap_rule_1.ABAPRule {
69765
69768
  key: "strict_sql",
69766
69769
  title: "Strict SQL",
69767
69770
  shortDescription: `Strict SQL`,
69768
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
69769
-
69770
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
69771
-
69772
- Also see separate rule sql_escape_host_variables
69773
-
69771
+ extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
69772
+
69773
+ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
69774
+
69775
+ Also see separate rule sql_escape_host_variables
69776
+
69774
69777
  Activates from v750 and up`,
69775
69778
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix],
69776
69779
  badExample: `SELECT * FROM ztabl INTO TABLE @rt_content WHERE type = @iv_type ORDER BY PRIMARY KEY.`,
@@ -70024,11 +70027,11 @@ class SyModification extends _abap_rule_1.ABAPRule {
70024
70027
  key: "sy_modification",
70025
70028
  title: "Modification of SY fields",
70026
70029
  shortDescription: `Finds modification of sy fields`,
70027
- extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
70028
-
70030
+ extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
70031
+
70029
70032
  Changes to SY-TVAR* fields are not reported`,
70030
70033
  tags: [_irule_1.RuleTag.SingleFile],
70031
- badExample: `sy-uname = 2.
70034
+ badExample: `sy-uname = 2.
70032
70035
  sy = sy.`,
70033
70036
  };
70034
70037
  }
@@ -70090,8 +70093,8 @@ class TABLEnhancementCategory {
70090
70093
  key: "tabl_enhancement_category",
70091
70094
  title: "TABL enhancement category must be set",
70092
70095
  shortDescription: `Checks that tables do not have the enhancement category 'not classified'.`,
70093
- extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
70094
-
70096
+ extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
70097
+
70095
70098
  You may use standard report RS_DDIC_CLASSIFICATION_FINAL for adjustment.`,
70096
70099
  tags: [],
70097
70100
  };
@@ -70219,9 +70222,9 @@ class TypeFormParameters extends _abap_rule_1.ABAPRule {
70219
70222
  title: "Type FORM parameters",
70220
70223
  shortDescription: `Checks for untyped FORM parameters`,
70221
70224
  tags: [_irule_1.RuleTag.SingleFile],
70222
- badExample: `FORM foo USING bar.
70225
+ badExample: `FORM foo USING bar.
70223
70226
  ENDFORM.`,
70224
- goodExample: `FORM foo USING bar TYPE string.
70227
+ goodExample: `FORM foo USING bar TYPE string.
70225
70228
  ENDFORM.`,
70226
70229
  };
70227
70230
  }
@@ -70894,38 +70897,38 @@ class UnnecessaryPragma extends _abap_rule_1.ABAPRule {
70894
70897
  key: "unnecessary_pragma",
70895
70898
  title: "Unnecessary Pragma",
70896
70899
  shortDescription: `Finds pragmas which can be removed`,
70897
- extendedInformation: `* NO_HANDLER with handler
70898
-
70899
- * NEEDED without definition
70900
-
70901
- * NO_TEXT without texts
70902
-
70903
- * SUBRC_OK where sy-subrc is checked
70904
-
70900
+ extendedInformation: `* NO_HANDLER with handler
70901
+
70902
+ * NEEDED without definition
70903
+
70904
+ * NO_TEXT without texts
70905
+
70906
+ * SUBRC_OK where sy-subrc is checked
70907
+
70905
70908
  NO_HANDLER inside macros are not checked`,
70906
70909
  tags: [_irule_1.RuleTag.SingleFile],
70907
- badExample: `TRY.
70908
- ...
70909
- CATCH zcx_abapgit_exception ##NO_HANDLER.
70910
- RETURN. " it has a handler
70911
- ENDTRY.
70912
- MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
70913
- SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
70914
- IF sy-subrc <> 0.
70910
+ badExample: `TRY.
70911
+ ...
70912
+ CATCH zcx_abapgit_exception ##NO_HANDLER.
70913
+ RETURN. " it has a handler
70914
+ ENDTRY.
70915
+ MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
70916
+ SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
70917
+ IF sy-subrc <> 0.
70915
70918
  ENDIF.`,
70916
- goodExample: `TRY.
70917
- ...
70918
- CATCH zcx_abapgit_exception.
70919
- RETURN.
70920
- ENDTRY.
70921
- MESSAGE w125(zbar) WITH c_foo INTO message.
70922
- SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
70923
- IF sy-subrc <> 0.
70924
- ENDIF.
70925
-
70926
- DATA: BEGIN OF blah ##NEEDED,
70927
- test1 TYPE string,
70928
- test2 TYPE string,
70919
+ goodExample: `TRY.
70920
+ ...
70921
+ CATCH zcx_abapgit_exception.
70922
+ RETURN.
70923
+ ENDTRY.
70924
+ MESSAGE w125(zbar) WITH c_foo INTO message.
70925
+ SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
70926
+ IF sy-subrc <> 0.
70927
+ ENDIF.
70928
+
70929
+ DATA: BEGIN OF blah ##NEEDED,
70930
+ test1 TYPE string,
70931
+ test2 TYPE string,
70929
70932
  END OF blah.`,
70930
70933
  };
70931
70934
  }
@@ -71092,18 +71095,18 @@ class UnnecessaryReturn extends _abap_rule_1.ABAPRule {
71092
71095
  shortDescription: `Finds unnecessary RETURN statements`,
71093
71096
  extendedInformation: `Finds unnecessary RETURN statements`,
71094
71097
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
71095
- badExample: `FORM hello1.
71096
- WRITE 'world'.
71097
- RETURN.
71098
- ENDFORM.
71099
-
71100
- FORM foo.
71101
- IF 1 = 2.
71102
- RETURN.
71103
- ENDIF.
71098
+ badExample: `FORM hello1.
71099
+ WRITE 'world'.
71100
+ RETURN.
71101
+ ENDFORM.
71102
+
71103
+ FORM foo.
71104
+ IF 1 = 2.
71105
+ RETURN.
71106
+ ENDIF.
71104
71107
  ENDFORM.`,
71105
- goodExample: `FORM hello2.
71106
- WRITE 'world'.
71108
+ goodExample: `FORM hello2.
71109
+ WRITE 'world'.
71107
71110
  ENDFORM.`,
71108
71111
  };
71109
71112
  }
@@ -71454,13 +71457,13 @@ class UnusedMacros {
71454
71457
  title: "Unused macros",
71455
71458
  shortDescription: `Checks for unused macro definitions definitions`,
71456
71459
  tags: [_irule_1.RuleTag.Quickfix],
71457
- badExample: `DEFINE foobar1.
71458
- WRITE 'hello'.
71460
+ badExample: `DEFINE foobar1.
71461
+ WRITE 'hello'.
71459
71462
  END-OF-DEFINITION.`,
71460
- goodExample: `DEFINE foobar2.
71461
- WRITE 'hello'.
71462
- END-OF-DEFINITION.
71463
-
71463
+ goodExample: `DEFINE foobar2.
71464
+ WRITE 'hello'.
71465
+ END-OF-DEFINITION.
71466
+
71464
71467
  foobar2.`,
71465
71468
  };
71466
71469
  }
@@ -71568,17 +71571,17 @@ class UnusedMethods {
71568
71571
  key: "unused_methods",
71569
71572
  title: "Unused methods",
71570
71573
  shortDescription: `Checks for unused methods`,
71571
- extendedInformation: `Checks private and protected methods.
71572
-
71573
- Unused methods are not reported if the object contains parser or syntax errors.
71574
-
71575
- Skips:
71576
- * methods FOR TESTING
71577
- * methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
71578
- * class_constructor + constructor methods
71579
- * event handlers
71580
- * methods that are redefined
71581
- * INCLUDEs
71574
+ extendedInformation: `Checks private and protected methods.
71575
+
71576
+ Unused methods are not reported if the object contains parser or syntax errors.
71577
+
71578
+ Skips:
71579
+ * methods FOR TESTING
71580
+ * methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
71581
+ * class_constructor + constructor methods
71582
+ * event handlers
71583
+ * methods that are redefined
71584
+ * INCLUDEs
71582
71585
  `,
71583
71586
  tags: [],
71584
71587
  pragma: "##CALLED",
@@ -72012,23 +72015,23 @@ class UnusedVariables {
72012
72015
  key: "unused_variables",
72013
72016
  title: "Unused variables",
72014
72017
  shortDescription: `Checks for unused variables and constants`,
72015
- extendedInformation: `Skips event parameters.
72016
-
72017
- Note that this currently does not work if the source code uses macros.
72018
-
72019
- Unused variables are not reported if the object contains parser or syntax errors.
72020
-
72018
+ extendedInformation: `Skips event parameters.
72019
+
72020
+ Note that this currently does not work if the source code uses macros.
72021
+
72022
+ Unused variables are not reported if the object contains parser or syntax errors.
72023
+
72021
72024
  Errors found in INCLUDES are reported for the main program.`,
72022
72025
  tags: [_irule_1.RuleTag.Quickfix],
72023
72026
  pragma: "##NEEDED",
72024
72027
  pseudoComment: "EC NEEDED",
72025
- badExample: `DATA: BEGIN OF blah1,
72026
- test TYPE string,
72027
- test2 TYPE string,
72028
+ badExample: `DATA: BEGIN OF blah1,
72029
+ test TYPE string,
72030
+ test2 TYPE string,
72028
72031
  END OF blah1.`,
72029
- goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
72030
- test TYPE string,
72031
- test2 TYPE string,
72032
+ goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
72033
+ test TYPE string,
72034
+ test2 TYPE string,
72032
72035
  END OF blah2.`,
72033
72036
  };
72034
72037
  }
@@ -72247,15 +72250,15 @@ class UseBoolExpression extends _abap_rule_1.ABAPRule {
72247
72250
  shortDescription: `Use boolean expression, xsdbool from 740sp08 and up, boolc from 702 and up`,
72248
72251
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
72249
72252
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
72250
- badExample: `IF line IS INITIAL.
72251
- has_entries = abap_false.
72252
- ELSE.
72253
- has_entries = abap_true.
72254
- ENDIF.
72255
-
72253
+ badExample: `IF line IS INITIAL.
72254
+ has_entries = abap_false.
72255
+ ELSE.
72256
+ has_entries = abap_true.
72257
+ ENDIF.
72258
+
72256
72259
  DATA(fsdf) = COND #( WHEN foo <> bar THEN abap_true ELSE abap_false ).`,
72257
- goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
72258
-
72260
+ goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
72261
+
72259
72262
  DATA(fsdf) = xsdbool( foo <> bar ).`,
72260
72263
  };
72261
72264
  }
@@ -72373,15 +72376,15 @@ class UseClassBasedExceptions extends _abap_rule_1.ABAPRule {
72373
72376
  shortDescription: `Use class based exceptions, checks interface and class definitions`,
72374
72377
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-class-based-exceptions`,
72375
72378
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
72376
- badExample: `INTERFACE lif.
72377
- METHODS load_data
72378
- EXCEPTIONS
72379
- invalid_parameter.
72379
+ badExample: `INTERFACE lif.
72380
+ METHODS load_data
72381
+ EXCEPTIONS
72382
+ invalid_parameter.
72380
72383
  ENDINTERFACE.`,
72381
- goodExample: `INTERFACE lif.
72382
- METHODS load_data
72383
- RAISING
72384
- cx_something.
72384
+ goodExample: `INTERFACE lif.
72385
+ METHODS load_data
72386
+ RAISING
72387
+ cx_something.
72385
72388
  ENDINTERFACE.`,
72386
72389
  };
72387
72390
  }
@@ -72441,15 +72444,15 @@ class UseLineExists extends _abap_rule_1.ABAPRule {
72441
72444
  key: "use_line_exists",
72442
72445
  title: "Use line_exists",
72443
72446
  shortDescription: `Use line_exists, from 740sp02 and up`,
72444
- extendedInformation: `
72445
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
72446
-
72447
+ extendedInformation: `
72448
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
72449
+
72447
72450
  Not reported if the READ TABLE statement contains BINARY SEARCH.`,
72448
72451
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
72449
- badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
72450
- IF sy-subrc = 0.
72452
+ badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
72453
+ IF sy-subrc = 0.
72451
72454
  ENDIF.`,
72452
- goodExample: `IF line_exists( my_table[ key = 'A' ] ).
72455
+ goodExample: `IF line_exists( my_table[ key = 'A' ] ).
72453
72456
  ENDIF.`,
72454
72457
  };
72455
72458
  }
@@ -72559,10 +72562,10 @@ class UseNew extends _abap_rule_1.ABAPRule {
72559
72562
  key: "use_new",
72560
72563
  title: "Use NEW",
72561
72564
  shortDescription: `Checks for deprecated CREATE OBJECT statements.`,
72562
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
72563
-
72564
- If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
72565
-
72565
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
72566
+
72567
+ If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
72568
+
72566
72569
  Applicable from v740sp02 and up`,
72567
72570
  badExample: `CREATE OBJECT ref.`,
72568
72571
  goodExample: `ref = NEW #( ).`,
@@ -72660,13 +72663,13 @@ class WhenOthersLast extends _abap_rule_1.ABAPRule {
72660
72663
  title: "WHEN OTHERS last",
72661
72664
  shortDescription: `Checks that WHEN OTHERS is placed the last within a CASE statement.`,
72662
72665
  tags: [_irule_1.RuleTag.SingleFile],
72663
- badExample: `CASE bar.
72664
- WHEN OTHERS.
72665
- WHEN 2.
72666
+ badExample: `CASE bar.
72667
+ WHEN OTHERS.
72668
+ WHEN 2.
72666
72669
  ENDCASE.`,
72667
- goodExample: `CASE bar.
72668
- WHEN 2.
72669
- WHEN OTHERS.
72670
+ goodExample: `CASE bar.
72671
+ WHEN 2.
72672
+ WHEN OTHERS.
72670
72673
  ENDCASE.`,
72671
72674
  };
72672
72675
  }
@@ -75961,7 +75964,7 @@ class MethodSourceTranspiler {
75961
75964
  else if (call.endsWith(".") === false) {
75962
75965
  call += ".";
75963
75966
  }
75964
- call += second.getFirstToken().getStr().replace(/\'/g, "").toLowerCase().replace("~", "$").trimEnd();
75967
+ call += second.getFirstToken().getStr().replace(/[\'\`]/g, "").toLowerCase().replace("~", "$").trimEnd();
75965
75968
  }
75966
75969
  else {
75967
75970
  ret.appendString("MethodSourceTranspiler-Unexpected");