@abaplint/cli 2.113.71 → 2.113.73

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 +908 -861
  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);
@@ -4340,7 +4346,7 @@ class Color extends combi_1.Expression {
4340
4346
  const texts = (0, combi_1.altPrio)("COL_BACKGROUND", "COL_HEADING", "COL_NORMAL", "COL_TOTAL", "COL_KEY", "COL_POSITIVE", "COL_NEGATIVE", "COL_GROUP");
4341
4347
  const value = (0, combi_1.alt)(eq, (0, combi_1.altPrio)("ON", "OFF", (0, combi_1.altPrio)(integers, texts)));
4342
4348
  const toggle = (0, combi_1.altPrio)("ON", "OFF");
4343
- return (0, combi_1.seq)("COLOR", value, (0, combi_1.opt)(toggle));
4349
+ return (0, combi_1.seq)("COLOR", (0, combi_1.opt)((0, combi_1.seq)(value, (0, combi_1.opt)(toggle))));
4344
4350
  }
4345
4351
  }
4346
4352
  exports.Color = Color;
@@ -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;
@@ -5304,7 +5312,7 @@ class FieldSymbol extends combi_1.Expression {
5304
5312
  getRunnable() {
5305
5313
  // todo, this only allows one dash in the name
5306
5314
  const dashes = (0, combi_1.seq)((0, combi_1.regex)(/^<[\w\/%$\*]+$/), (0, combi_1.tok)(tokens_1.Dash), (0, combi_1.regex)(/^[\w\/%$\*]+>$/));
5307
- return (0, combi_1.altPrio)((0, combi_1.regex)(/^<[\w\/%$\*]+>$/), dashes);
5315
+ return (0, combi_1.altPrio)((0, combi_1.regex)(/^<[\w\/%$\*\?]+>$/), dashes);
5308
5316
  }
5309
5317
  }
5310
5318
  exports.FieldSymbol = FieldSymbol;
@@ -8570,7 +8578,7 @@ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src
8570
8578
  class SQLHints extends combi_1.Expression {
8571
8579
  getRunnable() {
8572
8580
  const type = (0, combi_1.altPrio)("ORACLE", "ADABAS", "AS400", "DB2", "HDB", "MSSQLNT", "SYBASE", "DB6");
8573
- const ret = (0, combi_1.seq)("%_HINTS", (0, combi_1.plus)((0, combi_1.seq)(type, _1.Constant)));
8581
+ const ret = (0, combi_1.seq)("%_HINTS", (0, combi_1.plus)((0, combi_1.seq)(type, (0, combi_1.alt)(_1.Constant, _1.FieldSub))));
8574
8582
  return ret;
8575
8583
  }
8576
8584
  }
@@ -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);
@@ -13649,7 +13657,7 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
13649
13657
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
13650
13658
  class GetProperty {
13651
13659
  getMatcher() {
13652
- 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));
13653
13661
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
13654
13662
  }
13655
13663
  }
@@ -14545,7 +14553,7 @@ class Leave {
14545
14553
  getMatcher() {
14546
14554
  const retu = (0, combi_1.seq)(expressions_1.AndReturn, "TO SCREEN", expressions_1.Source);
14547
14555
  const transaction = (0, combi_1.seq)("TO TRANSACTION", expressions_1.Source, (0, combi_1.opt)("AND SKIP FIRST SCREEN"));
14548
- const ret = (0, combi_1.seq)("LEAVE", (0, combi_1.opt)((0, combi_1.alt)("TO CURRENT TRANSACTION", (0, combi_1.seq)((0, combi_1.opt)("TO"), "LIST-PROCESSING", (0, combi_1.opt)(retu)), "LIST-PROCESSING", "SCREEN", transaction, "PROGRAM", (0, combi_1.seq)("TO SCREEN", expressions_1.Source))));
14556
+ const ret = (0, combi_1.seq)("LEAVE", (0, combi_1.opt)((0, combi_1.alt)((0, combi_1.seq)("TO CURRENT TRANSACTION", (0, combi_1.opt)("AND SKIP FIRST SCREEN")), (0, combi_1.seq)((0, combi_1.opt)("TO"), "LIST-PROCESSING", (0, combi_1.opt)(retu)), "LIST-PROCESSING", "SCREEN", transaction, "PROGRAM", (0, combi_1.seq)("TO SCREEN", expressions_1.Source))));
14549
14557
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
14550
14558
  }
14551
14559
  }
@@ -14852,15 +14860,17 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
14852
14860
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
14853
14861
  class ModifyEntities {
14854
14862
  getMatcher() {
14855
- const fieldsWith = (0, combi_1.seq)("FIELDS (", (0, combi_1.plus)(expressions_1.SimpleName), ") WITH", expressions_1.Source);
14856
- 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)));
14857
14867
  const failed = (0, combi_1.seq)("FAILED", expressions_1.Target);
14858
14868
  const result = (0, combi_1.seq)("RESULT", expressions_1.Target);
14859
14869
  const mapped = (0, combi_1.seq)("MAPPED", expressions_1.Target);
14860
14870
  const reported = (0, combi_1.seq)("REPORTED", expressions_1.Target);
14861
14871
  const from = (0, combi_1.seq)("FROM", expressions_1.Source);
14862
14872
  const execute = (0, combi_1.seq)("EXECUTE", expressions_1.NamespaceSimpleName);
14863
- 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)));
14864
14874
  const entity = (0, combi_1.seq)("ENTITY", expressions_1.NamespaceSimpleName, execute, from, mapped, failed, reported);
14865
14875
  return (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("MODIFY", (0, combi_1.alt)(entities, entity)));
14866
14876
  }
@@ -14928,8 +14938,9 @@ class ModifyLine {
14928
14938
  const index = (0, combi_1.seq)("INDEX", expressions_1.Source);
14929
14939
  const page = (0, combi_1.seq)("OF PAGE", expressions_1.Source);
14930
14940
  const ocp = (0, combi_1.str)("OF CURRENT PAGE");
14931
- const lineFormat = (0, combi_1.seq)("LINE FORMAT", (0, combi_1.per)("INPUT OFF", "INVERSE", "RESET", "INTENSIFIED", expressions_1.Color));
14932
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));
14933
14944
  const options = (0, combi_1.per)(index, value, format, page, lineFormat, lineValue, ocp, intensified, expressions_1.Color);
14934
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));
14935
14946
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
@@ -15710,7 +15721,8 @@ class ReadEntities {
15710
15721
  const from = (0, combi_1.seq)("FROM", expressions_1.Source);
15711
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);
15712
15723
  const all = (0, combi_1.seq)("ALL FIELDS WITH", expressions_1.Source);
15713
- 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)));
15714
15726
  return (0, combi_1.ver)(version_1.Version.v754, s);
15715
15727
  }
15716
15728
  }
@@ -16196,7 +16208,7 @@ class ScrollList {
16196
16208
  const line = (0, combi_1.seq)("LINE", expressions_1.Source);
16197
16209
  const column = (0, combi_1.seq)("TO COLUMN", expressions_1.Source);
16198
16210
  const to = (0, combi_1.seq)("TO", (0, combi_1.alt)("FIRST PAGE", "LAST PAGE", (0, combi_1.seq)("PAGE", expressions_1.Source)));
16199
- const ret = (0, combi_1.seq)("SCROLL LIST", (0, combi_1.per)(index, (0, combi_1.alt)(to, "BACKWARD", "FORWARD"), (0, combi_1.alt)("LEFT", "RIGHT"), column, line));
16211
+ const ret = (0, combi_1.seq)("SCROLL LIST", (0, combi_1.per)(index, (0, combi_1.alt)(to, "BACKWARD", "FORWARD"), (0, combi_1.seq)((0, combi_1.alt)("LEFT", "RIGHT"), (0, combi_1.opt)((0, combi_1.seq)("BY", expressions_1.Source, "PLACES"))), column, line));
16200
16212
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
16201
16213
  }
16202
16214
  }
@@ -17356,7 +17368,7 @@ class SystemCall {
17356
17368
  getMatcher() {
17357
17369
  const anyy = (0, combi_1.regex)(/^.+$/);
17358
17370
  const objmgr = (0, combi_1.seq)("OBJMGR CLONE", source_1.Source, "TO", target_1.Target);
17359
- 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));
17360
17372
  const ret = (0, combi_1.seq)("SYSTEM-CALL", (0, combi_1.altPrio)(objmgr, did, (0, combi_1.plus)(anyy)));
17361
17373
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
17362
17374
  }
@@ -18038,7 +18050,7 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
18038
18050
  class While {
18039
18051
  getMatcher() {
18040
18052
  const vary = (0, combi_1.seq)("VARY", expressions_1.Target, "FROM", expressions_1.Source, "NEXT", expressions_1.Source);
18041
- return (0, combi_1.seq)("WHILE", expressions_1.Cond, (0, combi_1.opt)(vary));
18053
+ return (0, combi_1.seq)("WHILE", expressions_1.Cond, (0, combi_1.star)(vary));
18042
18054
  }
18043
18055
  }
18044
18056
  exports.While = While;
@@ -35437,13 +35449,13 @@ class FlowGraph {
35437
35449
  this.label = label;
35438
35450
  }
35439
35451
  toDigraph() {
35440
- return `digraph G {
35441
- labelloc="t";
35442
- label="${this.label}";
35443
- graph [fontname = "helvetica"];
35444
- node [fontname = "helvetica", shape="box"];
35445
- edge [fontname = "helvetica"];
35446
- ${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()}
35447
35459
  }`;
35448
35460
  }
