@abaplint/cli 2.113.85 → 2.113.87

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 +875 -869
  4. package/package.json +63 -63
package/build/cli.js CHANGED
@@ -10201,7 +10201,7 @@ class Assign {
10201
10201
  const decimals = (0, combi_1.seq)("DECIMALS", expressions_1.Source);
10202
10202
  const casting = (0, combi_1.seq)("CASTING", (0, combi_1.opt)((0, combi_1.alt)(like, handle, (0, combi_1.per)(type, decimals))));
10203
10203
  const obsoleteType = (0, combi_1.seq)("TYPE", expressions_1.Source, (0, combi_1.optPrio)(decimals));
10204
- const ret = (0, combi_1.seq)("ASSIGN", (0, combi_1.opt)((0, combi_1.seq)(expressions_1.Target, "INCREMENT")), expressions_1.AssignSource, "TO", expressions_1.FSTarget, (0, combi_1.opt)((0, combi_1.altPrio)(casting, obsoleteType)), (0, combi_1.opt)(range), (0, combi_1.opt)((0, combi_1.ver)(version_1.Version.v757, "ELSE UNASSIGN")));
10204
+ const ret = (0, combi_1.seq)("ASSIGN", (0, combi_1.opt)((0, combi_1.seq)(expressions_1.Target, "INCREMENT")), expressions_1.AssignSource, "TO", expressions_1.FSTarget, (0, combi_1.opt)((0, combi_1.altPrio)(casting, obsoleteType, decimals)), (0, combi_1.opt)(range), (0, combi_1.opt)((0, combi_1.ver)(version_1.Version.v757, "ELSE UNASSIGN")));
10205
10205
  return ret;
10206
10206
  }
10207
10207
  }
@@ -10681,7 +10681,7 @@ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@a
10681
10681
  class CallOLE {
10682
10682
  getMatcher() {
10683
10683
  const rc = (0, combi_1.seq)("=", expressions_1.Target);
10684
- const ret = (0, combi_1.seq)("CALL METHOD OF", expressions_1.Source, expressions_1.Source, (0, combi_1.opt)(rc), (0, combi_1.opt)("NO FLUSH"), (0, combi_1.opt)("QUEUEONLY"), (0, combi_1.opt)(expressions_1.OLEExporting));
10684
+ const ret = (0, combi_1.seq)("CALL METHOD OF", expressions_1.Source, expressions_1.Source, (0, combi_1.opt)(rc), (0, combi_1.opt)("NO FLUSH"), (0, combi_1.opt)("QUEUE-ONLY"), (0, combi_1.opt)(expressions_1.OLEExporting));
10685
10685
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
10686
10686
  }
10687
10687
  }
@@ -11359,10 +11359,12 @@ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@a
11359
11359
  class Communication {
11360
11360
  getMatcher() {
11361
11361
  const length = (0, combi_1.seq)("LENGTH", expressions_1.Target);
11362
+ const returncode = (0, combi_1.seq)("RETURNCODE", expressions_1.Source);
11363
+ const buffer = (0, combi_1.seq)("BUFFER", expressions_1.Target);
11362
11364
  const init = (0, combi_1.seq)("INIT ID", expressions_1.Source, "DESTINATION", expressions_1.Target);
11363
- const allocate = (0, combi_1.seq)("ALLOCATE ID", expressions_1.Source);
11364
- const send = (0, combi_1.seq)("SEND ID", expressions_1.Source, "BUFFER", expressions_1.Target, (0, combi_1.opt)(length));
11365
- const deallocate = (0, combi_1.seq)("DEALLOCATE ID", expressions_1.Source);
11365
+ const allocate = (0, combi_1.seq)("ALLOCATE ID", expressions_1.Source, (0, combi_1.opt)(returncode));
11366
+ const send = (0, combi_1.seq)("SEND ID", expressions_1.Source, (0, combi_1.opt)((0, combi_1.per)(buffer, length)), (0, combi_1.opt)(returncode));
11367
+ const deallocate = (0, combi_1.seq)("DEALLOCATE ID", expressions_1.Source, (0, combi_1.opt)(returncode));
11366
11368
  const accept = (0, combi_1.seq)("ACCEPT ID", expressions_1.Source);
11367
11369
  const receive = (0, combi_1.seq)("RECEIVE ID", expressions_1.Source, "BUFFER", expressions_1.Source, (0, combi_1.opt)(length), "DATAINFO", expressions_1.Target, "STATUSINFO", expressions_1.Target, "RECEIVED", expressions_1.Target);
11368
11370
  const ret = (0, combi_1.seq)("COMMUNICATION", (0, combi_1.alt)(init, allocate, send, deallocate, receive, accept));
@@ -11985,7 +11987,7 @@ class DeleteMemory {
11985
11987
  const memory = (0, combi_1.seq)("MEMORY ID", expressions_1.Source);
11986
11988
  const id = (0, combi_1.seq)("ID", expressions_1.Source);
11987
11989
  const client = (0, combi_1.seq)("CLIENT", expressions_1.Source);
11988
- const shared = (0, combi_1.seq)("SHARED", (0, combi_1.altPrio)("MEMORY", "BUFFER"), expressions_1.Field, "(", expressions_1.Field, ")", (0, combi_1.optPrio)(client), id);
11990
+ const shared = (0, combi_1.seq)("SHARED", (0, combi_1.altPrio)("MEMORY", "BUFFER"), expressions_1.Field, "(", (0, combi_1.regex)(/^\w+$/), ")", (0, combi_1.optPrio)(client), id);
11989
11991
  const ret = (0, combi_1.seq)("DELETE FROM", (0, combi_1.alt)(memory, shared));
11990
11992
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
11991
11993
  }
@@ -13753,7 +13755,7 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
13753
13755
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
13754
13756
  class GetProperty {
13755
13757
  getMatcher() {
13756
- 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));
13758
+ 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)("QUEUE-ONLY"), (0, combi_1.opt)(expressions_1.OLEExporting));
13757
13759
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
13758
13760
  }
13759
13761
  }
@@ -15005,9 +15007,9 @@ class ModifyInternal {
15005
15007
  const using = (0, combi_1.seq)("USING KEY", expressions_1.SimpleName);
15006
15008
  const additions = (0, combi_1.per)(where, assigning, using);
15007
15009
  const target = (0, combi_1.alt)(expressions_1.Target, expressions_1.Dynamic);
15008
- const options = (0, combi_1.alt)((0, combi_1.per)(index, transporting), (0, combi_1.seq)(from, (0, combi_1.opt)((0, combi_1.per)(index, transporting))), (0, combi_1.seq)((0, combi_1.per)(index, transporting), from, (0, combi_1.opt)((0, combi_1.per)(index, transporting))));
15010
+ const options = (0, combi_1.alt)((0, combi_1.per)(index, transporting), (0, combi_1.seq)(from, (0, combi_1.opt)((0, combi_1.per)(index, transporting, using))), (0, combi_1.seq)((0, combi_1.per)(index, transporting), from, (0, combi_1.opt)((0, combi_1.per)(index, transporting))));
15009
15011
  const long = (0, combi_1.seq)("MODIFY", (0, combi_1.opt)("TABLE"), target, (0, combi_1.opt)(options), (0, combi_1.opt)(additions));
15010
- const simple = (0, combi_1.seq)("MODIFY TABLE", target, from, (0, combi_1.opt)(using));
15012
+ const simple = (0, combi_1.seq)("MODIFY TABLE", target, (0, combi_1.per)(from, using));
15011
15013
  return (0, combi_1.alt)(long, simple);
15012
15014
  }
15013
15015
  }
@@ -15033,7 +15035,7 @@ class ModifyLine {
15033
15035
  getMatcher() {
15034
15036
  const onOff = (0, combi_1.alt)("ON", "OFF");
15035
15037
  const eq = (0, combi_1.seq)("=", expressions_1.Source);
15036
- const form = (0, combi_1.seq)((0, combi_1.alt)("INVERSE", "INPUT", "COLOR"), (0, combi_1.alt)(eq, onOff));
15038
+ const form = (0, combi_1.seq)((0, combi_1.alt)("INVERSE", "INPUT", "COLOR", "HOTSPOT"), (0, combi_1.alt)(eq, onOff));
15037
15039
  const from = (0, combi_1.seq)("FROM", expressions_1.Source);
15038
15040
  const value = (0, combi_1.seq)("FIELD VALUE", (0, combi_1.plus)((0, combi_1.seq)(expressions_1.Source, (0, combi_1.optPrio)(from))));
15039
15041
  const format = (0, combi_1.seq)("FIELD FORMAT", expressions_1.Source, (0, combi_1.opt)(form));
@@ -15431,7 +15433,7 @@ class Parameter {
15431
15433
  const type = (0, combi_1.seq)((0, combi_1.altPrio)("TYPE", "LIKE"), (0, combi_1.altPrio)(expressions_1.TypeName, expressions_1.Dynamic));
15432
15434
  const memory = (0, combi_1.seq)("MEMORY ID", expressions_1.SimpleSource1);
15433
15435
  const listbox = (0, combi_1.str)("AS LISTBOX");
15434
- const cmd = (0, combi_1.seq)("USER-COMMAND", (0, combi_1.regex)(/^\w+$/));
15436
+ const cmd = (0, combi_1.seq)("USER-COMMAND", (0, combi_1.regex)(/^[\w\?\/]+$/));
15435
15437
  const modif = (0, combi_1.seq)("MODIF ID", expressions_1.Modif);
15436
15438
  const visible = (0, combi_1.seq)("VISIBLE LENGTH", expressions_1.Constant);
15437
15439
  const length = (0, combi_1.seq)("LENGTH", expressions_1.Constant);
@@ -16378,7 +16380,8 @@ class ScrollList {
16378
16380
  const line = (0, combi_1.seq)("LINE", expressions_1.Source);
16379
16381
  const column = (0, combi_1.seq)("TO COLUMN", expressions_1.Source);
16380
16382
  const to = (0, combi_1.seq)("TO", (0, combi_1.alt)("FIRST PAGE", "LAST PAGE", (0, combi_1.seq)("PAGE", expressions_1.Source)));
16381
- 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));
16383
+ const pages = (0, combi_1.seq)(expressions_1.Source, "PAGES");
16384
+ const ret = (0, combi_1.seq)("SCROLL LIST", (0, combi_1.per)(index, (0, combi_1.seq)((0, combi_1.alt)(to, "BACKWARD", "FORWARD"), (0, combi_1.opt)(pages)), (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));
16382
16385
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
16383
16386
  }
16384
16387
  }
@@ -16510,7 +16513,7 @@ class SelectionScreen {
16510
16513
  const exclude = (0, combi_1.seq)("EXCLUDE", (0, combi_1.alt)("IDS", "PARAMETERS"), (0, combi_1.regex)(/^\w+$/));
16511
16514
  const beginVersion = (0, combi_1.seq)("BEGIN OF VERSION", (0, combi_1.regex)(/^\w+$/), expressions_1.TextElement);
16512
16515
  const endVersion = (0, combi_1.seq)("END OF VERSION", (0, combi_1.regex)(/^\w+$/));
16513
- const ret = (0, combi_1.seq)("SELECTION-SCREEN", (0, combi_1.altPrio)(comment, func, skip, pos, incl, iso, push, tab, uline, beginBlock, tabbed, endBlock, beginLine, endLine, param, beginScreen, endScreen, exclude, beginVersion, endVersion));
16516
+ const ret = (0, combi_1.seq)("SELECTION-SCREEN", (0, combi_1.altPrio)(comment, func, skip, pos, incl, iso, push, tab, uline, beginBlock, tabbed, endBlock, beginLine, endLine, param, beginScreen, endScreen, exclude, beginVersion, endVersion, def));
16514
16517
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
16515
16518
  }
16516
16519
  }
