@abaplint/cli 2.113.70 → 2.113.72

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/README.md +4 -4
  2. package/abaplint +2 -2
  3. package/build/cli.js +941 -858
  4. package/package.json +63 -63
package/build/cli.js CHANGED
@@ -1018,7 +1018,13 @@ async function run(arg) {
1018
1018
  const filesList = Array.isArray(configFiles) ? configFiles : [configFiles];
1019
1019
  for (const l of filesList) {
1020
1020
  const files = file_operations_1.FileOperations.loadFileNames(base + l);
1021
- loaded.push(...await file_operations_1.FileOperations.loadFiles(arg.compress, files, progress));
1021
+ const temp = await file_operations_1.FileOperations.loadFiles(arg.compress, files, progress);
1022
+ if (loaded.length === 0) {
1023
+ loaded = temp;
1024
+ }
1025
+ else {
1026
+ loaded = loaded.concat(temp);
1027
+ }
1022
1028
  }
1023
1029
  }
1024
1030
  deps = await loadDependencies(config, arg.compress, progress, base);
@@ -4831,11 +4837,13 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
4831
4837
  exports.DataDefinition = void 0;
4832
4838
  const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
4833
4839
  const Expressions = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
4840
+ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
4834
4841
  class DataDefinition extends combi_1.Expression {
4835
4842
  getRunnable() {
4836
4843
  const simple = (0, combi_1.opt)((0, combi_1.per)("READ-ONLY", Expressions.Type, Expressions.Length, Expressions.Decimals, Expressions.Value));
4837
4844
  const table = (0, combi_1.seq)(Expressions.TypeTable, (0, combi_1.optPrio)("READ-ONLY"));
4838
- return (0, combi_1.seq)(Expressions.DefinitionName, (0, combi_1.optPrio)(Expressions.ConstantFieldLength), (0, combi_1.alt)(simple, table, Expressions.TypeStructure));
4845
+ const boxed = (0, combi_1.ver)(version_1.Version.v702, "BOXED");
4846
+ return (0, combi_1.seq)(Expressions.DefinitionName, (0, combi_1.optPrio)(Expressions.ConstantFieldLength), (0, combi_1.alt)(simple, table, Expressions.TypeStructure), (0, combi_1.optPrio)(boxed));
4839
4847
  }
4840
4848
  }
4841
4849
  exports.DataDefinition = DataDefinition;