35449
35461
  listSources(node) {
@@ -35777,6 +35789,7 @@ class StatementFlow {
35777
35789
  || type instanceof Structures.With
35778
35790
  || type instanceof Structures.Provide
35779
35791
  || type instanceof Structures.Select
35792
+ || type instanceof Structures.EnhancementSection
35780
35793
  || type instanceof Structures.LoopAtScreen
35781
35794
  || type instanceof Structures.Do) {
35782
35795
  const loopName = StatementFlow.buildName(n.getFirstStatement());
@@ -41755,6 +41768,7 @@ class DDIC {
41755
41768
  case "DEC": // 1 <= len <= 31
41756
41769
  case "D16F": // 1 <= len <= 31
41757
41770
  case "D16D":
41771
+ case "D34D":
41758
41772
  case "D34F": // 1 <= len <= 31
41759
41773
  case "DF16_DEC": // 1 <= len <= 31
41760
41774
  case "DF34_DEC": // 1 <= len <= 31
@@ -41777,6 +41791,7 @@ class DDIC {
41777
41791
  return new Types.CharacterType(5, extra);
41778
41792
  case "UNIT": // 2 <= len <= 3
41779
41793
  return new Types.CharacterType(3, extra);
41794
+ case "UTCL":
41780
41795
  case "UTCLONG":
41781
41796
  return new Types.CharacterType(27, extra);
41782
41797
  case "NUMC": // 1 <= len <= 255
@@ -41836,7 +41851,7 @@ class DDIC {
41836
41851
  case "VARC":
41837
41852
  return new Types.UnknownType(input.text + " is an obsolete data type", input.infoText);
41838
41853
  default:
41839
- return new Types.UnknownType(input.text + " unknown", input.infoText);
41854
+ return new Types.UnknownType(input.text + " unknown basic ddic type", input.infoText);
41840
41855
  }
41841
41856
  }
41842
41857
  }
@@ -43863,13 +43878,13 @@ class Help {
43863
43878
  /////////////////////////////////////////////////
43864
43879
  static dumpABAP(file, reg, textDocument, position) {
43865
43880
  let content = "";
43866
- content = `
43867
- <a href="#_tokens" rel="no-refresh">Tokens</a> |
43868
- <a href="#_statements" rel="no-refresh">Statements</a> |
43869
- <a href="#_structure" rel="no-refresh">Structure</a> |
43870
- <a href="#_files" rel="no-refresh">Files</a> |
43871
- <a href="#_info" rel="no-refresh">Info Dump</a>
43872
- <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>
43873
43888
  ` +
43874
43889
  "<tt>" + textDocument.uri + " (" +
43875
43890
  (position.line + 1) + ", " +
@@ -44024,9 +44039,9 @@ class Help {
44024
44039
  return ret + "</ul>";
44025
44040
  }
44026
44041
  static tokens(file) {
44027
- let inner = `<table><tr><td><b>String</b></td><td><b>Type</b></td>
44028
- <td><b>Row</b></td><td><b>Column</b></td>
44029
- <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>
44030
44045
  </tr>`;
44031
44046
  for (const token of file.getTokens()) {
44032
44047
  const tStart = token.getStart();
@@ -46403,6 +46418,37 @@ exports.CDSMetadataExtension = CDSMetadataExtension;
46403
46418
 
46404
46419
  /***/ }),
46405
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
+
46406
46452
  /***/ "./node_modules/@abaplint/core/build/src/objects/change_document.js":
46407
46453
  /*!**************************************************************************!*\
46408
46454
  !*** ./node_modules/@abaplint/core/build/src/objects/change_document.js ***!
@@ -48754,6 +48800,7 @@ __exportStar(__webpack_require__(/*! ./business_function_set_assignment */ "./no
48754
48800
  __exportStar(__webpack_require__(/*! ./business_object_model */ "./node_modules/@abaplint/core/build/src/objects/business_object_model.js"), exports);
48755
48801
  __exportStar(__webpack_require__(/*! ./business_object_type */ "./node_modules/@abaplint/core/build/src/objects/business_object_type.js"), exports);
48756
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);
48757
48804
  __exportStar(__webpack_require__(/*! ./change_document */ "./node_modules/@abaplint/core/build/src/objects/change_document.js"), exports);
48758
48805
  __exportStar(__webpack_require__(/*! ./chapter_of_book_structure */ "./node_modules/@abaplint/core/build/src/objects/chapter_of_book_structure.js"), exports);
48759
48806
  __exportStar(__webpack_require__(/*! ./checkpoint_group */ "./node_modules/@abaplint/core/build/src/objects/checkpoint_group.js"), exports);
@@ -53284,7 +53331,7 @@ class Registry {
53284
53331
  }
53285
53332
  static abaplintVersion() {
53286
53333
  // magic, see build script "version.sh"
53287
- return "2.113.71";
53334
+ return "2.113.73";
53288
53335
  }
53289
53336
  getDDICReferences() {
53290
53337
  return this.ddicReferences;
@@ -53603,10 +53650,10 @@ class SevenBitAscii {
53603
53650
  key: "7bit_ascii",
53604
53651
  title: "Check for 7bit ascii",
53605
53652
  shortDescription: `Only allow characters from the 7bit ASCII set.`,
53606
- extendedInformation: `https://docs.abapopenchecks.org/checks/05/
53607
-
53608
- https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
53609
-
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
+
53610
53657
  Checkes files with extensions ".abap" and ".asddls"`,
53611
53658
  tags: [_irule_1.RuleTag.SingleFile],
53612
53659
  badExample: `WRITE '뽑'.`,
@@ -53812,10 +53859,10 @@ class Abapdoc extends _abap_rule_1.ABAPRule {
53812
53859
  key: "abapdoc",
53813
53860
  title: "Check abapdoc",
53814
53861
  shortDescription: `Various checks regarding abapdoc.`,
53815
- extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
53816
-
53817
- Plus class and interface definitions.
53818
-
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
+
53819
53866
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#abap-doc-only-for-public-apis`,
53820
53867
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
53821
53868
  };
@@ -53952,27 +53999,27 @@ class AddTestAttributes extends _abap_rule_1.ABAPRule {
53952
53999
  title: "Add test attributes for tests classes with test methods",
53953
54000
  shortDescription: `Add test attributes DURATION and RISK LEVEL for tests classes with test methods`,
53954
54001
  tags: [_irule_1.RuleTag.SingleFile],
53955
- badExample: `CLASS ltcl_test1 DEFINITION FINAL FOR TESTING.
53956
- PUBLIC SECTION.
53957
- PROTECTED SECTION.
53958
- PRIVATE SECTION.
53959
- METHODS test FOR TESTING RAISING cx_static_check.
53960
- ENDCLASS.
53961
-
53962
- CLASS ltcl_test1 IMPLEMENTATION.
53963
- METHOD test.
53964
- 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.
53965
54012
  ENDCLASS.`,
53966
- goodExample: `CLASS ltcl_test2 DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
53967
- PUBLIC SECTION.
53968
- PROTECTED SECTION.
53969
- PRIVATE SECTION.
53970
- METHODS test FOR TESTING RAISING cx_static_check.
53971
- ENDCLASS.
53972
-
53973
- CLASS ltcl_test2 IMPLEMENTATION.
53974
- METHOD test.
53975
- 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.
53976
54023
  ENDCLASS.`,
53977
54024
  };
53978
54025
  }
@@ -54058,49 +54105,49 @@ class AlignParameters extends _abap_rule_1.ABAPRule {
54058
54105
  key: "align_parameters",
54059
54106
  title: "Align Parameters",
54060
54107
  shortDescription: `Checks for vertially aligned parameters`,
54061
- extendedInformation: `Checks:
54062
- * function module calls
54063
- * method calls
54064
- * VALUE constructors
54065
- * NEW constructors
54066
- * RAISE EXCEPTION statements
54067
- * CREATE OBJECT statements
54068
- * RAISE EVENT statements
54069
-
54070
- https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
54071
-
54072
- Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
54073
-
54074
- 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
54075
54122
  https://rules.abaplint.org/max_one_method_parameter_per_line/ for splitting parameters to lines`,
54076
54123
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
54077
- badExample: `CALL FUNCTION 'FOOBAR'
54078
- EXPORTING
54079
- foo = 2
54080
- parameter = 3.
54081
-
54082
- foobar( moo = 1
54083
- param = 1 ).
54084
-
54085
- foo = VALUE #(
54086
- 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
54087
54134
  moo = 2 ).`,
54088
- goodExample: `CALL FUNCTION 'FOOBAR'
54089
- EXPORTING
54090
- foo = 2
54091
- parameter = 3.
54092
-
54093
- foobar( moo = 1
54094
- param = 1 ).
54095
-
54096
- foo = VALUE #(
54097
- foo = bar
54098
- moo = 2 ).
54099
-
54100
- DATA(sdf) = VALUE type(
54101
- common_val = 2
54102
- another_common = 5
54103
- ( 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
54104
54151
  value_foo = 5 ) ).`,
54105
54152
  };
54106
54153
  }
@@ -54534,37 +54581,37 @@ class AlignTypeExpressions extends _abap_rule_1.ABAPRule {
54534
54581
  key: "align_type_expressions",
54535
54582
  title: "Align TYPE expressions",
54536
54583
  shortDescription: `Align TYPE expressions in statements`,
54537
- extendedInformation: `
54538
- Currently works for METHODS + BEGIN OF
54539
-
54540
- If BEGIN OF has an INCLUDE TYPE its ignored
54541
-
54542
- 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:
54543
54590
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-align-type-clauses`,
54544
54591
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix],
54545
- badExample: `
54546
- TYPES: BEGIN OF foo,
54547
- bar TYPE i,
54548
- foobar TYPE i,
54549
- END OF foo.
54550
-
54551
- INTERFACE lif.
54552
- METHODS bar
54553
- IMPORTING
54554
- foo TYPE i
54555
- 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.
54556
54603
  ENDINTERFACE.`,
54557
- goodExample: `
54558
- TYPES: BEGIN OF foo,
54559
- bar TYPE i,
54560
- foobar TYPE i,
54561
- END OF foo.
54562
-
54563
- INTERFACE lif.
54564
- METHODS bar
54565
- IMPORTING
54566
- foo TYPE i
54567
- 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.
54568
54615
  ENDINTERFACE.`,
54569
54616
  };
54570
54617
  }
@@ -54843,16 +54890,16 @@ class AmbiguousStatement extends _abap_rule_1.ABAPRule {
54843
54890
  return {
54844
54891
  key: "ambiguous_statement",
54845
54892
  title: "Check for ambigious statements",
54846
- shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
54847
- Add "TABLE" keyword or "@" for escaping SQL variables
54848
-
54893
+ shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
54894
+ Add "TABLE" keyword or "@" for escaping SQL variables
54895
+
54849
54896
  Only works if the target version is 740sp05 or above`,
54850
54897
  tags: [_irule_1.RuleTag.SingleFile],
54851
- badExample: `DELETE foo FROM bar.
54898
+ badExample: `DELETE foo FROM bar.
54852
54899
  MODIFY foo FROM bar.`,
54853
- goodExample: `DELETE foo FROM @bar.
54854
- DELETE TABLE itab FROM 2.
54855
- MODIFY zfoo FROM @wa.
54900
+ goodExample: `DELETE foo FROM @bar.
54901
+ DELETE TABLE itab FROM 2.
54902
+ MODIFY zfoo FROM @wa.
54856
54903
  MODIFY TABLE foo FROM bar.`,
54857
54904
  };
54858
54905
  }
@@ -54957,16 +55004,16 @@ class AvoidUse extends _abap_rule_1.ABAPRule {
54957
55004
  key: "avoid_use",
54958
55005
  title: "Avoid use of certain statements",
54959
55006
  shortDescription: `Detects usage of certain statements.`,
54960
- extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
54961
-
54962
- Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
54963
-
54964
- STATICS: use CLASS-DATA instead
54965
-
54966
- DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
54967
-
54968
- TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
54969
-
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
+
54970
55017
  BREAK points`,
54971
55018
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
54972
55019
  };
@@ -55098,11 +55145,11 @@ class BeginEndNames extends _abap_rule_1.ABAPRule {
55098
55145
  title: "Check BEGIN END names",
55099
55146
  shortDescription: `Check BEGIN OF and END OF names match, plus there must be statements between BEGIN and END`,
55100
55147
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
55101
- badExample: `DATA: BEGIN OF stru,
55102
- field TYPE i,
55148
+ badExample: `DATA: BEGIN OF stru,
55149
+ field TYPE i,
55103
55150
  END OF structure_not_the_same.`,
55104
- goodExample: `DATA: BEGIN OF stru,
55105
- field TYPE i,
55151
+ goodExample: `DATA: BEGIN OF stru,
55152
+ field TYPE i,
55106
55153
  END OF stru.`,
55107
55154
  };
55108
55155
  }
@@ -55199,20 +55246,20 @@ class BeginSingleInclude extends _abap_rule_1.ABAPRule {
55199
55246
  title: "BEGIN contains single INCLUDE",
55200
55247
  shortDescription: `Finds TYPE BEGIN with just one INCLUDE TYPE, and DATA with single INCLUDE STRUCTURE`,
55201
55248
  tags: [_irule_1.RuleTag.SingleFile],
55202
- badExample: `TYPES: BEGIN OF dummy1.
55203
- INCLUDE TYPE dselc.
55204
- TYPES: END OF dummy1.
55205
-
55206
- DATA BEGIN OF foo.
55207
- INCLUDE STRUCTURE syst.
55208
- DATA END OF foo.
55209
-
55210
- STATICS BEGIN OF bar.
55211
- 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.
55212
55259
  STATICS END OF bar.`,
55213
- goodExample: `DATA BEGIN OF foo.
55214
- DATA field TYPE i.
55215
- INCLUDE STRUCTURE dselc.
55260
+ goodExample: `DATA BEGIN OF foo.
55261
+ DATA field TYPE i.
55262
+ INCLUDE STRUCTURE dselc.
55216
55263
  DATA END OF foo.`,
55217
55264
  };
55218
55265
  }
@@ -55302,9 +55349,9 @@ class CallTransactionAuthorityCheck extends _abap_rule_1.ABAPRule {
55302
55349
  extendedInformation: `https://docs.abapopenchecks.org/checks/54/`,
55303
55350
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
55304
55351
  badExample: `CALL TRANSACTION 'FOO'.`,
55305
- goodExample: `TRY.
55306
- CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
55307
- CATCH cx_sy_authorization_error.
55352
+ goodExample: `TRY.
55353
+ CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
55354
+ CATCH cx_sy_authorization_error.
55308
55355
  ENDTRY.`,
55309
55356
  };
55310
55357
  }
@@ -55369,10 +55416,10 @@ class CDSCommentStyle {
55369
55416
  key: "cds_comment_style",
55370
55417
  title: "CDS Comment Style",
55371
55418
  shortDescription: `Check for obsolete comment style`,
55372
- extendedInformation: `Check for obsolete comment style
55373
-
55374
- Comments starting with "--" are considered obsolete
55375
-
55419
+ extendedInformation: `Check for obsolete comment style
55420
+
55421
+ Comments starting with "--" are considered obsolete
55422
+
55376
55423
  https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abencds_general_syntax_rules.htm`,
55377
55424
  tags: [_irule_1.RuleTag.SingleFile],
55378
55425
  badExample: "-- this is a comment",
@@ -55438,10 +55485,10 @@ class CDSLegacyView {
55438
55485
  key: "cds_legacy_view",
55439
55486
  title: "CDS Legacy View",
55440
55487
  shortDescription: `Identify CDS Legacy Views`,
55441
- extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
55442
-
55443
- https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
55444
-
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
+
55445
55492
  v755 and up`,
55446
55493
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Upport],
55447
55494
  };
@@ -55596,10 +55643,10 @@ class ChainMainlyDeclarations extends _abap_rule_1.ABAPRule {
55596
55643
  key: "chain_mainly_declarations",
55597
55644
  title: "Chain mainly declarations",
55598
55645
  shortDescription: `Chain mainly declarations, allows chaining for the configured statements, reports errors for other statements.`,
55599
- extendedInformation: `
55600
- https://docs.abapopenchecks.org/checks/23/
55601
-
55602
- 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
55603
55650
  `,
55604
55651
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
55605
55652
  badExample: `CALL METHOD: bar.`,
@@ -55775,17 +55822,17 @@ class ChangeIfToCase extends _abap_rule_1.ABAPRule {
55775
55822
  title: "Change IF to CASE",
55776
55823
  shortDescription: `Finds IF constructs that can be changed to CASE`,
55777
55824
  // eslint-disable-next-line max-len
55778
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
55779
-
55825
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
55826
+
55780
55827
  If the first comparison is a boolean compare, no issue is reported.`,
55781
55828
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
55782
- badExample: `IF l_fcat-fieldname EQ 'FOO'.
55783
- ELSEIF l_fcat-fieldname = 'BAR'
55784
- 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'.
55785
55832
  ENDIF.`,
55786
- goodExample: `CASE l_fcat-fieldname.
55787
- WHEN 'FOO'.
55788
- WHEN 'BAR' OR 'MOO'.
55833
+ goodExample: `CASE l_fcat-fieldname.
55834
+ WHEN 'FOO'.
55835
+ WHEN 'BAR' OR 'MOO'.
55789
55836
  ENDCASE.`,
55790
55837
  };
55791
55838
  }
@@ -55922,8 +55969,8 @@ class CheckAbstract extends _abap_rule_1.ABAPRule {
55922
55969
  return {
55923
55970
  key: "check_abstract",
55924
55971
  title: "Check abstract methods and classes",
55925
- shortDescription: `Checks abstract methods and classes:
55926
- - class defined as abstract and final,
55972
+ shortDescription: `Checks abstract methods and classes:
55973
+ - class defined as abstract and final,
55927
55974
  - non-abstract class contains abstract methods`,
55928
55975
  extendedInformation: `If a class defines only constants, use an interface instead`,
55929
55976
  tags: [_irule_1.RuleTag.SingleFile],
@@ -56004,11 +56051,11 @@ class CheckComments extends _abap_rule_1.ABAPRule {
56004
56051
  return {
56005
56052
  key: "check_comments",
56006
56053
  title: "Check Comments",
56007
- shortDescription: `
56054
+ shortDescription: `
56008
56055
  Various checks for comment usage.`,
56009
- extendedInformation: `
56010
- Detects end of line comments. Comments starting with "#EC" or "##" are ignored
56011
-
56056
+ extendedInformation: `
56057
+ Detects end of line comments. Comments starting with "#EC" or "##" are ignored
56058
+
56012
56059
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#put-comments-before-the-statement-they-relate-to`,
56013
56060
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
56014
56061
  badExample: `WRITE 2. " descriptive comment`,
@@ -56170,9 +56217,9 @@ class CheckInclude {
56170
56217
  key: "check_include",
56171
56218
  title: "Check INCLUDEs",
56172
56219
  shortDescription: `Checks INCLUDE statements`,
56173
- extendedInformation: `
56174
- * Reports unused includes
56175
- * Errors if the includes are not found
56220
+ extendedInformation: `
56221
+ * Reports unused includes
56222
+ * Errors if the includes are not found
56176
56223
  * Error if including a main program`,
56177
56224
  tags: [_irule_1.RuleTag.Syntax],
56178
56225
  };
@@ -56248,14 +56295,14 @@ class CheckSubrc extends _abap_rule_1.ABAPRule {
56248
56295
  key: "check_subrc",
56249
56296
  title: "Check sy-subrc",
56250
56297
  shortDescription: `Check sy-subrc`,
56251
- extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
56252
-
56253
- If sy-dbcnt is checked after database statements, it is considered okay.
56254
-
56255
- "SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
56256
-
56257
- If IS ASSIGNED is checked after assigning, it is considered okay.
56258
-
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
+
56259
56306
  FIND statement with MATCH COUNT is considered okay if subrc is not checked`,
56260
56307
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
56261
56308
  pseudoComment: "EC CI_SUBRC",
@@ -56825,17 +56872,17 @@ class ClassicExceptionsOverlap extends _abap_rule_1.ABAPRule {
56825
56872
  shortDescription: `Find overlapping classic exceptions`,
56826
56873
  extendedInformation: `When debugging its typically good to know exactly which exception is caught`,
56827
56874
  tags: [_irule_1.RuleTag.SingleFile],
56828
- badExample: `CALL FUNCTION 'SOMETHING'
56829
- EXCEPTIONS
56830
- system_failure = 1 MESSAGE lv_message
56831
- communication_failure = 1 MESSAGE lv_message
56832
- 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
56833
56880
  OTHERS = 1.`,
56834
- goodExample: `CALL FUNCTION 'SOMETHING'
56835
- EXCEPTIONS
56836
- system_failure = 1 MESSAGE lv_message
56837
- communication_failure = 2 MESSAGE lv_message
56838
- 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
56839
56886
  OTHERS = 4.`,
56840
56887
  };
56841
56888
  }
@@ -57093,7 +57140,7 @@ class CommentedCode extends _abap_rule_1.ABAPRule {
57093
57140
  key: "commented_code",
57094
57141
  title: "Find commented code",
57095
57142
  shortDescription: `Detects usage of commented out code.`,
57096
- 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
57097
57144
  https://docs.abapopenchecks.org/checks/14/`,
57098
57145
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
57099
57146
  badExample: `* WRITE 'hello world'.`,
@@ -57326,10 +57373,10 @@ class ConstructorVisibilityPublic {
57326
57373
  key: "constructor_visibility_public",
57327
57374
  title: "Check constructor visibility is public",
57328
57375
  shortDescription: `Constructor must be placed in the public section, even if the class is not CREATE PUBLIC.`,
57329
- extendedInformation: `
57330
- This only applies to global classes.
57331
-
57332
- 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
57333
57380
  https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abeninstance_constructor_guidl.htm`,
57334
57381
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
57335
57382
  };
@@ -57404,8 +57451,8 @@ class ContainsTab extends _abap_rule_1.ABAPRule {
57404
57451
  key: "contains_tab",
57405
57452
  title: "Code contains tab",
57406
57453
  shortDescription: `Checks for usage of tabs (enable to enforce spaces)`,
57407
- extendedInformation: `
57408
- https://docs.abapopenchecks.org/checks/09/
57454
+ extendedInformation: `
57455
+ https://docs.abapopenchecks.org/checks/09/
57409
57456
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
57410
57457
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
57411
57458
  badExample: `\tWRITE 'hello world'.`,
@@ -57492,10 +57539,10 @@ class CyclicOO {
57492
57539
  key: "cyclic_oo",
57493
57540
  title: "Cyclic OO",
57494
57541
  shortDescription: `Finds cyclic/circular OO references`,
57495
- extendedInformation: `Runs for global INTF + CLAS objects
57496
-
57497
- Objects must be without syntax errors for this rule to take effect
57498
-
57542
+ extendedInformation: `Runs for global INTF + CLAS objects
57543
+
57544
+ Objects must be without syntax errors for this rule to take effect
57545
+
57499
57546
  References in testclass includes are ignored`,
57500
57547
  };
57501
57548
  }
@@ -57738,7 +57785,7 @@ class DangerousStatement extends _abap_rule_1.ABAPRule {
57738
57785
  key: "dangerous_statement",
57739
57786
  title: "Dangerous statement",
57740
57787
  shortDescription: `Detects potentially dangerous statements`,
57741
- extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
57788
+ extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
57742
57789
  dynamic SQL can potentially create SQL injection problems`,
57743
57790
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
57744
57791
  };
@@ -57945,13 +57992,13 @@ class DefinitionsTop extends _abap_rule_1.ABAPRule {
57945
57992
  shortDescription: `Checks that definitions are placed at the beginning of METHODs, FORMs and FUNCTIONs.`,
57946
57993
  extendedInformation: `https://docs.abapopenchecks.org/checks/17/`,
57947
57994
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
57948
- badExample: `FROM foo.
57949
- WRITE 'hello'.
57950
- DATA int TYPE i.
57995
+ badExample: `FROM foo.
57996
+ WRITE 'hello'.
57997
+ DATA int TYPE i.
57951
57998
  ENDFORM.`,
57952
- goodExample: `FROM foo.
57953
- DATA int TYPE i.
57954
- WRITE 'hello'.
57999
+ goodExample: `FROM foo.
58000
+ DATA int TYPE i.
58001
+ WRITE 'hello'.
57955
58002
  ENDFORM.`,
57956
58003
  };
57957
58004
  }
@@ -58493,39 +58540,39 @@ class Downport {
58493
58540
  key: "downport",
58494
58541
  title: "Downport statement",
58495
58542
  shortDescription: `Downport functionality`,
58496
- extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with
58497
- a higher level language version. If successful, various rules are applied to downport the statement.
58498
- Target downport version is always v702, thus rule is only enabled if target version is v702.
58499
-
58500
- Current rules:
58501
- * NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/
58502
- * DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/
58503
- * FIELD-SYMBOL() definitions are outlined
58504
- * CONV is outlined
58505
- * COND is outlined
58506
- * REDUCE is outlined
58507
- * SWITCH is outlined
58508
- * FILTER is outlined
58509
- * APPEND expression is outlined
58510
- * INSERT expression is outlined
58511
- * EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/
58512
- * CAST changed to ?=
58513
- * LOOP AT method_call( ) is outlined
58514
- * VALUE # with structure fields
58515
- * VALUE # with internal table lines
58516
- * Table Expressions are outlined
58517
- * SELECT INTO @DATA definitions are outlined
58518
- * Some occurrences of string template formatting option ALPHA changed to function module call
58519
- * SELECT/INSERT/MODIFY/DELETE/UPDATE "," in field list removed, "@" in source/targets removed
58520
- * PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods
58521
- * RAISE EXCEPTION ... MESSAGE
58522
- * Moving with +=, -=, /=, *=, &&= is expanded
58523
- * line_exists and line_index is downported to READ TABLE
58524
- * ENUMs, but does not nessesarily give the correct type and value
58525
- * MESSAGE with non simple source
58526
-
58527
- Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.
58528
-
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
+
58529
58576
  Make sure to test the downported code, it might not always be completely correct.`,
58530
58577
  tags: [_irule_1.RuleTag.Downport, _irule_1.RuleTag.Quickfix],
58531
58578
  };
@@ -59103,10 +59150,10 @@ Make sure to test the downported code, it might not always be completely correct
59103
59150
  const fieldName = f.concatTokens();
59104
59151
  fieldDefinition += indentation + " " + fieldName + " TYPE " + tableName + "-" + fieldName + ",\n";
59105
59152
  }
59106
- fieldDefinition = `DATA: BEGIN OF ${name},
59153
+ fieldDefinition = `DATA: BEGIN OF ${name},
59107
59154
  ${fieldDefinition}${indentation} END OF ${name}.`;
59108
59155
  }
59109
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
59156
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
59110
59157
  ${indentation}`);
59111
59158
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
59112
59159
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -59165,12 +59212,12 @@ ${indentation}`);
59165
59212
  }
59166
59213
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59167
59214
  const name = ((_g = inlineData.findFirstExpression(Expressions.TargetField)) === null || _g === void 0 ? void 0 : _g.concatTokens()) || "error";
59168
- let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
59169
- ${fieldDefinitions}${indentation} END OF ${uniqueName}.
59170
- ${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.
59171
59218
  ${indentation}`);
59172
59219
  if (fieldDefinitions === "") {
59173
- 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.
59174
59221
  ${indentation}`);
59175
59222
  }
59176
59223
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
@@ -59238,7 +59285,7 @@ ${indentation}`);
59238
59285
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59239
59286
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
59240
59287
  const firstToken = high.getFirstToken();
59241
- 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()}.
59242
59289
  ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
59243
59290
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
59244
59291
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -59292,7 +59339,7 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
59292
59339
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59293
59340
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
59294
59341
  const firstToken = high.getFirstToken();
59295
- 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()}.
59296
59343
  ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
59297
59344
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
59298
59345
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -59334,14 +59381,14 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
59334
59381
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
59335
59382
  const firstToken = high.getFirstToken();
59336
59383
  // note that the tabix restore should be done before throwing the exception
59337
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.
59338
- ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
59339
- ${indentation}${tabixBackup} = sy-tabix.
59340
- ${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.
59341
- ${indentation}sy-tabix = ${tabixBackup}.
59342
- ${indentation}IF sy-subrc <> 0.
59343
- ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59344
- ${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.
59345
59392
  ${indentation}`);
59346
59393
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, startToken.getStart(), tableExpression.getLastToken().getEnd(), uniqueName);
59347
59394
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -59398,7 +59445,7 @@ ${indentation}`);
59398
59445
  const className = classNames[0].concatTokens();
59399
59446
  const targetName = (_b = target.findFirstExpression(Expressions.TargetField)) === null || _b === void 0 ? void 0 : _b.concatTokens();
59400
59447
  const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
59401
- const code = ` DATA ${targetName} TYPE REF TO ${className}.
59448
+ const code = ` DATA ${targetName} TYPE REF TO ${className}.
59402
59449
  ${indentation}CATCH ${className} INTO ${targetName}.`;
59403
59450
  const fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getStart(), node.getEnd(), code);