@@ -16540,7 +16543,7 @@ class SelectOption {
16540
16543
  const option = (0, combi_1.seq)("OPTION", (0, combi_1.alt)("CP", expressions_1.Field));
16541
16544
  const sign = (0, combi_1.seq)("SIGN", expressions_1.Field);
16542
16545
  const memory = (0, combi_1.seq)("MEMORY ID", expressions_1.SimpleSource1);
16543
- const match = (0, combi_1.seq)("MATCHCODE OBJECT", expressions_1.Field);
16546
+ const match = (0, combi_1.seq)("MATCHCODE OBJECT", expressions_1.SimpleFieldChain);
16544
16547
  const modif = (0, combi_1.seq)("MODIF ID", expressions_1.Modif);
16545
16548
  const visible = (0, combi_1.seq)("VISIBLE LENGTH", expressions_1.Source);
16546
16549
  const options = (0, combi_1.per)(def, option, sign, memory, match, visible, modif, "NO DATABASE SELECTION", "LOWER CASE", "NO-EXTENSION", "NO INTERVALS", "NO-DISPLAY", "OBLIGATORY");
@@ -17307,7 +17310,7 @@ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@a
17307
17310
  class Submit {
17308
17311
  getMatcher() {
17309
17312
  const sign = (0, combi_1.seq)("SIGN", expressions_1.Source);
17310
- const eq = (0, combi_1.alt)("=", "EQ", "IN", "NE", "CP", "GE", "LE", "INCL");
17313
+ const eq = (0, combi_1.alt)("=", "EQ", "IN", "NE", "CP", "GE", "LE", "INCL", "GT", "LT");
17311
17314
  const compare = (0, combi_1.seq)(eq, expressions_1.Source);
17312
17315
  const between = (0, combi_1.seq)("BETWEEN", expressions_1.Source, "AND", expressions_1.Source);
17313
17316
  const selectionTable = (0, combi_1.seq)("WITH SELECTION-TABLE", expressions_1.Source);
@@ -23221,6 +23224,9 @@ class TypeUtils {
23221
23224
  }
23222
23225
  return true;
23223
23226
  }
23227
+ else if (target instanceof basic_1.SimpleType) {
23228
+ return this.isCharLikeStrict(source);
23229
+ }
23224
23230
  else if (target instanceof basic_1.CLikeType) {
23225
23231
  return this.isCharLikeStrict(source);
23226
23232
  }
@@ -27717,9 +27723,10 @@ class Source {
27717
27723
  if (foundType === undefined && s) {
27718
27724
  return new basic_1.DataReference(s);
27719
27725
  }
27720
- else {
27721
- return foundType;
27726
+ else if (foundType) {
27727
+ return new basic_1.DataReference(foundType);
27722
27728
  }
27729
+ return undefined;
27723
27730
  }
27724
27731
  case "FILTER":
27725
27732
  {
@@ -32007,12 +32014,11 @@ class Loop {
32007
32014
  const message = "No source type determined";
32008
32015
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
32009
32016
  }
32010
- return;
32011
32017
  }
32012
32018
  else if (sourceType instanceof basic_1.UnknownType) {
32013
32019
  const message = "Loop, not a table type, " + sourceType.getError();
32014
32020
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
32015
- return;
32021
+ sourceType = new basic_1.VoidType("Loop, not a table type");
32016
32022
  }
32017
32023
  else if (sourceType instanceof basic_1.TableType
32018
32024
  && target === undefined
@@ -32020,7 +32026,6 @@ class Loop {
32020
32026
  && node.getChildren().length === 4) {
32021
32027
  const message = "Loop, no header line";
32022
32028
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
32023
- return;
32024
32029
  }
32025
32030
  else if (!(sourceType instanceof basic_1.TableType)
32026
32031
  && !(sourceType instanceof basic_1.AnyType)
@@ -32029,14 +32034,12 @@ class Loop {
32029
32034
  && concat.startsWith("LOOP AT GROUP ") === false) {
32030
32035
  const message = "Loop, not a table type";
32031
32036
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
32032
- return;
32033
32037
  }
32034
32038
  else if (loopTarget === undefined
32035
32039
  && sourceType instanceof basic_1.TableType
32036
32040
  && sourceType.isWithHeader() === false) {
32037
32041
  const message = "Loop, no header";
32038
32042
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
32039
- return;
32040
32043
  }
32041
32044
  const targetConcat = loopTarget === null || loopTarget === void 0 ? void 0 : loopTarget.concatTokens().toUpperCase();
32042
32045
  if (sourceType instanceof basic_1.TableType) {
@@ -35723,13 +35726,13 @@ class FlowGraph {
35723
35726
  this.label = label;
35724
35727
  }
35725
35728
  toDigraph() {
35726
- return `digraph G {
35727
- labelloc="t";
35728
- label="${this.label}";
35729
- graph [fontname = "helvetica"];
35730
- node [fontname = "helvetica", shape="box"];
35731
- edge [fontname = "helvetica"];
35732
- ${this.toTextEdges()}
35729
+ return `digraph G {
35730
+ labelloc="t";
35731
+ label="${this.label}";
35732
+ graph [fontname = "helvetica"];
35733
+ node [fontname = "helvetica", shape="box"];
35734
+ edge [fontname = "helvetica"];
35735
+ ${this.toTextEdges()}
35733
35736
  }`;
35734
35737
  }
35735
35738
  listSources(node) {
@@ -44152,13 +44155,13 @@ class Help {
44152
44155
  /////////////////////////////////////////////////
44153
44156
  static dumpABAP(file, reg, textDocument, position) {
44154
44157
  let content = "";
44155
- content = `
44156
- <a href="#_tokens" rel="no-refresh">Tokens</a> |
44157
- <a href="#_statements" rel="no-refresh">Statements</a> |
44158
- <a href="#_structure" rel="no-refresh">Structure</a> |
44159
- <a href="#_files" rel="no-refresh">Files</a> |
44160
- <a href="#_info" rel="no-refresh">Info Dump</a>
44161
- <hr>
44158
+ content = `
44159
+ <a href="#_tokens" rel="no-refresh">Tokens</a> |
44160
+ <a href="#_statements" rel="no-refresh">Statements</a> |
44161
+ <a href="#_structure" rel="no-refresh">Structure</a> |
44162
+ <a href="#_files" rel="no-refresh">Files</a> |
44163
+ <a href="#_info" rel="no-refresh">Info Dump</a>
44164
+ <hr>
44162
44165
  ` +
44163
44166
  "<tt>" + textDocument.uri + " (" +
44164
44167
  (position.line + 1) + ", " +
@@ -44313,9 +44316,9 @@ class Help {
44313
44316
  return ret + "</ul>";
44314
44317
  }
44315
44318
  static tokens(file) {
44316
- let inner = `<table><tr><td><b>String</b></td><td><b>Type</b></td>
44317
- <td><b>Row</b></td><td><b>Column</b></td>
44318
- <td><b>vRow</b></td><td><b>vColumn</b></td>
44319
+ let inner = `<table><tr><td><b>String</b></td><td><b>Type</b></td>
44320
+ <td><b>Row</b></td><td><b>Column</b></td>
44321
+ <td><b>vRow</b></td><td><b>vColumn</b></td>
44319
44322
  </tr>`;
44320
44323
  for (const token of file.getTokens()) {
44321
44324
  const tStart = token.getStart();
@@ -45536,7 +45539,10 @@ class ABAPObject extends _abstract_object_1.AbstractObject {
45536
45539
  }
45537
45540
  // uri fallback,
45538
45541
  for (const file of this.getABAPFiles()) {
45539
- if (file.getFilename().endsWith(".abap")) {
45542
+ if (file.getFilename().includes(".prog.screen_")) {
45543
+ continue;
45544
+ }
45545
+ else if (file.getFilename().endsWith(".abap")) {
45540
45546
  return file;
45541
45547
  }
45542
45548
  }
@@ -53633,7 +53639,7 @@ class Registry {
53633
53639
  }
53634
53640
  static abaplintVersion() {
53635
53641
  // magic, see build script "version.sh"
53636
- return "2.113.85";
53642
+ return "2.113.87";
53637
53643
  }
53638
53644
  getDDICReferences() {
53639
53645
  return this.ddicReferences;
@@ -53952,10 +53958,10 @@ class SevenBitAscii {
53952
53958
  key: "7bit_ascii",
53953
53959
  title: "Check for 7bit ascii",
53954
53960
  shortDescription: `Only allow characters from the 7bit ASCII set.`,
53955
- extendedInformation: `https://docs.abapopenchecks.org/checks/05/
53956
-
53957
- https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
53958
-
53961
+ extendedInformation: `https://docs.abapopenchecks.org/checks/05/
53962
+
53963
+ https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
53964
+
53959
53965
  Checkes files with extensions ".abap" and ".asddls"`,
53960
53966
  tags: [_irule_1.RuleTag.SingleFile],
53961
53967
  badExample: `WRITE '뽑'.`,
@@ -54161,10 +54167,10 @@ class Abapdoc extends _abap_rule_1.ABAPRule {
54161
54167
  key: "abapdoc",
54162
54168
  title: "Check abapdoc",
54163
54169
  shortDescription: `Various checks regarding abapdoc.`,
54164
- extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
54165
-
54166
- Plus class and interface definitions.
54167
-
54170
+ extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
54171
+
54172
+ Plus class and interface definitions.
54173
+
54168
54174
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#abap-doc-only-for-public-apis`,
54169
54175
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
54170
54176
  };
@@ -54301,27 +54307,27 @@ class AddTestAttributes extends _abap_rule_1.ABAPRule {
54301
54307
  title: "Add test attributes for tests classes with test methods",
54302
54308
  shortDescription: `Add test attributes DURATION and RISK LEVEL for tests classes with test methods`,
54303
54309
  tags: [_irule_1.RuleTag.SingleFile],
54304
- badExample: `CLASS ltcl_test1 DEFINITION FINAL FOR TESTING.
54305
- PUBLIC SECTION.
54306
- PROTECTED SECTION.
54307
- PRIVATE SECTION.
54308
- METHODS test FOR TESTING RAISING cx_static_check.
54309
- ENDCLASS.
54310
-
54311
- CLASS ltcl_test1 IMPLEMENTATION.
54312
- METHOD test.
54313
- ENDMETHOD.
54310
+ badExample: `CLASS ltcl_test1 DEFINITION FINAL FOR TESTING.
54311
+ PUBLIC SECTION.
54312
+ PROTECTED SECTION.
54313
+ PRIVATE SECTION.
54314
+ METHODS test FOR TESTING RAISING cx_static_check.
54315
+ ENDCLASS.
54316
+
54317
+ CLASS ltcl_test1 IMPLEMENTATION.
54318
+ METHOD test.
54319
+ ENDMETHOD.
54314
54320
  ENDCLASS.`,
54315
- goodExample: `CLASS ltcl_test2 DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
54316
- PUBLIC SECTION.
54317
- PROTECTED SECTION.
54318
- PRIVATE SECTION.
54319
- METHODS test FOR TESTING RAISING cx_static_check.
54320
- ENDCLASS.
54321
-
54322
- CLASS ltcl_test2 IMPLEMENTATION.
54323
- METHOD test.
54324
- ENDMETHOD.
54321
+ goodExample: `CLASS ltcl_test2 DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
54322
+ PUBLIC SECTION.
54323
+ PROTECTED SECTION.
54324
+ PRIVATE SECTION.
54325
+ METHODS test FOR TESTING RAISING cx_static_check.
54326
+ ENDCLASS.
54327
+
54328
+ CLASS ltcl_test2 IMPLEMENTATION.
54329
+ METHOD test.
54330
+ ENDMETHOD.
54325
54331
  ENDCLASS.`,
54326
54332
  };
54327
54333
  }
@@ -54407,49 +54413,49 @@ class AlignParameters extends _abap_rule_1.ABAPRule {
54407
54413
  key: "align_parameters",
54408
54414
  title: "Align Parameters",
54409
54415
  shortDescription: `Checks for vertially aligned parameters`,
54410
- extendedInformation: `Checks:
54411
- * function module calls
54412
- * method calls
54413
- * VALUE constructors
54414
- * NEW constructors
54415
- * RAISE EXCEPTION statements
54416
- * CREATE OBJECT statements
54417
- * RAISE EVENT statements
54418
-
54419
- https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
54420
-
54421
- Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
54422
-
54423
- If parameters are on the same row, no issues are reported, see
54416
+ extendedInformation: `Checks:
54417
+ * function module calls
54418
+ * method calls
54419
+ * VALUE constructors
54420
+ * NEW constructors
54421
+ * RAISE EXCEPTION statements
54422
+ * CREATE OBJECT statements
54423
+ * RAISE EVENT statements
54424
+
54425
+ https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
54426
+
54427
+ Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
54428
+
54429
+ If parameters are on the same row, no issues are reported, see
54424
54430
  https://rules.abaplint.org/max_one_method_parameter_per_line/ for splitting parameters to lines`,
54425
54431
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
54426
- badExample: `CALL FUNCTION 'FOOBAR'
54427
- EXPORTING
54428
- foo = 2
54429
- parameter = 3.
54430
-
54431
- foobar( moo = 1
54432
- param = 1 ).
54433
-
54434
- foo = VALUE #(
54435
- foo = bar
54432
+ badExample: `CALL FUNCTION 'FOOBAR'
54433
+ EXPORTING
54434
+ foo = 2
54435
+ parameter = 3.
54436
+
54437
+ foobar( moo = 1
54438
+ param = 1 ).
54439
+
54440
+ foo = VALUE #(
54441
+ foo = bar
54436
54442
  moo = 2 ).`,
54437
- goodExample: `CALL FUNCTION 'FOOBAR'
54438
- EXPORTING
54439
- foo = 2
54440
- parameter = 3.
54441
-
54442
- foobar( moo = 1
54443
- param = 1 ).
54444
-
54445
- foo = VALUE #(
54446
- foo = bar
54447
- moo = 2 ).
54448
-
54449
- DATA(sdf) = VALUE type(
54450
- common_val = 2
54451
- another_common = 5
54452
- ( row_value = 4
54443
+ goodExample: `CALL FUNCTION 'FOOBAR'
54444
+ EXPORTING
54445
+ foo = 2
54446
+ parameter = 3.
54447
+
54448
+ foobar( moo = 1
54449
+ param = 1 ).
54450
+
54451
+ foo = VALUE #(
54452
+ foo = bar
54453
+ moo = 2 ).
54454
+
54455
+ DATA(sdf) = VALUE type(
54456
+ common_val = 2
54457
+ another_common = 5
54458
+ ( row_value = 4
54453
54459
  value_foo = 5 ) ).`,
54454
54460
  };
54455
54461
  }
@@ -54883,37 +54889,37 @@ class AlignTypeExpressions extends _abap_rule_1.ABAPRule {
54883
54889
  key: "align_type_expressions",
54884
54890
  title: "Align TYPE expressions",
54885
54891
  shortDescription: `Align TYPE expressions in statements`,
54886
- extendedInformation: `
54887
- Currently works for METHODS + BEGIN OF
54888
-
54889
- If BEGIN OF has an INCLUDE TYPE its ignored
54890
-
54891
- Also note that clean ABAP does not recommend aligning TYPE clauses:
54892
+ extendedInformation: `
54893
+ Currently works for METHODS + BEGIN OF
54894
+
54895
+ If BEGIN OF has an INCLUDE TYPE its ignored
54896
+
54897
+ Also note that clean ABAP does not recommend aligning TYPE clauses:
54892
54898
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-align-type-clauses`,
54893
54899
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix],
54894
- badExample: `
54895
- TYPES: BEGIN OF foo,
54896
- bar TYPE i,
54897
- foobar TYPE i,
54898
- END OF foo.
54899
-
54900
- INTERFACE lif.
54901
- METHODS bar
54902
- IMPORTING
54903
- foo TYPE i
54904
- foobar TYPE i.
54900
+ badExample: `
54901
+ TYPES: BEGIN OF foo,
54902
+ bar TYPE i,
54903
+ foobar TYPE i,
54904
+ END OF foo.
54905
+
54906
+ INTERFACE lif.
54907
+ METHODS bar
54908
+ IMPORTING
54909
+ foo TYPE i
54910
+ foobar TYPE i.
54905
54911
  ENDINTERFACE.`,
54906
- goodExample: `
54907
- TYPES: BEGIN OF foo,
54908
- bar TYPE i,
54909
- foobar TYPE i,
54910
- END OF foo.
54911
-
54912
- INTERFACE lif.
54913
- METHODS bar
54914
- IMPORTING
54915
- foo TYPE i
54916
- foobar TYPE i.
54912
+ goodExample: `
54913
+ TYPES: BEGIN OF foo,
54914
+ bar TYPE i,
54915
+ foobar TYPE i,
54916
+ END OF foo.
54917
+
54918
+ INTERFACE lif.
54919
+ METHODS bar
54920
+ IMPORTING
54921
+ foo TYPE i
54922
+ foobar TYPE i.
54917
54923
  ENDINTERFACE.`,
54918
54924
  };
54919
54925
  }
@@ -55192,16 +55198,16 @@ class AmbiguousStatement extends _abap_rule_1.ABAPRule {
55192
55198
  return {
55193
55199
  key: "ambiguous_statement",
55194
55200
  title: "Check for ambigious statements",
55195
- shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
55196
- Add "TABLE" keyword or "@" for escaping SQL variables
55197
-
55201
+ shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
55202
+ Add "TABLE" keyword or "@" for escaping SQL variables
55203
+
55198
55204
  Only works if the target version is 740sp05 or above`,
55199
55205
  tags: [_irule_1.RuleTag.SingleFile],
55200
- badExample: `DELETE foo FROM bar.
55206
+ badExample: `DELETE foo FROM bar.
55201
55207
  MODIFY foo FROM bar.`,
55202
- goodExample: `DELETE foo FROM @bar.
55203
- DELETE TABLE itab FROM 2.
55204
- MODIFY zfoo FROM @wa.
55208
+ goodExample: `DELETE foo FROM @bar.
55209
+ DELETE TABLE itab FROM 2.
55210
+ MODIFY zfoo FROM @wa.
55205
55211
  MODIFY TABLE foo FROM bar.`,
55206
55212
  };
55207
55213
  }
@@ -55306,16 +55312,16 @@ class AvoidUse extends _abap_rule_1.ABAPRule {
55306
55312
  key: "avoid_use",
55307
55313
  title: "Avoid use of certain statements",
55308
55314
  shortDescription: `Detects usage of certain statements.`,
55309
- extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
55310
-
55311
- Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
55312
-
55313
- STATICS: use CLASS-DATA instead
55314
-
55315
- DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
55316
-
55317
- TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
55318
-
55315
+ extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
55316
+
55317
+ Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
55318
+
55319
+ STATICS: use CLASS-DATA instead
55320
+
55321
+ DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
55322
+
55323
+ TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
55324
+
55319
55325
  BREAK points`,
55320
55326
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
55321
55327
  };
@@ -55447,11 +55453,11 @@ class BeginEndNames extends _abap_rule_1.ABAPRule {
55447
55453
  title: "Check BEGIN END names",
55448
55454
  shortDescription: `Check BEGIN OF and END OF names match, plus there must be statements between BEGIN and END`,
55449
55455
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
55450
- badExample: `DATA: BEGIN OF stru,
55451
- field TYPE i,
55456
+ badExample: `DATA: BEGIN OF stru,
55457
+ field TYPE i,
55452
55458
  END OF structure_not_the_same.`,
55453
- goodExample: `DATA: BEGIN OF stru,
55454
- field TYPE i,
55459
+ goodExample: `DATA: BEGIN OF stru,
55460
+ field TYPE i,
55455
55461
  END OF stru.`,
55456
55462
  };
55457
55463
  }
@@ -55548,20 +55554,20 @@ class BeginSingleInclude extends _abap_rule_1.ABAPRule {
55548
55554
  title: "BEGIN contains single INCLUDE",
55549
55555
  shortDescription: `Finds TYPE BEGIN with just one INCLUDE TYPE, and DATA with single INCLUDE STRUCTURE`,
55550
55556
  tags: [_irule_1.RuleTag.SingleFile],
55551
- badExample: `TYPES: BEGIN OF dummy1.
55552
- INCLUDE TYPE dselc.
55553
- TYPES: END OF dummy1.
55554
-
55555
- DATA BEGIN OF foo.
55556
- INCLUDE STRUCTURE syst.
55557
- DATA END OF foo.
55558
-
55559
- STATICS BEGIN OF bar.
55560
- INCLUDE STRUCTURE syst.
55557
+ badExample: `TYPES: BEGIN OF dummy1.
55558
+ INCLUDE TYPE dselc.
55559
+ TYPES: END OF dummy1.
55560
+
55561
+ DATA BEGIN OF foo.
55562
+ INCLUDE STRUCTURE syst.
55563
+ DATA END OF foo.
55564
+
55565
+ STATICS BEGIN OF bar.
55566
+ INCLUDE STRUCTURE syst.
55561
55567
  STATICS END OF bar.`,
55562
- goodExample: `DATA BEGIN OF foo.
55563
- DATA field TYPE i.
55564
- INCLUDE STRUCTURE dselc.
55568
+ goodExample: `DATA BEGIN OF foo.
55569
+ DATA field TYPE i.
55570
+ INCLUDE STRUCTURE dselc.
55565
55571
  DATA END OF foo.`,
55566
55572
  };
55567
55573
  }
@@ -55651,9 +55657,9 @@ class CallTransactionAuthorityCheck extends _abap_rule_1.ABAPRule {
55651
55657
  extendedInformation: `https://docs.abapopenchecks.org/checks/54/`,
55652
55658
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
55653
55659
  badExample: `CALL TRANSACTION 'FOO'.`,
55654
- goodExample: `TRY.
55655
- CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
55656
- CATCH cx_sy_authorization_error.
55660
+ goodExample: `TRY.
55661
+ CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
55662
+ CATCH cx_sy_authorization_error.
55657
55663
  ENDTRY.`,
55658
55664
  };
55659
55665
  }
@@ -55718,10 +55724,10 @@ class CDSCommentStyle {
55718
55724
  key: "cds_comment_style",
55719
55725
  title: "CDS Comment Style",
55720
55726
  shortDescription: `Check for obsolete comment style`,
55721
- extendedInformation: `Check for obsolete comment style
55722
-
55723
- Comments starting with "--" are considered obsolete
55724
-
55727
+ extendedInformation: `Check for obsolete comment style
55728
+
55729
+ Comments starting with "--" are considered obsolete
55730
+
55725
55731
  https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abencds_general_syntax_rules.htm`,
55726
55732
  tags: [_irule_1.RuleTag.SingleFile],
55727
55733
  badExample: "-- this is a comment",
@@ -55787,10 +55793,10 @@ class CDSLegacyView {
55787
55793
  key: "cds_legacy_view",
55788
55794
  title: "CDS Legacy View",
55789
55795
  shortDescription: `Identify CDS Legacy Views`,
55790
- extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
55791
-
55792
- https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
55793
-
55796
+ extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
55797
+
55798
+ https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
55799
+
55794
55800
  v755 and up`,
55795
55801
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Upport],
55796
55802
  };
@@ -55945,10 +55951,10 @@ class ChainMainlyDeclarations extends _abap_rule_1.ABAPRule {
55945
55951
  key: "chain_mainly_declarations",
55946
55952
  title: "Chain mainly declarations",
55947
55953
  shortDescription: `Chain mainly declarations, allows chaining for the configured statements, reports errors for other statements.`,
55948
- extendedInformation: `
55949
- https://docs.abapopenchecks.org/checks/23/
55950
-
55951
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
55954
+ extendedInformation: `
55955
+ https://docs.abapopenchecks.org/checks/23/
55956
+
55957
+ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
55952
55958
  `,
55953
55959
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
55954
55960
  badExample: `CALL METHOD: bar.`,
@@ -56124,17 +56130,17 @@ class ChangeIfToCase extends _abap_rule_1.ABAPRule {
56124
56130
  title: "Change IF to CASE",
56125
56131
  shortDescription: `Finds IF constructs that can be changed to CASE`,
56126
56132
  // eslint-disable-next-line max-len
56127
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
56128
-
56133
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
56134
+
56129
56135
  If the first comparison is a boolean compare, no issue is reported.`,
56130
56136
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
56131
- badExample: `IF l_fcat-fieldname EQ 'FOO'.
56132
- ELSEIF l_fcat-fieldname = 'BAR'
56133
- OR l_fcat-fieldname = 'MOO'.
56137
+ badExample: `IF l_fcat-fieldname EQ 'FOO'.
56138
+ ELSEIF l_fcat-fieldname = 'BAR'
56139
+ OR l_fcat-fieldname = 'MOO'.
56134
56140
  ENDIF.`,
56135
- goodExample: `CASE l_fcat-fieldname.
56136
- WHEN 'FOO'.
56137
- WHEN 'BAR' OR 'MOO'.
56141
+ goodExample: `CASE l_fcat-fieldname.
56142
+ WHEN 'FOO'.
56143
+ WHEN 'BAR' OR 'MOO'.
56138
56144
  ENDCASE.`,
56139
56145
  };
56140
56146
  }
@@ -56271,8 +56277,8 @@ class CheckAbstract extends _abap_rule_1.ABAPRule {
56271
56277
  return {
56272
56278
  key: "check_abstract",
56273
56279
  title: "Check abstract methods and classes",
56274
- shortDescription: `Checks abstract methods and classes:
56275
- - class defined as abstract and final,
56280
+ shortDescription: `Checks abstract methods and classes:
56281
+ - class defined as abstract and final,
56276
56282
  - non-abstract class contains abstract methods`,
56277
56283
  extendedInformation: `If a class defines only constants, use an interface instead`,
56278
56284
  tags: [_irule_1.RuleTag.SingleFile],
@@ -56353,11 +56359,11 @@ class CheckComments extends _abap_rule_1.ABAPRule {
56353
56359
  return {
56354
56360
  key: "check_comments",
56355
56361
  title: "Check Comments",
56356
- shortDescription: `
56362
+ shortDescription: `
56357
56363
  Various checks for comment usage.`,
56358
- extendedInformation: `
56359
- Detects end of line comments. Comments starting with "#EC" or "##" are ignored
56360
-
56364
+ extendedInformation: `
56365
+ Detects end of line comments. Comments starting with "#EC" or "##" are ignored
56366
+
56361
56367
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#put-comments-before-the-statement-they-relate-to`,
56362
56368
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
56363
56369
  badExample: `WRITE 2. " descriptive comment`,
@@ -56519,9 +56525,9 @@ class CheckInclude {
56519
56525
  key: "check_include",
56520
56526
  title: "Check INCLUDEs",
56521
56527
  shortDescription: `Checks INCLUDE statements`,
56522
- extendedInformation: `
56523
- * Reports unused includes
56524
- * Errors if the includes are not found
56528
+ extendedInformation: `
56529
+ * Reports unused includes
56530
+ * Errors if the includes are not found
56525
56531
  * Error if including a main program`,
56526
56532
  tags: [_irule_1.RuleTag.Syntax],
56527
56533
  };
@@ -56597,14 +56603,14 @@ class CheckSubrc extends _abap_rule_1.ABAPRule {
56597
56603
  key: "check_subrc",
56598
56604
  title: "Check sy-subrc",
56599
56605
  shortDescription: `Check sy-subrc`,
56600
- extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
56601
-
56602
- If sy-dbcnt is checked after database statements, it is considered okay.
56603
-
56604
- "SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
56605
-
56606
- If IS ASSIGNED is checked after assigning, it is considered okay.
56607
-
56606
+ extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
56607
+
56608
+ If sy-dbcnt is checked after database statements, it is considered okay.
56609
+
56610
+ "SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
56611
+
56612
+ If IS ASSIGNED is checked after assigning, it is considered okay.
56613
+
56608
56614
  FIND statement with MATCH COUNT is considered okay if subrc is not checked`,
56609
56615
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
56610
56616
  pseudoComment: "EC CI_SUBRC",
@@ -57174,17 +57180,17 @@ class ClassicExceptionsOverlap extends _abap_rule_1.ABAPRule {
57174
57180
  shortDescription: `Find overlapping classic exceptions`,
57175
57181
  extendedInformation: `When debugging its typically good to know exactly which exception is caught`,
57176
57182
  tags: [_irule_1.RuleTag.SingleFile],
57177
- badExample: `CALL FUNCTION 'SOMETHING'
57178
- EXCEPTIONS
57179
- system_failure = 1 MESSAGE lv_message
57180
- communication_failure = 1 MESSAGE lv_message
57181
- resource_failure = 1
57183
+ badExample: `CALL FUNCTION 'SOMETHING'
57184
+ EXCEPTIONS
57185
+ system_failure = 1 MESSAGE lv_message
57186
+ communication_failure = 1 MESSAGE lv_message
57187
+ resource_failure = 1
57182
57188
  OTHERS = 1.`,
57183
- goodExample: `CALL FUNCTION 'SOMETHING'
57184
- EXCEPTIONS
57185
- system_failure = 1 MESSAGE lv_message
57186
- communication_failure = 2 MESSAGE lv_message
57187
- resource_failure = 3
57189
+ goodExample: `CALL FUNCTION 'SOMETHING'
57190
+ EXCEPTIONS
57191
+ system_failure = 1 MESSAGE lv_message
57192
+ communication_failure = 2 MESSAGE lv_message
57193
+ resource_failure = 3
57188
57194
  OTHERS = 4.`,
57189
57195
  };
57190
57196
  }
@@ -57442,7 +57448,7 @@ class CommentedCode extends _abap_rule_1.ABAPRule {
57442
57448
  key: "commented_code",
57443
57449
  title: "Find commented code",
57444
57450
  shortDescription: `Detects usage of commented out code.`,
57445
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it
57451
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it
57446
57452
  https://docs.abapopenchecks.org/checks/14/`,
57447
57453
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
57448
57454
  badExample: `* WRITE 'hello world'.`,
@@ -57675,10 +57681,10 @@ class ConstructorVisibilityPublic {
57675
57681
  key: "constructor_visibility_public",
57676
57682
  title: "Check constructor visibility is public",
57677
57683
  shortDescription: `Constructor must be placed in the public section, even if the class is not CREATE PUBLIC.`,
57678
- extendedInformation: `
57679
- This only applies to global classes.
57680
-
57681
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
57684
+ extendedInformation: `
57685
+ This only applies to global classes.
57686
+
57687
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
57682
57688
  https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abeninstance_constructor_guidl.htm`,
57683
57689
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
57684
57690
  };
@@ -57753,8 +57759,8 @@ class ContainsTab extends _abap_rule_1.ABAPRule {
57753
57759
  key: "contains_tab",
57754
57760
  title: "Code contains tab",
57755
57761
  shortDescription: `Checks for usage of tabs (enable to enforce spaces)`,
57756
- extendedInformation: `
57757
- https://docs.abapopenchecks.org/checks/09/
57762
+ extendedInformation: `
57763
+ https://docs.abapopenchecks.org/checks/09/
57758
57764
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
57759
57765
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
57760
57766
  badExample: `\tWRITE 'hello world'.`,
@@ -57841,10 +57847,10 @@ class CyclicOO {
57841
57847
  key: "cyclic_oo",
57842
57848
  title: "Cyclic OO",
57843
57849
  shortDescription: `Finds cyclic/circular OO references`,
57844
- extendedInformation: `Runs for global INTF + CLAS objects
57845
-
57846
- Objects must be without syntax errors for this rule to take effect
57847
-
57850
+ extendedInformation: `Runs for global INTF + CLAS objects
57851
+
57852
+ Objects must be without syntax errors for this rule to take effect
57853
+
57848
57854
  References in testclass includes are ignored`,
57849
57855
  };
57850
57856
  }
@@ -58087,7 +58093,7 @@ class DangerousStatement extends _abap_rule_1.ABAPRule {
58087
58093
  key: "dangerous_statement",
58088
58094
  title: "Dangerous statement",
58089
58095
  shortDescription: `Detects potentially dangerous statements`,
58090
- extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
58096
+ extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
58091
58097
  dynamic SQL can potentially create SQL injection problems`,
58092
58098
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
58093
58099
  };
@@ -58294,13 +58300,13 @@ class DefinitionsTop extends _abap_rule_1.ABAPRule {
58294
58300
  shortDescription: `Checks that definitions are placed at the beginning of METHODs, FORMs and FUNCTIONs.`,
58295
58301
  extendedInformation: `https://docs.abapopenchecks.org/checks/17/`,
58296
58302
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
58297
- badExample: `FROM foo.
58298
- WRITE 'hello'.
58299
- DATA int TYPE i.
58303
+ badExample: `FROM foo.
58304
+ WRITE 'hello'.
58305
+ DATA int TYPE i.
58300
58306
  ENDFORM.`,
58301
- goodExample: `FROM foo.
58302
- DATA int TYPE i.
58303
- WRITE 'hello'.
58307
+ goodExample: `FROM foo.
58308
+ DATA int TYPE i.
58309
+ WRITE 'hello'.
58304
58310
  ENDFORM.`,
58305
58311
  };
58306
58312
  }
@@ -58842,39 +58848,39 @@ class Downport {
58842
58848
  key: "downport",
58843
58849
  title: "Downport statement",
58844
58850
  shortDescription: `Downport functionality`,
58845
- extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with
58846
- a higher level language version. If successful, various rules are applied to downport the statement.
58847
- Target downport version is always v702, thus rule is only enabled if target version is v702.
58848
-
58849
- Current rules:
58850
- * NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/
58851
- * DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/
58852
- * FIELD-SYMBOL() definitions are outlined
58853
- * CONV is outlined
58854
- * COND is outlined
58855
- * REDUCE is outlined
58856
- * SWITCH is outlined
58857
- * FILTER is outlined
58858
- * APPEND expression is outlined
58859
- * INSERT expression is outlined
58860
- * EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/
58861
- * CAST changed to ?=
58862
- * LOOP AT method_call( ) is outlined
58863
- * VALUE # with structure fields
58864
- * VALUE # with internal table lines
58865
- * Table Expressions are outlined
58866
- * SELECT INTO @DATA definitions are outlined
58867
- * Some occurrences of string template formatting option ALPHA changed to function module call
58868
- * SELECT/INSERT/MODIFY/DELETE/UPDATE "," in field list removed, "@" in source/targets removed
58869
- * PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods
58870
- * RAISE EXCEPTION ... MESSAGE
58871
- * Moving with +=, -=, /=, *=, &&= is expanded
58872
- * line_exists and line_index is downported to READ TABLE
58873
- * ENUMs, but does not nessesarily give the correct type and value
58874
- * MESSAGE with non simple source
58875
-
58876
- Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.
58877
-
58851
+ extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with
58852
+ a higher level language version. If successful, various rules are applied to downport the statement.
58853
+ Target downport version is always v702, thus rule is only enabled if target version is v702.
58854
+
58855
+ Current rules:
58856
+ * NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/
58857
+ * DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/
58858
+ * FIELD-SYMBOL() definitions are outlined
58859
+ * CONV is outlined
58860
+ * COND is outlined
58861
+ * REDUCE is outlined
58862
+ * SWITCH is outlined
58863
+ * FILTER is outlined
58864
+ * APPEND expression is outlined
58865
+ * INSERT expression is outlined
58866
+ * EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/
58867
+ * CAST changed to ?=
58868
+ * LOOP AT method_call( ) is outlined
58869
+ * VALUE # with structure fields
58870
+ * VALUE # with internal table lines
58871
+ * Table Expressions are outlined
58872
+ * SELECT INTO @DATA definitions are outlined
58873
+ * Some occurrences of string template formatting option ALPHA changed to function module call
58874
+ * SELECT/INSERT/MODIFY/DELETE/UPDATE "," in field list removed, "@" in source/targets removed
58875
+ * PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods
58876
+ * RAISE EXCEPTION ... MESSAGE
58877
+ * Moving with +=, -=, /=, *=, &&= is expanded
58878
+ * line_exists and line_index is downported to READ TABLE
58879
+ * ENUMs, but does not nessesarily give the correct type and value
58880
+ * MESSAGE with non simple source
58881
+
58882
+ Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.
58883
+
58878
58884
  Make sure to test the downported code, it might not always be completely correct.`,
58879
58885
  tags: [_irule_1.RuleTag.Downport, _irule_1.RuleTag.Quickfix],
58880
58886
  };
@@ -59489,10 +59495,10 @@ Make sure to test the downported code, it might not always be completely correct
59489
59495
  const fieldName = f.concatTokens();
59490
59496
  fieldDefinition += indentation + " " + fieldName + " TYPE " + tableName + "-" + fieldName + ",\n";
59491
59497
  }
59492
- fieldDefinition = `DATA: BEGIN OF ${name},
59498
+ fieldDefinition = `DATA: BEGIN OF ${name},
59493
59499
  ${fieldDefinition}${indentation} END OF ${name}.`;
59494
59500
  }
59495
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
59501
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
59496
59502
  ${indentation}`);
59497
59503
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
59498
59504
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -59551,12 +59557,12 @@ ${indentation}`);
59551
59557
  }
59552
59558
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59553
59559
  const name = ((_g = inlineData.findFirstExpression(Expressions.TargetField)) === null || _g === void 0 ? void 0 : _g.concatTokens()) || "error";
59554
- let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
59555
- ${fieldDefinitions}${indentation} END OF ${uniqueName}.
59556
- ${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.
59560
+ let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
59561
+ ${fieldDefinitions}${indentation} END OF ${uniqueName}.
59562
+ ${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.
59557
59563
  ${indentation}`);
59558
59564
  if (fieldDefinitions === "") {
59559
- fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.
59565
+ fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.
59560
59566
  ${indentation}`);
59561
59567
  }
59562
59568
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
@@ -59624,7 +59630,7 @@ ${indentation}`);
59624
59630
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59625
59631
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
59626
59632
  const firstToken = high.getFirstToken();
59627
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
59633
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
59628
59634
  ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
59629
59635
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
59630
59636
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -59678,7 +59684,7 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
59678
59684
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59679
59685
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
59680
59686
  const firstToken = high.getFirstToken();
59681
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
59687
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
59682
59688
  ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
59683
59689
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
59684
59690
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -59720,14 +59726,14 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
59720
59726
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
59721
59727
  const firstToken = high.getFirstToken();
59722
59728
  // note that the tabix restore should be done before throwing the exception
59723
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.
59724
- ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
59725
- ${indentation}${tabixBackup} = sy-tabix.
59726
- ${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.
59727
- ${indentation}sy-tabix = ${tabixBackup}.
59728
- ${indentation}IF sy-subrc <> 0.
59729
- ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59730
- ${indentation}ENDIF.
59729
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.
59730
+ ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
59731
+ ${indentation}${tabixBackup} = sy-tabix.
59732
+ ${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.
59733
+ ${indentation}sy-tabix = ${tabixBackup}.
59734
+ ${indentation}IF sy-subrc <> 0.
59735
+ ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59736
+ ${indentation}ENDIF.
59731
59737
  ${indentation}`);
59732
59738
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, startToken.getStart(), tableExpression.getLastToken().getEnd(), uniqueName);
59733
59739
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -59784,7 +59790,7 @@ ${indentation}`);
59784
59790
  const className = classNames[0].concatTokens();
59785
59791
  const targetName = (_b = target.findFirstExpression(Expressions.TargetField)) === null || _b === void 0 ? void 0 : _b.concatTokens();
59786
59792
  const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
59787
- const code = ` DATA ${targetName} TYPE REF TO ${className}.
59793
+ const code = ` DATA ${targetName} TYPE REF TO ${className}.
59788
59794
  ${indentation}CATCH ${className} INTO ${targetName}.`;
59789
59795
  const fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getStart(), node.getEnd(), code);
59790
59796
  return issue_1.Issue.atToken(lowFile, node.getFirstToken(), "Outline DATA", this.getMetadata().key, this.conf.severity, fix);
@@ -59946,16 +59952,16 @@ ${indentation}CATCH ${className} INTO ${targetName}.`;
59946
59952
  const uniqueName1 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59947
59953
  const uniqueName2 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59948
59954
  const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
59949
- let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
59950
- ${indentation}${uniqueName1}-msgid = ${id}.
59955
+ let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
59956
+ ${indentation}${uniqueName1}-msgid = ${id}.
59951
59957
  ${indentation}${uniqueName1}-msgno = ${number}.\n`;
59952
59958
  if (withs.length > 0) {
59953
- abap += `${indentation}${uniqueName1}-attr1 = 'IF_T100_DYN_MSG~MSGV1'.
59954
- ${indentation}${uniqueName1}-attr2 = 'IF_T100_DYN_MSG~MSGV2'.
59955
- ${indentation}${uniqueName1}-attr3 = 'IF_T100_DYN_MSG~MSGV3'.
59959
+ abap += `${indentation}${uniqueName1}-attr1 = 'IF_T100_DYN_MSG~MSGV1'.
59960
+ ${indentation}${uniqueName1}-attr2 = 'IF_T100_DYN_MSG~MSGV2'.
59961
+ ${indentation}${uniqueName1}-attr3 = 'IF_T100_DYN_MSG~MSGV3'.
59956
59962
  ${indentation}${uniqueName1}-attr4 = 'IF_T100_DYN_MSG~MSGV4'.\n`;
59957
59963
  }
59958
- abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
59964
+ abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
59959
59965
  ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`;
59960
59966
  if (withs.length > 0) {
59961
59967
  abap += `${indentation}${uniqueName2}->if_t100_dyn_msg~msgty = 'E'.\n`;
@@ -60067,10 +60073,10 @@ ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`
60067
60073
  let code = "";
60068
60074
  if (sourceRef.findFirstExpression(Expressions.TableExpression)) {
60069
60075
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
60070
- code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).
60071
- IF sy-subrc <> 0.
60072
- RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
60073
- ENDIF.
60076
+ code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).
60077
+ IF sy-subrc <> 0.
60078
+ RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
60079
+ ENDIF.
60074
60080
  GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
60075
60081
  }
60076
60082
  else {
@@ -60159,20 +60165,20 @@ GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
60159
60165
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
60160
60166
  const uniqueFS = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
60161
60167
  const uniqueNameIndex = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
60162
- code += ` items LIKE ${loopSourceName},
60163
- END OF ${groupTargetName}type.
60164
- DATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.
60165
- DATA ${uniqueName} LIKE LINE OF ${groupTargetName}tab.
60168
+ code += ` items LIKE ${loopSourceName},
60169
+ END OF ${groupTargetName}type.
60170
+ DATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.
60171
+ DATA ${uniqueName} LIKE LINE OF ${groupTargetName}tab.
60166
60172
  LOOP AT ${loopSourceName} ${(_l = high.findFirstExpression(Expressions.LoopTarget)) === null || _l === void 0 ? void 0 : _l.concatTokens()}.\n`;
60167
60173
  if (groupIndexName !== undefined) {
60168
60174
  code += `DATA(${uniqueNameIndex}) = sy-tabix.\n`;
60169
60175
  }
60170
- code += `READ TABLE ${groupTargetName}tab ASSIGNING FIELD-SYMBOL(<${uniqueFS}>) WITH KEY ${condition}.
60176
+ code += `READ TABLE ${groupTargetName}tab ASSIGNING FIELD-SYMBOL(<${uniqueFS}>) WITH KEY ${condition}.
60171
60177
  IF sy-subrc = 0.\n`;
60172
60178
  if (groupCountName !== undefined) {
60173
60179
  code += ` <${uniqueFS}>-${groupCountName} = <${uniqueFS}>-${groupCountName} + 1.\n`;
60174
60180
  }
60175
- code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
60181
+ code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
60176
60182
  ELSE.\n`;
60177
60183
  code += ` CLEAR ${uniqueName}.\n`;
60178
60184
  for (const c of group.findAllExpressions(Expressions.LoopGroupByComponent)) {
@@ -60193,8 +60199,8 @@ ELSE.\n`;
60193
60199
  }
60194
60200
  code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE ${uniqueName}-items.\n`;
60195
60201
  code += ` INSERT ${uniqueName} INTO TABLE ${groupTargetName}tab.\n`;
60196
- code += `ENDIF.
60197
- ENDLOOP.
60202
+ code += `ENDIF.
60203
+ ENDLOOP.
60198
60204
  LOOP AT ${groupTargetName}tab ${groupTarget}.`;
60199
60205
  let fix = edit_helper_1.EditHelper.replaceRange(lowFile, high.getFirstToken().getStart(), high.getLastToken().getEnd(), code);
60200
60206
  for (const l of ((_m = highFile.getStructure()) === null || _m === void 0 ? void 0 : _m.findAllStructures(Structures.Loop)) || []) {
@@ -60366,7 +60372,7 @@ LOOP AT ${groupTargetName}tab ${groupTarget}.`;
60366
60372
  const enumName = (_b = high.findExpressionAfterToken("ENUM")) === null || _b === void 0 ? void 0 : _b.concatTokens();
60367
60373
  const structureName = (_c = high.findExpressionAfterToken("STRUCTURE")) === null || _c === void 0 ? void 0 : _c.concatTokens();
60368
60374
  // all ENUMS are char like?
60369
- let code = `TYPES ${enumName} TYPE string.
60375
+ let code = `TYPES ${enumName} TYPE string.
60370
60376
  CONSTANTS: BEGIN OF ${structureName},\n`;
60371
60377
  let count = 1;
60372
60378
  for (const e of enumStructure.findDirectStatements(Statements.TypeEnum).concat(enumStructure.findDirectStatements(Statements.Type))) {
@@ -60410,14 +60416,14 @@ CONSTANTS: BEGIN OF ${structureName},\n`;
60410
60416
  const tabixBackup = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
60411
60417
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
60412
60418
  // restore tabix before exeption
60413
- const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.
60414
- ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
60415
- ${indentation}${tabixBackup} = sy-tabix.
60416
- ${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.
60417
- ${indentation}sy-tabix = ${tabixBackup}.
60418
- ${indentation}IF sy-subrc <> 0.
60419
- ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
60420
- ${indentation}ENDIF.
60419
+ const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.
60420
+ ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
60421
+ ${indentation}${tabixBackup} = sy-tabix.
60422
+ ${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.
60423
+ ${indentation}sy-tabix = ${tabixBackup}.
60424
+ ${indentation}IF sy-subrc <> 0.
60425
+ ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
60426
+ ${indentation}ENDIF.
60421
60427
  ${indentation}${uniqueName}`;
60422
60428
  const start = target.getFirstToken().getStart();
60423
60429
  const end = (_a = tableExpression.findDirectTokenByText("]")) === null || _a === void 0 ? void 0 : _a.getEnd();
@@ -60497,11 +60503,11 @@ ${indentation}${uniqueName}`;
60497
60503
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
60498
60504
  const source = (_b = child.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens();
60499
60505
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
60500
- const code = `DATA ${uniqueName} TYPE string.
60501
- ${indentation}CALL FUNCTION '${functionName}'
60502
- ${indentation} EXPORTING
60503
- ${indentation} input = ${source}
60504
- ${indentation} IMPORTING
60506
+ const code = `DATA ${uniqueName} TYPE string.
60507
+ ${indentation}CALL FUNCTION '${functionName}'
60508
+ ${indentation} EXPORTING
60509
+ ${indentation} input = ${source}
60510
+ ${indentation} IMPORTING
60505
60511
  ${indentation} output = ${uniqueName}.\n`;
60506
60512
  const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), code);
60507
60513
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, child.getFirstToken().getStart(), child.getLastToken().getEnd(), uniqueName);
@@ -61827,12 +61833,12 @@ class EasyToFindMessages {
61827
61833
  key: "easy_to_find_messages",
61828
61834
  title: "Easy to find messages",
61829
61835
  shortDescription: `Make messages easy to find`,
61830
- extendedInformation: `All messages must be statically referenced exactly once
61831
-
61832
- Only MESSAGE and RAISE statments are counted as static references
61833
-
61834
- Also see rule "message_exists"
61835
-
61836
+ extendedInformation: `All messages must be statically referenced exactly once
61837
+
61838
+ Only MESSAGE and RAISE statments are counted as static references
61839
+
61840
+ Also see rule "message_exists"
61841
+
61836
61842
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#make-messages-easy-to-find`,
61837
61843
  tags: [_irule_1.RuleTag.Styleguide],
61838
61844
  };
@@ -61913,13 +61919,13 @@ class EmptyEvent extends _abap_rule_1.ABAPRule {
61913
61919
  shortDescription: `Empty selection screen or list processing event block`,
61914
61920
  extendedInformation: ``,
61915
61921
  tags: [_irule_1.RuleTag.SingleFile],
61916
- badExample: `
61917
- INITIALIZATION.
61918
- WRITE 'hello'.
61922
+ badExample: `
61923
+ INITIALIZATION.
61924
+ WRITE 'hello'.
61919
61925
  END-OF-SELECTION.`,
61920
- goodExample: `
61921
- START-OF-SELECTION.
61922
- PERFORM sdf.
61926
+ goodExample: `
61927
+ START-OF-SELECTION.
61928
+ PERFORM sdf.
61923
61929
  COMMIT WORK.`,
61924
61930
  };
61925
61931
  }
@@ -62011,8 +62017,8 @@ class EmptyLineinStatement extends _abap_rule_1.ABAPRule {
62011
62017
  key: "empty_line_in_statement",
62012
62018
  title: "Find empty lines in statements",
62013
62019
  shortDescription: `Checks that statements do not contain empty lines.`,
62014
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
62015
-
62020
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
62021
+
62016
62022
  https://docs.abapopenchecks.org/checks/41/`,
62017
62023
  tags: [_irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
62018
62024
  badExample: `WRITE\n\nhello.`,
@@ -62188,13 +62194,13 @@ class EmptyStructure extends _abap_rule_1.ABAPRule {
62188
62194
  shortDescription: `Checks that the code does not contain empty blocks.`,
62189
62195
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-empty-if-branches`,
62190
62196
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
62191
- badExample: `IF foo = bar.
62192
- ENDIF.
62193
-
62194
- DO 2 TIMES.
62197
+ badExample: `IF foo = bar.
62198
+ ENDIF.
62199
+
62200
+ DO 2 TIMES.
62195
62201
  ENDDO.`,
62196
- goodExample: `LOOP AT itab WHERE qty = 0 OR date > sy-datum.
62197
- ENDLOOP.
62202
+ goodExample: `LOOP AT itab WHERE qty = 0 OR date > sy-datum.
62203
+ ENDLOOP.
62198
62204
  result = xsdbool( sy-subrc = 0 ).`,
62199
62205
  };
62200
62206
  }
@@ -62336,10 +62342,10 @@ class ExitOrCheck extends _abap_rule_1.ABAPRule {
62336
62342
  return {
62337
62343
  key: "exit_or_check",
62338
62344
  title: "Find EXIT or CHECK outside loops",
62339
- shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
62345
+ shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
62340
62346
  Use RETURN to leave procesing blocks instead.`,
62341
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
62342
- https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
62347
+ extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
62348
+ https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
62343
62349
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#check-vs-return`,
62344
62350
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
62345
62351
  };
@@ -62422,12 +62428,12 @@ class ExpandMacros extends _abap_rule_1.ABAPRule {
62422
62428
  key: "expand_macros",
62423
62429
  title: "Expand Macros",
62424
62430
  shortDescription: `Allows expanding macro calls with quick fixes`,
62425
- extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
62426
-
62431
+ extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
62432
+
62427
62433
  Note that macros/DEFINE cannot be used in the ABAP Cloud programming model`,
62428
- badExample: `DEFINE _hello.
62429
- WRITE 'hello'.
62430
- END-OF-DEFINITION.
62434
+ badExample: `DEFINE _hello.
62435
+ WRITE 'hello'.
62436
+ END-OF-DEFINITION.
62431
62437
  _hello.`,
62432
62438
  goodExample: `WRITE 'hello'.`,
62433
62439
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
@@ -62514,7 +62520,7 @@ class Exporting extends _abap_rule_1.ABAPRule {
62514
62520
  shortDescription: `Detects EXPORTING statements which can be omitted.`,
62515
62521
  badExample: `call_method( EXPORTING foo = bar ).`,
62516
62522
  goodExample: `call_method( foo = bar ).`,
62517
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-optional-keyword-exporting
62523
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-optional-keyword-exporting
62518
62524
  https://docs.abapopenchecks.org/checks/30/`,
62519
62525
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
62520
62526
  };
@@ -62612,7 +62618,7 @@ class ForbiddenIdentifier extends _abap_rule_1.ABAPRule {
62612
62618
  key: "forbidden_identifier",
62613
62619
  title: "Forbidden Identifier",
62614
62620
  shortDescription: `Forbid use of specified identifiers, list of regex.`,
62615
- extendedInformation: `Used in the transpiler to find javascript keywords in ABAP identifiers,
62621
+ extendedInformation: `Used in the transpiler to find javascript keywords in ABAP identifiers,
62616
62622
  https://github.com/abaplint/transpiler/blob/bda94b8b56e2b7f2f87be2168f12361aa530220e/packages/transpiler/src/validation.ts#L44`,
62617
62623
  tags: [_irule_1.RuleTag.SingleFile],
62618
62624
  };
@@ -62854,8 +62860,8 @@ class ForbiddenVoidType {
62854
62860
  key: "forbidden_void_type",
62855
62861
  title: "Forbidden Void Types",
62856
62862
  shortDescription: `Avoid usage of specified void types.`,
62857
- extendedInformation: `Inspiration:
62858
- BOOLEAN, BOOLE_D, CHAR01, CHAR1, CHAR10, CHAR12, CHAR128, CHAR2, CHAR20, CHAR4, CHAR70,
62863
+ extendedInformation: `Inspiration:
62864
+ BOOLEAN, BOOLE_D, CHAR01, CHAR1, CHAR10, CHAR12, CHAR128, CHAR2, CHAR20, CHAR4, CHAR70,
62859
62865
  DATS, TIMS, DATUM, FLAG, INT4, NUMC3, NUMC4, SAP_BOOL, TEXT25, TEXT80, X255, XFELD`,
62860
62866
  };
62861
62867
  }
@@ -63098,9 +63104,9 @@ class FullyTypeITabs extends _abap_rule_1.ABAPRule {
63098
63104
  key: "fully_type_itabs",
63099
63105
  title: "Fully type internal tables",
63100
63106
  shortDescription: `No implict table types or table keys`,
63101
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-the-right-table-type
63107
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-the-right-table-type
63102
63108
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key`,
63103
- badExample: `DATA lt_foo TYPE TABLE OF ty.
63109
+ badExample: `DATA lt_foo TYPE TABLE OF ty.
63104
63110
  DATA lt_bar TYPE STANDARD TABLE OF ty.`,
63105
63111
  goodExample: `DATA lt_foo TYPE STANDARD TABLE OF ty WITH EMPTY KEY.`,
63106
63112
  tags: [_irule_1.RuleTag.SingleFile],
@@ -63285,26 +63291,26 @@ class FunctionalWriting extends _abap_rule_1.ABAPRule {
63285
63291
  key: "functional_writing",
63286
63292
  title: "Use functional writing",
63287
63293
  shortDescription: `Detects usage of call method when functional style calls can be used.`,
63288
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-calls
63294
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-calls
63289
63295
  https://docs.abapopenchecks.org/checks/07/`,
63290
63296
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
63291
- badExample: `CALL METHOD zcl_class=>method( ).
63292
- CALL METHOD cl_abap_typedescr=>describe_by_name
63293
- EXPORTING
63294
- p_name = 'NAME'
63295
- RECEIVING
63296
- p_descr_ref = lr_typedescr
63297
- EXCEPTIONS
63298
- type_not_found = 1
63297
+ badExample: `CALL METHOD zcl_class=>method( ).
63298
+ CALL METHOD cl_abap_typedescr=>describe_by_name
63299
+ EXPORTING
63300
+ p_name = 'NAME'
63301
+ RECEIVING
63302
+ p_descr_ref = lr_typedescr
63303
+ EXCEPTIONS
63304
+ type_not_found = 1
63299
63305
  OTHERS = 2.`,
63300
- goodExample: `zcl_class=>method( ).
63301
- cl_abap_typedescr=>describe_by_name(
63302
- EXPORTING
63303
- p_name = 'NAME'
63304
- RECEIVING
63305
- p_descr_ref = lr_typedescr
63306
- EXCEPTIONS
63307
- type_not_found = 1
63306
+ goodExample: `zcl_class=>method( ).
63307
+ cl_abap_typedescr=>describe_by_name(
63308
+ EXPORTING
63309
+ p_name = 'NAME'
63310
+ RECEIVING
63311
+ p_descr_ref = lr_typedescr
63312
+ EXCEPTIONS
63313
+ type_not_found = 1
63308
63314
  OTHERS = 2 ).`,
63309
63315
  };
63310
63316
  }
@@ -63415,14 +63421,14 @@ class GlobalClass extends _abap_rule_1.ABAPRule {
63415
63421
  key: "global_class",
63416
63422
  title: "Global class checks",
63417
63423
  shortDescription: `Checks related to global classes`,
63418
- extendedInformation: `* global classes must be in own files
63419
-
63420
- * file names must match class name
63421
-
63422
- * file names must match interface name
63423
-
63424
- * global classes must be global definitions
63425
-
63424
+ extendedInformation: `* global classes must be in own files
63425
+
63426
+ * file names must match class name
63427
+
63428
+ * file names must match interface name
63429
+
63430
+ * global classes must be global definitions
63431
+
63426
63432
  * global interfaces must be global definitions`,
63427
63433
  tags: [_irule_1.RuleTag.Syntax],
63428
63434
  };
@@ -63521,21 +63527,21 @@ class IdenticalConditions extends _abap_rule_1.ABAPRule {
63521
63527
  return {
63522
63528
  key: "identical_conditions",
63523
63529
  title: "Identical conditions",
63524
- shortDescription: `Find identical conditions in IF + CASE + WHILE etc
63525
-
63530
+ shortDescription: `Find identical conditions in IF + CASE + WHILE etc
63531
+
63526
63532
  Prerequsites: code is pretty printed with identical cAsE`,
63527
63533
  tags: [_irule_1.RuleTag.SingleFile],
63528
- badExample: `IF foo = bar OR 1 = a OR foo = bar.
63529
- ENDIF.
63530
- CASE bar.
63531
- WHEN '1'.
63532
- WHEN 'A' OR '1'.
63534
+ badExample: `IF foo = bar OR 1 = a OR foo = bar.
63535
+ ENDIF.
63536
+ CASE bar.
63537
+ WHEN '1'.
63538
+ WHEN 'A' OR '1'.
63533
63539
  ENDCASE.`,
63534
- goodExample: `IF foo = bar OR 1 = a.
63535
- ENDIF.
63536
- CASE bar.
63537
- WHEN '1'.
63538
- WHEN 'A'.
63540
+ goodExample: `IF foo = bar OR 1 = a.
63541
+ ENDIF.
63542
+ CASE bar.
63543
+ WHEN '1'.
63544
+ WHEN 'A'.
63539
63545
  ENDCASE.`,
63540
63546
  };
63541
63547
  }
@@ -63669,23 +63675,23 @@ class IdenticalContents extends _abap_rule_1.ABAPRule {
63669
63675
  key: "identical_contents",
63670
63676
  title: "Identical contents",
63671
63677
  shortDescription: `Find identical contents in blocks inside IFs, both in the beginning and in the end.`,
63672
- extendedInformation: `
63673
- Prerequsites: code is pretty printed with identical cAsE
63674
-
63678
+ extendedInformation: `
63679
+ Prerequsites: code is pretty printed with identical cAsE
63680
+
63675
63681
  Chained statments are ignored`,
63676
63682
  tags: [_irule_1.RuleTag.SingleFile],
63677
- badExample: `IF foo = bar.
63678
- WRITE 'bar'.
63679
- WRITE 'world'.
63680
- ELSE.
63681
- WRITE 'foo'.
63682
- WRITE 'world'.
63683
+ badExample: `IF foo = bar.
63684
+ WRITE 'bar'.
63685
+ WRITE 'world'.
63686
+ ELSE.
63687
+ WRITE 'foo'.
63688
+ WRITE 'world'.
63683
63689
  ENDIF.`,
63684
- goodExample: `IF foo = bar.
63685
- WRITE 'bar'.
63686
- ELSE.
63687
- WRITE 'foo'.
63688
- ENDIF.
63690
+ goodExample: `IF foo = bar.
63691
+ WRITE 'bar'.
63692
+ ELSE.
63693
+ WRITE 'foo'.
63694
+ ENDIF.
63689
63695
  WRITE 'world'.`,
63690
63696
  };
63691
63697
  }
@@ -63793,12 +63799,12 @@ class IdenticalDescriptions {
63793
63799
  key: "identical_descriptions",
63794
63800
  title: "Identical descriptions",
63795
63801
  shortDescription: `Searches for objects with the same type and same description`,
63796
- extendedInformation: `Case insensitive
63797
-
63798
- Only checks the master language descriptions
63799
-
63800
- Dependencies are skipped
63801
-
63802
+ extendedInformation: `Case insensitive
63803
+
63804
+ Only checks the master language descriptions
63805
+
63806
+ Dependencies are skipped
63807
+
63802
63808
  Works for: INTF, CLAS, DOMA, DTEL, FUNC in same FUGR`,
63803
63809
  tags: [],
63804
63810
  };
@@ -63972,43 +63978,43 @@ class IfInIf extends _abap_rule_1.ABAPRule {
63972
63978
  key: "if_in_if",
63973
63979
  title: "IF in IF",
63974
63980
  shortDescription: `Detects nested ifs which can be refactored.`,
63975
- extendedInformation: `
63976
- Directly nested IFs without ELSE can be refactored to a single condition using AND.
63977
-
63978
- ELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.
63979
-
63980
- https://docs.abapopenchecks.org/checks/01/
63981
+ extendedInformation: `
63982
+ Directly nested IFs without ELSE can be refactored to a single condition using AND.
63983
+
63984
+ ELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.
63985
+
63986
+ https://docs.abapopenchecks.org/checks/01/
63981
63987
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low`,
63982
- badExample: `IF condition1.
63983
- IF condition2.
63984
- ...
63985
- ENDIF.
63986
- ENDIF.
63987
-
63988
- IF condition1.
63989
- ...
63990
- ELSE.
63991
- IF condition2.
63992
- ...
63993
- ENDIF.
63988
+ badExample: `IF condition1.
63989
+ IF condition2.
63990
+ ...
63991
+ ENDIF.
63992
+ ENDIF.
63993
+
63994
+ IF condition1.
63995
+ ...
63996
+ ELSE.
63997
+ IF condition2.
63998
+ ...
63999
+ ENDIF.
63994
64000
  ENDIF.`,
63995
- goodExample: `IF ( condition1 ) AND ( condition2 ).
63996
- ...
63997
- ENDIF.
63998
-
63999
- IF condition1.
64000
- ...
64001
- ELSEIF condition2.
64002
- ...
64003
- ENDIF.
64004
-
64005
- CASE variable.
64006
- WHEN value1.
64007
- ...
64008
- WHEN value2.
64009
- IF condition2.
64010
- ...
64011
- ENDIF.
64001
+ goodExample: `IF ( condition1 ) AND ( condition2 ).
64002
+ ...
64003
+ ENDIF.
64004
+
64005
+ IF condition1.
64006
+ ...
64007
+ ELSEIF condition2.
64008
+ ...
64009
+ ENDIF.
64010
+
64011
+ CASE variable.
64012
+ WHEN value1.
64013
+ ...
64014
+ WHEN value2.
64015
+ IF condition2.
64016
+ ...
64017
+ ENDIF.
64012
64018
  ENDCASE.`,
64013
64019
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
64014
64020
  };
@@ -64193,9 +64199,9 @@ class ImplementMethods extends _abap_rule_1.ABAPRule {
64193
64199
  for (const i of ((_a = file.getStructure()) === null || _a === void 0 ? void 0 : _a.findAllStatements(Statements.ClassImplementation)) || []) {
64194
64200
  const name = (_b = i.findFirstExpression(Expressions.ClassName)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr().toUpperCase();
64195
64201
  if (name === impl.identifier.getName().toUpperCase()) {
64196
- return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
64197
- METHOD ${methodName.toLowerCase()}.
64198
- RETURN. " todo, implement method
64202
+ return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
64203
+ METHOD ${methodName.toLowerCase()}.
64204
+ RETURN. " todo, implement method
64199
64205
  ENDMETHOD.`);
64200
64206
  }
64201
64207
  }
@@ -64374,14 +64380,14 @@ class ImplicitStartOfSelection extends _abap_rule_1.ABAPRule {
64374
64380
  key: "implicit_start_of_selection",
64375
64381
  title: "Implicit START-OF-SELECTION",
64376
64382
  shortDescription: `Add explicit selection screen event handling`,
64377
- extendedInformation: `Only runs for executable programs
64378
-
64383
+ extendedInformation: `Only runs for executable programs
64384
+
64379
64385
  https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapstart-of-selection.htm`,
64380
64386
  tags: [_irule_1.RuleTag.SingleFile],
64381
- badExample: `REPORT zfoo.
64387
+ badExample: `REPORT zfoo.
64382
64388
  WRITE 'hello'.`,
64383
- goodExample: `
64384
- START-OF-SELECTION.
64389
+ goodExample: `
64390
+ START-OF-SELECTION.
64385
64391
  WRITE 'hello'.`,
64386
64392
  };
64387
64393
  }
@@ -64486,19 +64492,19 @@ class InStatementIndentation extends _abap_rule_1.ABAPRule {
64486
64492
  key: "in_statement_indentation",
64487
64493
  title: "In-statement indentation",
64488
64494
  shortDescription: "Checks alignment within statements which span multiple lines.",
64489
- extendedInformation: `Lines following the first line should be indented once (2 spaces).
64490
-
64491
- For block declaration statements, lines after the first should be indented an additional time (default: +2 spaces)
64495
+ extendedInformation: `Lines following the first line should be indented once (2 spaces).
64496
+
64497
+ For block declaration statements, lines after the first should be indented an additional time (default: +2 spaces)
64492
64498
  to distinguish them better from code within the block.`,
64493
- badExample: `IF 1 = 1
64494
- AND 2 = 2.
64495
- WRITE 'hello' &&
64496
- 'world'.
64499
+ badExample: `IF 1 = 1
64500
+ AND 2 = 2.
64501
+ WRITE 'hello' &&
64502
+ 'world'.
64497
64503
  ENDIF.`,
64498
- goodExample: `IF 1 = 1
64499
- AND 2 = 2.
64500
- WRITE 'hello' &&
64501
- 'world'.
64504
+ goodExample: `IF 1 = 1
64505
+ AND 2 = 2.
64506
+ WRITE 'hello' &&
64507
+ 'world'.
64502
64508
  ENDIF.`,
64503
64509
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
64504
64510
  };
@@ -64624,23 +64630,23 @@ class Indentation extends _abap_rule_1.ABAPRule {
64624
64630
  title: "Indentation",
64625
64631
  shortDescription: `Checks indentation`,
64626
64632
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
64627
- badExample: `CLASS lcl DEFINITION.
64628
- PRIVATE SECTION.
64629
- METHODS constructor.
64630
- ENDCLASS.
64631
-
64632
- CLASS lcl IMPLEMENTATION.
64633
- METHOD constructor.
64634
- ENDMETHOD.
64633
+ badExample: `CLASS lcl DEFINITION.
64634
+ PRIVATE SECTION.
64635
+ METHODS constructor.
64636
+ ENDCLASS.
64637
+
64638
+ CLASS lcl IMPLEMENTATION.
64639
+ METHOD constructor.
64640
+ ENDMETHOD.
64635
64641
  ENDCLASS.`,
64636
- goodExample: `CLASS lcl DEFINITION.
64637
- PRIVATE SECTION.
64638
- METHODS constructor.
64639
- ENDCLASS.
64640
-
64641
- CLASS lcl IMPLEMENTATION.
64642
- METHOD constructor.
64643
- ENDMETHOD.
64642
+ goodExample: `CLASS lcl DEFINITION.
64643
+ PRIVATE SECTION.
64644
+ METHODS constructor.
64645
+ ENDCLASS.
64646
+
64647
+ CLASS lcl IMPLEMENTATION.
64648
+ METHOD constructor.
64649
+ ENDMETHOD.
64644
64650
  ENDCLASS.`,
64645
64651
  };
64646
64652
  }
@@ -65044,9 +65050,9 @@ class IntfReferencingClas {
65044
65050
  key: "intf_referencing_clas",
65045
65051
  title: "INTF referencing CLAS",
65046
65052
  shortDescription: `Interface contains references to class`,
65047
- extendedInformation: `Only global interfaces are checked.
65048
- Only first level references are checked.
65049
- Exception class references are ignored.
65053
+ extendedInformation: `Only global interfaces are checked.
65054
+ Only first level references are checked.
65055
+ Exception class references are ignored.
65050
65056
  Void references are ignored.`,
65051
65057
  };
65052
65058
  }
@@ -65131,9 +65137,9 @@ class InvalidTableIndex extends _abap_rule_1.ABAPRule {
65131
65137
  title: "Invalid Table Index",
65132
65138
  shortDescription: `Issues error for constant table index zero, as ABAP starts from 1`,
65133
65139
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
65134
- badExample: `DATA(first) = table[ 0 ].
65140
+ badExample: `DATA(first) = table[ 0 ].
65135
65141
  READ TABLE gt_stack ASSIGNING <ls_stack> INDEX 0.`,
65136
- goodExample: `DATA(first) = table[ 1 ].
65142
+ goodExample: `DATA(first) = table[ 1 ].
65137
65143
  READ TABLE gt_stack ASSIGNING <ls_stack> INDEX 1.`,
65138
65144
  };
65139
65145
  }
@@ -65735,8 +65741,8 @@ class LineBreakStyle {
65735
65741
  return {
65736
65742
  key: "line_break_style",
65737
65743
  title: "Makes sure line breaks are consistent in the ABAP code",
65738
- shortDescription: `Enforces LF as newlines in ABAP files
65739
-
65744
+ shortDescription: `Enforces LF as newlines in ABAP files
65745
+
65740
65746
  abapGit does not work with CRLF`,
65741
65747
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
65742
65748
  };
@@ -65805,7 +65811,7 @@ class LineLength extends _abap_rule_1.ABAPRule {
65805
65811
  key: "line_length",
65806
65812
  title: "Line length",
65807
65813
  shortDescription: `Detects lines exceeding the provided maximum length.`,
65808
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length
65814
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length
65809
65815
  https://docs.abapopenchecks.org/checks/04/`,
65810
65816
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
65811
65817
  };
@@ -65876,7 +65882,7 @@ class LineOnlyPunc extends _abap_rule_1.ABAPRule {
65876
65882
  key: "line_only_punc",
65877
65883
  title: "Line containing only punctuation",
65878
65884
  shortDescription: `Detects lines containing only punctuation.`,
65879
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#close-brackets-at-line-end
65885
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#close-brackets-at-line-end
65880
65886
  https://docs.abapopenchecks.org/checks/16/`,
65881
65887
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
65882
65888
  badExample: "zcl_class=>method(\n).",
@@ -66139,15 +66145,15 @@ class LocalVariableNames extends _abap_rule_1.ABAPRule {
66139
66145
  return {
66140
66146
  key: "local_variable_names",
66141
66147
  title: "Local variable naming conventions",
66142
- shortDescription: `
66143
- Allows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols.
66148
+ shortDescription: `
66149
+ Allows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols.
66144
66150
  Regexes are case-insensitive.`,
66145
66151
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
66146
- badExample: `FORM bar.
66147
- DATA foo.
66152
+ badExample: `FORM bar.
66153
+ DATA foo.
66148
66154
  ENDFORM.`,
66149
- goodExample: `FORM bar.
66150
- DATA lv_foo.
66155
+ goodExample: `FORM bar.
66156
+ DATA lv_foo.
66151
66157
  ENDFORM.`,
66152
66158
  };
66153
66159
  }
@@ -66299,9 +66305,9 @@ class MacroNaming extends _abap_rule_1.ABAPRule {
66299
66305
  shortDescription: `Allows you to enforce a pattern for macro definitions`,
66300
66306
  extendedInformation: `Use rule "avoid_use" to avoid macros altogether.`,
66301
66307
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
66302
- badExample: `DEFINE something.
66308
+ badExample: `DEFINE something.
66303
66309
  END-OF-DEFINITION.`,
66304
- goodExample: `DEFINE _something.
66310
+ goodExample: `DEFINE _something.
66305
66311
  END-OF-DEFINITION.`,
66306
66312
  };
66307
66313
  }
@@ -66374,10 +66380,10 @@ class MainFileContents {
66374
66380
  key: "main_file_contents",
66375
66381
  title: "Main file contents",
66376
66382
  shortDescription: `Checks related to report declarations.`,
66377
- extendedInformation: `Does not run if the target version is Cloud
66378
-
66379
- * PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
66380
- * TYPEs must begin with "TYPE-POOL <name>."
66383
+ extendedInformation: `Does not run if the target version is Cloud
66384
+
66385
+ * PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
66386
+ * TYPEs must begin with "TYPE-POOL <name>."
66381
66387
  `,
66382
66388
  };
66383
66389
  }
@@ -66493,17 +66499,17 @@ class ManyParentheses extends _abap_rule_1.ABAPRule {
66493
66499
  title: "Too many parentheses",
66494
66500
  shortDescription: `Searches for expressions where extra parentheses can safely be removed`,
66495
66501
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
66496
- badExample: `
66497
- IF ( destination IS INITIAL ).
66498
- ENDIF.
66499
- IF foo = boo AND ( bar = lar AND moo = loo ).
66500
- ENDIF.
66502
+ badExample: `
66503
+ IF ( destination IS INITIAL ).
66504
+ ENDIF.
66505
+ IF foo = boo AND ( bar = lar AND moo = loo ).
66506
+ ENDIF.
66501
66507
  `,
66502
- goodExample: `
66503
- IF destination IS INITIAL.
66504
- ENDIF.
66505
- IF foo = boo AND bar = lar AND moo = loo.
66506
- ENDIF.
66508
+ goodExample: `
66509
+ IF destination IS INITIAL.
66510
+ ENDIF.
66511
+ IF foo = boo AND bar = lar AND moo = loo.
66512
+ ENDIF.
66507
66513
  `,
66508
66514
  };
66509
66515
  }
@@ -66677,14 +66683,14 @@ class MaxOneMethodParameterPerLine extends _abap_rule_1.ABAPRule {
66677
66683
  title: "Max one method parameter definition per line",
66678
66684
  shortDescription: `Keep max one method parameter description per line`,
66679
66685
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace],
66680
- badExample: `
66681
- METHODS apps_scope_token
66682
- IMPORTING
66686
+ badExample: `
66687
+ METHODS apps_scope_token
66688
+ IMPORTING
66683
66689
  body TYPE bodyapps_scope_token client_id TYPE str.`,
66684
- goodExample: `
66685
- METHODS apps_scope_token
66686
- IMPORTING
66687
- body TYPE bodyapps_scope_token
66690
+ goodExample: `
66691
+ METHODS apps_scope_token
66692
+ IMPORTING
66693
+ body TYPE bodyapps_scope_token
66688
66694
  client_id TYPE str.`,
66689
66695
  };
66690
66696
  }
@@ -66749,11 +66755,11 @@ class MaxOneStatement extends _abap_rule_1.ABAPRule {
66749
66755
  key: "max_one_statement",
66750
66756
  title: "Max one statement per line",
66751
66757
  shortDescription: `Checks that each line contains only a single statement.`,
66752
- extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
66753
-
66754
- Does not report anything for chained statements.
66755
-
66756
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line
66758
+ extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
66759
+
66760
+ Does not report anything for chained statements.
66761
+
66762
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line
66757
66763
  https://docs.abapopenchecks.org/checks/11/`,
66758
66764
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
66759
66765
  badExample: `WRITE foo. WRITE bar.`,
@@ -67091,8 +67097,8 @@ class MethodLength {
67091
67097
  key: "method_length",
67092
67098
  title: "Method/Form Length",
67093
67099
  shortDescription: `Checks relating to method/form length.`,
67094
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
67095
-
67100
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
67101
+
67096
67102
  Abstract methods without statements are considered okay.`,
67097
67103
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
67098
67104
  };
@@ -67197,20 +67203,20 @@ class MethodOverwritesBuiltIn extends _abap_rule_1.ABAPRule {
67197
67203
  key: "method_overwrites_builtin",
67198
67204
  title: "Method name overwrites builtin function",
67199
67205
  shortDescription: `Checks Method names that overwrite builtin SAP functions`,
67200
- extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
67201
-
67202
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
67203
-
67206
+ extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
67207
+
67208
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
67209
+
67204
67210
  Interface method names are ignored`,
67205
67211
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
67206
- badExample: `CLASS lcl DEFINITION.
67207
- PUBLIC SECTION.
67208
- METHODS matches.
67209
- ENDCLASS.
67210
-
67211
- CLASS lcl IMPLEMENTATION.
67212
- METHOD matches.
67213
- ENDMETHOD.
67212
+ badExample: `CLASS lcl DEFINITION.
67213
+ PUBLIC SECTION.
67214
+ METHODS matches.
67215
+ ENDCLASS.
67216
+
67217
+ CLASS lcl IMPLEMENTATION.
67218
+ METHOD matches.
67219
+ ENDMETHOD.
67214
67220
  ENDCLASS.`,
67215
67221
  };
67216
67222
  }
@@ -67401,12 +67407,12 @@ class MixReturning extends _abap_rule_1.ABAPRule {
67401
67407
  // eslint-disable-next-line max-len
67402
67408
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-either-returning-or-exporting-or-changing-but-not-a-combination`,
67403
67409
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
67404
- badExample: `CLASS lcl DEFINITION.
67405
- PUBLIC SECTION.
67406
- METHODS
67407
- foobar
67408
- EXPORTING foo TYPE i
67409
- RETURNING VALUE(rv_string) TYPE string.
67410
+ badExample: `CLASS lcl DEFINITION.
67411
+ PUBLIC SECTION.
67412
+ METHODS
67413
+ foobar
67414
+ EXPORTING foo TYPE i
67415
+ RETURNING VALUE(rv_string) TYPE string.
67410
67416
  ENDCLASS.`,
67411
67417
  };
67412
67418
  }
@@ -67786,7 +67792,7 @@ class Nesting extends _abap_rule_1.ABAPRule {
67786
67792
  key: "nesting",
67787
67793
  title: "Check nesting depth",
67788
67794
  shortDescription: `Checks for methods exceeding a maximum nesting depth`,
67789
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low
67795
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low
67790
67796
  https://docs.abapopenchecks.org/checks/74/`,
67791
67797
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
67792
67798
  };
@@ -68029,7 +68035,7 @@ class NoChainedAssignment extends _abap_rule_1.ABAPRule {
68029
68035
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-chain-assignments`,
68030
68036
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
68031
68037
  badExample: `var1 = var2 = var3.`,
68032
- goodExample: `var2 = var3.
68038
+ goodExample: `var2 = var3.
68033
68039
  var1 = var2.`,
68034
68040
  };
68035
68041
  }
@@ -68088,8 +68094,8 @@ class NoExternalFormCalls extends _abap_rule_1.ABAPRule {
68088
68094
  key: "no_external_form_calls",
68089
68095
  title: "No external FORM calls",
68090
68096
  shortDescription: `Detect external form calls`,
68091
- badExample: `PERFORM foo IN PROGRAM bar.
68092
-
68097
+ badExample: `PERFORM foo IN PROGRAM bar.
68098
+
68093
68099
  PERFORM foo(bar).`,
68094
68100
  tags: [_irule_1.RuleTag.SingleFile],
68095
68101
  };
@@ -68150,17 +68156,17 @@ class NoInlineInOptionalBranches extends _abap_rule_1.ABAPRule {
68150
68156
  key: "no_inline_in_optional_branches",
68151
68157
  title: "Don't declare inline in optional branches",
68152
68158
  shortDescription: `Don't declare inline in optional branches`,
68153
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
68154
-
68155
- Considered optional branches:
68156
- * inside IF/ELSEIF/ELSE
68157
- * inside LOOP
68158
- * inside WHILE
68159
- * inside CASE/WHEN, CASE TYPE OF
68160
- * inside DO
68161
- * inside SELECT loops
68162
-
68163
- Not considered optional branches:
68159
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
68160
+
68161
+ Considered optional branches:
68162
+ * inside IF/ELSEIF/ELSE
68163
+ * inside LOOP
68164
+ * inside WHILE
68165
+ * inside CASE/WHEN, CASE TYPE OF
68166
+ * inside DO
68167
+ * inside SELECT loops
68168
+
68169
+ Not considered optional branches:
68164
68170
  * TRY/CATCH/CLEANUP`,
68165
68171
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
68166
68172
  };
@@ -68260,12 +68266,12 @@ class NoPrefixes extends _abap_rule_1.ABAPRule {
68260
68266
  key: "no_prefixes",
68261
68267
  title: "No Prefixes",
68262
68268
  shortDescription: `Dont use hungarian notation`,
68263
- extendedInformation: `
68264
- Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
68265
- allowing all types to become voided, abaplint will then provide less precise syntax errors.
68266
-
68267
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
68268
-
68269
+ extendedInformation: `
68270
+ Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
68271
+ allowing all types to become voided, abaplint will then provide less precise syntax errors.
68272
+
68273
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
68274
+
68269
68275
  https://github.com/SAP/styleguides/blob/main/clean-abap/sub-sections/AvoidEncodings.md`,
68270
68276
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
68271
68277
  badExample: `DATA lv_foo TYPE i.`,
@@ -68444,7 +68450,7 @@ class NoPublicAttributes extends _abap_rule_1.ABAPRule {
68444
68450
  return {
68445
68451
  key: "no_public_attributes",
68446
68452
  title: "No public attributes",
68447
- shortDescription: `Checks that classes and interfaces don't contain any public attributes.
68453
+ shortDescription: `Checks that classes and interfaces don't contain any public attributes.
68448
68454
  Exceptions are excluded from this rule.`,
68449
68455
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#members-private-by-default-protected-only-if-needed`,
68450
68456
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
@@ -68545,13 +68551,13 @@ class NoYodaConditions extends _abap_rule_1.ABAPRule {
68545
68551
  key: "no_yoda_conditions",
68546
68552
  title: "No Yoda conditions",
68547
68553
  shortDescription: `Finds Yoda conditions and reports issues`,
68548
- extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
68549
-
68554
+ extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
68555
+
68550
68556
  Conditions with operators CP, NP, CS, NS, CA, NA, CO, CN are ignored`,
68551
68557
  tags: [_irule_1.RuleTag.SingleFile],
68552
- badExample: `IF 0 <> sy-subrc.
68558
+ badExample: `IF 0 <> sy-subrc.
68553
68559
  ENDIF.`,
68554
- goodExample: `IF sy-subrc <> 0.
68560
+ goodExample: `IF sy-subrc <> 0.
68555
68561
  ENDIF.`,
68556
68562
  };
68557
68563
  }
@@ -68652,8 +68658,8 @@ class NROBConsistency {
68652
68658
  key: "nrob_consistency",
68653
68659
  title: "Number range consistency",
68654
68660
  shortDescription: `Consistency checks for number ranges`,
68655
- extendedInformation: `Issue reported if percentage warning is over 50%
68656
-
68661
+ extendedInformation: `Issue reported if percentage warning is over 50%
68662
+
68657
68663
  Issue reported if the referenced domain is not found(taking error namespace into account)`,
68658
68664
  tags: [_irule_1.RuleTag.SingleFile],
68659
68665
  };
@@ -68930,58 +68936,58 @@ class ObsoleteStatement extends _abap_rule_1.ABAPRule {
68930
68936
  title: "Obsolete statements",
68931
68937
  shortDescription: `Checks for usages of certain obsolete statements`,
68932
68938
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
68933
- extendedInformation: `
68934
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
68935
-
68936
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
68937
-
68938
- SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
68939
-
68940
- IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
68941
-
68942
- WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
68943
-
68944
- FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
68945
-
68946
- TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
68947
-
68948
- LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
68949
-
68950
- COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
68951
-
68952
- OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
68953
-
68954
- PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
68955
-
68956
- RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
68957
-
68958
- PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
68959
-
68960
- MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
68961
-
68962
- SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
68963
- SELECT COUNT(*) is considered okay
68964
-
68965
- FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
68966
-
68967
- SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
68968
-
68969
- CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
68970
-
68971
- POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
68972
-
68973
- OCCURENCES: check for OCCURENCES vs OCCURRENCES
68974
-
68939
+ extendedInformation: `
68940
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
68941
+
68942
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
68943
+
68944
+ SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
68945
+
68946
+ IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
68947
+
68948
+ WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
68949
+
68950
+ FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
68951
+
68952
+ TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
68953
+
68954
+ LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
68955
+
68956
+ COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
68957
+
68958
+ OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
68959
+
68960
+ PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
68961
+
68962
+ RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
68963
+
68964
+ PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
68965
+
68966
+ MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
68967
+
68968
+ SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
68969
+ SELECT COUNT(*) is considered okay
68970
+
68971
+ FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
68972
+
68973
+ SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
68974
+
68975
+ CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
68976
+
68977
+ POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
68978
+
68979
+ OCCURENCES: check for OCCURENCES vs OCCURRENCES
68980
+
68975
68981
  CLIENT SPECIFIED, from 754: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abapselect_client_obsolete.htm`,
68976
- badExample: `REFRESH itab.
68977
-
68978
- COMPUTE foo = 2 + 2.
68979
-
68980
- MULTIPLY lv_foo BY 2.
68981
-
68982
- INTERFACE intf LOAD.
68983
-
68984
- IF foo IS SUPPLIED.
68982
+ badExample: `REFRESH itab.
68983
+
68984
+ COMPUTE foo = 2 + 2.
68985
+
68986
+ MULTIPLY lv_foo BY 2.
68987
+
68988
+ INTERFACE intf LOAD.
68989
+
68990
+ IF foo IS SUPPLIED.
68985
68991
  ENDIF.`,
68986
68992
  };
68987
68993
  }
@@ -69321,9 +69327,9 @@ class OmitParameterName {
69321
69327
  key: "omit_parameter_name",
69322
69328
  title: "Omit parameter name",
69323
69329
  shortDescription: `Omit the parameter name in single parameter calls`,
69324
- extendedInformation: `
69325
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
69326
-
69330
+ extendedInformation: `
69331
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
69332
+
69327
69333
  EXPORTING must already be omitted for this rule to take effect, https://rules.abaplint.org/exporting/`,
69328
69334
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
69329
69335
  badExample: `method( param = 2 ).`,
@@ -69529,20 +69535,20 @@ class OmitReceiving extends _abap_rule_1.ABAPRule {
69529
69535
  shortDescription: `Omit RECEIVING`,
69530
69536
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-receiving`,
69531
69537
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
69532
- badExample: `
69533
- upload_pack(
69534
- EXPORTING
69535
- io_client = lo_client
69536
- iv_url = iv_url
69537
- iv_deepen_level = iv_deepen_level
69538
- it_hashes = lt_hashes
69539
- RECEIVING
69538
+ badExample: `
69539
+ upload_pack(
69540
+ EXPORTING
69541
+ io_client = lo_client
69542
+ iv_url = iv_url
69543
+ iv_deepen_level = iv_deepen_level
69544
+ it_hashes = lt_hashes
69545
+ RECEIVING
69540
69546
  rt_objects = et_objects ).`,
69541
- goodExample: `
69542
- et_objects = upload_pack(
69543
- io_client = lo_client
69544
- iv_url = iv_url
69545
- iv_deepen_level = iv_deepen_level
69547
+ goodExample: `
69548
+ et_objects = upload_pack(
69549
+ io_client = lo_client
69550
+ iv_url = iv_url
69551
+ iv_deepen_level = iv_deepen_level
69546
69552
  it_hashes = lt_hashes ).`,
69547
69553
  };
69548
69554
  }
@@ -69606,8 +69612,8 @@ class Parser702Chaining extends _abap_rule_1.ABAPRule {
69606
69612
  return {
69607
69613
  key: "parser_702_chaining",
69608
69614
  title: "Parser Error, bad chanining on 702",
69609
- shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
69610
- this rule finds these and reports errors.
69615
+ shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
69616
+ this rule finds these and reports errors.
69611
69617
  Only active on target version 702 and below.`,
69612
69618
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
69613
69619
  };
@@ -69687,8 +69693,8 @@ class ParserError {
69687
69693
  return {
69688
69694
  key: "parser_error",
69689
69695
  title: "Parser error",
69690
- shortDescription: `Checks for syntax not recognized by abaplint.
69691
-
69696
+ shortDescription: `Checks for syntax not recognized by abaplint.
69697
+
69692
69698
  See recognized syntax at https://syntax.abaplint.org`,
69693
69699
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
69694
69700
  };
@@ -69773,7 +69779,7 @@ class ParserMissingSpace extends _abap_rule_1.ABAPRule {
69773
69779
  return {
69774
69780
  key: "parser_missing_space",
69775
69781
  title: "Parser Error, missing space",
69776
- shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.
69782
+ shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.
69777
69783
  This rule makes sure the spaces are consistently required across the language.`,
69778
69784
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
69779
69785
  badExample: `IF ( foo = 'bar').`,
@@ -70196,25 +70202,25 @@ class PreferInline {
70196
70202
  key: "prefer_inline",
70197
70203
  title: "Prefer Inline Declarations",
70198
70204
  shortDescription: `Prefer inline to up-front declarations.`,
70199
- extendedInformation: `EXPERIMENTAL
70200
-
70201
- Activates if language version is v740sp02 or above.
70202
-
70203
- Variables must be local(METHOD or FORM).
70204
-
70205
- No generic or void typed variables. No syntax errors.
70206
-
70207
- First position used must be a full/pure write.
70208
-
70209
- Move statment is not a cast(?=)
70210
-
70205
+ extendedInformation: `EXPERIMENTAL
70206
+
70207
+ Activates if language version is v740sp02 or above.
70208
+
70209
+ Variables must be local(METHOD or FORM).
70210
+
70211
+ No generic or void typed variables. No syntax errors.
70212
+
70213
+ First position used must be a full/pure write.
70214
+
70215
+ Move statment is not a cast(?=)
70216
+
70211
70217
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-inline-to-up-front-declarations`,
70212
70218
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Experimental, _irule_1.RuleTag.Quickfix],
70213
- badExample: `DATA foo TYPE i.
70214
- foo = 2.
70215
- DATA percentage TYPE decfloat34.
70219
+ badExample: `DATA foo TYPE i.
70220
+ foo = 2.
70221
+ DATA percentage TYPE decfloat34.
70216
70222
  percentage = ( comment_number / abs_statement_number ) * 100.`,
70217
- goodExample: `DATA(foo) = 2.
70223
+ goodExample: `DATA(foo) = 2.
70218
70224
  DATA(percentage) = CONV decfloat34( comment_number / abs_statement_number ) * 100.`,
70219
70225
  };
70220
70226
  }
@@ -70428,18 +70434,18 @@ class PreferIsNot extends _abap_rule_1.ABAPRule {
70428
70434
  key: "prefer_is_not",
70429
70435
  title: "Prefer IS NOT to NOT IS",
70430
70436
  shortDescription: `Prefer IS NOT to NOT IS`,
70431
- extendedInformation: `
70432
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
70433
-
70437
+ extendedInformation: `
70438
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
70439
+
70434
70440
  "if not is_valid( )." examples are skipped`,
70435
70441
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
70436
- goodExample: `IF variable IS NOT INITIAL.
70437
- IF variable NP 'TODO*'.
70438
- IF variable <> 42.
70442
+ goodExample: `IF variable IS NOT INITIAL.
70443
+ IF variable NP 'TODO*'.
70444
+ IF variable <> 42.
70439
70445
  IF variable CO 'hello'.`,
70440
- badExample: `IF NOT variable IS INITIAL.
70441
- IF NOT variable CP 'TODO*'.
70442
- IF NOT variable = 42.
70446
+ badExample: `IF NOT variable IS INITIAL.
70447
+ IF NOT variable CP 'TODO*'.
70448
+ IF NOT variable = 42.
70443
70449
  IF NOT variable CA 'hello'.`,
70444
70450
  };
70445
70451
  }
@@ -70627,14 +70633,14 @@ class PreferRaiseExceptionNew extends _abap_rule_1.ABAPRule {
70627
70633
  key: "prefer_raise_exception_new",
70628
70634
  title: "Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE",
70629
70635
  shortDescription: `Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE`,
70630
- extendedInformation: `
70631
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
70632
-
70636
+ extendedInformation: `
70637
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
70638
+
70633
70639
  From 752 and up`,
70634
70640
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
70635
70641
  goodExample: `RAISE EXCEPTION NEW cx_generation_error( previous = exception ).`,
70636
- badExample: `RAISE EXCEPTION TYPE cx_generation_error
70637
- EXPORTING
70642
+ badExample: `RAISE EXCEPTION TYPE cx_generation_error
70643
+ EXPORTING
70638
70644
  previous = exception.`,
70639
70645
  };
70640
70646
  }
@@ -70712,12 +70718,12 @@ class PreferReturningToExporting extends _abap_rule_1.ABAPRule {
70712
70718
  key: "prefer_returning_to_exporting",
70713
70719
  title: "Prefer RETURNING to EXPORTING",
70714
70720
  shortDescription: `Prefer RETURNING to EXPORTING. Generic types cannot be RETURNING.`,
70715
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting
70721
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting
70716
70722
  https://docs.abapopenchecks.org/checks/44/`,
70717
70723
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
70718
- badExample: `CLASS lcl DEFINITION.
70719
- PUBLIC SECTION.
70720
- METHODS test EXPORTING ev_foo TYPE i.
70724
+ badExample: `CLASS lcl DEFINITION.
70725
+ PUBLIC SECTION.
70726
+ METHODS test EXPORTING ev_foo TYPE i.
70721
70727
  ENDCLASS.`,
70722
70728
  };
70723
70729
  }
@@ -70813,8 +70819,8 @@ class PreferXsdbool extends _abap_rule_1.ABAPRule {
70813
70819
  key: "prefer_xsdbool",
70814
70820
  title: "Prefer xsdbool over boolc",
70815
70821
  shortDescription: `Prefer xsdbool over boolc`,
70816
- extendedInformation: `Activates if language version is v740sp08 or above.
70817
-
70822
+ extendedInformation: `Activates if language version is v740sp08 or above.
70823
+
70818
70824
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
70819
70825
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
70820
70826
  badExample: `DATA(sdf) = boolc( 1 = 2 ).`,
@@ -70886,9 +70892,9 @@ class PreferredCompareOperator extends _abap_rule_1.ABAPRule {
70886
70892
  title: "Preferred compare operator",
70887
70893
  shortDescription: `Configure undesired operator variants`,
70888
70894
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
70889
- badExample: `IF foo EQ bar.
70895
+ badExample: `IF foo EQ bar.
70890
70896
  ENDIF.`,
70891
- goodExample: `IF foo = bar.
70897
+ goodExample: `IF foo = bar.
70892
70898
  ENDIF.`,
70893
70899
  };
70894
70900
  }
@@ -71112,26 +71118,26 @@ class ReduceProceduralCode extends _abap_rule_1.ABAPRule {
71112
71118
  key: "reduce_procedural_code",
71113
71119
  title: "Reduce procedural code",
71114
71120
  shortDescription: `Checks FORM and FUNCTION-MODULE have few statements`,
71115
- extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
71116
-
71117
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
71118
-
71121
+ extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
71122
+
71123
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
71124
+
71119
71125
  Comments are not counted as statements.`,
71120
71126
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
71121
- badExample: `FORM foo.
71122
- DATA lv_bar TYPE i.
71123
- lv_bar = 2 + 2.
71124
- IF lv_bar = 4.
71125
- WRITE 'hello world'.
71126
- ENDIF.
71127
- DATA lv_bar TYPE i.
71128
- lv_bar = 2 + 2.
71129
- IF lv_bar = 4.
71130
- WRITE 'hello world'.
71131
- ENDIF.
71127
+ badExample: `FORM foo.
71128
+ DATA lv_bar TYPE i.
71129
+ lv_bar = 2 + 2.
71130
+ IF lv_bar = 4.
71131
+ WRITE 'hello world'.
71132
+ ENDIF.
71133
+ DATA lv_bar TYPE i.
71134
+ lv_bar = 2 + 2.
71135
+ IF lv_bar = 4.
71136
+ WRITE 'hello world'.
71137
+ ENDIF.
71132
71138
  ENDFORM.`,
71133
- goodExample: `FORM foo.
71134
- NEW zcl_global_class( )->run_logic( ).
71139
+ goodExample: `FORM foo.
71140
+ NEW zcl_global_class( )->run_logic( ).
71135
71141
  ENDFORM.`,
71136
71142
  };
71137
71143
  }
@@ -71375,10 +71381,10 @@ class RemoveDescriptions {
71375
71381
  return {
71376
71382
  key: "remove_descriptions",
71377
71383
  title: "Remove descriptions",
71378
- shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
71379
-
71380
- Class descriptions are required, see rule description_empty.
71381
-
71384
+ shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
71385
+
71386
+ Class descriptions are required, see rule description_empty.
71387
+
71382
71388
  Consider using ABAP Doc for documentation.`,
71383
71389
  tags: [],
71384
71390
  };
@@ -71503,14 +71509,14 @@ class RFCErrorHandling extends _abap_rule_1.ABAPRule {
71503
71509
  tags: [_irule_1.RuleTag.SingleFile],
71504
71510
  shortDescription: `Checks that exceptions 'system_failure' and 'communication_failure' are handled in RFC calls`,
71505
71511
  extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenrfc_exception.htm`,
71506
- badExample: `CALL FUNCTION 'ZRFC'
71512
+ badExample: `CALL FUNCTION 'ZRFC'
71507
71513
  DESTINATION lv_rfc.`,
71508
- goodExample: `CALL FUNCTION 'ZRFC'
71509
- DESTINATION lv_rfc
71510
- EXCEPTIONS
71511
- system_failure = 1 MESSAGE msg
71512
- communication_failure = 2 MESSAGE msg
71513
- resource_failure = 3
71514
+ goodExample: `CALL FUNCTION 'ZRFC'
71515
+ DESTINATION lv_rfc
71516
+ EXCEPTIONS
71517
+ system_failure = 1 MESSAGE msg
71518
+ communication_failure = 2 MESSAGE msg
71519
+ resource_failure = 3
71514
71520
  OTHERS = 4.`,
71515
71521
  };
71516
71522
  }
@@ -71594,11 +71600,11 @@ class SelectAddOrderBy {
71594
71600
  key: "select_add_order_by",
71595
71601
  title: "SELECT add ORDER BY",
71596
71602
  shortDescription: `SELECTs add ORDER BY clause`,
71597
- extendedInformation: `
71598
- This will make sure that the SELECT statement returns results in the same sequence on different databases
71599
-
71600
- add ORDER BY PRIMARY KEY if in doubt
71601
-
71603
+ extendedInformation: `
71604
+ This will make sure that the SELECT statement returns results in the same sequence on different databases
71605
+
71606
+ add ORDER BY PRIMARY KEY if in doubt
71607
+
71602
71608
  If the target is a sorted/hashed table, no issue is reported`,
71603
71609
  tags: [_irule_1.RuleTag.SingleFile],
71604
71610
  badExample: `SELECT * FROM db INTO TABLE @DATA(tab).`,
@@ -71729,14 +71735,14 @@ class SelectPerformance {
71729
71735
  key: "select_performance",
71730
71736
  title: "SELECT performance",
71731
71737
  shortDescription: `Various checks regarding SELECT performance.`,
71732
- extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
71733
-
71738
+ extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
71739
+
71734
71740
  SELECT *: not reported if using INTO/APPENDING CORRESPONDING FIELDS OF`,
71735
71741
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Performance],
71736
- badExample: `SELECT field1, field2 FROM table
71737
- INTO @DATA(structure) UP TO 1 ROWS ORDER BY field3 DESCENDING.
71742
+ badExample: `SELECT field1, field2 FROM table
71743
+ INTO @DATA(structure) UP TO 1 ROWS ORDER BY field3 DESCENDING.
71738
71744
  ENDSELECT.`,
71739
- goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
71745
+ goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
71740
71746
  INTO TABLE @DATA(table) ORDER BY field3 DESCENDING`,
71741
71747
  };
71742
71748
  }
@@ -71850,8 +71856,8 @@ class SelectSingleFullKey {
71850
71856
  key: "select_single_full_key",
71851
71857
  title: "Detect SELECT SINGLE which are possibily not unique",
71852
71858
  shortDescription: `Detect SELECT SINGLE which are possibily not unique`,
71853
- extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
71854
-
71859
+ extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
71860
+
71855
71861
  If the statement contains a JOIN it is not checked`,
71856
71862
  pseudoComment: "EC CI_NOORDER",
71857
71863
  tags: [_irule_1.RuleTag.Quickfix],
@@ -72279,8 +72285,8 @@ class SICFConsistency {
72279
72285
  key: "sicf_consistency",
72280
72286
  title: "SICF consistency",
72281
72287
  shortDescription: `Checks the validity of ICF services`,
72282
- extendedInformation: `* Class defined in handler must exist
72283
- * Class must not have any syntax errors
72288
+ extendedInformation: `* Class defined in handler must exist
72289
+ * Class must not have any syntax errors
72284
72290
  * Class must implement interface IF_HTTP_EXTENSION`,
72285
72291
  };
72286
72292
  }
@@ -72392,23 +72398,23 @@ class SlowParameterPassing {
72392
72398
  shortDescription: `Detects slow pass by value passing for methods where parameter is not changed`,
72393
72399
  extendedInformation: `Method parameters defined in interfaces is not checked`,
72394
72400
  tags: [_irule_1.RuleTag.Performance],
72395
- badExample: `CLASS lcl DEFINITION.
72396
- PUBLIC SECTION.
72397
- METHODS bar IMPORTING VALUE(sdf) TYPE string.
72398
- ENDCLASS.
72399
- CLASS lcl IMPLEMENTATION.
72400
- METHOD bar.
72401
- WRITE sdf.
72402
- ENDMETHOD.
72401
+ badExample: `CLASS lcl DEFINITION.
72402
+ PUBLIC SECTION.
72403
+ METHODS bar IMPORTING VALUE(sdf) TYPE string.
72404
+ ENDCLASS.
72405
+ CLASS lcl IMPLEMENTATION.
72406
+ METHOD bar.
72407
+ WRITE sdf.
72408
+ ENDMETHOD.
72403
72409
  ENDCLASS.`,
72404
- goodExample: `CLASS lcl DEFINITION.
72405
- PUBLIC SECTION.
72406
- METHODS bar IMPORTING sdf TYPE string.
72407
- ENDCLASS.
72408
- CLASS lcl IMPLEMENTATION.
72409
- METHOD bar.
72410
- WRITE sdf.
72411
- ENDMETHOD.
72410
+ goodExample: `CLASS lcl DEFINITION.
72411
+ PUBLIC SECTION.
72412
+ METHODS bar IMPORTING sdf TYPE string.
72413
+ ENDCLASS.
72414
+ CLASS lcl IMPLEMENTATION.
72415
+ METHOD bar.
72416
+ WRITE sdf.
72417
+ ENDMETHOD.
72412
72418
  ENDCLASS.`,
72413
72419
  };
72414
72420
  }
@@ -72679,8 +72685,8 @@ class SpaceBeforeDot extends _abap_rule_1.ABAPRule {
72679
72685
  key: "space_before_dot",
72680
72686
  title: "Space before dot",
72681
72687
  shortDescription: `Checks for extra spaces before dots at the ends of statements`,
72682
- extendedInformation: `
72683
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
72688
+ extendedInformation: `
72689
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
72684
72690
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#condense-your-code`,
72685
72691
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
72686
72692
  badExample: `WRITE bar .`,
@@ -72866,12 +72872,12 @@ class SQLValueConversion {
72866
72872
  key: "sql_value_conversion",
72867
72873
  title: "Implicit SQL Value Conversion",
72868
72874
  shortDescription: `Ensure types match when selecting from database`,
72869
- extendedInformation: `
72870
- * Integer to CHAR conversion
72871
- * Integer to NUMC conversion
72872
- * NUMC to Integer conversion
72873
- * CHAR to Integer conversion
72874
- * Source field longer than database field, CHAR -> CHAR
72875
+ extendedInformation: `
72876
+ * Integer to CHAR conversion
72877
+ * Integer to NUMC conversion
72878
+ * NUMC to Integer conversion
72879
+ * CHAR to Integer conversion
72880
+ * Source field longer than database field, CHAR -> CHAR
72875
72881
  * Source field longer than database field, NUMC -> NUMC`,
72876
72882
  tags: [],
72877
72883
  };
@@ -72943,7 +72949,7 @@ class StartAtTab extends _abap_rule_1.ABAPRule {
72943
72949
  key: "start_at_tab",
72944
72950
  title: "Start at tab",
72945
72951
  shortDescription: `Checks that statements start at tabstops.`,
72946
- extendedInformation: `Reports max 100 issues per file
72952
+ extendedInformation: `Reports max 100 issues per file
72947
72953
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
72948
72954
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
72949
72955
  badExample: ` WRITE a.`,
@@ -73120,12 +73126,12 @@ class StrictSQL extends _abap_rule_1.ABAPRule {
73120
73126
  key: "strict_sql",
73121
73127
  title: "Strict SQL",
73122
73128
  shortDescription: `Strict SQL`,
73123
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
73124
-
73125
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
73126
-
73127
- Also see separate rule sql_escape_host_variables
73128
-
73129
+ extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
73130
+
73131
+ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
73132
+
73133
+ Also see separate rule sql_escape_host_variables
73134
+
73129
73135
  Activates from v750 and up`,
73130
73136
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix],
73131
73137
  badExample: `SELECT * FROM ztabl INTO TABLE @rt_content WHERE type = @iv_type ORDER BY PRIMARY KEY.`,
@@ -73379,11 +73385,11 @@ class SyModification extends _abap_rule_1.ABAPRule {
73379
73385
  key: "sy_modification",
73380
73386
  title: "Modification of SY fields",
73381
73387
  shortDescription: `Finds modification of sy fields`,
73382
- extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
73383
-
73388
+ extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
73389
+
73384
73390
  Changes to SY-TVAR* fields are not reported`,
73385
73391
  tags: [_irule_1.RuleTag.SingleFile],
73386
- badExample: `sy-uname = 2.
73392
+ badExample: `sy-uname = 2.
73387
73393
  sy = sy.`,
73388
73394
  };
73389
73395
  }
@@ -73445,8 +73451,8 @@ class TABLEnhancementCategory {
73445
73451
  key: "tabl_enhancement_category",
73446
73452
  title: "TABL enhancement category must be set",
73447
73453
  shortDescription: `Checks that tables do not have the enhancement category 'not classified'.`,
73448
- extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
73449
-
73454
+ extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
73455
+
73450
73456
  You may use standard report RS_DDIC_CLASSIFICATION_FINAL for adjustment.`,
73451
73457
  tags: [],
73452
73458
  };
@@ -73511,8 +73517,8 @@ class TablesDeclaredLocally extends _abap_rule_1.ABAPRule {
73511
73517
  shortDescription: `TABLES are always global, so declare them globally`,
73512
73518
  extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abaptables.htm`,
73513
73519
  tags: [_irule_1.RuleTag.SingleFile],
73514
- badExample: `FORM foo.
73515
- TABLES t100.
73520
+ badExample: `FORM foo.
73521
+ TABLES t100.
73516
73522
  ENDFORM.`,
73517
73523
  goodExample: `TABLES t000.`,
73518
73524
  };
@@ -73640,9 +73646,9 @@ class TypeFormParameters extends _abap_rule_1.ABAPRule {
73640
73646
  title: "Type FORM parameters",
73641
73647
  shortDescription: `Checks for untyped FORM parameters`,
73642
73648
  tags: [_irule_1.RuleTag.SingleFile],
73643
- badExample: `FORM foo USING bar.
73649
+ badExample: `FORM foo USING bar.
73644
73650
  ENDFORM.`,
73645
- goodExample: `FORM foo USING bar TYPE string.
73651
+ goodExample: `FORM foo USING bar TYPE string.
73646
73652
  ENDFORM.`,
73647
73653
  };
73648
73654
  }
@@ -74315,38 +74321,38 @@ class UnnecessaryPragma extends _abap_rule_1.ABAPRule {
74315
74321
  key: "unnecessary_pragma",
74316
74322
  title: "Unnecessary Pragma",
74317
74323
  shortDescription: `Finds pragmas which can be removed`,
74318
- extendedInformation: `* NO_HANDLER with handler
74319
-
74320
- * NEEDED without definition
74321
-
74322
- * NO_TEXT without texts
74323
-
74324
- * SUBRC_OK where sy-subrc is checked
74325
-
74324
+ extendedInformation: `* NO_HANDLER with handler
74325
+
74326
+ * NEEDED without definition
74327
+
74328
+ * NO_TEXT without texts
74329
+
74330
+ * SUBRC_OK where sy-subrc is checked
74331
+
74326
74332
  NO_HANDLER inside macros are not checked`,
74327
74333
  tags: [_irule_1.RuleTag.SingleFile],
74328
- badExample: `TRY.
74329
- ...
74330
- CATCH zcx_abapgit_exception ##NO_HANDLER.
74331
- RETURN. " it has a handler
74332
- ENDTRY.
74333
- MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
74334
- SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
74335
- IF sy-subrc <> 0.
74334
+ badExample: `TRY.
74335
+ ...
74336
+ CATCH zcx_abapgit_exception ##NO_HANDLER.
74337
+ RETURN. " it has a handler
74338
+ ENDTRY.
74339
+ MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
74340
+ SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
74341
+ IF sy-subrc <> 0.
74336
74342
  ENDIF.`,
74337
- goodExample: `TRY.
74338
- ...
74339
- CATCH zcx_abapgit_exception.
74340
- RETURN.
74341
- ENDTRY.
74342
- MESSAGE w125(zbar) WITH c_foo INTO message.
74343
- SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
74344
- IF sy-subrc <> 0.
74345
- ENDIF.
74346
-
74347
- DATA: BEGIN OF blah ##NEEDED,
74348
- test1 TYPE string,
74349
- test2 TYPE string,
74343
+ goodExample: `TRY.
74344
+ ...
74345
+ CATCH zcx_abapgit_exception.
74346
+ RETURN.
74347
+ ENDTRY.
74348
+ MESSAGE w125(zbar) WITH c_foo INTO message.
74349
+ SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
74350
+ IF sy-subrc <> 0.
74351
+ ENDIF.
74352
+
74353
+ DATA: BEGIN OF blah ##NEEDED,
74354
+ test1 TYPE string,
74355
+ test2 TYPE string,
74350
74356
  END OF blah.`,
74351
74357
  };
74352
74358
  }
@@ -74513,18 +74519,18 @@ class UnnecessaryReturn extends _abap_rule_1.ABAPRule {
74513
74519
  shortDescription: `Finds unnecessary RETURN statements`,
74514
74520
  extendedInformation: `Finds unnecessary RETURN statements`,
74515
74521
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
74516
- badExample: `FORM hello1.
74517
- WRITE 'world'.
74518
- RETURN.
74519
- ENDFORM.
74520
-
74521
- FORM foo.
74522
- IF 1 = 2.
74523
- RETURN.
74524
- ENDIF.
74522
+ badExample: `FORM hello1.
74523
+ WRITE 'world'.
74524
+ RETURN.
74525
+ ENDFORM.
74526
+
74527
+ FORM foo.
74528
+ IF 1 = 2.
74529
+ RETURN.
74530
+ ENDIF.
74525
74531
  ENDFORM.`,
74526
- goodExample: `FORM hello2.
74527
- WRITE 'world'.
74532
+ goodExample: `FORM hello2.
74533
+ WRITE 'world'.
74528
74534
  ENDFORM.`,
74529
74535
  };
74530
74536
  }
@@ -74875,13 +74881,13 @@ class UnusedMacros {
74875
74881
  title: "Unused macros",
74876
74882
  shortDescription: `Checks for unused macro definitions definitions`,
74877
74883
  tags: [_irule_1.RuleTag.Quickfix],
74878
- badExample: `DEFINE foobar1.
74879
- WRITE 'hello'.
74884
+ badExample: `DEFINE foobar1.
74885
+ WRITE 'hello'.
74880
74886
  END-OF-DEFINITION.`,
74881
- goodExample: `DEFINE foobar2.
74882
- WRITE 'hello'.
74883
- END-OF-DEFINITION.
74884
-
74887
+ goodExample: `DEFINE foobar2.
74888
+ WRITE 'hello'.
74889
+ END-OF-DEFINITION.
74890
+
74885
74891
  foobar2.`,
74886
74892
  };
74887
74893
  }
@@ -74993,18 +74999,18 @@ class UnusedMethods {
74993
74999
  key: "unused_methods",
74994
75000
  title: "Unused methods",
74995
75001
  shortDescription: `Checks for unused methods`,
74996
- extendedInformation: `Checks private and protected methods.
74997
-
74998
- Unused methods are not reported if the object contains parser or syntax errors.
74999
- Quick fixes only appears for private methods or projected methods where the class doesnt have any subclasses.
75000
-
75001
- Skips:
75002
- * methods FOR TESTING
75003
- * methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
75004
- * class_constructor + constructor methods
75005
- * event handlers
75006
- * methods that are redefined
75007
- * INCLUDEs
75002
+ extendedInformation: `Checks private and protected methods.
75003
+
75004
+ Unused methods are not reported if the object contains parser or syntax errors.
75005
+ Quick fixes only appears for private methods or projected methods where the class doesnt have any subclasses.
75006
+
75007
+ Skips:
75008
+ * methods FOR TESTING
75009
+ * methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
75010
+ * class_constructor + constructor methods
75011
+ * event handlers
75012
+ * methods that are redefined
75013
+ * INCLUDEs
75008
75014
  `,
75009
75015
  tags: [_irule_1.RuleTag.Quickfix],
75010
75016
  pragma: "##CALLED",
@@ -75480,23 +75486,23 @@ class UnusedVariables {
75480
75486
  key: "unused_variables",
75481
75487
  title: "Unused variables",
75482
75488
  shortDescription: `Checks for unused variables and constants`,
75483
- extendedInformation: `Skips event parameters.
75484
-
75485
- Note that this currently does not work if the source code uses macros.
75486
-
75487
- Unused variables are not reported if the object contains parser or syntax errors.
75488
-
75489
+ extendedInformation: `Skips event parameters.
75490
+
75491
+ Note that this currently does not work if the source code uses macros.
75492
+
75493
+ Unused variables are not reported if the object contains parser or syntax errors.
75494
+
75489
75495
  Errors found in INCLUDES are reported for the main program.`,
75490
75496
  tags: [_irule_1.RuleTag.Quickfix],
75491
75497
  pragma: "##NEEDED",
75492
75498
  pseudoComment: "EC NEEDED",
75493
- badExample: `DATA: BEGIN OF blah1,
75494
- test TYPE string,
75495
- test2 TYPE string,
75499
+ badExample: `DATA: BEGIN OF blah1,
75500
+ test TYPE string,
75501
+ test2 TYPE string,
75496
75502
  END OF blah1.`,
75497
- goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
75498
- test TYPE string,
75499
- test2 TYPE string,
75503
+ goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
75504
+ test TYPE string,
75505
+ test2 TYPE string,
75500
75506
  END OF blah2.`,
75501
75507
  };
75502
75508
  }