@@ -8926,7 +8934,7 @@ class StringTemplateFormatting extends combi_1.Expression {
8926
8934
  getRunnable() {
8927
8935
  // https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapcompute_string_format_options.htm
8928
8936
  const alphaOptions = (0, combi_1.altPrio)("OUT", "RAW", "IN", _1.Source);
8929
- const alignOptions = (0, combi_1.altPrio)("LEFT", "RIGHT", "CENTER", _1.Source);
8937
+ const alignOptions = (0, combi_1.altPrio)("LEFT", "RIGHT", "CENTER", _1.Source, dynamic_1.Dynamic);
8930
8938
  const dateTimeOptions = (0, combi_1.altPrio)("RAW", "ISO", "USER", "ENVIRONMENT", _1.Source, dynamic_1.Dynamic);
8931
8939
  const timeStampOptions = (0, combi_1.altPrio)("SPACE", "ISO", "USER", "ENVIRONMENT", _1.Source);
8932
8940
  const numberOptions = (0, combi_1.altPrio)("RAW", "USER", "ENVIRONMENT", _1.Source, dynamic_1.Dynamic);
@@ -9864,8 +9872,12 @@ class StatementParser {
9864
9872
  else {
9865
9873
  wa.statements[i] = new nodes_1.StatementNode(new _statement_1.NativeSQL()).setChildren(this.tokensToNodes(statement.getTokens()));
9866
9874
  if (statement.concatTokens().toUpperCase().endsWith("ENDMETHOD.")) {
9867
- // yea, this is not completely correct
9868
- wa.statements[i] = new nodes_1.StatementNode(new Statements.EndMethod()).setChildren(this.tokensToNodes(statement.getTokens()));
9875
+ const tokens = statement.getTokens();
9876
+ const startTokens = this.tokensToNodes(tokens.slice(tokens.length - 2, tokens.length));
9877
+ const endTokens = this.tokensToNodes(tokens.slice(0, tokens.length - 2));
9878
+ wa.statements[i] = new nodes_1.StatementNode(new _statement_1.NativeSQL()).setChildren(endTokens);
9879
+ const item = new nodes_1.StatementNode(new Statements.EndMethod()).setChildren(startTokens);
9880
+ wa.statements.splice(i + 1, 0, item);
9869
9881
  sql = false;
9870
9882
  }
9871
9883
  }
@@ -13645,7 +13657,7 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
13645
13657
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
13646
13658
  class GetProperty {
13647
13659
  getMatcher() {
13648
- const ret = (0, combi_1.seq)("GET PROPERTY OF", expressions_1.FieldSub, expressions_1.Source, "=", expressions_1.Source, (0, combi_1.opt)("NO FLUSH"), (0, combi_1.opt)(expressions_1.OLEExporting));
13660
+ const ret = (0, combi_1.seq)("GET PROPERTY OF", expressions_1.FieldSub, expressions_1.Source, "=", expressions_1.Source, (0, combi_1.opt)("NO FLUSH"), (0, combi_1.opt)("QUEUEONLY"), (0, combi_1.opt)(expressions_1.OLEExporting));
13649
13661
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
13650
13662
  }
13651
13663
  }
@@ -14848,15 +14860,17 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
14848
14860
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
14849
14861
  class ModifyEntities {
14850
14862
  getMatcher() {
14851
- const fieldsWith = (0, combi_1.seq)("FIELDS (", (0, combi_1.plus)(expressions_1.SimpleName), ") WITH", expressions_1.Source);
14852
- const operation = (0, combi_1.alt)((0, combi_1.seq)("UPDATE SET FIELDS WITH", expressions_1.Source), (0, combi_1.seq)("CREATE SET FIELDS WITH", expressions_1.Source), (0, combi_1.seq)("UPDATE", fieldsWith), (0, combi_1.seq)("DELETE FROM", expressions_1.Source), (0, combi_1.seq)("EXECUTE", expressions_1.SimpleName, "FROM", expressions_1.Source), (0, combi_1.seq)("CREATE", (0, combi_1.optPrio)("AUTO FILL CID"), fieldsWith));
14863
+ const withh = (0, combi_1.seq)("WITH", expressions_1.Source);
14864
+ const fieldsWith = (0, combi_1.seq)("FIELDS (", (0, combi_1.plus)(expressions_1.SimpleName), ")", withh);
14865
+ const by = (0, combi_1.seq)("BY", expressions_1.AssociationName);
14866
+ const operation = (0, combi_1.alt)((0, combi_1.seq)("UPDATE SET FIELDS WITH", expressions_1.Source), (0, combi_1.seq)("CREATE SET FIELDS WITH", expressions_1.Source), (0, combi_1.seq)("UPDATE", fieldsWith), (0, combi_1.seq)("DELETE FROM", expressions_1.Source), (0, combi_1.seq)("CREATE", (0, combi_1.opt)(by), "FROM", expressions_1.Source), (0, combi_1.seq)("EXECUTE", expressions_1.SimpleName, "FROM", expressions_1.Source), (0, combi_1.seq)("CREATE", (0, combi_1.opt)(by), (0, combi_1.optPrio)("AUTO FILL CID"), (0, combi_1.altPrio)(withh, fieldsWith)));
14853
14867
  const failed = (0, combi_1.seq)("FAILED", expressions_1.Target);
14854
14868
  const result = (0, combi_1.seq)("RESULT", expressions_1.Target);
14855
14869
  const mapped = (0, combi_1.seq)("MAPPED", expressions_1.Target);
14856
14870
  const reported = (0, combi_1.seq)("REPORTED", expressions_1.Target);
14857
14871
  const from = (0, combi_1.seq)("FROM", expressions_1.Source);
14858
14872
  const execute = (0, combi_1.seq)("EXECUTE", expressions_1.NamespaceSimpleName);
14859
- const entities = (0, combi_1.seq)("ENTITIES OF", expressions_1.NamespaceSimpleName, (0, combi_1.opt)("IN LOCAL MODE"), (0, combi_1.plusPrio)((0, combi_1.seq)("ENTITY", expressions_1.SimpleName, operation)), (0, combi_1.optPrio)((0, combi_1.per)(failed, result, mapped, reported)));
14873
+ const entities = (0, combi_1.seq)("ENTITIES OF", expressions_1.NamespaceSimpleName, (0, combi_1.opt)("IN LOCAL MODE"), (0, combi_1.plusPrio)((0, combi_1.seq)("ENTITY", expressions_1.SimpleName, (0, combi_1.plus)(operation))), (0, combi_1.optPrio)((0, combi_1.per)(failed, result, mapped, reported)));
14860
14874
  const entity = (0, combi_1.seq)("ENTITY", expressions_1.NamespaceSimpleName, execute, from, mapped, failed, reported);
14861
14875
  return (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("MODIFY", (0, combi_1.alt)(entities, entity)));
14862
14876
  }
@@ -14924,8 +14938,9 @@ class ModifyLine {
14924
14938
  const index = (0, combi_1.seq)("INDEX", expressions_1.Source);
14925
14939
  const page = (0, combi_1.seq)("OF PAGE", expressions_1.Source);
14926
14940
  const ocp = (0, combi_1.str)("OF CURRENT PAGE");
14927
- const lineFormat = (0, combi_1.seq)("LINE FORMAT", (0, combi_1.per)("INPUT OFF", "INVERSE", "RESET", "INTENSIFIED", expressions_1.Color));
14928
14941
  const intensified = (0, combi_1.seq)("INTENSIFIED", onOff);
14942
+ const intensifiedOpt = (0, combi_1.seq)("INTENSIFIED", (0, combi_1.opt)(onOff));
14943
+ const lineFormat = (0, combi_1.seq)("LINE FORMAT", (0, combi_1.per)("INPUT OFF", "INVERSE", "RESET", intensifiedOpt, expressions_1.Color));
14929
14944
  const options = (0, combi_1.per)(index, value, format, page, lineFormat, lineValue, ocp, intensified, expressions_1.Color);
14930
14945
  const ret = (0, combi_1.seq)("MODIFY", (0, combi_1.altPrio)("CURRENT LINE", (0, combi_1.seq)("LINE", expressions_1.Source)), (0, combi_1.opt)(options));
14931
14946
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
@@ -15706,7 +15721,8 @@ class ReadEntities {
15706
15721
  const from = (0, combi_1.seq)("FROM", expressions_1.Source);
15707
15722
  const fields = (0, combi_1.seq)("FIELDS", (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.plus)(expressions_1.SimpleName), (0, combi_1.tok)(tokens_1.WParenRightW), "WITH", expressions_1.Source);
15708
15723
  const all = (0, combi_1.seq)("ALL FIELDS WITH", expressions_1.Source);
15709
- const s = (0, combi_1.seq)("READ ENTITIES OF", expressions_1.NamespaceSimpleName, (0, combi_1.opt)("IN LOCAL MODE"), "ENTITY", expressions_1.SimpleName, (0, combi_1.opt)((0, combi_1.seq)("BY", expressions_1.AssociationName)), (0, combi_1.alt)(fields, from, all), (0, combi_1.optPrio)((0, combi_1.seq)("RESULT", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("LINK", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("FAILED", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("REPORTED", expressions_1.Target)));
15724
+ const entity = (0, combi_1.seq)("ENTITY", expressions_1.SimpleName, (0, combi_1.opt)((0, combi_1.seq)("BY", expressions_1.AssociationName)), (0, combi_1.alt)(fields, from, all), (0, combi_1.optPrio)((0, combi_1.seq)("RESULT", expressions_1.Target)));
15725
+ const s = (0, combi_1.seq)("READ ENTITIES OF", expressions_1.NamespaceSimpleName, (0, combi_1.opt)("IN LOCAL MODE"), (0, combi_1.plus)(entity), (0, combi_1.optPrio)((0, combi_1.seq)("LINK", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("FAILED", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("REPORTED", expressions_1.Target)));
15710
15726
  return (0, combi_1.ver)(version_1.Version.v754, s);
15711
15727
  }
15712
15728
  }
@@ -17352,7 +17368,7 @@ class SystemCall {
17352
17368
  getMatcher() {
17353
17369
  const anyy = (0, combi_1.regex)(/^.+$/);
17354
17370
  const objmgr = (0, combi_1.seq)("OBJMGR CLONE", source_1.Source, "TO", target_1.Target);
17355
- const did = (0, combi_1.seq)(anyy, "DID", source_1.Source, "PARAMETERS", source_1.Source, source_1.Source, source_1.Source);
17371
+ const did = (0, combi_1.seq)(anyy, "DID", source_1.Source, "PARAMETERS", (0, combi_1.plus)(source_1.Source));
17356
17372
  const ret = (0, combi_1.seq)("SYSTEM-CALL", (0, combi_1.altPrio)(objmgr, did, (0, combi_1.plus)(anyy)));
17357
17373
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
17358
17374
  }
@@ -25835,6 +25851,7 @@ const component_compare_1 = __webpack_require__(/*! ./component_compare */ "./no
25835
25851
  const inline_data_1 = __webpack_require__(/*! ./inline_data */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/inline_data.js");
25836
25852
  const fstarget_1 = __webpack_require__(/*! ./fstarget */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/fstarget.js");
25837
25853
  const target_1 = __webpack_require__(/*! ./target */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js");
25854
+ const source_1 = __webpack_require__(/*! ./source */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js");
25838
25855
  class LoopGroupBy {
25839
25856
  runSyntax(node, input) {
25840
25857
  for (const t of node.findAllExpressions(Expressions.Target)) {
@@ -25849,6 +25866,9 @@ class LoopGroupBy {
25849
25866
  for (const t of node.findAllExpressions(Expressions.FSTarget)) {
25850
25867
  new fstarget_1.FSTarget().runSyntax(t, input, new basic_1.VoidType("todoGroupBy"));
25851
25868
  }
25869
+ for (const t of node.findDirectExpressions(Expressions.Source)) {
25870
+ new source_1.Source().runSyntax(t, input, new basic_1.VoidType("todoGroupBy"));
25871
+ }
25852
25872
  for (const c of node.findDirectExpressions(Expressions.LoopGroupByComponent)) {
25853
25873
  for (const t of c.findDirectExpressions(Expressions.ComponentCompareSingle)) {
25854
25874
  new component_compare_1.ComponentCompare().runSyntax(t, input);
@@ -30521,6 +30541,30 @@ exports.DeleteInternal = DeleteInternal;
30521
30541
 
30522
30542
  /***/ }),
30523
30543
 
30544
+ /***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/delete_memory.js":
30545
+ /*!*****************************************************************************************!*\
30546
+ !*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/delete_memory.js ***!
30547
+ \*****************************************************************************************/
30548
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
30549
+
30550
+ "use strict";
30551
+
30552
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
30553
+ exports.DeleteMemory = void 0;
30554
+ const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
30555
+ const source_1 = __webpack_require__(/*! ../expressions/source */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js");
30556
+ class DeleteMemory {
30557
+ runSyntax(node, input) {
30558
+ for (const s of node.findDirectExpressions(Expressions.Source)) {
30559
+ new source_1.Source().runSyntax(s, input);
30560
+ }
30561
+ }
30562
+ }
30563
+ exports.DeleteMemory = DeleteMemory;
30564
+ //# sourceMappingURL=delete_memory.js.map
30565
+
30566
+ /***/ }),
30567
+
30524
30568
  /***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/delete_report.js":
30525
30569
  /*!*****************************************************************************************!*\
30526
30570
  !*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/delete_report.js ***!
@@ -34637,6 +34681,7 @@ const statics_1 = __webpack_require__(/*! ./structures/statics */ "./node_module
34637
34681
  const constants_1 = __webpack_require__(/*! ./structures/constants */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/constants.js");
34638
34682
  const class_definition_1 = __webpack_require__(/*! ../types/class_definition */ "./node_modules/@abaplint/core/build/src/abap/types/class_definition.js");
34639
34683
  const interface_definition_1 = __webpack_require__(/*! ../types/interface_definition */ "./node_modules/@abaplint/core/build/src/abap/types/interface_definition.js");
34684
+ const delete_memory_1 = __webpack_require__(/*! ./statements/delete_memory */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/delete_memory.js");
34640
34685
  const perform_1 = __webpack_require__(/*! ./statements/perform */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/perform.js");
34641
34686
  const type_1 = __webpack_require__(/*! ./statements/type */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/type.js");
34642
34687
  const constant_1 = __webpack_require__(/*! ./statements/constant */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/constant.js");
@@ -34891,6 +34936,7 @@ if (Object.keys(map).length === 0) {
34891
34936
  addToMap(new modify_internal_1.ModifyInternal());
34892
34937
  addToMap(new read_textpool_1.ReadTextpool());
34893
34938
  addToMap(new editor_call_1.EditorCall());
34939
+ addToMap(new delete_memory_1.DeleteMemory());
34894
34940
  }
34895
34941
  // -----------------------------------
34896
34942
  class SyntaxLogic {
@@ -35403,13 +35449,13 @@ class FlowGraph {
35403
35449
  this.label = label;
35404
35450
  }
35405
35451
  toDigraph() {
35406
- return `digraph G {
35407
- labelloc="t";
35408
- label="${this.label}";
35409
- graph [fontname = "helvetica"];
35410
- node [fontname = "helvetica", shape="box"];
35411
- edge [fontname = "helvetica"];
35412
- ${this.toTextEdges()}
35452
+ return `digraph G {
35453
+ labelloc="t";
35454
+ label="${this.label}";
35455
+ graph [fontname = "helvetica"];
35456
+ node [fontname = "helvetica", shape="box"];
35457
+ edge [fontname = "helvetica"];
35458
+ ${this.toTextEdges()}
35413
35459
  }`;
35414
35460
  }
35415
35461
  listSources(node) {
@@ -35743,6 +35789,7 @@ class StatementFlow {
35743
35789
  || type instanceof Structures.With
35744
35790
  || type instanceof Structures.Provide
35745
35791
  || type instanceof Structures.Select
35792
+ || type instanceof Structures.EnhancementSection
35746
35793
  || type instanceof Structures.LoopAtScreen
35747
35794
  || type instanceof Structures.Do) {
35748
35795
  const loopName = StatementFlow.buildName(n.getFirstStatement());
@@ -41721,6 +41768,7 @@ class DDIC {
41721
41768
  case "DEC": // 1 <= len <= 31
41722
41769
  case "D16F": // 1 <= len <= 31
41723
41770
  case "D16D":
41771
+ case "D34D":
41724
41772
  case "D34F": // 1 <= len <= 31
41725
41773
  case "DF16_DEC": // 1 <= len <= 31
41726
41774
  case "DF34_DEC": // 1 <= len <= 31
@@ -41743,6 +41791,7 @@ class DDIC {
41743
41791
  return new Types.CharacterType(5, extra);
41744
41792
  case "UNIT": // 2 <= len <= 3
41745
41793
  return new Types.CharacterType(3, extra);
41794
+ case "UTCL":
41746
41795
  case "UTCLONG":
41747
41796
  return new Types.CharacterType(27, extra);
41748
41797
  case "NUMC": // 1 <= len <= 255
@@ -41802,7 +41851,7 @@ class DDIC {
41802
41851
  case "VARC":
41803
41852
  return new Types.UnknownType(input.text + " is an obsolete data type", input.infoText);
41804
41853
  default:
41805
- return new Types.UnknownType(input.text + " unknown", input.infoText);
41854
+ return new Types.UnknownType(input.text + " unknown basic ddic type", input.infoText);
41806
41855
  }
41807
41856
  }
41808
41857
  }
@@ -43829,13 +43878,13 @@ class Help {
43829
43878
  /////////////////////////////////////////////////
43830
43879
  static dumpABAP(file, reg, textDocument, position) {
43831
43880
  let content = "";
43832
- content = `
43833
- <a href="#_tokens" rel="no-refresh">Tokens</a> |
43834
- <a href="#_statements" rel="no-refresh">Statements</a> |
43835
- <a href="#_structure" rel="no-refresh">Structure</a> |
43836
- <a href="#_files" rel="no-refresh">Files</a> |
43837
- <a href="#_info" rel="no-refresh">Info Dump</a>
43838
- <hr>
43881
+ content = `
43882
+ <a href="#_tokens" rel="no-refresh">Tokens</a> |
43883
+ <a href="#_statements" rel="no-refresh">Statements</a> |
43884
+ <a href="#_structure" rel="no-refresh">Structure</a> |
43885
+ <a href="#_files" rel="no-refresh">Files</a> |
43886
+ <a href="#_info" rel="no-refresh">Info Dump</a>
43887
+ <hr>
43839
43888
  ` +
43840
43889
  "<tt>" + textDocument.uri + " (" +
43841
43890
  (position.line + 1) + ", " +
@@ -43990,9 +44039,9 @@ class Help {
43990
44039
  return ret + "</ul>";
43991
44040
  }
43992
44041
  static tokens(file) {
43993
- let inner = `<table><tr><td><b>String</b></td><td><b>Type</b></td>
43994
- <td><b>Row</b></td><td><b>Column</b></td>
43995
- <td><b>vRow</b></td><td><b>vColumn</b></td>
44042
+ let inner = `<table><tr><td><b>String</b></td><td><b>Type</b></td>
44043
+ <td><b>Row</b></td><td><b>Column</b></td>
44044
+ <td><b>vRow</b></td><td><b>vColumn</b></td>
43996
44045
  </tr>`;
43997
44046
  for (const token of file.getTokens()) {
43998
44047
  const tStart = token.getStart();
@@ -46369,6 +46418,37 @@ exports.CDSMetadataExtension = CDSMetadataExtension;
46369
46418
 
46370
46419
  /***/ }),
46371
46420
 
46421
+ /***/ "./node_modules/@abaplint/core/build/src/objects/cds_type.js":
46422
+ /*!*******************************************************************!*\
46423
+ !*** ./node_modules/@abaplint/core/build/src/objects/cds_type.js ***!
46424
+ \*******************************************************************/
46425
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
46426
+
46427
+ "use strict";
46428
+
46429
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
46430
+ exports.CDSType = void 0;
46431
+ const _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ "./node_modules/@abaplint/core/build/src/objects/_abstract_object.js");
46432
+ class CDSType extends _abstract_object_1.AbstractObject {
46433
+ getType() {
46434
+ return "DRTY";
46435
+ }
46436
+ getAllowedNaming() {
46437
+ return {
46438
+ maxLength: 30,
46439
+ allowNamespace: true,
46440
+ };
46441
+ }
46442
+ getDescription() {
46443
+ // todo
46444
+ return undefined;
46445
+ }
46446
+ }
46447
+ exports.CDSType = CDSType;
46448
+ //# sourceMappingURL=cds_type.js.map
46449
+
46450
+ /***/ }),
46451
+
46372
46452
  /***/ "./node_modules/@abaplint/core/build/src/objects/change_document.js":
46373
46453
  /*!**************************************************************************!*\
46374
46454
  !*** ./node_modules/@abaplint/core/build/src/objects/change_document.js ***!
@@ -48720,6 +48800,7 @@ __exportStar(__webpack_require__(/*! ./business_function_set_assignment */ "./no
48720
48800
  __exportStar(__webpack_require__(/*! ./business_object_model */ "./node_modules/@abaplint/core/build/src/objects/business_object_model.js"), exports);
48721
48801
  __exportStar(__webpack_require__(/*! ./business_object_type */ "./node_modules/@abaplint/core/build/src/objects/business_object_type.js"), exports);
48722
48802
  __exportStar(__webpack_require__(/*! ./cds_metadata_extension */ "./node_modules/@abaplint/core/build/src/objects/cds_metadata_extension.js"), exports);
48803
+ __exportStar(__webpack_require__(/*! ./cds_type */ "./node_modules/@abaplint/core/build/src/objects/cds_type.js"), exports);
48723
48804
  __exportStar(__webpack_require__(/*! ./change_document */ "./node_modules/@abaplint/core/build/src/objects/change_document.js"), exports);
48724
48805
  __exportStar(__webpack_require__(/*! ./chapter_of_book_structure */ "./node_modules/@abaplint/core/build/src/objects/chapter_of_book_structure.js"), exports);
48725
48806
  __exportStar(__webpack_require__(/*! ./checkpoint_group */ "./node_modules/@abaplint/core/build/src/objects/checkpoint_group.js"), exports);
@@ -53250,7 +53331,7 @@ class Registry {
53250
53331
  }
53251
53332
  static abaplintVersion() {
53252
53333
  // magic, see build script "version.sh"
53253
- return "2.113.70";
53334
+ return "2.113.72";
53254
53335
  }
53255
53336
  getDDICReferences() {
53256
53337
  return this.ddicReferences;
@@ -53569,10 +53650,10 @@ class SevenBitAscii {
53569
53650
  key: "7bit_ascii",
53570
53651
  title: "Check for 7bit ascii",
53571
53652
  shortDescription: `Only allow characters from the 7bit ASCII set.`,
53572
- extendedInformation: `https://docs.abapopenchecks.org/checks/05/
53573
-
53574
- https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
53575
-
53653
+ extendedInformation: `https://docs.abapopenchecks.org/checks/05/
53654
+
53655
+ https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
53656
+
53576
53657
  Checkes files with extensions ".abap" and ".asddls"`,
53577
53658
  tags: [_irule_1.RuleTag.SingleFile],
53578
53659
  badExample: `WRITE '뽑'.`,
@@ -53778,10 +53859,10 @@ class Abapdoc extends _abap_rule_1.ABAPRule {
53778
53859
  key: "abapdoc",
53779
53860
  title: "Check abapdoc",
53780
53861
  shortDescription: `Various checks regarding abapdoc.`,
53781
- extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
53782
-
53783
- Plus class and interface definitions.
53784
-
53862
+ extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
53863
+
53864
+ Plus class and interface definitions.
53865
+
53785
53866
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#abap-doc-only-for-public-apis`,
53786
53867
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
53787
53868
  };
@@ -53918,27 +53999,27 @@ class AddTestAttributes extends _abap_rule_1.ABAPRule {
53918
53999
  title: "Add test attributes for tests classes with test methods",
53919
54000
  shortDescription: `Add test attributes DURATION and RISK LEVEL for tests classes with test methods`,
53920
54001
  tags: [_irule_1.RuleTag.SingleFile],
53921
- badExample: `CLASS ltcl_test1 DEFINITION FINAL FOR TESTING.
53922
- PUBLIC SECTION.
53923
- PROTECTED SECTION.
53924
- PRIVATE SECTION.
53925
- METHODS test FOR TESTING RAISING cx_static_check.
53926
- ENDCLASS.
53927
-
53928
- CLASS ltcl_test1 IMPLEMENTATION.
53929
- METHOD test.
53930
- ENDMETHOD.
54002
+ badExample: `CLASS ltcl_test1 DEFINITION FINAL FOR TESTING.
54003
+ PUBLIC SECTION.
54004
+ PROTECTED SECTION.
54005
+ PRIVATE SECTION.
54006
+ METHODS test FOR TESTING RAISING cx_static_check.
54007
+ ENDCLASS.
54008
+
54009
+ CLASS ltcl_test1 IMPLEMENTATION.
54010
+ METHOD test.
54011
+ ENDMETHOD.
53931
54012
  ENDCLASS.`,
53932
- goodExample: `CLASS ltcl_test2 DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
53933
- PUBLIC SECTION.
53934
- PROTECTED SECTION.
53935
- PRIVATE SECTION.
53936
- METHODS test FOR TESTING RAISING cx_static_check.
53937
- ENDCLASS.
53938
-
53939
- CLASS ltcl_test2 IMPLEMENTATION.
53940
- METHOD test.
53941
- ENDMETHOD.
54013
+ goodExample: `CLASS ltcl_test2 DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
54014
+ PUBLIC SECTION.
54015
+ PROTECTED SECTION.
54016
+ PRIVATE SECTION.
54017
+ METHODS test FOR TESTING RAISING cx_static_check.
54018
+ ENDCLASS.
54019
+
54020
+ CLASS ltcl_test2 IMPLEMENTATION.
54021
+ METHOD test.
54022
+ ENDMETHOD.
53942
54023
  ENDCLASS.`,
53943
54024
  };
53944
54025
  }
@@ -54024,49 +54105,49 @@ class AlignParameters extends _abap_rule_1.ABAPRule {
54024
54105
  key: "align_parameters",
54025
54106
  title: "Align Parameters",
54026
54107
  shortDescription: `Checks for vertially aligned parameters`,
54027
- extendedInformation: `Checks:
54028
- * function module calls
54029
- * method calls
54030
- * VALUE constructors
54031
- * NEW constructors
54032
- * RAISE EXCEPTION statements
54033
- * CREATE OBJECT statements
54034
- * RAISE EVENT statements
54035
-
54036
- https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
54037
-
54038
- Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
54039
-
54040
- If parameters are on the same row, no issues are reported, see
54108
+ extendedInformation: `Checks:
54109
+ * function module calls
54110
+ * method calls
54111
+ * VALUE constructors
54112
+ * NEW constructors
54113
+ * RAISE EXCEPTION statements
54114
+ * CREATE OBJECT statements
54115
+ * RAISE EVENT statements
54116
+
54117
+ https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
54118
+
54119
+ Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
54120
+
54121
+ If parameters are on the same row, no issues are reported, see
54041
54122
  https://rules.abaplint.org/max_one_method_parameter_per_line/ for splitting parameters to lines`,
54042
54123
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
54043
- badExample: `CALL FUNCTION 'FOOBAR'
54044
- EXPORTING
54045
- foo = 2
54046
- parameter = 3.
54047
-
54048
- foobar( moo = 1
54049
- param = 1 ).
54050
-
54051
- foo = VALUE #(
54052
- foo = bar
54124
+ badExample: `CALL FUNCTION 'FOOBAR'
54125
+ EXPORTING
54126
+ foo = 2
54127
+ parameter = 3.
54128
+
54129
+ foobar( moo = 1
54130
+ param = 1 ).
54131
+
54132
+ foo = VALUE #(
54133
+ foo = bar
54053
54134
  moo = 2 ).`,
54054
- goodExample: `CALL FUNCTION 'FOOBAR'
54055
- EXPORTING
54056
- foo = 2
54057
- parameter = 3.
54058
-
54059
- foobar( moo = 1
54060
- param = 1 ).
54061
-
54062
- foo = VALUE #(
54063
- foo = bar
54064
- moo = 2 ).
54065
-
54066
- DATA(sdf) = VALUE type(
54067
- common_val = 2
54068
- another_common = 5
54069
- ( row_value = 4
54135
+ goodExample: `CALL FUNCTION 'FOOBAR'
54136
+ EXPORTING
54137
+ foo = 2
54138
+ parameter = 3.
54139
+
54140
+ foobar( moo = 1
54141
+ param = 1 ).
54142
+
54143
+ foo = VALUE #(
54144
+ foo = bar
54145
+ moo = 2 ).
54146
+
54147
+ DATA(sdf) = VALUE type(
54148
+ common_val = 2
54149
+ another_common = 5
54150
+ ( row_value = 4
54070
54151
  value_foo = 5 ) ).`,
54071
54152
  };
54072
54153
  }
@@ -54500,37 +54581,37 @@ class AlignTypeExpressions extends _abap_rule_1.ABAPRule {
54500
54581
  key: "align_type_expressions",
54501
54582
  title: "Align TYPE expressions",
54502
54583
  shortDescription: `Align TYPE expressions in statements`,
54503
- extendedInformation: `
54504
- Currently works for METHODS + BEGIN OF
54505
-
54506
- If BEGIN OF has an INCLUDE TYPE its ignored
54507
-
54508
- Also note that clean ABAP does not recommend aligning TYPE clauses:
54584
+ extendedInformation: `
54585
+ Currently works for METHODS + BEGIN OF
54586
+
54587
+ If BEGIN OF has an INCLUDE TYPE its ignored
54588
+
54589
+ Also note that clean ABAP does not recommend aligning TYPE clauses:
54509
54590
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-align-type-clauses`,
54510
54591
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix],
54511
- badExample: `
54512
- TYPES: BEGIN OF foo,
54513
- bar TYPE i,
54514
- foobar TYPE i,
54515
- END OF foo.
54516
-
54517
- INTERFACE lif.
54518
- METHODS bar
54519
- IMPORTING
54520
- foo TYPE i
54521
- foobar TYPE i.
54592
+ badExample: `
54593
+ TYPES: BEGIN OF foo,
54594
+ bar TYPE i,
54595
+ foobar TYPE i,
54596
+ END OF foo.
54597
+
54598
+ INTERFACE lif.
54599
+ METHODS bar
54600
+ IMPORTING
54601
+ foo TYPE i
54602
+ foobar TYPE i.
54522
54603
  ENDINTERFACE.`,
54523
- goodExample: `
54524
- TYPES: BEGIN OF foo,
54525
- bar TYPE i,
54526
- foobar TYPE i,
54527
- END OF foo.
54528
-
54529
- INTERFACE lif.
54530
- METHODS bar
54531
- IMPORTING
54532
- foo TYPE i
54533
- foobar TYPE i.
54604
+ goodExample: `
54605
+ TYPES: BEGIN OF foo,
54606
+ bar TYPE i,
54607
+ foobar TYPE i,
54608
+ END OF foo.
54609
+
54610
+ INTERFACE lif.
54611
+ METHODS bar
54612
+ IMPORTING
54613
+ foo TYPE i
54614
+ foobar TYPE i.
54534
54615
  ENDINTERFACE.`,
54535
54616
  };
54536
54617
  }
@@ -54809,16 +54890,16 @@ class AmbiguousStatement extends _abap_rule_1.ABAPRule {
54809
54890
  return {
54810
54891
  key: "ambiguous_statement",
54811
54892
  title: "Check for ambigious statements",
54812
- shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
54813
- Add "TABLE" keyword or "@" for escaping SQL variables
54814
-
54893
+ shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
54894
+ Add "TABLE" keyword or "@" for escaping SQL variables
54895
+
54815
54896
  Only works if the target version is 740sp05 or above`,
54816
54897
  tags: [_irule_1.RuleTag.SingleFile],
54817
- badExample: `DELETE foo FROM bar.
54898
+ badExample: `DELETE foo FROM bar.
54818
54899
  MODIFY foo FROM bar.`,
54819
- goodExample: `DELETE foo FROM @bar.
54820
- DELETE TABLE itab FROM 2.
54821
- MODIFY zfoo FROM @wa.
54900
+ goodExample: `DELETE foo FROM @bar.
54901
+ DELETE TABLE itab FROM 2.
54902
+ MODIFY zfoo FROM @wa.
54822
54903
  MODIFY TABLE foo FROM bar.`,
54823
54904
  };
54824
54905
  }
@@ -54923,16 +55004,16 @@ class AvoidUse extends _abap_rule_1.ABAPRule {
54923
55004
  key: "avoid_use",
54924
55005
  title: "Avoid use of certain statements",
54925
55006
  shortDescription: `Detects usage of certain statements.`,
54926
- extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
54927
-
54928
- Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
54929
-
54930
- STATICS: use CLASS-DATA instead
54931
-
54932
- DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
54933
-
54934
- TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
54935
-
55007
+ extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
55008
+
55009
+ Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
55010
+
55011
+ STATICS: use CLASS-DATA instead
55012
+
55013
+ DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
55014
+
55015
+ TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
55016
+
54936
55017
  BREAK points`,
54937
55018
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
54938
55019
  };
@@ -55064,11 +55145,11 @@ class BeginEndNames extends _abap_rule_1.ABAPRule {
55064
55145
  title: "Check BEGIN END names",
55065
55146
  shortDescription: `Check BEGIN OF and END OF names match, plus there must be statements between BEGIN and END`,
55066
55147
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
55067
- badExample: `DATA: BEGIN OF stru,
55068
- field TYPE i,
55148
+ badExample: `DATA: BEGIN OF stru,
55149
+ field TYPE i,
55069
55150
  END OF structure_not_the_same.`,
55070
- goodExample: `DATA: BEGIN OF stru,
55071
- field TYPE i,
55151
+ goodExample: `DATA: BEGIN OF stru,
55152
+ field TYPE i,
55072
55153
  END OF stru.`,
55073
55154
  };
55074
55155
  }
@@ -55165,20 +55246,20 @@ class BeginSingleInclude extends _abap_rule_1.ABAPRule {
55165
55246
  title: "BEGIN contains single INCLUDE",
55166
55247
  shortDescription: `Finds TYPE BEGIN with just one INCLUDE TYPE, and DATA with single INCLUDE STRUCTURE`,
55167
55248
  tags: [_irule_1.RuleTag.SingleFile],
55168
- badExample: `TYPES: BEGIN OF dummy1.
55169
- INCLUDE TYPE dselc.
55170
- TYPES: END OF dummy1.
55171
-
55172
- DATA BEGIN OF foo.
55173
- INCLUDE STRUCTURE syst.
55174
- DATA END OF foo.
55175
-
55176
- STATICS BEGIN OF bar.
55177
- INCLUDE STRUCTURE syst.
55249
+ badExample: `TYPES: BEGIN OF dummy1.
55250
+ INCLUDE TYPE dselc.
55251
+ TYPES: END OF dummy1.
55252
+
55253
+ DATA BEGIN OF foo.
55254
+ INCLUDE STRUCTURE syst.
55255
+ DATA END OF foo.
55256
+
55257
+ STATICS BEGIN OF bar.
55258
+ INCLUDE STRUCTURE syst.
55178
55259
  STATICS END OF bar.`,
55179
- goodExample: `DATA BEGIN OF foo.
55180
- DATA field TYPE i.
55181
- INCLUDE STRUCTURE dselc.
55260
+ goodExample: `DATA BEGIN OF foo.
55261
+ DATA field TYPE i.
55262
+ INCLUDE STRUCTURE dselc.
55182
55263
  DATA END OF foo.`,
55183
55264
  };
55184
55265
  }
@@ -55268,9 +55349,9 @@ class CallTransactionAuthorityCheck extends _abap_rule_1.ABAPRule {
55268
55349
  extendedInformation: `https://docs.abapopenchecks.org/checks/54/`,
55269
55350
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
55270
55351
  badExample: `CALL TRANSACTION 'FOO'.`,
55271
- goodExample: `TRY.
55272
- CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
55273
- CATCH cx_sy_authorization_error.
55352
+ goodExample: `TRY.
55353
+ CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
55354
+ CATCH cx_sy_authorization_error.
55274
55355
  ENDTRY.`,
55275
55356
  };
55276
55357
  }
@@ -55335,10 +55416,10 @@ class CDSCommentStyle {
55335
55416
  key: "cds_comment_style",
55336
55417
  title: "CDS Comment Style",
55337
55418
  shortDescription: `Check for obsolete comment style`,
55338
- extendedInformation: `Check for obsolete comment style
55339
-
55340
- Comments starting with "--" are considered obsolete
55341
-
55419
+ extendedInformation: `Check for obsolete comment style
55420
+
55421
+ Comments starting with "--" are considered obsolete
55422
+
55342
55423
  https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abencds_general_syntax_rules.htm`,
55343
55424
  tags: [_irule_1.RuleTag.SingleFile],
55344
55425
  badExample: "-- this is a comment",
@@ -55404,10 +55485,10 @@ class CDSLegacyView {
55404
55485
  key: "cds_legacy_view",
55405
55486
  title: "CDS Legacy View",
55406
55487
  shortDescription: `Identify CDS Legacy Views`,
55407
- extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
55408
-
55409
- https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
55410
-
55488
+ extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
55489
+
55490
+ https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
55491
+
55411
55492
  v755 and up`,
55412
55493
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Upport],
55413
55494
  };
@@ -55562,10 +55643,10 @@ class ChainMainlyDeclarations extends _abap_rule_1.ABAPRule {
55562
55643
  key: "chain_mainly_declarations",
55563
55644
  title: "Chain mainly declarations",
55564
55645
  shortDescription: `Chain mainly declarations, allows chaining for the configured statements, reports errors for other statements.`,
55565
- extendedInformation: `
55566
- https://docs.abapopenchecks.org/checks/23/
55567
-
55568
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
55646
+ extendedInformation: `
55647
+ https://docs.abapopenchecks.org/checks/23/
55648
+
55649
+ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
55569
55650
  `,
55570
55651
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
55571
55652
  badExample: `CALL METHOD: bar.`,
@@ -55741,17 +55822,17 @@ class ChangeIfToCase extends _abap_rule_1.ABAPRule {
55741
55822
  title: "Change IF to CASE",
55742
55823
  shortDescription: `Finds IF constructs that can be changed to CASE`,
55743
55824
  // eslint-disable-next-line max-len
55744
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
55745
-
55825
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
55826
+
55746
55827
  If the first comparison is a boolean compare, no issue is reported.`,
55747
55828
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
55748
- badExample: `IF l_fcat-fieldname EQ 'FOO'.
55749
- ELSEIF l_fcat-fieldname = 'BAR'
55750
- OR l_fcat-fieldname = 'MOO'.
55829
+ badExample: `IF l_fcat-fieldname EQ 'FOO'.
55830
+ ELSEIF l_fcat-fieldname = 'BAR'
55831
+ OR l_fcat-fieldname = 'MOO'.
55751
55832
  ENDIF.`,
55752
- goodExample: `CASE l_fcat-fieldname.
55753
- WHEN 'FOO'.
55754
- WHEN 'BAR' OR 'MOO'.
55833
+ goodExample: `CASE l_fcat-fieldname.
55834
+ WHEN 'FOO'.
55835
+ WHEN 'BAR' OR 'MOO'.
55755
55836
  ENDCASE.`,
55756
55837
  };
55757
55838
  }
@@ -55888,8 +55969,8 @@ class CheckAbstract extends _abap_rule_1.ABAPRule {
55888
55969
  return {
55889
55970
  key: "check_abstract",
55890
55971
  title: "Check abstract methods and classes",
55891
- shortDescription: `Checks abstract methods and classes:
55892
- - class defined as abstract and final,
55972
+ shortDescription: `Checks abstract methods and classes:
55973
+ - class defined as abstract and final,
55893
55974
  - non-abstract class contains abstract methods`,
55894
55975
  extendedInformation: `If a class defines only constants, use an interface instead`,
55895
55976
  tags: [_irule_1.RuleTag.SingleFile],
@@ -55970,11 +56051,11 @@ class CheckComments extends _abap_rule_1.ABAPRule {
55970
56051
  return {
55971
56052
  key: "check_comments",
55972
56053
  title: "Check Comments",
55973
- shortDescription: `
56054
+ shortDescription: `
55974
56055
  Various checks for comment usage.`,
55975
- extendedInformation: `
55976
- Detects end of line comments. Comments starting with "#EC" or "##" are ignored
55977
-
56056
+ extendedInformation: `
56057
+ Detects end of line comments. Comments starting with "#EC" or "##" are ignored
56058
+
55978
56059
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#put-comments-before-the-statement-they-relate-to`,
55979
56060
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
55980
56061
  badExample: `WRITE 2. " descriptive comment`,
@@ -56136,9 +56217,9 @@ class CheckInclude {
56136
56217
  key: "check_include",
56137
56218
  title: "Check INCLUDEs",
56138
56219
  shortDescription: `Checks INCLUDE statements`,
56139
- extendedInformation: `
56140
- * Reports unused includes
56141
- * Errors if the includes are not found
56220
+ extendedInformation: `
56221
+ * Reports unused includes
56222
+ * Errors if the includes are not found
56142
56223
  * Error if including a main program`,
56143
56224
  tags: [_irule_1.RuleTag.Syntax],
56144
56225
  };
@@ -56214,14 +56295,14 @@ class CheckSubrc extends _abap_rule_1.ABAPRule {
56214
56295
  key: "check_subrc",
56215
56296
  title: "Check sy-subrc",
56216
56297
  shortDescription: `Check sy-subrc`,
56217
- extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
56218
-
56219
- If sy-dbcnt is checked after database statements, it is considered okay.
56220
-
56221
- "SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
56222
-
56223
- If IS ASSIGNED is checked after assigning, it is considered okay.
56224
-
56298
+ extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
56299
+
56300
+ If sy-dbcnt is checked after database statements, it is considered okay.
56301
+
56302
+ "SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
56303
+
56304
+ If IS ASSIGNED is checked after assigning, it is considered okay.
56305
+
56225
56306
  FIND statement with MATCH COUNT is considered okay if subrc is not checked`,
56226
56307
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
56227
56308
  pseudoComment: "EC CI_SUBRC",
@@ -56791,17 +56872,17 @@ class ClassicExceptionsOverlap extends _abap_rule_1.ABAPRule {
56791
56872
  shortDescription: `Find overlapping classic exceptions`,
56792
56873
  extendedInformation: `When debugging its typically good to know exactly which exception is caught`,
56793
56874
  tags: [_irule_1.RuleTag.SingleFile],
56794
- badExample: `CALL FUNCTION 'SOMETHING'
56795
- EXCEPTIONS
56796
- system_failure = 1 MESSAGE lv_message
56797
- communication_failure = 1 MESSAGE lv_message
56798
- resource_failure = 1
56875
+ badExample: `CALL FUNCTION 'SOMETHING'
56876
+ EXCEPTIONS
56877
+ system_failure = 1 MESSAGE lv_message
56878
+ communication_failure = 1 MESSAGE lv_message
56879
+ resource_failure = 1
56799
56880
  OTHERS = 1.`,
56800
- goodExample: `CALL FUNCTION 'SOMETHING'
56801
- EXCEPTIONS
56802
- system_failure = 1 MESSAGE lv_message
56803
- communication_failure = 2 MESSAGE lv_message
56804
- resource_failure = 3
56881
+ goodExample: `CALL FUNCTION 'SOMETHING'
56882
+ EXCEPTIONS
56883
+ system_failure = 1 MESSAGE lv_message
56884
+ communication_failure = 2 MESSAGE lv_message
56885
+ resource_failure = 3
56805
56886
  OTHERS = 4.`,
56806
56887
  };
56807
56888
  }
@@ -57059,7 +57140,7 @@ class CommentedCode extends _abap_rule_1.ABAPRule {
57059
57140
  key: "commented_code",
57060
57141
  title: "Find commented code",
57061
57142
  shortDescription: `Detects usage of commented out code.`,
57062
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it
57143
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it
57063
57144
  https://docs.abapopenchecks.org/checks/14/`,
57064
57145
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
57065
57146
  badExample: `* WRITE 'hello world'.`,
@@ -57292,10 +57373,10 @@ class ConstructorVisibilityPublic {
57292
57373
  key: "constructor_visibility_public",
57293
57374
  title: "Check constructor visibility is public",
57294
57375
  shortDescription: `Constructor must be placed in the public section, even if the class is not CREATE PUBLIC.`,
57295
- extendedInformation: `
57296
- This only applies to global classes.
57297
-
57298
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
57376
+ extendedInformation: `
57377
+ This only applies to global classes.
57378
+
57379
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
57299
57380
  https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abeninstance_constructor_guidl.htm`,
57300
57381
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
57301
57382
  };
@@ -57370,8 +57451,8 @@ class ContainsTab extends _abap_rule_1.ABAPRule {
57370
57451
  key: "contains_tab",
57371
57452
  title: "Code contains tab",
57372
57453
  shortDescription: `Checks for usage of tabs (enable to enforce spaces)`,
57373
- extendedInformation: `
57374
- https://docs.abapopenchecks.org/checks/09/
57454
+ extendedInformation: `
57455
+ https://docs.abapopenchecks.org/checks/09/
57375
57456
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
57376
57457
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
57377
57458
  badExample: `\tWRITE 'hello world'.`,
@@ -57458,10 +57539,10 @@ class CyclicOO {
57458
57539
  key: "cyclic_oo",
57459
57540
  title: "Cyclic OO",
57460
57541
  shortDescription: `Finds cyclic/circular OO references`,
57461
- extendedInformation: `Runs for global INTF + CLAS objects
57462
-
57463
- Objects must be without syntax errors for this rule to take effect
57464
-
57542
+ extendedInformation: `Runs for global INTF + CLAS objects
57543
+
57544
+ Objects must be without syntax errors for this rule to take effect
57545
+
57465
57546
  References in testclass includes are ignored`,
57466
57547
  };
57467
57548
  }
@@ -57704,7 +57785,7 @@ class DangerousStatement extends _abap_rule_1.ABAPRule {
57704
57785
  key: "dangerous_statement",
57705
57786
  title: "Dangerous statement",
57706
57787
  shortDescription: `Detects potentially dangerous statements`,
57707
- extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
57788
+ extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
57708
57789
  dynamic SQL can potentially create SQL injection problems`,
57709
57790
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
57710
57791
  };
@@ -57911,13 +57992,13 @@ class DefinitionsTop extends _abap_rule_1.ABAPRule {
57911
57992
  shortDescription: `Checks that definitions are placed at the beginning of METHODs, FORMs and FUNCTIONs.`,
57912
57993
  extendedInformation: `https://docs.abapopenchecks.org/checks/17/`,
57913
57994
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
57914
- badExample: `FROM foo.
57915
- WRITE 'hello'.
57916
- DATA int TYPE i.
57995
+ badExample: `FROM foo.
57996
+ WRITE 'hello'.
57997
+ DATA int TYPE i.
57917
57998
  ENDFORM.`,
57918
- goodExample: `FROM foo.
57919
- DATA int TYPE i.
57920
- WRITE 'hello'.
57999
+ goodExample: `FROM foo.
58000
+ DATA int TYPE i.
58001
+ WRITE 'hello'.
57921
58002
  ENDFORM.`,
57922
58003
  };
57923
58004
  }
@@ -58459,39 +58540,39 @@ class Downport {
58459
58540
  key: "downport",
58460
58541
  title: "Downport statement",
58461
58542
  shortDescription: `Downport functionality`,
58462
- extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with
58463
- a higher level language version. If successful, various rules are applied to downport the statement.
58464
- Target downport version is always v702, thus rule is only enabled if target version is v702.
58465
-
58466
- Current rules:
58467
- * NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/
58468
- * DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/
58469
- * FIELD-SYMBOL() definitions are outlined
58470
- * CONV is outlined
58471
- * COND is outlined
58472
- * REDUCE is outlined
58473
- * SWITCH is outlined
58474
- * FILTER is outlined
58475
- * APPEND expression is outlined
58476
- * INSERT expression is outlined
58477
- * EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/
58478
- * CAST changed to ?=
58479
- * LOOP AT method_call( ) is outlined
58480
- * VALUE # with structure fields
58481
- * VALUE # with internal table lines
58482
- * Table Expressions are outlined
58483
- * SELECT INTO @DATA definitions are outlined
58484
- * Some occurrences of string template formatting option ALPHA changed to function module call
58485
- * SELECT/INSERT/MODIFY/DELETE/UPDATE "," in field list removed, "@" in source/targets removed
58486
- * PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods
58487
- * RAISE EXCEPTION ... MESSAGE
58488
- * Moving with +=, -=, /=, *=, &&= is expanded
58489
- * line_exists and line_index is downported to READ TABLE
58490
- * ENUMs, but does not nessesarily give the correct type and value
58491
- * MESSAGE with non simple source
58492
-
58493
- Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.
58494
-
58543
+ extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with
58544
+ a higher level language version. If successful, various rules are applied to downport the statement.
58545
+ Target downport version is always v702, thus rule is only enabled if target version is v702.
58546
+
58547
+ Current rules:
58548
+ * NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/
58549
+ * DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/
58550
+ * FIELD-SYMBOL() definitions are outlined
58551
+ * CONV is outlined
58552
+ * COND is outlined
58553
+ * REDUCE is outlined
58554
+ * SWITCH is outlined
58555
+ * FILTER is outlined
58556
+ * APPEND expression is outlined
58557
+ * INSERT expression is outlined
58558
+ * EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/
58559
+ * CAST changed to ?=
58560
+ * LOOP AT method_call( ) is outlined
58561
+ * VALUE # with structure fields
58562
+ * VALUE # with internal table lines
58563
+ * Table Expressions are outlined
58564
+ * SELECT INTO @DATA definitions are outlined
58565
+ * Some occurrences of string template formatting option ALPHA changed to function module call
58566
+ * SELECT/INSERT/MODIFY/DELETE/UPDATE "," in field list removed, "@" in source/targets removed
58567
+ * PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods
58568
+ * RAISE EXCEPTION ... MESSAGE
58569
+ * Moving with +=, -=, /=, *=, &&= is expanded
58570
+ * line_exists and line_index is downported to READ TABLE
58571
+ * ENUMs, but does not nessesarily give the correct type and value
58572
+ * MESSAGE with non simple source
58573
+
58574
+ Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.
58575
+
58495
58576
  Make sure to test the downported code, it might not always be completely correct.`,
58496
58577
  tags: [_irule_1.RuleTag.Downport, _irule_1.RuleTag.Quickfix],
58497
58578
  };
@@ -59069,10 +59150,10 @@ Make sure to test the downported code, it might not always be completely correct
59069
59150
  const fieldName = f.concatTokens();
59070
59151
  fieldDefinition += indentation + " " + fieldName + " TYPE " + tableName + "-" + fieldName + ",\n";
59071
59152
  }
59072
- fieldDefinition = `DATA: BEGIN OF ${name},
59153
+ fieldDefinition = `DATA: BEGIN OF ${name},
59073
59154
  ${fieldDefinition}${indentation} END OF ${name}.`;
59074
59155
  }
59075
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
59156
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
59076
59157
  ${indentation}`);
59077
59158
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
59078
59159
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -59131,12 +59212,12 @@ ${indentation}`);
59131
59212
  }
59132
59213
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59133
59214
  const name = ((_g = inlineData.findFirstExpression(Expressions.TargetField)) === null || _g === void 0 ? void 0 : _g.concatTokens()) || "error";
59134
- let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
59135
- ${fieldDefinitions}${indentation} END OF ${uniqueName}.
59136
- ${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.
59215
+ let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
59216
+ ${fieldDefinitions}${indentation} END OF ${uniqueName}.
59217
+ ${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.
59137
59218
  ${indentation}`);
59138
59219
  if (fieldDefinitions === "") {
59139
- fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.
59220
+ fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.
59140
59221
  ${indentation}`);
59141
59222
  }
59142
59223
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
@@ -59204,7 +59285,7 @@ ${indentation}`);
59204
59285
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59205
59286
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
59206
59287
  const firstToken = high.getFirstToken();
59207
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
59288
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
59208
59289
  ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
59209
59290
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
59210
59291
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -59258,7 +59339,7 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
59258
59339
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59259
59340
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
59260
59341
  const firstToken = high.getFirstToken();
59261
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
59342
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
59262
59343
  ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
59263
59344
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
59264
59345
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -59300,14 +59381,14 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
59300
59381
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
59301
59382
  const firstToken = high.getFirstToken();
59302
59383
  // note that the tabix restore should be done before throwing the exception
59303
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.
59304
- ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
59305
- ${indentation}${tabixBackup} = sy-tabix.
59306
- ${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.
59307
- ${indentation}sy-tabix = ${tabixBackup}.
59308
- ${indentation}IF sy-subrc <> 0.
59309
- ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59310
- ${indentation}ENDIF.
59384
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.
59385
+ ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
59386
+ ${indentation}${tabixBackup} = sy-tabix.
59387
+ ${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.
59388
+ ${indentation}sy-tabix = ${tabixBackup}.
59389
+ ${indentation}IF sy-subrc <> 0.
59390
+ ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59391
+ ${indentation}ENDIF.
59311
59392
  ${indentation}`);
59312
59393
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, startToken.getStart(), tableExpression.getLastToken().getEnd(), uniqueName);
59313
59394
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -59364,7 +59445,7 @@ ${indentation}`);
59364
59445
  const className = classNames[0].concatTokens();
59365
59446
  const targetName = (_b = target.findFirstExpression(Expressions.TargetField)) === null || _b === void 0 ? void 0 : _b.concatTokens();
59366
59447
  const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
59367
- const code = ` DATA ${targetName} TYPE REF TO ${className}.
59448
+ const code = ` DATA ${targetName} TYPE REF TO ${className}.
59368
59449
  ${indentation}CATCH ${className} INTO ${targetName}.`;
59369
59450
  const fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getStart(), node.getEnd(), code);
59370
59451
  return issue_1.Issue.atToken(lowFile, node.getFirstToken(), "Outline DATA", this.getMetadata().key, this.conf.severity, fix);
@@ -59526,16 +59607,16 @@ ${indentation}CATCH ${className} INTO ${targetName}.`;
59526
59607
  const uniqueName1 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59527
59608
  const uniqueName2 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59528
59609
  const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
59529
- let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
59530
- ${indentation}${uniqueName1}-msgid = ${id}.
59610
+ let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
59611
+ ${indentation}${uniqueName1}-msgid = ${id}.
59531
59612
  ${indentation}${uniqueName1}-msgno = ${number}.\n`;
59532
59613
  if (withs.length > 0) {
59533
- abap += `${indentation}${uniqueName1}-attr1 = 'IF_T100_DYN_MSG~MSGV1'.
59534
- ${indentation}${uniqueName1}-attr2 = 'IF_T100_DYN_MSG~MSGV2'.
59535
- ${indentation}${uniqueName1}-attr3 = 'IF_T100_DYN_MSG~MSGV3'.
59614
+ abap += `${indentation}${uniqueName1}-attr1 = 'IF_T100_DYN_MSG~MSGV1'.
59615
+ ${indentation}${uniqueName1}-attr2 = 'IF_T100_DYN_MSG~MSGV2'.
59616
+ ${indentation}${uniqueName1}-attr3 = 'IF_T100_DYN_MSG~MSGV3'.
59536
59617
  ${indentation}${uniqueName1}-attr4 = 'IF_T100_DYN_MSG~MSGV4'.\n`;
59537
59618
  }
59538
- abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
59619
+ abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
59539
59620
  ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`;
59540
59621
  if (withs.length > 0) {
59541
59622
  abap += `${indentation}${uniqueName2}->if_t100_dyn_msg~msgty = 'E'.\n`;
@@ -59647,10 +59728,10 @@ ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`
59647
59728
  let code = "";
59648
59729
  if (sourceRef.findFirstExpression(Expressions.TableExpression)) {
59649
59730
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59650
- code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).
59651
- IF sy-subrc <> 0.
59652
- RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59653
- ENDIF.
59731
+ code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).
59732
+ IF sy-subrc <> 0.
59733
+ RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59734
+ ENDIF.
59654
59735
  GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
59655
59736
  }
59656
59737
  else {
@@ -59739,20 +59820,20 @@ GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
59739
59820
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59740
59821
  const uniqueFS = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59741
59822
  const uniqueNameIndex = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59742
- code += ` items LIKE ${loopSourceName},
59743
- END OF ${groupTargetName}type.
59744
- DATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.
59745
- DATA ${uniqueName} LIKE LINE OF ${groupTargetName}tab.
59823
+ code += ` items LIKE ${loopSourceName},
59824
+ END OF ${groupTargetName}type.
59825
+ DATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.
59826
+ DATA ${uniqueName} LIKE LINE OF ${groupTargetName}tab.
59746
59827
  LOOP AT ${loopSourceName} ${(_l = high.findFirstExpression(Expressions.LoopTarget)) === null || _l === void 0 ? void 0 : _l.concatTokens()}.\n`;
59747
59828
  if (groupIndexName !== undefined) {
59748
59829
  code += `DATA(${uniqueNameIndex}) = sy-tabix.\n`;
59749
59830
  }
59750
- code += `READ TABLE ${groupTargetName}tab ASSIGNING FIELD-SYMBOL(<${uniqueFS}>) WITH KEY ${condition}.
59831
+ code += `READ TABLE ${groupTargetName}tab ASSIGNING FIELD-SYMBOL(<${uniqueFS}>) WITH KEY ${condition}.
59751
59832
  IF sy-subrc = 0.\n`;
59752
59833
  if (groupCountName !== undefined) {
59753
59834
  code += ` <${uniqueFS}>-${groupCountName} = <${uniqueFS}>-${groupCountName} + 1.\n`;
59754
59835
  }
59755
- code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
59836
+ code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
59756
59837
  ELSE.\n`;
59757
59838
  code += ` CLEAR ${uniqueName}.\n`;
59758
59839
  for (const c of group.findAllExpressions(Expressions.LoopGroupByComponent)) {
@@ -59773,8 +59854,8 @@ ELSE.\n`;
59773
59854
  }
59774
59855
  code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE ${uniqueName}-items.\n`;
59775
59856
  code += ` INSERT ${uniqueName} INTO TABLE ${groupTargetName}tab.\n`;
59776
- code += `ENDIF.
59777
- ENDLOOP.
59857
+ code += `ENDIF.
59858
+ ENDLOOP.
59778
59859
  LOOP AT ${groupTargetName}tab ${groupTarget}.`;
59779
59860
  let fix = edit_helper_1.EditHelper.replaceRange(lowFile, high.getFirstToken().getStart(), high.getLastToken().getEnd(), code);
59780
59861
  for (const l of ((_m = highFile.getStructure()) === null || _m === void 0 ? void 0 : _m.findAllStructures(Structures.Loop)) || []) {
@@ -59946,7 +60027,7 @@ LOOP AT ${groupTargetName}tab ${groupTarget}.`;
59946
60027
  const enumName = (_b = high.findExpressionAfterToken("ENUM")) === null || _b === void 0 ? void 0 : _b.concatTokens();
59947
60028
  const structureName = (_c = high.findExpressionAfterToken("STRUCTURE")) === null || _c === void 0 ? void 0 : _c.concatTokens();
59948
60029
  // all ENUMS are char like?
59949
- let code = `TYPES ${enumName} TYPE string.
60030
+ let code = `TYPES ${enumName} TYPE string.
59950
60031
  CONSTANTS: BEGIN OF ${structureName},\n`;
59951
60032
  let count = 1;
59952
60033
  for (const e of enumStructure.findDirectStatements(Statements.TypeEnum).concat(enumStructure.findDirectStatements(Statements.Type))) {
@@ -59990,14 +60071,14 @@ CONSTANTS: BEGIN OF ${structureName},\n`;
59990
60071
  const tabixBackup = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59991
60072
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
59992
60073
  // restore tabix before exeption
59993
- const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.
59994
- ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
59995
- ${indentation}${tabixBackup} = sy-tabix.
59996
- ${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.
59997
- ${indentation}sy-tabix = ${tabixBackup}.
59998
- ${indentation}IF sy-subrc <> 0.
59999
- ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
60000
- ${indentation}ENDIF.
60074
+ const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.
60075
+ ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
60076
+ ${indentation}${tabixBackup} = sy-tabix.
60077
+ ${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.
60078
+ ${indentation}sy-tabix = ${tabixBackup}.
60079
+ ${indentation}IF sy-subrc <> 0.
60080
+ ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
60081
+ ${indentation}ENDIF.
60001
60082
  ${indentation}${uniqueName}`;
60002
60083
  const start = target.getFirstToken().getStart();
60003
60084
  const end = (_a = tableExpression.findDirectTokenByText("]")) === null || _a === void 0 ? void 0 : _a.getEnd();
@@ -60077,11 +60158,11 @@ ${indentation}${uniqueName}`;
60077
60158
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
60078
60159
  const source = (_b = child.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens();
60079
60160
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
60080
- const code = `DATA ${uniqueName} TYPE string.
60081
- ${indentation}CALL FUNCTION '${functionName}'
60082
- ${indentation} EXPORTING
60083
- ${indentation} input = ${source}
60084
- ${indentation} IMPORTING
60161
+ const code = `DATA ${uniqueName} TYPE string.
60162
+ ${indentation}CALL FUNCTION '${functionName}'
60163
+ ${indentation} EXPORTING
60164
+ ${indentation} input = ${source}
60165
+ ${indentation} IMPORTING
60085
60166
  ${indentation} output = ${uniqueName}.\n`;
60086
60167
  const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), code);
60087
60168
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, child.getFirstToken().getStart(), child.getLastToken().getEnd(), uniqueName);
@@ -61393,12 +61474,12 @@ class EasyToFindMessages {
61393
61474
  key: "easy_to_find_messages",
61394
61475
  title: "Easy to find messages",
61395
61476
  shortDescription: `Make messages easy to find`,
61396
- extendedInformation: `All messages must be statically referenced exactly once
61397
-
61398
- Only MESSAGE and RAISE statments are counted as static references
61399
-
61400
- Also see rule "message_exists"
61401
-
61477
+ extendedInformation: `All messages must be statically referenced exactly once
61478
+
61479
+ Only MESSAGE and RAISE statments are counted as static references
61480
+
61481
+ Also see rule "message_exists"
61482
+
61402
61483
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#make-messages-easy-to-find`,
61403
61484
  tags: [_irule_1.RuleTag.Styleguide],
61404
61485
  };
@@ -61479,13 +61560,13 @@ class EmptyEvent extends _abap_rule_1.ABAPRule {
61479
61560
  shortDescription: `Empty selection screen or list processing event block`,
61480
61561
  extendedInformation: ``,
61481
61562
  tags: [_irule_1.RuleTag.SingleFile],
61482
- badExample: `
61483
- INITIALIZATION.
61484
- WRITE 'hello'.
61563
+ badExample: `
61564
+ INITIALIZATION.
61565
+ WRITE 'hello'.
61485
61566
  END-OF-SELECTION.`,
61486
- goodExample: `
61487
- START-OF-SELECTION.
61488
- PERFORM sdf.
61567
+ goodExample: `
61568
+ START-OF-SELECTION.
61569
+ PERFORM sdf.
61489
61570
  COMMIT WORK.`,
61490
61571
  };
61491
61572
  }
@@ -61577,8 +61658,8 @@ class EmptyLineinStatement extends _abap_rule_1.ABAPRule {
61577
61658
  key: "empty_line_in_statement",
61578
61659
  title: "Find empty lines in statements",
61579
61660
  shortDescription: `Checks that statements do not contain empty lines.`,
61580
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
61581
-
61661
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
61662
+
61582
61663
  https://docs.abapopenchecks.org/checks/41/`,
61583
61664
  tags: [_irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
61584
61665
  badExample: `WRITE\n\nhello.`,
@@ -61754,13 +61835,13 @@ class EmptyStructure extends _abap_rule_1.ABAPRule {
61754
61835
  shortDescription: `Checks that the code does not contain empty blocks.`,
61755
61836
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-empty-if-branches`,
61756
61837
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
61757
- badExample: `IF foo = bar.
61758
- ENDIF.
61759
-
61760
- DO 2 TIMES.
61838
+ badExample: `IF foo = bar.
61839
+ ENDIF.
61840
+
61841
+ DO 2 TIMES.
61761
61842
  ENDDO.`,
61762
- goodExample: `LOOP AT itab WHERE qty = 0 OR date > sy-datum.
61763
- ENDLOOP.
61843
+ goodExample: `LOOP AT itab WHERE qty = 0 OR date > sy-datum.
61844
+ ENDLOOP.
61764
61845
  result = xsdbool( sy-subrc = 0 ).`,
61765
61846
  };
61766
61847
  }
@@ -61902,10 +61983,10 @@ class ExitOrCheck extends _abap_rule_1.ABAPRule {
61902
61983
  return {
61903
61984
  key: "exit_or_check",
61904
61985
  title: "Find EXIT or CHECK outside loops",
61905
- shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
61986
+ shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
61906
61987
  Use RETURN to leave procesing blocks instead.`,
61907
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
61908
- https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
61988
+ extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
61989
+ https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
61909
61990
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#check-vs-return`,
61910
61991
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
61911
61992
  };
@@ -61988,12 +62069,12 @@ class ExpandMacros extends _abap_rule_1.ABAPRule {
61988
62069
  key: "expand_macros",
61989
62070
  title: "Expand Macros",
61990
62071
  shortDescription: `Allows expanding macro calls with quick fixes`,
61991
- extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
61992
-
62072
+ extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
62073
+
61993
62074
  Note that macros/DEFINE cannot be used in the ABAP Cloud programming model`,
61994
- badExample: `DEFINE _hello.
61995
- WRITE 'hello'.
61996
- END-OF-DEFINITION.
62075
+ badExample: `DEFINE _hello.
62076
+ WRITE 'hello'.
62077
+ END-OF-DEFINITION.
61997
62078
  _hello.`,
61998
62079
  goodExample: `WRITE 'hello'.`,
61999
62080
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
@@ -62080,7 +62161,7 @@ class Exporting extends _abap_rule_1.ABAPRule {
62080
62161
  shortDescription: `Detects EXPORTING statements which can be omitted.`,
62081
62162
  badExample: `call_method( EXPORTING foo = bar ).`,
62082
62163
  goodExample: `call_method( foo = bar ).`,
62083
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-optional-keyword-exporting
62164
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-optional-keyword-exporting
62084
62165
  https://docs.abapopenchecks.org/checks/30/`,
62085
62166
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
62086
62167
  };
@@ -62178,7 +62259,7 @@ class ForbiddenIdentifier extends _abap_rule_1.ABAPRule {
62178
62259
  key: "forbidden_identifier",
62179
62260
  title: "Forbidden Identifier",
62180
62261
  shortDescription: `Forbid use of specified identifiers, list of regex.`,
62181
- extendedInformation: `Used in the transpiler to find javascript keywords in ABAP identifiers,
62262
+ extendedInformation: `Used in the transpiler to find javascript keywords in ABAP identifiers,
62182
62263
  https://github.com/abaplint/transpiler/blob/bda94b8b56e2b7f2f87be2168f12361aa530220e/packages/transpiler/src/validation.ts#L44`,
62183
62264
  tags: [_irule_1.RuleTag.SingleFile],
62184
62265
  };
@@ -62420,8 +62501,8 @@ class ForbiddenVoidType {
62420
62501
  key: "forbidden_void_type",
62421
62502
  title: "Forbidden Void Types",
62422
62503
  shortDescription: `Avoid usage of specified void types.`,
62423
- extendedInformation: `Inspiration:
62424
- BOOLEAN, BOOLE_D, CHAR01, CHAR1, CHAR10, CHAR12, CHAR128, CHAR2, CHAR20, CHAR4, CHAR70,
62504
+ extendedInformation: `Inspiration:
62505
+ BOOLEAN, BOOLE_D, CHAR01, CHAR1, CHAR10, CHAR12, CHAR128, CHAR2, CHAR20, CHAR4, CHAR70,
62425
62506
  DATS, TIMS, DATUM, FLAG, INT4, NUMC3, NUMC4, SAP_BOOL, TEXT25, TEXT80, X255, XFELD`,
62426
62507
  };
62427
62508
  }
@@ -62664,9 +62745,9 @@ class FullyTypeITabs extends _abap_rule_1.ABAPRule {
62664
62745
  key: "fully_type_itabs",
62665
62746
  title: "Fully type internal tables",
62666
62747
  shortDescription: `No implict table types or table keys`,
62667
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-the-right-table-type
62748
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-the-right-table-type
62668
62749
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key`,
62669
- badExample: `DATA lt_foo TYPE TABLE OF ty.
62750
+ badExample: `DATA lt_foo TYPE TABLE OF ty.
62670
62751
  DATA lt_bar TYPE STANDARD TABLE OF ty.`,
62671
62752
  goodExample: `DATA lt_foo TYPE STANDARD TABLE OF ty WITH EMPTY KEY.`,
62672
62753
  tags: [_irule_1.RuleTag.SingleFile],
@@ -62851,26 +62932,26 @@ class FunctionalWriting extends _abap_rule_1.ABAPRule {
62851
62932
  key: "functional_writing",
62852
62933
  title: "Use functional writing",
62853
62934
  shortDescription: `Detects usage of call method when functional style calls can be used.`,
62854
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-calls
62935
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-calls
62855
62936
  https://docs.abapopenchecks.org/checks/07/`,
62856
62937
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
62857
- badExample: `CALL METHOD zcl_class=>method( ).
62858
- CALL METHOD cl_abap_typedescr=>describe_by_name
62859
- EXPORTING
62860
- p_name = 'NAME'
62861
- RECEIVING
62862
- p_descr_ref = lr_typedescr
62863
- EXCEPTIONS
62864
- type_not_found = 1
62938
+ badExample: `CALL METHOD zcl_class=>method( ).
62939
+ CALL METHOD cl_abap_typedescr=>describe_by_name
62940
+ EXPORTING
62941
+ p_name = 'NAME'
62942
+ RECEIVING
62943
+ p_descr_ref = lr_typedescr
62944
+ EXCEPTIONS
62945
+ type_not_found = 1
62865
62946
  OTHERS = 2.`,
62866
- goodExample: `zcl_class=>method( ).
62867
- cl_abap_typedescr=>describe_by_name(
62868
- EXPORTING
62869
- p_name = 'NAME'
62870
- RECEIVING
62871
- p_descr_ref = lr_typedescr
62872
- EXCEPTIONS
62873
- type_not_found = 1
62947
+ goodExample: `zcl_class=>method( ).
62948
+ cl_abap_typedescr=>describe_by_name(
62949
+ EXPORTING
62950
+ p_name = 'NAME'
62951
+ RECEIVING
62952
+ p_descr_ref = lr_typedescr
62953
+ EXCEPTIONS
62954
+ type_not_found = 1
62874
62955
  OTHERS = 2 ).`,
62875
62956
  };
62876
62957
  }
@@ -62981,14 +63062,14 @@ class GlobalClass extends _abap_rule_1.ABAPRule {
62981
63062
  key: "global_class",
62982
63063
  title: "Global class checks",
62983
63064
  shortDescription: `Checks related to global classes`,
62984
- extendedInformation: `* global classes must be in own files
62985
-
62986
- * file names must match class name
62987
-
62988
- * file names must match interface name
62989
-
62990
- * global classes must be global definitions
62991
-
63065
+ extendedInformation: `* global classes must be in own files
63066
+
63067
+ * file names must match class name
63068
+
63069
+ * file names must match interface name
63070
+
63071
+ * global classes must be global definitions
63072
+
62992
63073
  * global interfaces must be global definitions`,
62993
63074
  tags: [_irule_1.RuleTag.Syntax],
62994
63075
  };
@@ -63087,21 +63168,21 @@ class IdenticalConditions extends _abap_rule_1.ABAPRule {
63087
63168
  return {
63088
63169
  key: "identical_conditions",
63089
63170
  title: "Identical conditions",
63090
- shortDescription: `Find identical conditions in IF + CASE + WHILE etc
63091
-
63171
+ shortDescription: `Find identical conditions in IF + CASE + WHILE etc
63172
+
63092
63173
  Prerequsites: code is pretty printed with identical cAsE`,
63093
63174
  tags: [_irule_1.RuleTag.SingleFile],
63094
- badExample: `IF foo = bar OR 1 = a OR foo = bar.
63095
- ENDIF.
63096
- CASE bar.
63097
- WHEN '1'.
63098
- WHEN 'A' OR '1'.
63175
+ badExample: `IF foo = bar OR 1 = a OR foo = bar.
63176
+ ENDIF.
63177
+ CASE bar.
63178
+ WHEN '1'.
63179
+ WHEN 'A' OR '1'.
63099
63180
  ENDCASE.`,
63100
- goodExample: `IF foo = bar OR 1 = a.
63101
- ENDIF.
63102
- CASE bar.
63103
- WHEN '1'.
63104
- WHEN 'A'.
63181
+ goodExample: `IF foo = bar OR 1 = a.
63182
+ ENDIF.
63183
+ CASE bar.
63184
+ WHEN '1'.
63185
+ WHEN 'A'.
63105
63186
  ENDCASE.`,
63106
63187
  };
63107
63188
  }
@@ -63235,23 +63316,23 @@ class IdenticalContents extends _abap_rule_1.ABAPRule {
63235
63316
  key: "identical_contents",
63236
63317
  title: "Identical contents",
63237
63318
  shortDescription: `Find identical contents in blocks inside IFs, both in the beginning and in the end.`,
63238
- extendedInformation: `
63239
- Prerequsites: code is pretty printed with identical cAsE
63240
-
63319
+ extendedInformation: `
63320
+ Prerequsites: code is pretty printed with identical cAsE
63321
+
63241
63322
  Chained statments are ignored`,
63242
63323
  tags: [_irule_1.RuleTag.SingleFile],
63243
- badExample: `IF foo = bar.
63244
- WRITE 'bar'.
63245
- WRITE 'world'.
63246
- ELSE.
63247
- WRITE 'foo'.
63248
- WRITE 'world'.
63324
+ badExample: `IF foo = bar.
63325
+ WRITE 'bar'.
63326
+ WRITE 'world'.
63327
+ ELSE.
63328
+ WRITE 'foo'.
63329
+ WRITE 'world'.
63249
63330
  ENDIF.`,
63250
- goodExample: `IF foo = bar.
63251
- WRITE 'bar'.
63252
- ELSE.
63253
- WRITE 'foo'.
63254
- ENDIF.
63331
+ goodExample: `IF foo = bar.
63332
+ WRITE 'bar'.
63333
+ ELSE.
63334
+ WRITE 'foo'.
63335
+ ENDIF.
63255
63336
  WRITE 'world'.`,
63256
63337
  };
63257
63338
  }
@@ -63359,12 +63440,12 @@ class IdenticalDescriptions {
63359
63440
  key: "identical_descriptions",
63360
63441
  title: "Identical descriptions",
63361
63442
  shortDescription: `Searches for objects with the same type and same description`,
63362
- extendedInformation: `Case insensitive
63363
-
63364
- Only checks the master language descriptions
63365
-
63366
- Dependencies are skipped
63367
-
63443
+ extendedInformation: `Case insensitive
63444
+
63445
+ Only checks the master language descriptions
63446
+
63447
+ Dependencies are skipped
63448
+
63368
63449
  Works for: INTF, CLAS, DOMA, DTEL, FUNC in same FUGR`,
63369
63450
  tags: [],
63370
63451
  };
@@ -63538,43 +63619,43 @@ class IfInIf extends _abap_rule_1.ABAPRule {
63538
63619
  key: "if_in_if",
63539
63620
  title: "IF in IF",
63540
63621
  shortDescription: `Detects nested ifs which can be refactored.`,
63541
- extendedInformation: `
63542
- Directly nested IFs without ELSE can be refactored to a single condition using AND.
63543
-
63544
- ELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.
63545
-
63546
- https://docs.abapopenchecks.org/checks/01/
63622
+ extendedInformation: `
63623
+ Directly nested IFs without ELSE can be refactored to a single condition using AND.
63624
+
63625
+ ELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.
63626
+
63627
+ https://docs.abapopenchecks.org/checks/01/
63547
63628
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low`,
63548
- badExample: `IF condition1.
63549
- IF condition2.
63550
- ...
63551
- ENDIF.
63552
- ENDIF.
63553
-
63554
- IF condition1.
63555
- ...
63556
- ELSE.
63557
- IF condition2.
63558
- ...
63559
- ENDIF.
63629
+ badExample: `IF condition1.
63630
+ IF condition2.
63631
+ ...
63632
+ ENDIF.
63633
+ ENDIF.
63634
+
63635
+ IF condition1.
63636
+ ...
63637
+ ELSE.
63638
+ IF condition2.
63639
+ ...
63640
+ ENDIF.
63560
63641
  ENDIF.`,
63561
- goodExample: `IF ( condition1 ) AND ( condition2 ).
63562
- ...
63563
- ENDIF.
63564
-
63565
- IF condition1.
63566
- ...
63567
- ELSEIF condition2.
63568
- ...
63569
- ENDIF.
63570
-
63571
- CASE variable.
63572
- WHEN value1.
63573
- ...
63574
- WHEN value2.
63575
- IF condition2.
63576
- ...
63577
- ENDIF.
63642
+ goodExample: `IF ( condition1 ) AND ( condition2 ).
63643
+ ...
63644
+ ENDIF.
63645
+
63646
+ IF condition1.
63647
+ ...
63648
+ ELSEIF condition2.
63649
+ ...
63650
+ ENDIF.
63651
+
63652
+ CASE variable.
63653
+ WHEN value1.
63654
+ ...
63655
+ WHEN value2.
63656
+ IF condition2.
63657
+ ...
63658
+ ENDIF.
63578
63659
  ENDCASE.`,
63579
63660
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
63580
63661
  };
@@ -63759,9 +63840,9 @@ class ImplementMethods extends _abap_rule_1.ABAPRule {
63759
63840
  for (const i of ((_a = file.getStructure()) === null || _a === void 0 ? void 0 : _a.findAllStatements(Statements.ClassImplementation)) || []) {
63760
63841
  const name = (_b = i.findFirstExpression(Expressions.ClassName)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr().toUpperCase();
63761
63842
  if (name === impl.identifier.getName().toUpperCase()) {
63762
- return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
63763
- METHOD ${methodName.toLowerCase()}.
63764
- RETURN. " todo, implement method
63843
+ return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
63844
+ METHOD ${methodName.toLowerCase()}.
63845
+ RETURN. " todo, implement method
63765
63846
  ENDMETHOD.`);
63766
63847
  }
63767
63848
  }
@@ -63940,14 +64021,14 @@ class ImplicitStartOfSelection extends _abap_rule_1.ABAPRule {
63940
64021
  key: "implicit_start_of_selection",
63941
64022
  title: "Implicit START-OF-SELECTION",
63942
64023
  shortDescription: `Add explicit selection screen event handling`,
63943
- extendedInformation: `Only runs for executable programs
63944
-
64024
+ extendedInformation: `Only runs for executable programs
64025
+
63945
64026
  https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapstart-of-selection.htm`,
63946
64027
  tags: [_irule_1.RuleTag.SingleFile],
63947
- badExample: `REPORT zfoo.
64028
+ badExample: `REPORT zfoo.
63948
64029
  WRITE 'hello'.`,
63949
- goodExample: `
63950
- START-OF-SELECTION.
64030
+ goodExample: `
64031
+ START-OF-SELECTION.
63951
64032
  WRITE 'hello'.`,
63952
64033
  };
63953
64034
  }
@@ -64052,19 +64133,19 @@ class InStatementIndentation extends _abap_rule_1.ABAPRule {
64052
64133
  key: "in_statement_indentation",
64053
64134
  title: "In-statement indentation",
64054
64135
  shortDescription: "Checks alignment within statements which span multiple lines.",
64055
- extendedInformation: `Lines following the first line should be indented once (2 spaces).
64056
-
64057
- For block declaration statements, lines after the first should be indented an additional time (default: +2 spaces)
64136
+ extendedInformation: `Lines following the first line should be indented once (2 spaces).
64137
+
64138
+ For block declaration statements, lines after the first should be indented an additional time (default: +2 spaces)
64058
64139
  to distinguish them better from code within the block.`,
64059
- badExample: `IF 1 = 1
64060
- AND 2 = 2.
64061
- WRITE 'hello' &&
64062
- 'world'.
64140
+ badExample: `IF 1 = 1
64141
+ AND 2 = 2.
64142
+ WRITE 'hello' &&
64143
+ 'world'.
64063
64144
  ENDIF.`,
64064
- goodExample: `IF 1 = 1
64065
- AND 2 = 2.
64066
- WRITE 'hello' &&
64067
- 'world'.
64145
+ goodExample: `IF 1 = 1
64146
+ AND 2 = 2.
64147
+ WRITE 'hello' &&
64148
+ 'world'.
64068
64149
  ENDIF.`,
64069
64150
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
64070
64151
  };
@@ -64091,7 +64172,9 @@ ENDIF.`,
64091
64172
  }
64092
64173
  }
64093
64174
  for (const s of file.getStatements()) {
64094
- if (s.get() instanceof _statement_1.Comment || s.get() instanceof _statement_1.Unknown) {
64175
+ if (s.get() instanceof _statement_1.Comment
64176
+ || s.get() instanceof _statement_1.Unknown
64177
+ || s.get() instanceof _statement_1.NativeSQL) {
64095
64178
  continue;
64096
64179
  }
64097
64180
  const tokens = s.getTokens();
@@ -64188,23 +64271,23 @@ class Indentation extends _abap_rule_1.ABAPRule {
64188
64271
  title: "Indentation",
64189
64272
  shortDescription: `Checks indentation`,
64190
64273
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
64191
- badExample: `CLASS lcl DEFINITION.
64192
- PRIVATE SECTION.
64193
- METHODS constructor.
64194
- ENDCLASS.
64195
-
64196
- CLASS lcl IMPLEMENTATION.
64197
- METHOD constructor.
64198
- ENDMETHOD.
64274
+ badExample: `CLASS lcl DEFINITION.
64275
+ PRIVATE SECTION.
64276
+ METHODS constructor.
64277
+ ENDCLASS.
64278
+
64279
+ CLASS lcl IMPLEMENTATION.
64280
+ METHOD constructor.
64281
+ ENDMETHOD.
64199
64282
  ENDCLASS.`,
64200
- goodExample: `CLASS lcl DEFINITION.
64201
- PRIVATE SECTION.
64202
- METHODS constructor.
64203
- ENDCLASS.
64204
-
64205
- CLASS lcl IMPLEMENTATION.
64206
- METHOD constructor.
64207
- ENDMETHOD.
64283
+ goodExample: `CLASS lcl DEFINITION.
64284
+ PRIVATE SECTION.
64285
+ METHODS constructor.
64286
+ ENDCLASS.
64287
+
64288
+ CLASS lcl IMPLEMENTATION.
64289
+ METHOD constructor.
64290
+ ENDMETHOD.
64208
64291
  ENDCLASS.`,
64209
64292
  };
64210
64293
  }
@@ -64608,9 +64691,9 @@ class IntfReferencingClas {
64608
64691
  key: "intf_referencing_clas",
64609
64692
  title: "INTF referencing CLAS",
64610
64693
  shortDescription: `Interface contains references to class`,
64611
- extendedInformation: `Only global interfaces are checked.
64612
- Only first level references are checked.
64613
- Exception class references are ignored.
64694
+ extendedInformation: `Only global interfaces are checked.
64695
+ Only first level references are checked.
64696
+ Exception class references are ignored.
64614
64697
  Void references are ignored.`,
64615
64698
  };
64616
64699
  }
@@ -64695,9 +64778,9 @@ class InvalidTableIndex extends _abap_rule_1.ABAPRule {
64695
64778
  title: "Invalid Table Index",
64696
64779
  shortDescription: `Issues error for constant table index zero, as ABAP starts from 1`,
64697
64780
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
64698
- badExample: `DATA(first) = table[ 0 ].
64781
+ badExample: `DATA(first) = table[ 0 ].
64699
64782
  READ TABLE gt_stack ASSIGNING <ls_stack> INDEX 0.`,
64700
- goodExample: `DATA(first) = table[ 1 ].
64783
+ goodExample: `DATA(first) = table[ 1 ].
64701
64784
  READ TABLE gt_stack ASSIGNING <ls_stack> INDEX 1.`,
64702
64785
  };
64703
64786
  }
@@ -65299,8 +65382,8 @@ class LineBreakStyle {
65299
65382
  return {
65300
65383
  key: "line_break_style",
65301
65384
  title: "Makes sure line breaks are consistent in the ABAP code",
65302
- shortDescription: `Enforces LF as newlines in ABAP files
65303
-
65385
+ shortDescription: `Enforces LF as newlines in ABAP files
65386
+
65304
65387
  abapGit does not work with CRLF`,
65305
65388
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
65306
65389
  };
@@ -65369,7 +65452,7 @@ class LineLength extends _abap_rule_1.ABAPRule {
65369
65452
  key: "line_length",
65370
65453
  title: "Line length",
65371
65454
  shortDescription: `Detects lines exceeding the provided maximum length.`,
65372
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length
65455
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length
65373
65456
  https://docs.abapopenchecks.org/checks/04/`,
65374
65457
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
65375
65458
  };
@@ -65440,7 +65523,7 @@ class LineOnlyPunc extends _abap_rule_1.ABAPRule {
65440
65523
  key: "line_only_punc",
65441
65524
  title: "Line containing only punctuation",
65442
65525
  shortDescription: `Detects lines containing only punctuation.`,
65443
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#close-brackets-at-line-end
65526
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#close-brackets-at-line-end
65444
65527
  https://docs.abapopenchecks.org/checks/16/`,
65445
65528
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
65446
65529
  badExample: "zcl_class=>method(\n).",
@@ -65703,15 +65786,15 @@ class LocalVariableNames extends _abap_rule_1.ABAPRule {
65703
65786
  return {
65704
65787
  key: "local_variable_names",
65705
65788
  title: "Local variable naming conventions",
65706
- shortDescription: `
65707
- Allows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols.
65789
+ shortDescription: `
65790
+ Allows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols.
65708
65791
  Regexes are case-insensitive.`,
65709
65792
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
65710
- badExample: `FORM bar.
65711
- DATA foo.
65793
+ badExample: `FORM bar.
65794
+ DATA foo.
65712
65795
  ENDFORM.`,
65713
- goodExample: `FORM bar.
65714
- DATA lv_foo.
65796
+ goodExample: `FORM bar.
65797
+ DATA lv_foo.
65715
65798
  ENDFORM.`,
65716
65799
  };
65717
65800
  }
@@ -65863,9 +65946,9 @@ class MacroNaming extends _abap_rule_1.ABAPRule {
65863
65946
  shortDescription: `Allows you to enforce a pattern for macro definitions`,
65864
65947
  extendedInformation: `Use rule "avoid_use" to avoid macros altogether.`,
65865
65948
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
65866
- badExample: `DEFINE something.
65949
+ badExample: `DEFINE something.
65867
65950
  END-OF-DEFINITION.`,
65868
- goodExample: `DEFINE _something.
65951
+ goodExample: `DEFINE _something.
65869
65952
  END-OF-DEFINITION.`,
65870
65953
  };
65871
65954
  }
@@ -65938,10 +66021,10 @@ class MainFileContents {
65938
66021
  key: "main_file_contents",
65939
66022
  title: "Main file contents",
65940
66023
  shortDescription: `Checks related to report declarations.`,
65941
- extendedInformation: `Does not run if the target version is Cloud
65942
-
65943
- * PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
65944
- * TYPEs must begin with "TYPE-POOL <name>."
66024
+ extendedInformation: `Does not run if the target version is Cloud
66025
+
66026
+ * PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
66027
+ * TYPEs must begin with "TYPE-POOL <name>."
65945
66028
  `,
65946
66029
  };
65947
66030
  }
@@ -66057,17 +66140,17 @@ class ManyParentheses extends _abap_rule_1.ABAPRule {
66057
66140
  title: "Too many parentheses",
66058
66141
  shortDescription: `Searches for expressions where extra parentheses can safely be removed`,
66059
66142
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
66060
- badExample: `
66061
- IF ( destination IS INITIAL ).
66062
- ENDIF.
66063
- IF foo = boo AND ( bar = lar AND moo = loo ).
66064
- ENDIF.
66143
+ badExample: `
66144
+ IF ( destination IS INITIAL ).
66145
+ ENDIF.
66146
+ IF foo = boo AND ( bar = lar AND moo = loo ).
66147
+ ENDIF.
66065
66148
  `,
66066
- goodExample: `
66067
- IF destination IS INITIAL.
66068
- ENDIF.
66069
- IF foo = boo AND bar = lar AND moo = loo.
66070
- ENDIF.
66149
+ goodExample: `
66150
+ IF destination IS INITIAL.
66151
+ ENDIF.
66152
+ IF foo = boo AND bar = lar AND moo = loo.
66153
+ ENDIF.
66071
66154
  `,
66072
66155
  };
66073
66156
  }
@@ -66241,14 +66324,14 @@ class MaxOneMethodParameterPerLine extends _abap_rule_1.ABAPRule {
66241
66324
  title: "Max one method parameter definition per line",
66242
66325
  shortDescription: `Keep max one method parameter description per line`,
66243
66326
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace],
66244
- badExample: `
66245
- METHODS apps_scope_token
66246
- IMPORTING
66327
+ badExample: `
66328
+ METHODS apps_scope_token
66329
+ IMPORTING
66247
66330
  body TYPE bodyapps_scope_token client_id TYPE str.`,
66248
- goodExample: `
66249
- METHODS apps_scope_token
66250
- IMPORTING
66251
- body TYPE bodyapps_scope_token
66331
+ goodExample: `
66332
+ METHODS apps_scope_token
66333
+ IMPORTING
66334
+ body TYPE bodyapps_scope_token
66252
66335
  client_id TYPE str.`,
66253
66336
  };
66254
66337
  }
@@ -66313,11 +66396,11 @@ class MaxOneStatement extends _abap_rule_1.ABAPRule {
66313
66396
  key: "max_one_statement",
66314
66397
  title: "Max one statement per line",
66315
66398
  shortDescription: `Checks that each line contains only a single statement.`,
66316
- extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
66317
-
66318
- Does not report anything for chained statements.
66319
-
66320
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line
66399
+ extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
66400
+
66401
+ Does not report anything for chained statements.
66402
+
66403
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line
66321
66404
  https://docs.abapopenchecks.org/checks/11/`,
66322
66405
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
66323
66406
  badExample: `WRITE foo. WRITE bar.`,
@@ -66655,8 +66738,8 @@ class MethodLength {
66655
66738
  key: "method_length",
66656
66739
  title: "Method/Form Length",
66657
66740
  shortDescription: `Checks relating to method/form length.`,
66658
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
66659
-
66741
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
66742
+
66660
66743
  Abstract methods without statements are considered okay.`,
66661
66744
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
66662
66745
  };
@@ -66761,20 +66844,20 @@ class MethodOverwritesBuiltIn extends _abap_rule_1.ABAPRule {
66761
66844
  key: "method_overwrites_builtin",
66762
66845
  title: "Method name overwrites builtin function",
66763
66846
  shortDescription: `Checks Method names that overwrite builtin SAP functions`,
66764
- extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
66765
-
66766
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
66767
-
66847
+ extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
66848
+
66849
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
66850
+
66768
66851
  Interface method names are ignored`,
66769
66852
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
66770
- badExample: `CLASS lcl DEFINITION.
66771
- PUBLIC SECTION.
66772
- METHODS matches.
66773
- ENDCLASS.
66774
-
66775
- CLASS lcl IMPLEMENTATION.
66776
- METHOD matches.
66777
- ENDMETHOD.
66853
+ badExample: `CLASS lcl DEFINITION.
66854
+ PUBLIC SECTION.
66855
+ METHODS matches.
66856
+ ENDCLASS.
66857
+
66858
+ CLASS lcl IMPLEMENTATION.
66859
+ METHOD matches.
66860
+ ENDMETHOD.
66778
66861
  ENDCLASS.`,
66779
66862
  };
66780
66863
  }
@@ -66965,12 +67048,12 @@ class MixReturning extends _abap_rule_1.ABAPRule {
66965
67048
  // eslint-disable-next-line max-len
66966
67049
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-either-returning-or-exporting-or-changing-but-not-a-combination`,
66967
67050
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
66968
- badExample: `CLASS lcl DEFINITION.
66969
- PUBLIC SECTION.
66970
- METHODS
66971
- foobar
66972
- EXPORTING foo TYPE i
66973
- RETURNING VALUE(rv_string) TYPE string.
67051
+ badExample: `CLASS lcl DEFINITION.
67052
+ PUBLIC SECTION.
67053
+ METHODS
67054
+ foobar
67055
+ EXPORTING foo TYPE i
67056
+ RETURNING VALUE(rv_string) TYPE string.
66974
67057
  ENDCLASS.`,
66975
67058
  };
66976
67059
  }
@@ -67350,7 +67433,7 @@ class Nesting extends _abap_rule_1.ABAPRule {
67350
67433
  key: "nesting",
67351
67434
  title: "Check nesting depth",
67352
67435
  shortDescription: `Checks for methods exceeding a maximum nesting depth`,
67353
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low
67436
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low
67354
67437
  https://docs.abapopenchecks.org/checks/74/`,
67355
67438
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
67356
67439
  };
@@ -67593,7 +67676,7 @@ class NoChainedAssignment extends _abap_rule_1.ABAPRule {
67593
67676
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-chain-assignments`,
67594
67677
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
67595
67678
  badExample: `var1 = var2 = var3.`,
67596
- goodExample: `var2 = var3.
67679
+ goodExample: `var2 = var3.
67597
67680
  var1 = var2.`,
67598
67681
  };
67599
67682
  }
@@ -67652,8 +67735,8 @@ class NoExternalFormCalls extends _abap_rule_1.ABAPRule {
67652
67735
  key: "no_external_form_calls",
67653
67736
  title: "No external FORM calls",
67654
67737
  shortDescription: `Detect external form calls`,
67655
- badExample: `PERFORM foo IN PROGRAM bar.
67656
-
67738
+ badExample: `PERFORM foo IN PROGRAM bar.
67739
+
67657
67740
  PERFORM foo(bar).`,
67658
67741
  tags: [_irule_1.RuleTag.SingleFile],
67659
67742
  };
@@ -67714,17 +67797,17 @@ class NoInlineInOptionalBranches extends _abap_rule_1.ABAPRule {
67714
67797
  key: "no_inline_in_optional_branches",
67715
67798
  title: "Don't declare inline in optional branches",
67716
67799
  shortDescription: `Don't declare inline in optional branches`,
67717
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
67718
-
67719
- Considered optional branches:
67720
- * inside IF/ELSEIF/ELSE
67721
- * inside LOOP
67722
- * inside WHILE
67723
- * inside CASE/WHEN, CASE TYPE OF
67724
- * inside DO
67725
- * inside SELECT loops
67726
-
67727
- Not considered optional branches:
67800
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
67801
+
67802
+ Considered optional branches:
67803
+ * inside IF/ELSEIF/ELSE
67804
+ * inside LOOP
67805
+ * inside WHILE
67806
+ * inside CASE/WHEN, CASE TYPE OF
67807
+ * inside DO
67808
+ * inside SELECT loops
67809
+
67810
+ Not considered optional branches:
67728
67811
  * TRY/CATCH/CLEANUP`,
67729
67812
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
67730
67813
  };
@@ -67824,12 +67907,12 @@ class NoPrefixes extends _abap_rule_1.ABAPRule {
67824
67907
  key: "no_prefixes",
67825
67908
  title: "No Prefixes",
67826
67909
  shortDescription: `Dont use hungarian notation`,
67827
- extendedInformation: `
67828
- Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
67829
- allowing all types to become voided, abaplint will then provide less precise syntax errors.
67830
-
67831
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
67832
-
67910
+ extendedInformation: `
67911
+ Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
67912
+ allowing all types to become voided, abaplint will then provide less precise syntax errors.
67913
+
67914
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
67915
+
67833
67916
  https://github.com/SAP/styleguides/blob/main/clean-abap/sub-sections/AvoidEncodings.md`,
67834
67917
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
67835
67918
  badExample: `DATA lv_foo TYPE i.`,
@@ -68008,7 +68091,7 @@ class NoPublicAttributes extends _abap_rule_1.ABAPRule {
68008
68091
  return {
68009
68092
  key: "no_public_attributes",
68010
68093
  title: "No public attributes",
68011
- shortDescription: `Checks that classes and interfaces don't contain any public attributes.
68094
+ shortDescription: `Checks that classes and interfaces don't contain any public attributes.
68012
68095
  Exceptions are excluded from this rule.`,
68013
68096
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#members-private-by-default-protected-only-if-needed`,
68014
68097
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
@@ -68109,13 +68192,13 @@ class NoYodaConditions extends _abap_rule_1.ABAPRule {
68109
68192
  key: "no_yoda_conditions",
68110
68193
  title: "No Yoda conditions",
68111
68194
  shortDescription: `Finds Yoda conditions and reports issues`,
68112
- extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
68113
-
68195
+ extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
68196
+
68114
68197
  Conditions with operators CP, NP, CS, NS, CA, NA, CO, CN are ignored`,
68115
68198
  tags: [_irule_1.RuleTag.SingleFile],
68116
- badExample: `IF 0 <> sy-subrc.
68199
+ badExample: `IF 0 <> sy-subrc.
68117
68200
  ENDIF.`,
68118
- goodExample: `IF sy-subrc <> 0.
68201
+ goodExample: `IF sy-subrc <> 0.
68119
68202
  ENDIF.`,
68120
68203
  };
68121
68204
  }
@@ -68216,8 +68299,8 @@ class NROBConsistency {
68216
68299
  key: "nrob_consistency",
68217
68300
  title: "Number range consistency",
68218
68301
  shortDescription: `Consistency checks for number ranges`,
68219
- extendedInformation: `Issue reported if percentage warning is over 50%
68220
-
68302
+ extendedInformation: `Issue reported if percentage warning is over 50%
68303
+
68221
68304
  Issue reported if the referenced domain is not found(taking error namespace into account)`,
68222
68305
  tags: [_irule_1.RuleTag.SingleFile],
68223
68306
  };
@@ -68494,58 +68577,58 @@ class ObsoleteStatement extends _abap_rule_1.ABAPRule {
68494
68577
  title: "Obsolete statements",
68495
68578
  shortDescription: `Checks for usages of certain obsolete statements`,
68496
68579
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
68497
- extendedInformation: `
68498
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
68499
-
68500
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
68501
-
68502
- SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
68503
-
68504
- IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
68505
-
68506
- WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
68507
-
68508
- FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
68509
-
68510
- TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
68511
-
68512
- LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
68513
-
68514
- COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
68515
-
68516
- OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
68517
-
68518
- PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
68519
-
68520
- RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
68521
-
68522
- PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
68523
-
68524
- MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
68525
-
68526
- SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
68527
- SELECT COUNT(*) is considered okay
68528
-
68529
- FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
68530
-
68531
- SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
68532
-
68533
- CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
68534
-
68535
- POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
68536
-
68537
- OCCURENCES: check for OCCURENCES vs OCCURRENCES
68538
-
68580
+ extendedInformation: `
68581
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
68582
+
68583
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
68584
+
68585
+ SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
68586
+
68587
+ IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
68588
+
68589
+ WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
68590
+
68591
+ FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
68592
+
68593
+ TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
68594
+
68595
+ LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
68596
+
68597
+ COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
68598
+
68599
+ OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
68600
+
68601
+ PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
68602
+
68603
+ RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
68604
+
68605
+ PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
68606
+
68607
+ MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
68608
+
68609
+ SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
68610
+ SELECT COUNT(*) is considered okay
68611
+
68612
+ FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
68613
+
68614
+ SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
68615
+
68616
+ CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
68617
+
68618
+ POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
68619
+
68620
+ OCCURENCES: check for OCCURENCES vs OCCURRENCES
68621
+
68539
68622
  CLIENT SPECIFIED, from 754: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abapselect_client_obsolete.htm`,
68540
- badExample: `REFRESH itab.
68541
-
68542
- COMPUTE foo = 2 + 2.
68543
-
68544
- MULTIPLY lv_foo BY 2.
68545
-
68546
- INTERFACE intf LOAD.
68547
-
68548
- IF foo IS SUPPLIED.
68623
+ badExample: `REFRESH itab.
68624
+
68625
+ COMPUTE foo = 2 + 2.
68626
+
68627
+ MULTIPLY lv_foo BY 2.
68628
+
68629
+ INTERFACE intf LOAD.
68630
+
68631
+ IF foo IS SUPPLIED.
68549
68632
  ENDIF.`,
68550
68633
  };
68551
68634
  }
@@ -68885,9 +68968,9 @@ class OmitParameterName {
68885
68968
  key: "omit_parameter_name",
68886
68969
  title: "Omit parameter name",
68887
68970
  shortDescription: `Omit the parameter name in single parameter calls`,
68888
- extendedInformation: `
68889
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
68890
-
68971
+ extendedInformation: `
68972
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
68973
+
68891
68974
  EXPORTING must already be omitted for this rule to take effect, https://rules.abaplint.org/exporting/`,
68892
68975
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
68893
68976
  badExample: `method( param = 2 ).`,
@@ -69093,20 +69176,20 @@ class OmitReceiving extends _abap_rule_1.ABAPRule {
69093
69176
  shortDescription: `Omit RECEIVING`,
69094
69177
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-receiving`,
69095
69178
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
69096
- badExample: `
69097
- upload_pack(
69098
- EXPORTING
69099
- io_client = lo_client
69100
- iv_url = iv_url
69101
- iv_deepen_level = iv_deepen_level
69102
- it_hashes = lt_hashes
69103
- RECEIVING
69179
+ badExample: `
69180
+ upload_pack(
69181
+ EXPORTING
69182
+ io_client = lo_client
69183
+ iv_url = iv_url
69184
+ iv_deepen_level = iv_deepen_level
69185
+ it_hashes = lt_hashes
69186
+ RECEIVING
69104
69187
  rt_objects = et_objects ).`,
69105
- goodExample: `
69106
- et_objects = upload_pack(
69107
- io_client = lo_client
69108
- iv_url = iv_url
69109
- iv_deepen_level = iv_deepen_level
69188
+ goodExample: `
69189
+ et_objects = upload_pack(
69190
+ io_client = lo_client
69191
+ iv_url = iv_url
69192
+ iv_deepen_level = iv_deepen_level
69110
69193
  it_hashes = lt_hashes ).`,
69111
69194
  };
69112
69195
  }
@@ -69170,8 +69253,8 @@ class Parser702Chaining extends _abap_rule_1.ABAPRule {
69170
69253
  return {
69171
69254
  key: "parser_702_chaining",
69172
69255
  title: "Parser Error, bad chanining on 702",
69173
- shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
69174
- this rule finds these and reports errors.
69256
+ shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
69257
+ this rule finds these and reports errors.
69175
69258
  Only active on target version 702 and below.`,
69176
69259
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
69177
69260
  };
@@ -69251,8 +69334,8 @@ class ParserError {
69251
69334
  return {
69252
69335
  key: "parser_error",
69253
69336
  title: "Parser error",
69254
- shortDescription: `Checks for syntax not recognized by abaplint.
69255
-
69337
+ shortDescription: `Checks for syntax not recognized by abaplint.
69338
+
69256
69339
  See recognized syntax at https://syntax.abaplint.org`,
69257
69340
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
69258
69341
  };
@@ -69337,7 +69420,7 @@ class ParserMissingSpace extends _abap_rule_1.ABAPRule {
69337
69420
  return {
69338
69421
  key: "parser_missing_space",
69339
69422
  title: "Parser Error, missing space",
69340
- shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.
69423
+ shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.
69341
69424
  This rule makes sure the spaces are consistently required across the language.`,
69342
69425
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
69343
69426
  badExample: `IF ( foo = 'bar').`,
@@ -69760,25 +69843,25 @@ class PreferInline {
69760
69843
  key: "prefer_inline",
69761
69844
  title: "Prefer Inline Declarations",
69762
69845
  shortDescription: `Prefer inline to up-front declarations.`,
69763
- extendedInformation: `EXPERIMENTAL
69764
-
69765
- Activates if language version is v740sp02 or above.
69766
-
69767
- Variables must be local(METHOD or FORM).
69768
-
69769
- No generic or void typed variables. No syntax errors.
69770
-
69771
- First position used must be a full/pure write.
69772
-
69773
- Move statment is not a cast(?=)
69774
-
69846
+ extendedInformation: `EXPERIMENTAL
69847
+
69848
+ Activates if language version is v740sp02 or above.
69849
+
69850
+ Variables must be local(METHOD or FORM).
69851
+
69852
+ No generic or void typed variables. No syntax errors.
69853
+
69854
+ First position used must be a full/pure write.
69855
+
69856
+ Move statment is not a cast(?=)
69857
+
69775
69858
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-inline-to-up-front-declarations`,
69776
69859
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Experimental, _irule_1.RuleTag.Quickfix],
69777
- badExample: `DATA foo TYPE i.
69778
- foo = 2.
69779
- DATA percentage TYPE decfloat34.
69860
+ badExample: `DATA foo TYPE i.
69861
+ foo = 2.
69862
+ DATA percentage TYPE decfloat34.
69780
69863
  percentage = ( comment_number / abs_statement_number ) * 100.`,
69781
- goodExample: `DATA(foo) = 2.
69864
+ goodExample: `DATA(foo) = 2.
69782
69865
  DATA(percentage) = CONV decfloat34( comment_number / abs_statement_number ) * 100.`,
69783
69866
  };
69784
69867
  }
@@ -69992,18 +70075,18 @@ class PreferIsNot extends _abap_rule_1.ABAPRule {
69992
70075
  key: "prefer_is_not",
69993
70076
  title: "Prefer IS NOT to NOT IS",
69994
70077
  shortDescription: `Prefer IS NOT to NOT IS`,
69995
- extendedInformation: `
69996
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
69997
-
70078
+ extendedInformation: `
70079
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
70080
+
69998
70081
  "if not is_valid( )." examples are skipped`,
69999
70082
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
70000
- goodExample: `IF variable IS NOT INITIAL.
70001
- IF variable NP 'TODO*'.
70002
- IF variable <> 42.
70083
+ goodExample: `IF variable IS NOT INITIAL.
70084
+ IF variable NP 'TODO*'.
70085
+ IF variable <> 42.
70003
70086
  IF variable CO 'hello'.`,
70004
- badExample: `IF NOT variable IS INITIAL.
70005
- IF NOT variable CP 'TODO*'.
70006
- IF NOT variable = 42.
70087
+ badExample: `IF NOT variable IS INITIAL.
70088
+ IF NOT variable CP 'TODO*'.
70089
+ IF NOT variable = 42.
70007
70090
  IF NOT variable CA 'hello'.`,
70008
70091
  };
70009
70092
  }
@@ -70191,14 +70274,14 @@ class PreferRaiseExceptionNew extends _abap_rule_1.ABAPRule {
70191
70274
  key: "prefer_raise_exception_new",
70192
70275
  title: "Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE",
70193
70276
  shortDescription: `Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE`,
70194
- extendedInformation: `
70195
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
70196
-
70277
+ extendedInformation: `
70278
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
70279
+
70197
70280
  From 752 and up`,
70198
70281
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
70199
70282
  goodExample: `RAISE EXCEPTION NEW cx_generation_error( previous = exception ).`,
70200
- badExample: `RAISE EXCEPTION TYPE cx_generation_error
70201
- EXPORTING
70283
+ badExample: `RAISE EXCEPTION TYPE cx_generation_error
70284
+ EXPORTING
70202
70285
  previous = exception.`,
70203
70286
  };
70204
70287
  }
@@ -70276,12 +70359,12 @@ class PreferReturningToExporting extends _abap_rule_1.ABAPRule {
70276
70359
  key: "prefer_returning_to_exporting",
70277
70360
  title: "Prefer RETURNING to EXPORTING",
70278
70361
  shortDescription: `Prefer RETURNING to EXPORTING. Generic types cannot be RETURNING.`,
70279
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting
70362
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting
70280
70363
  https://docs.abapopenchecks.org/checks/44/`,
70281
70364
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
70282
- badExample: `CLASS lcl DEFINITION.
70283
- PUBLIC SECTION.
70284
- METHODS test EXPORTING ev_foo TYPE i.
70365
+ badExample: `CLASS lcl DEFINITION.
70366
+ PUBLIC SECTION.
70367
+ METHODS test EXPORTING ev_foo TYPE i.
70285
70368
  ENDCLASS.`,
70286
70369
  };
70287
70370
  }
@@ -70377,8 +70460,8 @@ class PreferXsdbool extends _abap_rule_1.ABAPRule {
70377
70460
  key: "prefer_xsdbool",
70378
70461
  title: "Prefer xsdbool over boolc",
70379
70462
  shortDescription: `Prefer xsdbool over boolc`,
70380
- extendedInformation: `Activates if language version is v740sp08 or above.
70381
-
70463
+ extendedInformation: `Activates if language version is v740sp08 or above.
70464
+
70382
70465
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
70383
70466
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
70384
70467
  badExample: `DATA(sdf) = boolc( 1 = 2 ).`,
@@ -70450,9 +70533,9 @@ class PreferredCompareOperator extends _abap_rule_1.ABAPRule {
70450
70533
  title: "Preferred compare operator",
70451
70534
  shortDescription: `Configure undesired operator variants`,
70452
70535
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
70453
- badExample: `IF foo EQ bar.
70536
+ badExample: `IF foo EQ bar.
70454
70537
  ENDIF.`,
70455
- goodExample: `IF foo = bar.
70538
+ goodExample: `IF foo = bar.
70456
70539
  ENDIF.`,
70457
70540
  };
70458
70541
  }
@@ -70676,26 +70759,26 @@ class ReduceProceduralCode extends _abap_rule_1.ABAPRule {
70676
70759
  key: "reduce_procedural_code",
70677
70760
  title: "Reduce procedural code",
70678
70761
  shortDescription: `Checks FORM and FUNCTION-MODULE have few statements`,
70679
- extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
70680
-
70681
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
70682
-
70762
+ extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
70763
+
70764
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
70765
+
70683
70766
  Comments are not counted as statements.`,
70684
70767
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
70685
- badExample: `FORM foo.
70686
- DATA lv_bar TYPE i.
70687
- lv_bar = 2 + 2.
70688
- IF lv_bar = 4.
70689
- WRITE 'hello world'.
70690
- ENDIF.
70691
- DATA lv_bar TYPE i.
70692
- lv_bar = 2 + 2.
70693
- IF lv_bar = 4.
70694
- WRITE 'hello world'.
70695
- ENDIF.
70768
+ badExample: `FORM foo.
70769
+ DATA lv_bar TYPE i.
70770
+ lv_bar = 2 + 2.
70771
+ IF lv_bar = 4.
70772
+ WRITE 'hello world'.
70773
+ ENDIF.
70774
+ DATA lv_bar TYPE i.
70775
+ lv_bar = 2 + 2.
70776
+ IF lv_bar = 4.
70777
+ WRITE 'hello world'.
70778
+ ENDIF.
70696
70779
  ENDFORM.`,
70697
- goodExample: `FORM foo.
70698
- NEW zcl_global_class( )->run_logic( ).
70780
+ goodExample: `FORM foo.
70781
+ NEW zcl_global_class( )->run_logic( ).
70699
70782
  ENDFORM.`,
70700
70783
  };
70701
70784
  }
@@ -70939,10 +71022,10 @@ class RemoveDescriptions {
70939
71022
  return {
70940
71023
  key: "remove_descriptions",
70941
71024
  title: "Remove descriptions",
70942
- shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
70943
-
70944
- Class descriptions are required, see rule description_empty.
70945
-
71025
+ shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
71026
+
71027
+ Class descriptions are required, see rule description_empty.
71028
+
70946
71029
  Consider using ABAP Doc for documentation.`,
70947
71030
  tags: [],
70948
71031
  };
@@ -71067,14 +71150,14 @@ class RFCErrorHandling extends _abap_rule_1.ABAPRule {
71067
71150
  tags: [_irule_1.RuleTag.SingleFile],
71068
71151
  shortDescription: `Checks that exceptions 'system_failure' and 'communication_failure' are handled in RFC calls`,
71069
71152
  extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenrfc_exception.htm`,
71070
- badExample: `CALL FUNCTION 'ZRFC'
71153
+ badExample: `CALL FUNCTION 'ZRFC'
71071
71154
  DESTINATION lv_rfc.`,
71072
- goodExample: `CALL FUNCTION 'ZRFC'
71073
- DESTINATION lv_rfc
71074
- EXCEPTIONS
71075
- system_failure = 1 MESSAGE msg
71076
- communication_failure = 2 MESSAGE msg
71077
- resource_failure = 3
71155
+ goodExample: `CALL FUNCTION 'ZRFC'
71156
+ DESTINATION lv_rfc
71157
+ EXCEPTIONS
71158
+ system_failure = 1 MESSAGE msg
71159
+ communication_failure = 2 MESSAGE msg
71160
+ resource_failure = 3
71078
71161
  OTHERS = 4.`,
71079
71162
  };
71080
71163
  }
@@ -71158,11 +71241,11 @@ class SelectAddOrderBy {
71158
71241
  key: "select_add_order_by",
71159
71242
  title: "SELECT add ORDER BY",
71160
71243
  shortDescription: `SELECTs add ORDER BY clause`,
71161
- extendedInformation: `
71162
- This will make sure that the SELECT statement returns results in the same sequence on different databases
71163
-
71164
- add ORDER BY PRIMARY KEY if in doubt
71165
-
71244
+ extendedInformation: `
71245
+ This will make sure that the SELECT statement returns results in the same sequence on different databases
71246
+
71247
+ add ORDER BY PRIMARY KEY if in doubt
71248
+
71166
71249
  If the target is a sorted/hashed table, no issue is reported`,
71167
71250
  tags: [_irule_1.RuleTag.SingleFile],
71168
71251
  badExample: `SELECT * FROM db INTO TABLE @DATA(tab).`,
@@ -71293,14 +71376,14 @@ class SelectPerformance {
71293
71376
  key: "select_performance",
71294
71377
  title: "SELECT performance",
71295
71378
  shortDescription: `Various checks regarding SELECT performance.`,
71296
- extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
71297
-
71379
+ extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
71380
+
71298
71381
  SELECT *: not reported if using INTO/APPENDING CORRESPONDING FIELDS OF`,
71299
71382
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Performance],
71300
- badExample: `SELECT field1, field2 FROM table
71301
- INTO @DATA(structure) UP TO 1 ROWS ORDER BY field3 DESCENDING.
71383
+ badExample: `SELECT field1, field2 FROM table
71384
+ INTO @DATA(structure) UP TO 1 ROWS ORDER BY field3 DESCENDING.
71302
71385
  ENDSELECT.`,
71303
- goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
71386
+ goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
71304
71387
  INTO TABLE @DATA(table) ORDER BY field3 DESCENDING`,
71305
71388
  };
71306
71389
  }
@@ -71414,8 +71497,8 @@ class SelectSingleFullKey {
71414
71497
  key: "select_single_full_key",
71415
71498
  title: "Detect SELECT SINGLE which are possibily not unique",
71416
71499
  shortDescription: `Detect SELECT SINGLE which are possibily not unique`,
71417
- extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
71418
-
71500
+ extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
71501
+
71419
71502
  If the statement contains a JOIN it is not checked`,
71420
71503
  pseudoComment: "EC CI_NOORDER",
71421
71504
  tags: [_irule_1.RuleTag.Quickfix],
@@ -71843,8 +71926,8 @@ class SICFConsistency {
71843
71926
  key: "sicf_consistency",
71844
71927
  title: "SICF consistency",
71845
71928
  shortDescription: `Checks the validity of ICF services`,
71846
- extendedInformation: `* Class defined in handler must exist
71847
- * Class must not have any syntax errors
71929
+ extendedInformation: `* Class defined in handler must exist
71930
+ * Class must not have any syntax errors
71848
71931
  * Class must implement interface IF_HTTP_EXTENSION`,
71849
71932
  };
71850
71933
  }
@@ -71956,23 +72039,23 @@ class SlowParameterPassing {
71956
72039
  shortDescription: `Detects slow pass by value passing for methods where parameter is not changed`,
71957
72040
  extendedInformation: `Method parameters defined in interfaces is not checked`,
71958
72041
  tags: [_irule_1.RuleTag.Performance],
71959
- badExample: `CLASS lcl DEFINITION.
71960
- PUBLIC SECTION.
71961
- METHODS bar IMPORTING VALUE(sdf) TYPE string.
71962
- ENDCLASS.
71963
- CLASS lcl IMPLEMENTATION.
71964
- METHOD bar.
71965
- WRITE sdf.
71966
- ENDMETHOD.
72042
+ badExample: `CLASS lcl DEFINITION.
72043
+ PUBLIC SECTION.
72044
+ METHODS bar IMPORTING VALUE(sdf) TYPE string.
72045
+ ENDCLASS.
72046
+ CLASS lcl IMPLEMENTATION.
72047
+ METHOD bar.
72048
+ WRITE sdf.
72049
+ ENDMETHOD.
71967
72050
  ENDCLASS.`,
71968
- goodExample: `CLASS lcl DEFINITION.
71969
- PUBLIC SECTION.
71970
- METHODS bar IMPORTING sdf TYPE string.
71971
- ENDCLASS.
71972
- CLASS lcl IMPLEMENTATION.
71973
- METHOD bar.
71974
- WRITE sdf.
71975
- ENDMETHOD.
72051
+ goodExample: `CLASS lcl DEFINITION.
72052
+ PUBLIC SECTION.
72053
+ METHODS bar IMPORTING sdf TYPE string.
72054
+ ENDCLASS.
72055
+ CLASS lcl IMPLEMENTATION.
72056
+ METHOD bar.
72057
+ WRITE sdf.
72058
+ ENDMETHOD.
71976
72059
  ENDCLASS.`,
71977
72060
  };
71978
72061
  }
@@ -72243,8 +72326,8 @@ class SpaceBeforeDot extends _abap_rule_1.ABAPRule {
72243
72326
  key: "space_before_dot",
72244
72327
  title: "Space before dot",
72245
72328
  shortDescription: `Checks for extra spaces before dots at the ends of statements`,
72246
- extendedInformation: `
72247
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
72329
+ extendedInformation: `
72330
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
72248
72331
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#condense-your-code`,
72249
72332
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
72250
72333
  badExample: `WRITE bar .`,
@@ -72430,12 +72513,12 @@ class SQLValueConversion {
72430
72513
  key: "sql_value_conversion",
72431
72514
  title: "Implicit SQL Value Conversion",
72432
72515
  shortDescription: `Ensure types match when selecting from database`,
72433
- extendedInformation: `
72434
- * Integer to CHAR conversion
72435
- * Integer to NUMC conversion
72436
- * NUMC to Integer conversion
72437
- * CHAR to Integer conversion
72438
- * Source field longer than database field, CHAR -> CHAR
72516
+ extendedInformation: `
72517
+ * Integer to CHAR conversion
72518
+ * Integer to NUMC conversion
72519
+ * NUMC to Integer conversion
72520
+ * CHAR to Integer conversion
72521
+ * Source field longer than database field, CHAR -> CHAR
72439
72522
  * Source field longer than database field, NUMC -> NUMC`,
72440
72523
  tags: [],
72441
72524
  };
@@ -72507,7 +72590,7 @@ class StartAtTab extends _abap_rule_1.ABAPRule {
72507
72590
  key: "start_at_tab",
72508
72591
  title: "Start at tab",
72509
72592
  shortDescription: `Checks that statements start at tabstops.`,
72510
- extendedInformation: `Reports max 100 issues per file
72593
+ extendedInformation: `Reports max 100 issues per file
72511
72594
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
72512
72595
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
72513
72596
  badExample: ` WRITE a.`,
@@ -72684,12 +72767,12 @@ class StrictSQL extends _abap_rule_1.ABAPRule {
72684
72767
  key: "strict_sql",
72685
72768
  title: "Strict SQL",
72686
72769
  shortDescription: `Strict SQL`,
72687
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
72688
-
72689
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
72690
-
72691
- Also see separate rule sql_escape_host_variables
72692
-
72770
+ extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
72771
+
72772
+ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
72773
+
72774
+ Also see separate rule sql_escape_host_variables
72775
+
72693
72776
  Activates from v750 and up`,
72694
72777
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix],
72695
72778
  badExample: `SELECT * FROM ztabl INTO TABLE @rt_content WHERE type = @iv_type ORDER BY PRIMARY KEY.`,
@@ -72943,11 +73026,11 @@ class SyModification extends _abap_rule_1.ABAPRule {
72943
73026
  key: "sy_modification",
72944
73027
  title: "Modification of SY fields",
72945
73028
  shortDescription: `Finds modification of sy fields`,
72946
- extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
72947
-
73029
+ extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
73030
+
72948
73031
  Changes to SY-TVAR* fields are not reported`,
72949
73032
  tags: [_irule_1.RuleTag.SingleFile],
72950
- badExample: `sy-uname = 2.
73033
+ badExample: `sy-uname = 2.
72951
73034
  sy = sy.`,
72952
73035
  };
72953
73036
  }
@@ -73009,8 +73092,8 @@ class TABLEnhancementCategory {
73009
73092
  key: "tabl_enhancement_category",
73010
73093
  title: "TABL enhancement category must be set",
73011
73094
  shortDescription: `Checks that tables do not have the enhancement category 'not classified'.`,
73012
- extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
73013
-
73095
+ extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
73096
+
73014
73097
  You may use standard report RS_DDIC_CLASSIFICATION_FINAL for adjustment.`,
73015
73098
  tags: [],
73016
73099
  };
@@ -73075,8 +73158,8 @@ class TablesDeclaredLocally extends _abap_rule_1.ABAPRule {
73075
73158
  shortDescription: `TABLES are always global, so declare them globally`,
73076
73159
  extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abaptables.htm`,
73077
73160
  tags: [_irule_1.RuleTag.SingleFile],
73078
- badExample: `FORM foo.
73079
- TABLES t100.
73161
+ badExample: `FORM foo.
73162
+ TABLES t100.
73080
73163
  ENDFORM.`,
73081
73164
  goodExample: `TABLES t000.`,
73082
73165
  };
@@ -73204,9 +73287,9 @@ class TypeFormParameters extends _abap_rule_1.ABAPRule {
73204
73287
  title: "Type FORM parameters",
73205
73288
  shortDescription: `Checks for untyped FORM parameters`,
73206
73289
  tags: [_irule_1.RuleTag.SingleFile],
73207
- badExample: `FORM foo USING bar.
73290
+ badExample: `FORM foo USING bar.
73208
73291
  ENDFORM.`,
73209
- goodExample: `FORM foo USING bar TYPE string.
73292
+ goodExample: `FORM foo USING bar TYPE string.
73210
73293
  ENDFORM.`,
73211
73294
  };
73212
73295
  }
@@ -73879,38 +73962,38 @@ class UnnecessaryPragma extends _abap_rule_1.ABAPRule {
73879
73962
  key: "unnecessary_pragma",
73880
73963
  title: "Unnecessary Pragma",
73881
73964
  shortDescription: `Finds pragmas which can be removed`,
73882
- extendedInformation: `* NO_HANDLER with handler
73883
-
73884
- * NEEDED without definition
73885
-
73886
- * NO_TEXT without texts
73887
-
73888
- * SUBRC_OK where sy-subrc is checked
73889
-
73965
+ extendedInformation: `* NO_HANDLER with handler
73966
+
73967
+ * NEEDED without definition
73968
+
73969
+ * NO_TEXT without texts
73970
+
73971
+ * SUBRC_OK where sy-subrc is checked
73972
+
73890
73973
  NO_HANDLER inside macros are not checked`,
73891
73974
  tags: [_irule_1.RuleTag.SingleFile],
73892
- badExample: `TRY.
73893
- ...
73894
- CATCH zcx_abapgit_exception ##NO_HANDLER.
73895
- RETURN. " it has a handler
73896
- ENDTRY.
73897
- MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
73898
- SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
73899
- IF sy-subrc <> 0.
73975
+ badExample: `TRY.
73976
+ ...
73977
+ CATCH zcx_abapgit_exception ##NO_HANDLER.
73978
+ RETURN. " it has a handler
73979
+ ENDTRY.
73980
+ MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
73981
+ SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
73982
+ IF sy-subrc <> 0.
73900
73983
  ENDIF.`,
73901
- goodExample: `TRY.
73902
- ...
73903
- CATCH zcx_abapgit_exception.
73904
- RETURN.
73905
- ENDTRY.
73906
- MESSAGE w125(zbar) WITH c_foo INTO message.
73907
- SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
73908
- IF sy-subrc <> 0.
73909
- ENDIF.
73910
-
73911
- DATA: BEGIN OF blah ##NEEDED,
73912
- test1 TYPE string,
73913
- test2 TYPE string,
73984
+ goodExample: `TRY.
73985
+ ...
73986
+ CATCH zcx_abapgit_exception.
73987
+ RETURN.
73988
+ ENDTRY.
73989
+ MESSAGE w125(zbar) WITH c_foo INTO message.
73990
+ SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
73991
+ IF sy-subrc <> 0.
73992
+ ENDIF.
73993
+
73994
+ DATA: BEGIN OF blah ##NEEDED,
73995
+ test1 TYPE string,
73996
+ test2 TYPE string,
73914
73997
  END OF blah.`,
73915
73998
  };
73916
73999
  }
@@ -74077,18 +74160,18 @@ class UnnecessaryReturn extends _abap_rule_1.ABAPRule {
74077
74160
  shortDescription: `Finds unnecessary RETURN statements`,
74078
74161
  extendedInformation: `Finds unnecessary RETURN statements`,
74079
74162
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
74080
- badExample: `FORM hello1.
74081
- WRITE 'world'.
74082
- RETURN.
74083
- ENDFORM.
74084
-
74085
- FORM foo.
74086
- IF 1 = 2.
74087
- RETURN.
74088
- ENDIF.
74163
+ badExample: `FORM hello1.
74164
+ WRITE 'world'.
74165
+ RETURN.
74166
+ ENDFORM.
74167
+
74168
+ FORM foo.
74169
+ IF 1 = 2.
74170
+ RETURN.
74171
+ ENDIF.
74089
74172
  ENDFORM.`,
74090
- goodExample: `FORM hello2.
74091
- WRITE 'world'.
74173
+ goodExample: `FORM hello2.
74174
+ WRITE 'world'.
74092
74175
  ENDFORM.`,
74093
74176
  };
74094
74177
  }
@@ -74439,13 +74522,13 @@ class UnusedMacros {
74439
74522
  title: "Unused macros",
74440
74523
  shortDescription: `Checks for unused macro definitions definitions`,
74441
74524
  tags: [_irule_1.RuleTag.Quickfix],
74442
- badExample: `DEFINE foobar1.
74443
- WRITE 'hello'.
74525
+ badExample: `DEFINE foobar1.
74526
+ WRITE 'hello'.
74444
74527
  END-OF-DEFINITION.`,
74445
- goodExample: `DEFINE foobar2.
74446
- WRITE 'hello'.
74447
- END-OF-DEFINITION.
74448
-
74528
+ goodExample: `DEFINE foobar2.
74529
+ WRITE 'hello'.
74530
+ END-OF-DEFINITION.
74531
+
74449
74532
  foobar2.`,
74450
74533
  };
74451
74534
  }
@@ -74557,18 +74640,18 @@ class UnusedMethods {
74557
74640
  key: "unused_methods",
74558
74641
  title: "Unused methods",
74559
74642
  shortDescription: `Checks for unused methods`,
74560
- extendedInformation: `Checks private and protected methods.
74561
-
74562
- Unused methods are not reported if the object contains parser or syntax errors.
74563
- Quick fixes only appears for private methods or projected methods where the class doesnt have any subclasses.
74564
-
74565
- Skips:
74566
- * methods FOR TESTING
74567
- * methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
74568
- * class_constructor + constructor methods
74569
- * event handlers
74570
- * methods that are redefined
74571
- * INCLUDEs
74643
+ extendedInformation: `Checks private and protected methods.
74644
+
74645
+ Unused methods are not reported if the object contains parser or syntax errors.
74646
+ Quick fixes only appears for private methods or projected methods where the class doesnt have any subclasses.
74647
+
74648
+ Skips:
74649
+ * methods FOR TESTING
74650
+ * methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
74651
+ * class_constructor + constructor methods
74652
+ * event handlers
74653
+ * methods that are redefined
74654
+ * INCLUDEs
74572
74655
  `,
74573
74656
  tags: [_irule_1.RuleTag.Quickfix],
74574
74657
  pragma: "##CALLED",
@@ -75044,23 +75127,23 @@ class UnusedVariables {
75044
75127
  key: "unused_variables",
75045
75128
  title: "Unused variables",
75046
75129
  shortDescription: `Checks for unused variables and constants`,
75047
- extendedInformation: `Skips event parameters.
75048
-
75049
- Note that this currently does not work if the source code uses macros.
75050
-
75051
- Unused variables are not reported if the object contains parser or syntax errors.
75052
-
75130
+ extendedInformation: `Skips event parameters.
75131
+
75132
+ Note that this currently does not work if the source code uses macros.
75133
+
75134
+ Unused variables are not reported if the object contains parser or syntax errors.
75135
+
75053
75136
  Errors found in INCLUDES are reported for the main program.`,
75054
75137
  tags: [_irule_1.RuleTag.Quickfix],
75055
75138
  pragma: "##NEEDED",
75056
75139
  pseudoComment: "EC NEEDED",
75057
- badExample: `DATA: BEGIN OF blah1,
75058
- test TYPE string,
75059
- test2 TYPE string,
75140
+ badExample: `DATA: BEGIN OF blah1,
75141
+ test TYPE string,
75142
+ test2 TYPE string,
75060
75143
  END OF blah1.`,
75061
- goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
75062
- test TYPE string,
75063
- test2 TYPE string,
75144
+ goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
75145
+ test TYPE string,
75146
+ test2 TYPE string,
75064
75147
  END OF blah2.`,
75065
75148
  };
75066
75149
  }
@@ -75279,15 +75362,15 @@ class UseBoolExpression extends _abap_rule_1.ABAPRule {
75279
75362
  shortDescription: `Use boolean expression, xsdbool from 740sp08 and up, boolc from 702 and up`,
75280
75363
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
75281
75364
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
75282
- badExample: `IF line IS INITIAL.
75283
- has_entries = abap_false.
75284
- ELSE.
75285
- has_entries = abap_true.
75286
- ENDIF.
75287
-
75365
+ badExample: `IF line IS INITIAL.
75366
+ has_entries = abap_false.
75367
+ ELSE.
75368
+ has_entries = abap_true.
75369
+ ENDIF.
75370
+
75288
75371
  DATA(fsdf) = COND #( WHEN foo <> bar THEN abap_true ELSE abap_false ).`,
75289
- goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
75290
-
75372
+ goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
75373
+
75291
75374
  DATA(fsdf) = xsdbool( foo <> bar ).`,
75292
75375
  };
75293
75376
  }
@@ -75405,15 +75488,15 @@ class UseClassBasedExceptions extends _abap_rule_1.ABAPRule {
75405
75488
  shortDescription: `Use class based exceptions, checks interface and class definitions`,
75406
75489
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-class-based-exceptions`,
75407
75490
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
75408
- badExample: `INTERFACE lif.
75409
- METHODS load_data
75410
- EXCEPTIONS
75411
- invalid_parameter.
75491
+ badExample: `INTERFACE lif.
75492
+ METHODS load_data
75493
+ EXCEPTIONS
75494
+ invalid_parameter.
75412
75495
  ENDINTERFACE.`,
75413
- goodExample: `INTERFACE lif.
75414
- METHODS load_data
75415
- RAISING
75416
- cx_something.
75496
+ goodExample: `INTERFACE lif.
75497
+ METHODS load_data
75498
+ RAISING
75499
+ cx_something.
75417
75500
  ENDINTERFACE.`,
75418
75501
  };
75419
75502
  }
@@ -75473,15 +75556,15 @@ class UseLineExists extends _abap_rule_1.ABAPRule {
75473
75556
  key: "use_line_exists",
75474
75557
  title: "Use line_exists",
75475
75558
  shortDescription: `Use line_exists, from 740sp02 and up`,
75476
- extendedInformation: `
75477
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
75478
-
75559
+ extendedInformation: `
75560
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
75561
+
75479
75562
  Not reported if the READ TABLE statement contains BINARY SEARCH.`,
75480
75563
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
75481
- badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
75482
- IF sy-subrc = 0.
75564
+ badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
75565
+ IF sy-subrc = 0.
75483
75566
  ENDIF.`,
75484
- goodExample: `IF line_exists( my_table[ key = 'A' ] ).
75567
+ goodExample: `IF line_exists( my_table[ key = 'A' ] ).
75485
75568
  ENDIF.`,
75486
75569
  };
75487
75570
  }
@@ -75591,10 +75674,10 @@ class UseNew extends _abap_rule_1.ABAPRule {
75591
75674
  key: "use_new",
75592
75675
  title: "Use NEW",
75593
75676
  shortDescription: `Checks for deprecated CREATE OBJECT statements.`,
75594
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
75595
-
75596
- If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
75597
-
75677
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
75678
+
75679
+ If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
75680
+
75598
75681
  Applicable from v740sp02 and up`,
75599
75682
  badExample: `CREATE OBJECT ref.`,
75600
75683
  goodExample: `ref = NEW #( ).`,
@@ -75692,13 +75775,13 @@ class WhenOthersLast extends _abap_rule_1.ABAPRule {
75692
75775
  title: "WHEN OTHERS last",
75693
75776
  shortDescription: `Checks that WHEN OTHERS is placed the last within a CASE statement.`,
75694
75777
  tags: [_irule_1.RuleTag.SingleFile],
75695
- badExample: `CASE bar.
75696
- WHEN OTHERS.
75697
- WHEN 2.
75778
+ badExample: `CASE bar.
75779
+ WHEN OTHERS.
75780
+ WHEN 2.
75698
75781
  ENDCASE.`,
75699
- goodExample: `CASE bar.
75700
- WHEN 2.
75701
- WHEN OTHERS.
75782
+ goodExample: `CASE bar.
75783
+ WHEN 2.
75784
+ WHEN OTHERS.
75702
75785
  ENDCASE.`,
75703
75786
  };
75704
75787
  }