59404
59451
  return issue_1.Issue.atToken(lowFile, node.getFirstToken(), "Outline DATA", this.getMetadata().key, this.conf.severity, fix);
@@ -59560,16 +59607,16 @@ ${indentation}CATCH ${className} INTO ${targetName}.`;
59560
59607
  const uniqueName1 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59561
59608
  const uniqueName2 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59562
59609
  const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
59563
- let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
59564
- ${indentation}${uniqueName1}-msgid = ${id}.
59610
+ let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
59611
+ ${indentation}${uniqueName1}-msgid = ${id}.
59565
59612
  ${indentation}${uniqueName1}-msgno = ${number}.\n`;
59566
59613
  if (withs.length > 0) {
59567
- abap += `${indentation}${uniqueName1}-attr1 = 'IF_T100_DYN_MSG~MSGV1'.
59568
- ${indentation}${uniqueName1}-attr2 = 'IF_T100_DYN_MSG~MSGV2'.
59569
- ${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'.
59570
59617
  ${indentation}${uniqueName1}-attr4 = 'IF_T100_DYN_MSG~MSGV4'.\n`;
59571
59618
  }
59572
- abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
59619
+ abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
59573
59620
  ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`;
59574
59621
  if (withs.length > 0) {
59575
59622
  abap += `${indentation}${uniqueName2}->if_t100_dyn_msg~msgty = 'E'.\n`;
@@ -59681,10 +59728,10 @@ ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`
59681
59728
  let code = "";