@@ -75715,15 +75721,15 @@ class UseBoolExpression extends _abap_rule_1.ABAPRule {
75715
75721
  shortDescription: `Use boolean expression, xsdbool from 740sp08 and up, boolc from 702 and up`,
75716
75722
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
75717
75723
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
75718
- badExample: `IF line IS INITIAL.
75719
- has_entries = abap_false.
75720
- ELSE.
75721
- has_entries = abap_true.
75722
- ENDIF.
75723
-
75724
+ badExample: `IF line IS INITIAL.
75725
+ has_entries = abap_false.
75726
+ ELSE.
75727
+ has_entries = abap_true.
75728
+ ENDIF.
75729
+
75724
75730
  DATA(fsdf) = COND #( WHEN foo <> bar THEN abap_true ELSE abap_false ).`,
75725
- goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
75726
-
75731
+ goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
75732
+
75727
75733
  DATA(fsdf) = xsdbool( foo <> bar ).`,
75728
75734
  };
75729
75735
  }
@@ -75841,15 +75847,15 @@ class UseClassBasedExceptions extends _abap_rule_1.ABAPRule {
75841
75847
  shortDescription: `Use class based exceptions, checks interface and class definitions`,
75842
75848
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-class-based-exceptions`,
75843
75849
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
75844
- badExample: `INTERFACE lif.
75845
- METHODS load_data
75846
- EXCEPTIONS
75847
- invalid_parameter.
75850
+ badExample: `INTERFACE lif.
75851
+ METHODS load_data
75852
+ EXCEPTIONS
75853
+ invalid_parameter.
75848
75854
  ENDINTERFACE.`,
75849
- goodExample: `INTERFACE lif.
75850
- METHODS load_data
75851
- RAISING
75852
- cx_something.
75855
+ goodExample: `INTERFACE lif.
75856
+ METHODS load_data
75857
+ RAISING
75858
+ cx_something.
75853
75859
  ENDINTERFACE.`,
75854
75860
  };