59682
59729
  if (sourceRef.findFirstExpression(Expressions.TableExpression)) {
59683
59730
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59684
- code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).
59685
- IF sy-subrc <> 0.
59686
- RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59687
- 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.
59688
59735
  GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
59689
59736
  }
59690
59737
  else {
@@ -59773,20 +59820,20 @@ GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
59773
59820
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59774
59821
  const uniqueFS = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59775
59822
  const uniqueNameIndex = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59776
- code += ` items LIKE ${loopSourceName},
59777
- END OF ${groupTargetName}type.
59778
- DATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.
59779
- 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.
59780
59827
  LOOP AT ${loopSourceName} ${(_l = high.findFirstExpression(Expressions.LoopTarget)) === null || _l === void 0 ? void 0 : _l.concatTokens()}.\n`;
59781
59828
  if (groupIndexName !== undefined) {
59782
59829
  code += `DATA(${uniqueNameIndex}) = sy-tabix.\n`;
59783
59830
  }
59784
- 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}.
59785
59832
  IF sy-subrc = 0.\n`;
59786
59833
  if (groupCountName !== undefined) {
59787
59834
  code += ` <${uniqueFS}>-${groupCountName} = <${uniqueFS}>-${groupCountName} + 1.\n`;
59788
59835
  }
59789
- code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
59836
+ code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
59790
59837
  ELSE.\n`;
59791
59838
  code += ` CLEAR ${uniqueName}.\n`;
59792
59839
  for (const c of group.findAllExpressions(Expressions.LoopGroupByComponent)) {
@@ -59807,8 +59854,8 @@ ELSE.\n`;
59807
59854
  }
59808
59855
  code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE ${uniqueName}-items.\n`;
59809
59856
  code += ` INSERT ${uniqueName} INTO TABLE ${groupTargetName}tab.\n`;
59810
- code += `ENDIF.
59811
- ENDLOOP.
59857
+ code += `ENDIF.
59858
+ ENDLOOP.
59812
59859
  LOOP AT ${groupTargetName}tab ${groupTarget}.`;
59813
59860
  let fix = edit_helper_1.EditHelper.replaceRange(lowFile, high.getFirstToken().getStart(), high.getLastToken().getEnd(), code);
59814
59861
  for (const l of ((_m = highFile.getStructure()) === null || _m === void 0 ? void 0 : _m.findAllStructures(Structures.Loop)) || []) {
@@ -59980,7 +60027,7 @@ LOOP AT ${groupTargetName}tab ${groupTarget}.`;
59980
60027
  const enumName = (_b = high.findExpressionAfterToken("ENUM")) === null || _b === void 0 ? void 0 : _b.concatTokens();
59981
60028
  const structureName = (_c = high.findExpressionAfterToken("STRUCTURE")) === null || _c === void 0 ? void 0 : _c.concatTokens();
59982
60029
  // all ENUMS are char like?
59983
- let code = `TYPES ${enumName} TYPE string.
60030
+ let code = `TYPES ${enumName} TYPE string.
59984
60031
  CONSTANTS: BEGIN OF ${structureName},\n`;
59985
60032
  let count = 1;
59986
60033
  for (const e of enumStructure.findDirectStatements(Statements.TypeEnum).concat(enumStructure.findDirectStatements(Statements.Type))) {
@@ -60024,14 +60071,14 @@ CONSTANTS: BEGIN OF ${structureName},\n`;
60024
60071
  const tabixBackup = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
60025
60072
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
60026
60073
  // restore tabix before exeption
60027
- const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.
60028
- ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
60029
- ${indentation}${tabixBackup} = sy-tabix.
60030
- ${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.
60031
- ${indentation}sy-tabix = ${tabixBackup}.
60032
- ${indentation}IF sy-subrc <> 0.
60033
- ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
60034
- ${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.
60035
60082
  ${indentation}${uniqueName}`;
60036
60083
  const start = target.getFirstToken().getStart();
60037
60084
  const end = (_a = tableExpression.findDirectTokenByText("]")) === null || _a === void 0 ? void 0 : _a.getEnd();
@@ -60111,11 +60158,11 @@ ${indentation}${uniqueName}`;
60111
60158
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
60112
60159
  const source = (_b = child.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens();
60113
60160
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
60114
- const code = `DATA ${uniqueName} TYPE string.
60115
- ${indentation}CALL FUNCTION '${functionName}'
60116
- ${indentation} EXPORTING
60117
- ${indentation} input = ${source}
60118
- ${indentation} IMPORTING
60161
+ const code = `DATA ${uniqueName} TYPE string.
60162
+ ${indentation}CALL FUNCTION '${functionName}'
60163
+ ${indentation} EXPORTING
60164
+ ${indentation} input = ${source}
60165
+ ${indentation} IMPORTING
60119
60166
  ${indentation} output = ${uniqueName}.\n`;
60120
60167
  const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), code);
60121
60168
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, child.getFirstToken().getStart(), child.getLastToken().getEnd(), uniqueName);
@@ -61427,12 +61474,12 @@ class EasyToFindMessages {
61427
61474
  key: "easy_to_find_messages",
61428
61475
  title: "Easy to find messages",
61429
61476
  shortDescription: `Make messages easy to find`,
61430
- extendedInformation: `All messages must be statically referenced exactly once
61431
-
61432
- Only MESSAGE and RAISE statments are counted as static references
61433
-
61434
- Also see rule "message_exists"
61435
-
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
+
61436
61483
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#make-messages-easy-to-find`,
61437
61484
  tags: [_irule_1.RuleTag.Styleguide],
61438
61485
  };
@@ -61513,13 +61560,13 @@ class EmptyEvent extends _abap_rule_1.ABAPRule {
61513
61560
  shortDescription: `Empty selection screen or list processing event block`,
61514
61561
  extendedInformation: ``,
61515
61562
  tags: [_irule_1.RuleTag.SingleFile],
61516
- badExample: `
61517
- INITIALIZATION.
61518
- WRITE 'hello'.
61563
+ badExample: `
61564
+ INITIALIZATION.
61565
+ WRITE 'hello'.
61519
61566
  END-OF-SELECTION.`,
61520
- goodExample: `
61521
- START-OF-SELECTION.
61522
- PERFORM sdf.
61567
+ goodExample: `
61568
+ START-OF-SELECTION.
61569
+ PERFORM sdf.
61523
61570
  COMMIT WORK.`,
61524
61571
  };
61525
61572
  }
@@ -61611,8 +61658,8 @@ class EmptyLineinStatement extends _abap_rule_1.ABAPRule {
61611
61658
  key: "empty_line_in_statement",
61612
61659
  title: "Find empty lines in statements",
61613
61660
  shortDescription: `Checks that statements do not contain empty lines.`,
61614
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
61615
-
61661
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
61662
+
61616
61663
  https://docs.abapopenchecks.org/checks/41/`,
61617
61664
  tags: [_irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
61618
61665
  badExample: `WRITE\n\nhello.`,
@@ -61788,13 +61835,13 @@ class EmptyStructure extends _abap_rule_1.ABAPRule {
61788
61835
  shortDescription: `Checks that the code does not contain empty blocks.`,
61789
61836
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-empty-if-branches`,
61790
61837
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
61791
- badExample: `IF foo = bar.
61792
- ENDIF.
61793
-
61794
- DO 2 TIMES.
61838
+ badExample: `IF foo = bar.
61839
+ ENDIF.
61840
+
61841
+ DO 2 TIMES.
61795
61842
  ENDDO.`,
61796
- goodExample: `LOOP AT itab WHERE qty = 0 OR date > sy-datum.
61797
- ENDLOOP.
61843
+ goodExample: `LOOP AT itab WHERE qty = 0 OR date > sy-datum.
61844
+ ENDLOOP.
61798
61845
  result = xsdbool( sy-subrc = 0 ).`,
61799
61846
  };
61800
61847
  }
@@ -61936,10 +61983,10 @@ class ExitOrCheck extends _abap_rule_1.ABAPRule {
61936
61983
  return {
61937
61984
  key: "exit_or_check",
61938
61985
  title: "Find EXIT or CHECK outside loops",
61939
- shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
61986
+ shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
61940
61987
  Use RETURN to leave procesing blocks instead.`,
61941
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
61942
- 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
61943
61990
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#check-vs-return`,
61944
61991
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
61945
61992
  };
@@ -62022,12 +62069,12 @@ class ExpandMacros extends _abap_rule_1.ABAPRule {
62022
62069
  key: "expand_macros",
62023
62070
  title: "Expand Macros",
62024
62071
  shortDescription: `Allows expanding macro calls with quick fixes`,
62025
- extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
62026
-
62072
+ extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
62073
+
62027
62074
  Note that macros/DEFINE cannot be used in the ABAP Cloud programming model`,
62028
- badExample: `DEFINE _hello.
62029
- WRITE 'hello'.
62030
- END-OF-DEFINITION.
62075
+ badExample: `DEFINE _hello.
62076
+ WRITE 'hello'.
62077
+ END-OF-DEFINITION.
62031
62078
  _hello.`,
62032
62079
  goodExample: `WRITE 'hello'.`,
62033
62080
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
@@ -62114,7 +62161,7 @@ class Exporting extends _abap_rule_1.ABAPRule {
62114
62161
  shortDescription: `Detects EXPORTING statements which can be omitted.`,
62115
62162
  badExample: `call_method( EXPORTING foo = bar ).`,
62116
62163
  goodExample: `call_method( foo = bar ).`,
62117
- 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
62118
62165
  https://docs.abapopenchecks.org/checks/30/`,
62119
62166
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
62120
62167
  };
@@ -62212,7 +62259,7 @@ class ForbiddenIdentifier extends _abap_rule_1.ABAPRule {
62212
62259
  key: "forbidden_identifier",
62213
62260
  title: "Forbidden Identifier",
62214
62261
  shortDescription: `Forbid use of specified identifiers, list of regex.`,
62215
- 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,
62216
62263
  https://github.com/abaplint/transpiler/blob/bda94b8b56e2b7f2f87be2168f12361aa530220e/packages/transpiler/src/validation.ts#L44`,
62217
62264
  tags: [_irule_1.RuleTag.SingleFile],
62218
62265
  };
@@ -62454,8 +62501,8 @@ class ForbiddenVoidType {
62454
62501
  key: "forbidden_void_type",
62455
62502
  title: "Forbidden Void Types",
62456
62503
  shortDescription: `Avoid usage of specified void types.`,
62457
- extendedInformation: `Inspiration:
62458
- 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,
62459
62506
  DATS, TIMS, DATUM, FLAG, INT4, NUMC3, NUMC4, SAP_BOOL, TEXT25, TEXT80, X255, XFELD`,
62460
62507
  };
62461
62508
  }
@@ -62698,9 +62745,9 @@ class FullyTypeITabs extends _abap_rule_1.ABAPRule {
62698
62745
  key: "fully_type_itabs",
62699
62746
  title: "Fully type internal tables",
62700
62747
  shortDescription: `No implict table types or table keys`,
62701
- 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
62702
62749
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key`,
62703
- badExample: `DATA lt_foo TYPE TABLE OF ty.
62750
+ badExample: `DATA lt_foo TYPE TABLE OF ty.
62704
62751
  DATA lt_bar TYPE STANDARD TABLE OF ty.`,
62705
62752
  goodExample: `DATA lt_foo TYPE STANDARD TABLE OF ty WITH EMPTY KEY.`,
62706
62753
  tags: [_irule_1.RuleTag.SingleFile],
@@ -62885,26 +62932,26 @@ class FunctionalWriting extends _abap_rule_1.ABAPRule {
62885
62932
  key: "functional_writing",
62886
62933
  title: "Use functional writing",
62887
62934
  shortDescription: `Detects usage of call method when functional style calls can be used.`,
62888
- 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
62889
62936
  https://docs.abapopenchecks.org/checks/07/`,
62890
62937
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
62891
- badExample: `CALL METHOD zcl_class=>method( ).
62892
- CALL METHOD cl_abap_typedescr=>describe_by_name
62893
- EXPORTING
62894
- p_name = 'NAME'
62895
- RECEIVING
62896
- p_descr_ref = lr_typedescr
62897
- EXCEPTIONS
62898
- 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
62899
62946
  OTHERS = 2.`,
62900
- goodExample: `zcl_class=>method( ).
62901
- cl_abap_typedescr=>describe_by_name(
62902
- EXPORTING
62903
- p_name = 'NAME'
62904
- RECEIVING
62905
- p_descr_ref = lr_typedescr
62906
- EXCEPTIONS
62907
- 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
62908
62955
  OTHERS = 2 ).`,
62909
62956
  };
62910
62957
  }
@@ -63015,14 +63062,14 @@ class GlobalClass extends _abap_rule_1.ABAPRule {
63015
63062
  key: "global_class",
63016
63063
  title: "Global class checks",
63017
63064
  shortDescription: `Checks related to global classes`,
63018
- extendedInformation: `* global classes must be in own files
63019
-
63020
- * file names must match class name
63021
-
63022
- * file names must match interface name
63023
-
63024
- * global classes must be global definitions
63025
-
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
+
63026
63073
  * global interfaces must be global definitions`,
63027
63074
  tags: [_irule_1.RuleTag.Syntax],
63028
63075
  };
@@ -63121,21 +63168,21 @@ class IdenticalConditions extends _abap_rule_1.ABAPRule {
63121
63168
  return {
63122
63169
  key: "identical_conditions",
63123
63170
  title: "Identical conditions",
63124
- shortDescription: `Find identical conditions in IF + CASE + WHILE etc
63125
-
63171
+ shortDescription: `Find identical conditions in IF + CASE + WHILE etc
63172
+
63126
63173
  Prerequsites: code is pretty printed with identical cAsE`,
63127
63174
  tags: [_irule_1.RuleTag.SingleFile],
63128
- badExample: `IF foo = bar OR 1 = a OR foo = bar.
63129
- ENDIF.
63130
- CASE bar.
63131
- WHEN '1'.
63132
- 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'.
63133
63180
  ENDCASE.`,
63134
- goodExample: `IF foo = bar OR 1 = a.
63135
- ENDIF.
63136
- CASE bar.
63137
- WHEN '1'.
63138
- WHEN 'A'.
63181
+ goodExample: `IF foo = bar OR 1 = a.
63182
+ ENDIF.
63183
+ CASE bar.
63184
+ WHEN '1'.
63185
+ WHEN 'A'.
63139
63186
  ENDCASE.`,
63140
63187
  };
63141
63188
  }
@@ -63269,23 +63316,23 @@ class IdenticalContents extends _abap_rule_1.ABAPRule {
63269
63316
  key: "identical_contents",
63270
63317
  title: "Identical contents",
63271
63318
  shortDescription: `Find identical contents in blocks inside IFs, both in the beginning and in the end.`,
63272
- extendedInformation: `
63273
- Prerequsites: code is pretty printed with identical cAsE
63274
-
63319
+ extendedInformation: `
63320
+ Prerequsites: code is pretty printed with identical cAsE
63321
+
63275
63322
  Chained statments are ignored`,
63276
63323
  tags: [_irule_1.RuleTag.SingleFile],
63277
- badExample: `IF foo = bar.
63278
- WRITE 'bar'.
63279
- WRITE 'world'.
63280
- ELSE.
63281
- WRITE 'foo'.
63282
- WRITE 'world'.
63324
+ badExample: `IF foo = bar.
63325
+ WRITE 'bar'.
63326
+ WRITE 'world'.
63327
+ ELSE.
63328
+ WRITE 'foo'.
63329
+ WRITE 'world'.
63283
63330
  ENDIF.`,
63284
- goodExample: `IF foo = bar.
63285
- WRITE 'bar'.
63286
- ELSE.
63287
- WRITE 'foo'.
63288
- ENDIF.
63331
+ goodExample: `IF foo = bar.
63332
+ WRITE 'bar'.
63333
+ ELSE.
63334
+ WRITE 'foo'.
63335
+ ENDIF.
63289
63336
  WRITE 'world'.`,
63290
63337
  };
63291
63338
  }
@@ -63393,12 +63440,12 @@ class IdenticalDescriptions {
63393
63440
  key: "identical_descriptions",
63394
63441
  title: "Identical descriptions",
63395
63442
  shortDescription: `Searches for objects with the same type and same description`,
63396
- extendedInformation: `Case insensitive
63397
-
63398
- Only checks the master language descriptions
63399
-
63400
- Dependencies are skipped
63401
-
63443
+ extendedInformation: `Case insensitive
63444
+
63445
+ Only checks the master language descriptions
63446
+
63447
+ Dependencies are skipped
63448
+
63402
63449
  Works for: INTF, CLAS, DOMA, DTEL, FUNC in same FUGR`,
63403
63450
  tags: [],
63404
63451
  };
@@ -63572,43 +63619,43 @@ class IfInIf extends _abap_rule_1.ABAPRule {
63572
63619
  key: "if_in_if",
63573
63620
  title: "IF in IF",
63574
63621
  shortDescription: `Detects nested ifs which can be refactored.`,
63575
- extendedInformation: `
63576
- Directly nested IFs without ELSE can be refactored to a single condition using AND.
63577
-
63578
- ELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.
63579
-
63580
- 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/
63581
63628
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low`,
63582
- badExample: `IF condition1.
63583
- IF condition2.
63584
- ...
63585
- ENDIF.
63586
- ENDIF.
63587
-
63588
- IF condition1.
63589
- ...
63590
- ELSE.
63591
- IF condition2.
63592
- ...
63593
- 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.
63594
63641
  ENDIF.`,
63595
- goodExample: `IF ( condition1 ) AND ( condition2 ).
63596
- ...
63597
- ENDIF.
63598
-
63599
- IF condition1.
63600
- ...
63601
- ELSEIF condition2.
63602
- ...
63603
- ENDIF.
63604
-
63605
- CASE variable.
63606
- WHEN value1.
63607
- ...
63608
- WHEN value2.
63609
- IF condition2.
63610
- ...
63611
- 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.
63612
63659
  ENDCASE.`,
63613
63660
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
63614
63661
  };
@@ -63793,9 +63840,9 @@ class ImplementMethods extends _abap_rule_1.ABAPRule {
63793
63840
  for (const i of ((_a = file.getStructure()) === null || _a === void 0 ? void 0 : _a.findAllStatements(Statements.ClassImplementation)) || []) {
63794
63841
  const name = (_b = i.findFirstExpression(Expressions.ClassName)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr().toUpperCase();
63795
63842
  if (name === impl.identifier.getName().toUpperCase()) {
63796
- return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
63797
- METHOD ${methodName.toLowerCase()}.
63798
- RETURN. " todo, implement method
63843
+ return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
63844
+ METHOD ${methodName.toLowerCase()}.
63845
+ RETURN. " todo, implement method
63799
63846
  ENDMETHOD.`);
63800
63847
  }
63801
63848
  }
@@ -63974,14 +64021,14 @@ class ImplicitStartOfSelection extends _abap_rule_1.ABAPRule {
63974
64021
  key: "implicit_start_of_selection",
63975
64022
  title: "Implicit START-OF-SELECTION",
63976
64023
  shortDescription: `Add explicit selection screen event handling`,
63977
- extendedInformation: `Only runs for executable programs
63978
-
64024
+ extendedInformation: `Only runs for executable programs
64025
+
63979
64026
  https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapstart-of-selection.htm`,
63980
64027
  tags: [_irule_1.RuleTag.SingleFile],
63981
- badExample: `REPORT zfoo.
64028
+ badExample: `REPORT zfoo.
63982
64029
  WRITE 'hello'.`,
63983
- goodExample: `
63984
- START-OF-SELECTION.
64030
+ goodExample: `
64031
+ START-OF-SELECTION.
63985
64032
  WRITE 'hello'.`,
63986
64033
  };
63987
64034
  }
@@ -64086,19 +64133,19 @@ class InStatementIndentation extends _abap_rule_1.ABAPRule {
64086
64133
  key: "in_statement_indentation",
64087
64134
  title: "In-statement indentation",
64088
64135
  shortDescription: "Checks alignment within statements which span multiple lines.",
64089
- extendedInformation: `Lines following the first line should be indented once (2 spaces).
64090
-
64091
- 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)
64092
64139
  to distinguish them better from code within the block.`,
64093
- badExample: `IF 1 = 1
64094
- AND 2 = 2.
64095
- WRITE 'hello' &&
64096
- 'world'.
64140
+ badExample: `IF 1 = 1
64141
+ AND 2 = 2.
64142
+ WRITE 'hello' &&
64143
+ 'world'.
64097
64144
  ENDIF.`,
64098
- goodExample: `IF 1 = 1
64099
- AND 2 = 2.
64100
- WRITE 'hello' &&
64101
- 'world'.
64145
+ goodExample: `IF 1 = 1
64146
+ AND 2 = 2.
64147
+ WRITE 'hello' &&
64148
+ 'world'.
64102
64149
  ENDIF.`,
64103
64150
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
64104
64151
  };
@@ -64224,23 +64271,23 @@ class Indentation extends _abap_rule_1.ABAPRule {
64224
64271
  title: "Indentation",
64225
64272
  shortDescription: `Checks indentation`,
64226
64273
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
64227
- badExample: `CLASS lcl DEFINITION.
64228
- PRIVATE SECTION.
64229
- METHODS constructor.
64230
- ENDCLASS.
64231
-
64232
- CLASS lcl IMPLEMENTATION.
64233
- METHOD constructor.
64234
- ENDMETHOD.
64274
+ badExample: `CLASS lcl DEFINITION.
64275
+ PRIVATE SECTION.
64276
+ METHODS constructor.
64277
+ ENDCLASS.
64278
+
64279
+ CLASS lcl IMPLEMENTATION.
64280
+ METHOD constructor.
64281
+ ENDMETHOD.
64235
64282
  ENDCLASS.`,
64236
- goodExample: `CLASS lcl DEFINITION.
64237
- PRIVATE SECTION.
64238
- METHODS constructor.
64239
- ENDCLASS.
64240
-
64241
- CLASS lcl IMPLEMENTATION.
64242
- METHOD constructor.
64243
- ENDMETHOD.
64283
+ goodExample: `CLASS lcl DEFINITION.
64284
+ PRIVATE SECTION.
64285
+ METHODS constructor.
64286
+ ENDCLASS.
64287
+
64288
+ CLASS lcl IMPLEMENTATION.
64289
+ METHOD constructor.
64290
+ ENDMETHOD.
64244
64291
  ENDCLASS.`,
64245
64292
  };
64246
64293
  }
@@ -64644,9 +64691,9 @@ class IntfReferencingClas {
64644
64691
  key: "intf_referencing_clas",
64645
64692
  title: "INTF referencing CLAS",
64646
64693
  shortDescription: `Interface contains references to class`,
64647
- extendedInformation: `Only global interfaces are checked.
64648
- Only first level references are checked.
64649
- 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.
64650
64697
  Void references are ignored.`,
64651
64698
  };
64652
64699
  }
@@ -64731,9 +64778,9 @@ class InvalidTableIndex extends _abap_rule_1.ABAPRule {
64731
64778
  title: "Invalid Table Index",
64732
64779
  shortDescription: `Issues error for constant table index zero, as ABAP starts from 1`,
64733
64780
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
64734
- badExample: `DATA(first) = table[ 0 ].
64781
+ badExample: `DATA(first) = table[ 0 ].
64735
64782
  READ TABLE gt_stack ASSIGNING <ls_stack> INDEX 0.`,
64736
- goodExample: `DATA(first) = table[ 1 ].
64783
+ goodExample: `DATA(first) = table[ 1 ].
64737
64784
  READ TABLE gt_stack ASSIGNING <ls_stack> INDEX 1.`,
64738
64785
  };
64739
64786
  }
@@ -65335,8 +65382,8 @@ class LineBreakStyle {
65335
65382
  return {
65336
65383
  key: "line_break_style",
65337
65384
  title: "Makes sure line breaks are consistent in the ABAP code",
65338
- shortDescription: `Enforces LF as newlines in ABAP files
65339
-
65385
+ shortDescription: `Enforces LF as newlines in ABAP files
65386
+
65340
65387
  abapGit does not work with CRLF`,
65341
65388
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
65342
65389
  };
@@ -65405,7 +65452,7 @@ class LineLength extends _abap_rule_1.ABAPRule {
65405
65452
  key: "line_length",
65406
65453
  title: "Line length",
65407
65454
  shortDescription: `Detects lines exceeding the provided maximum length.`,
65408
- 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
65409
65456
  https://docs.abapopenchecks.org/checks/04/`,
65410
65457
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
65411
65458
  };
@@ -65476,7 +65523,7 @@ class LineOnlyPunc extends _abap_rule_1.ABAPRule {
65476
65523
  key: "line_only_punc",
65477
65524
  title: "Line containing only punctuation",
65478
65525
  shortDescription: `Detects lines containing only punctuation.`,
65479
- 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
65480
65527
  https://docs.abapopenchecks.org/checks/16/`,
65481
65528
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
65482
65529
  badExample: "zcl_class=>method(\n).",
@@ -65739,15 +65786,15 @@ class LocalVariableNames extends _abap_rule_1.ABAPRule {
65739
65786
  return {
65740
65787
  key: "local_variable_names",
65741
65788
  title: "Local variable naming conventions",
65742
- shortDescription: `
65743
- 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.
65744
65791
  Regexes are case-insensitive.`,
65745
65792
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
65746
- badExample: `FORM bar.
65747
- DATA foo.
65793
+ badExample: `FORM bar.
65794
+ DATA foo.
65748
65795
  ENDFORM.`,
65749
- goodExample: `FORM bar.
65750
- DATA lv_foo.
65796
+ goodExample: `FORM bar.
65797
+ DATA lv_foo.
65751
65798
  ENDFORM.`,
65752
65799
  };
65753
65800
  }
@@ -65899,9 +65946,9 @@ class MacroNaming extends _abap_rule_1.ABAPRule {
65899
65946
  shortDescription: `Allows you to enforce a pattern for macro definitions`,
65900
65947
  extendedInformation: `Use rule "avoid_use" to avoid macros altogether.`,
65901
65948
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
65902
- badExample: `DEFINE something.
65949
+ badExample: `DEFINE something.
65903
65950
  END-OF-DEFINITION.`,
65904
- goodExample: `DEFINE _something.
65951
+ goodExample: `DEFINE _something.
65905
65952
  END-OF-DEFINITION.`,
65906
65953
  };
65907
65954
  }
@@ -65974,10 +66021,10 @@ class MainFileContents {
65974
66021
  key: "main_file_contents",
65975
66022
  title: "Main file contents",
65976
66023
  shortDescription: `Checks related to report declarations.`,
65977
- extendedInformation: `Does not run if the target version is Cloud
65978
-
65979
- * PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
65980
- * 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>."
65981
66028
  `,
65982
66029
  };
65983
66030
  }
@@ -66093,17 +66140,17 @@ class ManyParentheses extends _abap_rule_1.ABAPRule {
66093
66140
  title: "Too many parentheses",
66094
66141
  shortDescription: `Searches for expressions where extra parentheses can safely be removed`,
66095
66142
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
66096
- badExample: `
66097
- IF ( destination IS INITIAL ).
66098
- ENDIF.
66099
- IF foo = boo AND ( bar = lar AND moo = loo ).
66100
- ENDIF.
66143
+ badExample: `
66144
+ IF ( destination IS INITIAL ).
66145
+ ENDIF.
66146
+ IF foo = boo AND ( bar = lar AND moo = loo ).
66147
+ ENDIF.
66101
66148
  `,
66102
- goodExample: `
66103
- IF destination IS INITIAL.
66104
- ENDIF.
66105
- IF foo = boo AND bar = lar AND moo = loo.
66106
- ENDIF.
66149
+ goodExample: `
66150
+ IF destination IS INITIAL.
66151
+ ENDIF.
66152
+ IF foo = boo AND bar = lar AND moo = loo.
66153
+ ENDIF.
66107
66154
  `,
66108
66155
  };
66109
66156
  }
@@ -66277,14 +66324,14 @@ class MaxOneMethodParameterPerLine extends _abap_rule_1.ABAPRule {
66277
66324
  title: "Max one method parameter definition per line",
66278
66325
  shortDescription: `Keep max one method parameter description per line`,
66279
66326
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace],
66280
- badExample: `
66281
- METHODS apps_scope_token
66282
- IMPORTING
66327
+ badExample: `
66328
+ METHODS apps_scope_token
66329
+ IMPORTING
66283
66330
  body TYPE bodyapps_scope_token client_id TYPE str.`,
66284
- goodExample: `
66285
- METHODS apps_scope_token
66286
- IMPORTING
66287
- body TYPE bodyapps_scope_token
66331
+ goodExample: `
66332
+ METHODS apps_scope_token
66333
+ IMPORTING
66334
+ body TYPE bodyapps_scope_token
66288
66335
  client_id TYPE str.`,
66289
66336
  };
66290
66337
  }