75855
75861
  }
@@ -75909,15 +75915,15 @@ class UseLineExists extends _abap_rule_1.ABAPRule {
75909
75915
  key: "use_line_exists",
75910
75916
  title: "Use line_exists",
75911
75917
  shortDescription: `Use line_exists, from 740sp02 and up`,
75912
- extendedInformation: `
75913
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
75914
-
75918
+ extendedInformation: `
75919
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
75920
+
75915
75921
  Not reported if the READ TABLE statement contains BINARY SEARCH.`,
75916
75922
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
75917
- badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
75918
- IF sy-subrc = 0.
75923
+ badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
75924
+ IF sy-subrc = 0.
75919
75925
  ENDIF.`,
75920
- goodExample: `IF line_exists( my_table[ key = 'A' ] ).
75926
+ goodExample: `IF line_exists( my_table[ key = 'A' ] ).
75921
75927
  ENDIF.`,
75922
75928
  };
75923
75929
  }
@@ -76027,10 +76033,10 @@ class UseNew extends _abap_rule_1.ABAPRule {
76027
76033
  key: "use_new",
76028
76034
  title: "Use NEW",
76029
76035
  shortDescription: `Checks for deprecated CREATE OBJECT statements.`,
76030
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
76031
-
76032
- If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
76033
-
76036
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
76037
+
76038
+ If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
76039
+
76034
76040
  Applicable from v740sp02 and up`,
76035
76041
  badExample: `CREATE OBJECT ref.`,
76036
76042
  goodExample: `ref = NEW #( ).`,
@@ -76128,13 +76134,13 @@ class WhenOthersLast extends _abap_rule_1.ABAPRule {
76128
76134
  title: "WHEN OTHERS last",
76129
76135
  shortDescription: `Checks that WHEN OTHERS is placed the last within a CASE statement.`,
76130
76136
  tags: [_irule_1.RuleTag.SingleFile],
76131
- badExample: `CASE bar.
76132
- WHEN OTHERS.
76133
- WHEN 2.
76137
+ badExample: `CASE bar.
76138
+ WHEN OTHERS.
76139
+ WHEN 2.
76134
76140
  ENDCASE.`,
76135
- goodExample: `CASE bar.
76136
- WHEN 2.
76137
- WHEN OTHERS.
76141
+ goodExample: `CASE bar.
76142
+ WHEN 2.
76143
+ WHEN OTHERS.
76138
76144
  ENDCASE.`,
76139
76145
  };
76140
76146
  }
@@ -88953,11 +88959,11 @@ function _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {
88953
88959
  }
88954
88960
 
88955
88961
  if ('CI' in env) {
88956
- if ('GITHUB_ACTIONS' in env || 'GITEA_ACTIONS' in env) {
88962
+ if (['GITHUB_ACTIONS', 'GITEA_ACTIONS', 'CIRCLECI'].some(key => key in env)) {
88957
88963
  return 3;
88958
88964
  }
88959
88965
 
88960
- if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
88966
+ if (['TRAVIS', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
88961
88967
  return 1;
88962
88968
  }
88963
88969