@@ -66349,11 +66396,11 @@ class MaxOneStatement extends _abap_rule_1.ABAPRule {
66349
66396
  key: "max_one_statement",
66350
66397
  title: "Max one statement per line",
66351
66398
  shortDescription: `Checks that each line contains only a single statement.`,
66352
- extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
66353
-
66354
- Does not report anything for chained statements.
66355
-
66356
- 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
66357
66404
  https://docs.abapopenchecks.org/checks/11/`,
66358
66405
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
66359
66406
  badExample: `WRITE foo. WRITE bar.`,
@@ -66691,8 +66738,8 @@ class MethodLength {
66691
66738
  key: "method_length",
66692
66739
  title: "Method/Form Length",
66693
66740
  shortDescription: `Checks relating to method/form length.`,
66694
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
66695
-
66741
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
66742
+
66696
66743
  Abstract methods without statements are considered okay.`,
66697
66744
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
66698
66745
  };
@@ -66797,20 +66844,20 @@ class MethodOverwritesBuiltIn extends _abap_rule_1.ABAPRule {
66797
66844
  key: "method_overwrites_builtin",
66798
66845
  title: "Method name overwrites builtin function",
66799
66846
  shortDescription: `Checks Method names that overwrite builtin SAP functions`,
66800
- extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
66801
-
66802
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
66803
-
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
+
66804
66851
  Interface method names are ignored`,
66805
66852
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
66806
- badExample: `CLASS lcl DEFINITION.
66807
- PUBLIC SECTION.
66808
- METHODS matches.
66809
- ENDCLASS.
66810
-
66811
- CLASS lcl IMPLEMENTATION.
66812
- METHOD matches.
66813
- ENDMETHOD.
66853
+ badExample: `CLASS lcl DEFINITION.
66854
+ PUBLIC SECTION.
66855
+ METHODS matches.
66856
+ ENDCLASS.
66857
+
66858
+ CLASS lcl IMPLEMENTATION.
66859
+ METHOD matches.
66860
+ ENDMETHOD.
66814
66861
  ENDCLASS.`,
66815
66862
  };
66816
66863
  }
@@ -67001,12 +67048,12 @@ class MixReturning extends _abap_rule_1.ABAPRule {
67001
67048
  // eslint-disable-next-line max-len
67002
67049
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-either-returning-or-exporting-or-changing-but-not-a-combination`,
67003
67050
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
67004
- badExample: `CLASS lcl DEFINITION.
67005
- PUBLIC SECTION.
67006
- METHODS
67007
- foobar
67008
- EXPORTING foo TYPE i
67009
- 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.
67010
67057
  ENDCLASS.`,
67011
67058
  };
67012
67059
  }
@@ -67386,7 +67433,7 @@ class Nesting extends _abap_rule_1.ABAPRule {
67386
67433
  key: "nesting",
67387
67434
  title: "Check nesting depth",
67388
67435
  shortDescription: `Checks for methods exceeding a maximum nesting depth`,
67389
- 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
67390
67437
  https://docs.abapopenchecks.org/checks/74/`,
67391
67438
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
67392
67439
  };
@@ -67629,7 +67676,7 @@ class NoChainedAssignment extends _abap_rule_1.ABAPRule {
67629
67676
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-chain-assignments`,
67630
67677
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
67631
67678
  badExample: `var1 = var2 = var3.`,
67632
- goodExample: `var2 = var3.
67679
+ goodExample: `var2 = var3.
67633
67680
  var1 = var2.`,
67634
67681
  };
67635
67682
  }
@@ -67688,8 +67735,8 @@ class NoExternalFormCalls extends _abap_rule_1.ABAPRule {
67688
67735
  key: "no_external_form_calls",
67689
67736
  title: "No external FORM calls",
67690
67737
  shortDescription: `Detect external form calls`,
67691
- badExample: `PERFORM foo IN PROGRAM bar.
67692
-
67738
+ badExample: `PERFORM foo IN PROGRAM bar.
67739
+
67693
67740
  PERFORM foo(bar).`,
67694
67741
  tags: [_irule_1.RuleTag.SingleFile],
67695
67742
  };
@@ -67750,17 +67797,17 @@ class NoInlineInOptionalBranches extends _abap_rule_1.ABAPRule {
67750
67797
  key: "no_inline_in_optional_branches",
67751
67798
  title: "Don't declare inline in optional branches",
67752
67799
  shortDescription: `Don't declare inline in optional branches`,
67753
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
67754
-
67755
- Considered optional branches:
67756
- * inside IF/ELSEIF/ELSE
67757
- * inside LOOP
67758
- * inside WHILE
67759
- * inside CASE/WHEN, CASE TYPE OF
67760
- * inside DO
67761
- * inside SELECT loops
67762
-
67763
- 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:
67764
67811
  * TRY/CATCH/CLEANUP`,
67765
67812
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
67766
67813
  };
@@ -67860,12 +67907,12 @@ class NoPrefixes extends _abap_rule_1.ABAPRule {
67860
67907
  key: "no_prefixes",
67861
67908
  title: "No Prefixes",
67862
67909
  shortDescription: `Dont use hungarian notation`,
67863
- extendedInformation: `
67864
- Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
67865
- allowing all types to become voided, abaplint will then provide less precise syntax errors.
67866
-
67867
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
67868
-
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
+
67869
67916
  https://github.com/SAP/styleguides/blob/main/clean-abap/sub-sections/AvoidEncodings.md`,
67870
67917
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
67871
67918
  badExample: `DATA lv_foo TYPE i.`,
@@ -68044,7 +68091,7 @@ class NoPublicAttributes extends _abap_rule_1.ABAPRule {
68044
68091
  return {
68045
68092
  key: "no_public_attributes",
68046
68093
  title: "No public attributes",
68047
- 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.
68048
68095
  Exceptions are excluded from this rule.`,
68049
68096
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#members-private-by-default-protected-only-if-needed`,
68050
68097
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
@@ -68145,13 +68192,13 @@ class NoYodaConditions extends _abap_rule_1.ABAPRule {
68145
68192
  key: "no_yoda_conditions",
68146
68193
  title: "No Yoda conditions",
68147
68194
  shortDescription: `Finds Yoda conditions and reports issues`,
68148
- extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
68149
-
68195
+ extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
68196
+
68150
68197
  Conditions with operators CP, NP, CS, NS, CA, NA, CO, CN are ignored`,
68151
68198
  tags: [_irule_1.RuleTag.SingleFile],
68152
- badExample: `IF 0 <> sy-subrc.
68199
+ badExample: `IF 0 <> sy-subrc.
68153
68200
  ENDIF.`,
68154
- goodExample: `IF sy-subrc <> 0.
68201
+ goodExample: `IF sy-subrc <> 0.
68155
68202
  ENDIF.`,
68156
68203
  };
68157
68204
  }
@@ -68252,8 +68299,8 @@ class NROBConsistency {
68252
68299
  key: "nrob_consistency",
68253
68300
  title: "Number range consistency",
68254
68301
  shortDescription: `Consistency checks for number ranges`,
68255
- extendedInformation: `Issue reported if percentage warning is over 50%
68256
-
68302
+ extendedInformation: `Issue reported if percentage warning is over 50%
68303
+
68257
68304
  Issue reported if the referenced domain is not found(taking error namespace into account)`,
68258
68305
  tags: [_irule_1.RuleTag.SingleFile],
68259
68306
  };
@@ -68530,58 +68577,58 @@ class ObsoleteStatement extends _abap_rule_1.ABAPRule {
68530
68577
  title: "Obsolete statements",
68531
68578
  shortDescription: `Checks for usages of certain obsolete statements`,
68532
68579
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
68533
- extendedInformation: `
68534
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
68535
-
68536
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
68537
-
68538
- SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
68539
-
68540
- IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
68541
-
68542
- WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
68543
-
68544
- FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
68545
-
68546
- TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
68547
-
68548
- LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
68549
-
68550
- COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
68551
-
68552
- OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
68553
-
68554
- PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
68555
-
68556
- RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
68557
-
68558
- PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
68559
-
68560
- MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
68561
-
68562
- SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
68563
- SELECT COUNT(*) is considered okay
68564
-
68565
- FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
68566
-
68567
- SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
68568
-
68569
- CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
68570
-
68571
- POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
68572
-
68573
- OCCURENCES: check for OCCURENCES vs OCCURRENCES
68574
-
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
+
68575
68622
  CLIENT SPECIFIED, from 754: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abapselect_client_obsolete.htm`,
68576
- badExample: `REFRESH itab.
68577
-
68578
- COMPUTE foo = 2 + 2.
68579
-
68580
- MULTIPLY lv_foo BY 2.
68581
-
68582
- INTERFACE intf LOAD.
68583
-
68584
- 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.
68585
68632
  ENDIF.`,
68586
68633
  };
68587
68634
  }
@@ -68921,9 +68968,9 @@ class OmitParameterName {
68921
68968
  key: "omit_parameter_name",
68922
68969
  title: "Omit parameter name",
68923
68970
  shortDescription: `Omit the parameter name in single parameter calls`,
68924
- extendedInformation: `
68925
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
68926
-
68971
+ extendedInformation: `
68972
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
68973
+
68927
68974
  EXPORTING must already be omitted for this rule to take effect, https://rules.abaplint.org/exporting/`,
68928
68975
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
68929
68976
  badExample: `method( param = 2 ).`,
@@ -69129,20 +69176,20 @@ class OmitReceiving extends _abap_rule_1.ABAPRule {
69129
69176
  shortDescription: `Omit RECEIVING`,
69130
69177
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-receiving`,
69131
69178
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
69132
- badExample: `
69133
- upload_pack(
69134
- EXPORTING
69135
- io_client = lo_client
69136
- iv_url = iv_url
69137
- iv_deepen_level = iv_deepen_level
69138
- it_hashes = lt_hashes
69139
- 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
69140
69187
  rt_objects = et_objects ).`,
69141
- goodExample: `
69142
- et_objects = upload_pack(
69143
- io_client = lo_client
69144
- iv_url = iv_url
69145
- 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
69146
69193
  it_hashes = lt_hashes ).`,
69147
69194
  };
69148
69195
  }
@@ -69206,8 +69253,8 @@ class Parser702Chaining extends _abap_rule_1.ABAPRule {
69206
69253
  return {
69207
69254
  key: "parser_702_chaining",
69208
69255
  title: "Parser Error, bad chanining on 702",
69209
- shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
69210
- 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.
69211
69258
  Only active on target version 702 and below.`,
69212
69259
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
69213
69260
  };
@@ -69287,8 +69334,8 @@ class ParserError {
69287
69334
  return {
69288
69335
  key: "parser_error",
69289
69336
  title: "Parser error",
69290
- shortDescription: `Checks for syntax not recognized by abaplint.
69291
-
69337
+ shortDescription: `Checks for syntax not recognized by abaplint.
69338
+
69292
69339
  See recognized syntax at https://syntax.abaplint.org`,
69293
69340
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
69294
69341
  };
@@ -69373,7 +69420,7 @@ class ParserMissingSpace extends _abap_rule_1.ABAPRule {
69373
69420
  return {
69374
69421
  key: "parser_missing_space",
69375
69422
  title: "Parser Error, missing space",
69376
- 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.
69377
69424
  This rule makes sure the spaces are consistently required across the language.`,
69378
69425
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
69379
69426
  badExample: `IF ( foo = 'bar').`,
@@ -69796,25 +69843,25 @@ class PreferInline {
69796
69843
  key: "prefer_inline",
69797
69844
  title: "Prefer Inline Declarations",
69798
69845
  shortDescription: `Prefer inline to up-front declarations.`,
69799
- extendedInformation: `EXPERIMENTAL
69800
-
69801
- Activates if language version is v740sp02 or above.
69802
-
69803
- Variables must be local(METHOD or FORM).
69804
-
69805
- No generic or void typed variables. No syntax errors.
69806
-
69807
- First position used must be a full/pure write.
69808
-
69809
- Move statment is not a cast(?=)
69810
-
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
+
69811
69858
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-inline-to-up-front-declarations`,
69812
69859
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Experimental, _irule_1.RuleTag.Quickfix],
69813
- badExample: `DATA foo TYPE i.
69814
- foo = 2.
69815
- DATA percentage TYPE decfloat34.
69860
+ badExample: `DATA foo TYPE i.
69861
+ foo = 2.
69862
+ DATA percentage TYPE decfloat34.
69816
69863
  percentage = ( comment_number / abs_statement_number ) * 100.`,
69817
- goodExample: `DATA(foo) = 2.
69864
+ goodExample: `DATA(foo) = 2.
69818
69865
  DATA(percentage) = CONV decfloat34( comment_number / abs_statement_number ) * 100.`,
69819
69866
  };
69820
69867
  }
@@ -70028,18 +70075,18 @@ class PreferIsNot extends _abap_rule_1.ABAPRule {
70028
70075
  key: "prefer_is_not",
70029
70076
  title: "Prefer IS NOT to NOT IS",
70030
70077
  shortDescription: `Prefer IS NOT to NOT IS`,
70031
- extendedInformation: `
70032
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
70033
-
70078
+ extendedInformation: `
70079
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
70080
+
70034
70081
  "if not is_valid( )." examples are skipped`,
70035
70082
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
70036
- goodExample: `IF variable IS NOT INITIAL.
70037
- IF variable NP 'TODO*'.
70038
- IF variable <> 42.
70083
+ goodExample: `IF variable IS NOT INITIAL.
70084
+ IF variable NP 'TODO*'.
70085
+ IF variable <> 42.
70039
70086
  IF variable CO 'hello'.`,
70040
- badExample: `IF NOT variable IS INITIAL.
70041
- IF NOT variable CP 'TODO*'.
70042
- IF NOT variable = 42.
70087
+ badExample: `IF NOT variable IS INITIAL.
70088
+ IF NOT variable CP 'TODO*'.
70089
+ IF NOT variable = 42.
70043
70090
  IF NOT variable CA 'hello'.`,
70044
70091
  };
70045
70092
  }
@@ -70227,14 +70274,14 @@ class PreferRaiseExceptionNew extends _abap_rule_1.ABAPRule {
70227
70274
  key: "prefer_raise_exception_new",
70228
70275
  title: "Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE",
70229
70276
  shortDescription: `Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE`,
70230
- extendedInformation: `
70231
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
70232
-
70277
+ extendedInformation: `
70278
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
70279
+
70233
70280
  From 752 and up`,
70234
70281
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
70235
70282
  goodExample: `RAISE EXCEPTION NEW cx_generation_error( previous = exception ).`,
70236
- badExample: `RAISE EXCEPTION TYPE cx_generation_error
70237
- EXPORTING
70283
+ badExample: `RAISE EXCEPTION TYPE cx_generation_error
70284
+ EXPORTING
70238
70285
  previous = exception.`,
70239
70286
  };
70240
70287
  }
@@ -70312,12 +70359,12 @@ class PreferReturningToExporting extends _abap_rule_1.ABAPRule {
70312
70359
  key: "prefer_returning_to_exporting",
70313
70360
  title: "Prefer RETURNING to EXPORTING",
70314
70361
  shortDescription: `Prefer RETURNING to EXPORTING. Generic types cannot be RETURNING.`,
70315
- 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
70316
70363
  https://docs.abapopenchecks.org/checks/44/`,
70317
70364
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
70318
- badExample: `CLASS lcl DEFINITION.
70319
- PUBLIC SECTION.
70320
- METHODS test EXPORTING ev_foo TYPE i.
70365
+ badExample: `CLASS lcl DEFINITION.
70366
+ PUBLIC SECTION.
70367
+ METHODS test EXPORTING ev_foo TYPE i.
70321
70368
  ENDCLASS.`,
70322
70369
  };
70323
70370
  }
@@ -70413,8 +70460,8 @@ class PreferXsdbool extends _abap_rule_1.ABAPRule {
70413
70460
  key: "prefer_xsdbool",
70414
70461
  title: "Prefer xsdbool over boolc",
70415
70462
  shortDescription: `Prefer xsdbool over boolc`,
70416
- extendedInformation: `Activates if language version is v740sp08 or above.
70417
-
70463
+ extendedInformation: `Activates if language version is v740sp08 or above.
70464
+
70418
70465
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
70419
70466
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
70420
70467
  badExample: `DATA(sdf) = boolc( 1 = 2 ).`,
@@ -70486,9 +70533,9 @@ class PreferredCompareOperator extends _abap_rule_1.ABAPRule {
70486
70533
  title: "Preferred compare operator",
70487
70534
  shortDescription: `Configure undesired operator variants`,
70488
70535
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
70489
- badExample: `IF foo EQ bar.
70536
+ badExample: `IF foo EQ bar.
70490
70537
  ENDIF.`,
70491
- goodExample: `IF foo = bar.
70538
+ goodExample: `IF foo = bar.
70492
70539
  ENDIF.`,
70493
70540
  };
70494
70541
  }
@@ -70712,26 +70759,26 @@ class ReduceProceduralCode extends _abap_rule_1.ABAPRule {
70712
70759
  key: "reduce_procedural_code",
70713
70760
  title: "Reduce procedural code",
70714
70761
  shortDescription: `Checks FORM and FUNCTION-MODULE have few statements`,
70715
- extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
70716
-
70717
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
70718
-
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
+
70719
70766
  Comments are not counted as statements.`,
70720
70767
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
70721
- badExample: `FORM foo.
70722
- DATA lv_bar TYPE i.
70723
- lv_bar = 2 + 2.
70724
- IF lv_bar = 4.
70725
- WRITE 'hello world'.
70726
- ENDIF.
70727
- DATA lv_bar TYPE i.
70728
- lv_bar = 2 + 2.
70729
- IF lv_bar = 4.
70730
- WRITE 'hello world'.
70731
- 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.
70732
70779
  ENDFORM.`,
70733
- goodExample: `FORM foo.
70734
- NEW zcl_global_class( )->run_logic( ).
70780
+ goodExample: `FORM foo.
70781
+ NEW zcl_global_class( )->run_logic( ).
70735
70782
  ENDFORM.`,
70736
70783
  };
70737
70784
  }
@@ -70975,10 +71022,10 @@ class RemoveDescriptions {
70975
71022
  return {
70976
71023
  key: "remove_descriptions",
70977
71024
  title: "Remove descriptions",
70978
- shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
70979
-
70980
- Class descriptions are required, see rule description_empty.
70981
-
71025
+ shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
71026
+
71027
+ Class descriptions are required, see rule description_empty.
71028
+
70982
71029
  Consider using ABAP Doc for documentation.`,
70983
71030
  tags: [],
70984
71031
  };
@@ -71103,14 +71150,14 @@ class RFCErrorHandling extends _abap_rule_1.ABAPRule {
71103
71150
  tags: [_irule_1.RuleTag.SingleFile],
71104
71151
  shortDescription: `Checks that exceptions 'system_failure' and 'communication_failure' are handled in RFC calls`,
71105
71152
  extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenrfc_exception.htm`,
71106
- badExample: `CALL FUNCTION 'ZRFC'
71153
+ badExample: `CALL FUNCTION 'ZRFC'
71107
71154
  DESTINATION lv_rfc.`,
71108
- goodExample: `CALL FUNCTION 'ZRFC'
71109
- DESTINATION lv_rfc
71110
- EXCEPTIONS
71111
- system_failure = 1 MESSAGE msg
71112
- communication_failure = 2 MESSAGE msg
71113
- 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
71114
71161
  OTHERS = 4.`,
71115
71162
  };
71116
71163
  }
@@ -71194,11 +71241,11 @@ class SelectAddOrderBy {
71194
71241
  key: "select_add_order_by",
71195
71242
  title: "SELECT add ORDER BY",
71196
71243
  shortDescription: `SELECTs add ORDER BY clause`,
71197
- extendedInformation: `
71198
- This will make sure that the SELECT statement returns results in the same sequence on different databases
71199
-
71200
- add ORDER BY PRIMARY KEY if in doubt
71201
-
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
+
71202
71249
  If the target is a sorted/hashed table, no issue is reported`,
71203
71250
  tags: [_irule_1.RuleTag.SingleFile],
71204
71251
  badExample: `SELECT * FROM db INTO TABLE @DATA(tab).`,
@@ -71329,14 +71376,14 @@ class SelectPerformance {
71329
71376
  key: "select_performance",
71330
71377
  title: "SELECT performance",
71331
71378
  shortDescription: `Various checks regarding SELECT performance.`,
71332
- extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
71333
-
71379
+ extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
71380
+
71334
71381
  SELECT *: not reported if using INTO/APPENDING CORRESPONDING FIELDS OF`,
71335
71382
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Performance],
71336
- badExample: `SELECT field1, field2 FROM table
71337
- 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.
71338
71385
  ENDSELECT.`,
71339
- goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
71386
+ goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
71340
71387
  INTO TABLE @DATA(table) ORDER BY field3 DESCENDING`,
71341
71388
  };
71342
71389
  }
@@ -71450,8 +71497,8 @@ class SelectSingleFullKey {
71450
71497
  key: "select_single_full_key",
71451
71498
  title: "Detect SELECT SINGLE which are possibily not unique",
71452
71499
  shortDescription: `Detect SELECT SINGLE which are possibily not unique`,
71453
- extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
71454
-
71500
+ extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
71501
+
71455
71502
  If the statement contains a JOIN it is not checked`,
71456
71503
  pseudoComment: "EC CI_NOORDER",
71457
71504
  tags: [_irule_1.RuleTag.Quickfix],
@@ -71879,8 +71926,8 @@ class SICFConsistency {
71879
71926
  key: "sicf_consistency",
71880
71927
  title: "SICF consistency",
71881
71928
  shortDescription: `Checks the validity of ICF services`,
71882
- extendedInformation: `* Class defined in handler must exist
71883
- * Class must not have any syntax errors
71929
+ extendedInformation: `* Class defined in handler must exist
71930
+ * Class must not have any syntax errors
71884
71931
  * Class must implement interface IF_HTTP_EXTENSION`,
71885
71932
  };
71886
71933
  }
@@ -71992,23 +72039,23 @@ class SlowParameterPassing {
71992
72039
  shortDescription: `Detects slow pass by value passing for methods where parameter is not changed`,
71993
72040
  extendedInformation: `Method parameters defined in interfaces is not checked`,
71994
72041
  tags: [_irule_1.RuleTag.Performance],
71995
- badExample: `CLASS lcl DEFINITION.
71996
- PUBLIC SECTION.
71997
- METHODS bar IMPORTING VALUE(sdf) TYPE string.
71998
- ENDCLASS.
71999
- CLASS lcl IMPLEMENTATION.
72000
- METHOD bar.
72001
- WRITE sdf.
72002
- 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.
72003
72050
  ENDCLASS.`,
72004
- goodExample: `CLASS lcl DEFINITION.
72005
- PUBLIC SECTION.
72006
- METHODS bar IMPORTING sdf TYPE string.
72007
- ENDCLASS.
72008
- CLASS lcl IMPLEMENTATION.
72009
- METHOD bar.
72010
- WRITE sdf.
72011
- 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.
72012
72059
  ENDCLASS.`,
72013
72060
  };
72014
72061
  }
@@ -72279,8 +72326,8 @@ class SpaceBeforeDot extends _abap_rule_1.ABAPRule {
72279
72326
  key: "space_before_dot",
72280
72327
  title: "Space before dot",
72281
72328
  shortDescription: `Checks for extra spaces before dots at the ends of statements`,
72282
- extendedInformation: `
72283
- 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
72284
72331
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#condense-your-code`,
72285
72332
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
72286
72333
  badExample: `WRITE bar .`,
@@ -72466,12 +72513,12 @@ class SQLValueConversion {
72466
72513
  key: "sql_value_conversion",
72467
72514
  title: "Implicit SQL Value Conversion",
72468
72515
  shortDescription: `Ensure types match when selecting from database`,
72469
- extendedInformation: `
72470
- * Integer to CHAR conversion
72471
- * Integer to NUMC conversion
72472
- * NUMC to Integer conversion
72473
- * CHAR to Integer conversion
72474
- * 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
72475
72522
  * Source field longer than database field, NUMC -> NUMC`,
72476
72523
  tags: [],
72477
72524
  };
@@ -72543,7 +72590,7 @@ class StartAtTab extends _abap_rule_1.ABAPRule {
72543
72590
  key: "start_at_tab",
72544
72591
  title: "Start at tab",
72545
72592
  shortDescription: `Checks that statements start at tabstops.`,
72546
- extendedInformation: `Reports max 100 issues per file
72593
+ extendedInformation: `Reports max 100 issues per file
72547
72594
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
72548
72595
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
72549
72596
  badExample: ` WRITE a.`,
@@ -72720,12 +72767,12 @@ class StrictSQL extends _abap_rule_1.ABAPRule {
72720
72767
  key: "strict_sql",
72721
72768
  title: "Strict SQL",
72722
72769
  shortDescription: `Strict SQL`,
72723
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
72724
-
72725
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
72726
-
72727
- Also see separate rule sql_escape_host_variables
72728
-
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
+
72729
72776
  Activates from v750 and up`,
72730
72777
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix],
72731
72778
  badExample: `SELECT * FROM ztabl INTO TABLE @rt_content WHERE type = @iv_type ORDER BY PRIMARY KEY.`,
@@ -72979,11 +73026,11 @@ class SyModification extends _abap_rule_1.ABAPRule {
72979
73026
  key: "sy_modification",
72980
73027
  title: "Modification of SY fields",
72981
73028
  shortDescription: `Finds modification of sy fields`,
72982
- extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
72983
-
73029
+ extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
73030
+
72984
73031
  Changes to SY-TVAR* fields are not reported`,
72985
73032
  tags: [_irule_1.RuleTag.SingleFile],
72986
- badExample: `sy-uname = 2.
73033
+ badExample: `sy-uname = 2.
72987
73034
  sy = sy.`,
72988
73035
  };
72989
73036
  }
@@ -73045,8 +73092,8 @@ class TABLEnhancementCategory {
73045
73092
  key: "tabl_enhancement_category",
73046
73093
  title: "TABL enhancement category must be set",
73047
73094
  shortDescription: `Checks that tables do not have the enhancement category 'not classified'.`,
73048
- extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
73049
-
73095
+ extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
73096
+
73050
73097
  You may use standard report RS_DDIC_CLASSIFICATION_FINAL for adjustment.`,
73051
73098
  tags: [],
73052
73099
  };
@@ -73111,8 +73158,8 @@ class TablesDeclaredLocally extends _abap_rule_1.ABAPRule {
73111
73158
  shortDescription: `TABLES are always global, so declare them globally`,
73112
73159
  extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abaptables.htm`,
73113
73160
  tags: [_irule_1.RuleTag.SingleFile],
73114
- badExample: `FORM foo.
73115
- TABLES t100.
73161
+ badExample: `FORM foo.
73162
+ TABLES t100.
73116
73163
  ENDFORM.`,
73117
73164
  goodExample: `TABLES t000.`,
73118
73165
  };
@@ -73240,9 +73287,9 @@ class TypeFormParameters extends _abap_rule_1.ABAPRule {
73240
73287
  title: "Type FORM parameters",
73241
73288
  shortDescription: `Checks for untyped FORM parameters`,
73242
73289
  tags: [_irule_1.RuleTag.SingleFile],
73243
- badExample: `FORM foo USING bar.
73290
+ badExample: `FORM foo USING bar.
73244
73291
  ENDFORM.`,
73245
- goodExample: `FORM foo USING bar TYPE string.
73292
+ goodExample: `FORM foo USING bar TYPE string.
73246
73293
  ENDFORM.`,
73247
73294
  };
73248
73295
  }
@@ -73915,38 +73962,38 @@ class UnnecessaryPragma extends _abap_rule_1.ABAPRule {
73915
73962
  key: "unnecessary_pragma",
73916
73963
  title: "Unnecessary Pragma",
73917
73964
  shortDescription: `Finds pragmas which can be removed`,
73918
- extendedInformation: `* NO_HANDLER with handler
73919
-
73920
- * NEEDED without definition
73921
-
73922
- * NO_TEXT without texts
73923
-
73924
- * SUBRC_OK where sy-subrc is checked
73925
-
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
+
73926
73973
  NO_HANDLER inside macros are not checked`,
73927
73974
  tags: [_irule_1.RuleTag.SingleFile],
73928
- badExample: `TRY.
73929
- ...
73930
- CATCH zcx_abapgit_exception ##NO_HANDLER.
73931
- RETURN. " it has a handler
73932
- ENDTRY.
73933
- MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
73934
- SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
73935
- 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.
73936
73983
  ENDIF.`,
73937
- goodExample: `TRY.
73938
- ...
73939
- CATCH zcx_abapgit_exception.
73940
- RETURN.
73941
- ENDTRY.
73942
- MESSAGE w125(zbar) WITH c_foo INTO message.
73943
- SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
73944
- IF sy-subrc <> 0.
73945
- ENDIF.
73946
-
73947
- DATA: BEGIN OF blah ##NEEDED,
73948
- test1 TYPE string,
73949
- 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,
73950
73997
  END OF blah.`,
73951
73998
  };
73952
73999
  }
@@ -74113,18 +74160,18 @@ class UnnecessaryReturn extends _abap_rule_1.ABAPRule {
74113
74160
  shortDescription: `Finds unnecessary RETURN statements`,
74114
74161
  extendedInformation: `Finds unnecessary RETURN statements`,
74115
74162
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
74116
- badExample: `FORM hello1.
74117
- WRITE 'world'.
74118
- RETURN.
74119
- ENDFORM.
74120
-
74121
- FORM foo.
74122
- IF 1 = 2.
74123
- RETURN.
74124
- ENDIF.
74163
+ badExample: `FORM hello1.
74164
+ WRITE 'world'.
74165
+ RETURN.
74166
+ ENDFORM.
74167
+
74168
+ FORM foo.
74169
+ IF 1 = 2.
74170
+ RETURN.
74171
+ ENDIF.
74125
74172
  ENDFORM.`,
74126
- goodExample: `FORM hello2.
74127
- WRITE 'world'.
74173
+ goodExample: `FORM hello2.
74174
+ WRITE 'world'.
74128
74175
  ENDFORM.`,
74129
74176
  };
74130
74177
  }
@@ -74475,13 +74522,13 @@ class UnusedMacros {
74475
74522
  title: "Unused macros",
74476
74523
  shortDescription: `Checks for unused macro definitions definitions`,
74477
74524
  tags: [_irule_1.RuleTag.Quickfix],
74478
- badExample: `DEFINE foobar1.
74479
- WRITE 'hello'.
74525
+ badExample: `DEFINE foobar1.
74526
+ WRITE 'hello'.
74480
74527
  END-OF-DEFINITION.`,
74481
- goodExample: `DEFINE foobar2.
74482
- WRITE 'hello'.
74483
- END-OF-DEFINITION.
74484
-
74528
+ goodExample: `DEFINE foobar2.
74529
+ WRITE 'hello'.
74530
+ END-OF-DEFINITION.
74531
+
74485
74532
  foobar2.`,
74486
74533
  };
74487
74534
  }
@@ -74593,18 +74640,18 @@ class UnusedMethods {
74593
74640
  key: "unused_methods",
74594
74641
  title: "Unused methods",
74595
74642
  shortDescription: `Checks for unused methods`,
74596
- extendedInformation: `Checks private and protected methods.
74597
-
74598
- Unused methods are not reported if the object contains parser or syntax errors.
74599
- Quick fixes only appears for private methods or projected methods where the class doesnt have any subclasses.
74600
-
74601
- Skips:
74602
- * methods FOR TESTING
74603
- * methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
74604
- * class_constructor + constructor methods
74605
- * event handlers
74606
- * methods that are redefined
74607
- * 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
74608
74655
  `,
74609
74656
  tags: [_irule_1.RuleTag.Quickfix],
74610
74657
  pragma: "##CALLED",
@@ -75080,23 +75127,23 @@ class UnusedVariables {
75080
75127
  key: "unused_variables",
75081
75128
  title: "Unused variables",
75082
75129
  shortDescription: `Checks for unused variables and constants`,
75083
- extendedInformation: `Skips event parameters.
75084
-
75085
- Note that this currently does not work if the source code uses macros.
75086
-
75087
- Unused variables are not reported if the object contains parser or syntax errors.
75088
-
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
+
75089
75136
  Errors found in INCLUDES are reported for the main program.`,
75090
75137
  tags: [_irule_1.RuleTag.Quickfix],
75091
75138
  pragma: "##NEEDED",
75092
75139
  pseudoComment: "EC NEEDED",
75093
- badExample: `DATA: BEGIN OF blah1,
75094
- test TYPE string,
75095
- test2 TYPE string,
75140
+ badExample: `DATA: BEGIN OF blah1,
75141
+ test TYPE string,
75142
+ test2 TYPE string,
75096
75143
  END OF blah1.`,
75097
- goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
75098
- test TYPE string,
75099
- test2 TYPE string,
75144
+ goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
75145
+ test TYPE string,
75146
+ test2 TYPE string,
75100
75147
  END OF blah2.`,
75101
75148
  };
75102
75149
  }
@@ -75315,15 +75362,15 @@ class UseBoolExpression extends _abap_rule_1.ABAPRule {
75315
75362
  shortDescription: `Use boolean expression, xsdbool from 740sp08 and up, boolc from 702 and up`,
75316
75363
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
75317
75364
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
75318
- badExample: `IF line IS INITIAL.
75319
- has_entries = abap_false.
75320
- ELSE.
75321
- has_entries = abap_true.
75322
- ENDIF.
75323
-
75365
+ badExample: `IF line IS INITIAL.
75366
+ has_entries = abap_false.
75367
+ ELSE.
75368
+ has_entries = abap_true.
75369
+ ENDIF.
75370
+
75324
75371
  DATA(fsdf) = COND #( WHEN foo <> bar THEN abap_true ELSE abap_false ).`,
75325
- goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
75326
-
75372
+ goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
75373
+
75327
75374
  DATA(fsdf) = xsdbool( foo <> bar ).`,
75328
75375
  };
75329
75376
  }
@@ -75441,15 +75488,15 @@ class UseClassBasedExceptions extends _abap_rule_1.ABAPRule {
75441
75488
  shortDescription: `Use class based exceptions, checks interface and class definitions`,
75442
75489
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-class-based-exceptions`,
75443
75490
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
75444
- badExample: `INTERFACE lif.
75445
- METHODS load_data
75446
- EXCEPTIONS
75447
- invalid_parameter.
75491
+ badExample: `INTERFACE lif.
75492
+ METHODS load_data
75493
+ EXCEPTIONS
75494
+ invalid_parameter.
75448
75495
  ENDINTERFACE.`,
75449
- goodExample: `INTERFACE lif.
75450
- METHODS load_data
75451
- RAISING
75452
- cx_something.
75496
+ goodExample: `INTERFACE lif.
75497
+ METHODS load_data
75498
+ RAISING
75499
+ cx_something.
75453
75500
  ENDINTERFACE.`,
75454
75501
  };
75455
75502
  }
@@ -75509,15 +75556,15 @@ class UseLineExists extends _abap_rule_1.ABAPRule {
75509
75556
  key: "use_line_exists",
75510
75557
  title: "Use line_exists",
75511
75558
  shortDescription: `Use line_exists, from 740sp02 and up`,
75512
- extendedInformation: `
75513
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
75514
-
75559
+ extendedInformation: `
75560
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
75561
+
75515
75562
  Not reported if the READ TABLE statement contains BINARY SEARCH.`,
75516
75563
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
75517
- badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
75518
- IF sy-subrc = 0.
75564
+ badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
75565
+ IF sy-subrc = 0.
75519
75566
  ENDIF.`,
75520
- goodExample: `IF line_exists( my_table[ key = 'A' ] ).
75567
+ goodExample: `IF line_exists( my_table[ key = 'A' ] ).
75521
75568
  ENDIF.`,
75522
75569
  };
75523
75570
  }
@@ -75627,10 +75674,10 @@ class UseNew extends _abap_rule_1.ABAPRule {
75627
75674
  key: "use_new",
75628
75675
  title: "Use NEW",
75629
75676
  shortDescription: `Checks for deprecated CREATE OBJECT statements.`,
75630
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
75631
-
75632
- If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
75633
-
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
+
75634
75681
  Applicable from v740sp02 and up`,
75635
75682
  badExample: `CREATE OBJECT ref.`,
75636
75683
  goodExample: `ref = NEW #( ).`,
@@ -75728,13 +75775,13 @@ class WhenOthersLast extends _abap_rule_1.ABAPRule {
75728
75775
  title: "WHEN OTHERS last",
75729
75776
  shortDescription: `Checks that WHEN OTHERS is placed the last within a CASE statement.`,
75730
75777
  tags: [_irule_1.RuleTag.SingleFile],
75731
- badExample: `CASE bar.
75732
- WHEN OTHERS.
75733
- WHEN 2.
75778
+ badExample: `CASE bar.
75779
+ WHEN OTHERS.
75780
+ WHEN 2.
75734
75781
  ENDCASE.`,
75735
- goodExample: `CASE bar.
75736
- WHEN 2.
75737
- WHEN OTHERS.
75782
+ goodExample: `CASE bar.
75783
+ WHEN 2.
75784
+ WHEN OTHERS.
75738
75785
  ENDCASE.`,
75739
75786
  };
75740
75787
  }