@abaplint/cli 2.113.23 → 2.113.25

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 +951 -903
  4. package/package.json +63 -63
package/build/cli.js CHANGED
@@ -7752,6 +7752,7 @@ class Source extends combi_1.Expression {
7752
7752
  const method = (0, combi_1.seq)(_1.MethodCallChain, (0, combi_1.optPrio)((0, combi_1.altPrio)(attr, comp)), deref);
7753
7753
  const rparen = (0, combi_1.tok)(tokens_1.WParenRightW);
7754
7754
  const rparenNoSpace = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenRightW), (0, combi_1.tok)(tokens_1.WParenRightW));
7755
+ const lparenNoSpace = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenLeft), (0, combi_1.tok)(tokens_1.ParenLeftW));
7755
7756
  // paren used for eg. "( 2 + 1 ) * 4"
7756
7757
  const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), Source, rparen);
7757
7758
  const after = (0, combi_1.seq)((0, combi_1.altPrio)("&", "&&", _1.ArithOperator), Source);
@@ -7759,7 +7760,7 @@ class Source extends combi_1.Expression {
7759
7760
  const prefix = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WPlus), "BIT-NOT");
7760
7761
  const old = (0, combi_1.seq)((0, combi_1.optPrio)(prefix), (0, combi_1.altPrio)(_1.Constant, _1.StringTemplate, text_element_1.TextElement, bool, method, (0, combi_1.seq)(_1.FieldChain, deref), paren), (0, combi_1.optPrio)(after));
7761
7762
  const corr = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("CORRESPONDING", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.CorrespondingBody, rparen, (0, combi_1.optPrio)(after)));
7762
- const conv = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("CONV", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.ConvBody, rparenNoSpace, (0, combi_1.optPrio)(after)));
7763
+ const conv = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("CONV", _1.TypeNameOrInfer, lparenNoSpace, _1.ConvBody, rparenNoSpace, (0, combi_1.optPrio)(after)));
7763
7764
  const swit = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("SWITCH", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.SwitchBody, rparenNoSpace, (0, combi_1.optPrio)(after)));
7764
7765
  const value = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("VALUE", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.ValueBody, rparenNoSpace, (0, combi_1.optPrio)(after)));
7765
7766
  const cond = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("COND", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.CondBody, rparenNoSpace, (0, combi_1.optPrio)(after)));
@@ -9325,8 +9326,8 @@ class TypeTable extends combi_1.Expression {
9325
9326
  const generic = (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.alt)("STANDARD", "HASHED", "INDEX", "SORTED", "ANY")), "TABLE");
9326
9327
  const normal1 = (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.alt)("STANDARD", "HASHED", "INDEX", "SORTED", "ANY")), "TABLE OF", (0, combi_1.optPrio)("REF TO"), _1.TypeName);
9327
9328
  const likeType = (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.alt)("STANDARD", "HASHED", "INDEX", "SORTED", "ANY")), "TABLE OF", (0, combi_1.optPrio)("REF TO"), (0, combi_1.opt)(field_chain_1.FieldChain), (0, combi_1.opt)((0, combi_1.per)(header, initial, (0, combi_1.plusPrio)(type_table_key_1.TypeTableKey))));
9328
- const rangeType = (0, combi_1.seq)("RANGE OF", _1.TypeName, (0, combi_1.optPrio)(header), (0, combi_1.optPrio)(initial));
9329
- const rangeLike = (0, combi_1.seq)("RANGE OF", field_chain_1.FieldChain, (0, combi_1.optPrio)(header), (0, combi_1.optPrio)(initial));
9329
+ const rangeType = (0, combi_1.seq)("RANGE OF", _1.TypeName, (0, combi_1.optPrio)(header), (0, combi_1.optPrio)(initial), (0, combi_1.optPrio)("VALUE IS INITIAL"));
9330
+ const rangeLike = (0, combi_1.seq)("RANGE OF", field_chain_1.FieldChain, (0, combi_1.optPrio)(header), (0, combi_1.optPrio)(initial), (0, combi_1.optPrio)("VALUE IS INITIAL"));
9330
9331
  // a maximum of 15 secondary table keys can be defined
9331
9332
  // "WITH" is not allowed as a field name in keys
9332
9333
  const typetable = (0, combi_1.alt)(generic, (0, combi_1.seq)(normal1, (0, combi_1.alt)((0, combi_1.opt)((0, combi_1.per)(header, initial, (0, combi_1.plusPrio)(type_table_key_1.TypeTableKey))), (0, combi_1.seq)((0, combi_1.plus)(type_table_key_1.TypeTableKey), (0, combi_1.optPrio)(initial)))));
@@ -35173,13 +35174,13 @@ class FlowGraph {
35173
35174
  this.label = label;
35174
35175
  }
35175
35176
  toDigraph() {
35176
- return `digraph G {
35177
- labelloc="t";
35178
- label="${this.label}";
35179
- graph [fontname = "helvetica"];
35180
- node [fontname = "helvetica", shape="box"];
35181
- edge [fontname = "helvetica"];
35182
- ${this.toTextEdges()}
35177
+ return `digraph G {
35178
+ labelloc="t";
35179
+ label="${this.label}";
35180
+ graph [fontname = "helvetica"];
35181
+ node [fontname = "helvetica", shape="box"];
35182
+ edge [fontname = "helvetica"];
35183
+ ${this.toTextEdges()}
35183
35184
  }`;
35184
35185
  }
35185
35186
  listSources(node) {
@@ -36737,6 +36738,10 @@ class AbstractType {
36737
36738
  var _a;
36738
36739
  return (_a = this.data) === null || _a === void 0 ? void 0 : _a.RTTIName;
36739
36740
  }
36741
+ getDescription() {
36742
+ var _a;
36743
+ return (_a = this.data) === null || _a === void 0 ? void 0 : _a.description;
36744
+ }
36740
36745
  getConversionExit() {
36741
36746
  var _a;
36742
36747
  return (_a = this.data) === null || _a === void 0 ? void 0 : _a.conversionExit;
@@ -40698,8 +40703,7 @@ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src
40698
40703
  const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
40699
40704
  class CDSSource extends combi_1.Expression {
40700
40705
  getRunnable() {
40701
- const pre = (0, combi_1.seq)("/", (0, combi_1.regex)(/^[\w_]+$/), "/");
40702
- return (0, combi_1.seq)((0, combi_1.opt)(pre), (0, combi_1.regex)(/^[\w_]+$/), (0, combi_1.opt)(_1.CDSAs));
40706
+ return (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)(_1.CDSAs));
40703
40707
  }
40704
40708
  }
40705
40709
  exports.CDSSource = CDSSource;
@@ -41327,9 +41331,15 @@ class DDIC {
41327
41331
  return { type: new Types.VoidType(name) };
41328
41332
  }
41329
41333
  }
41330
- textToType(text, length, decimals, infoText, qualifiedName, conversionExit, ddicName) {
41334
+ textToType(input) {
41331
41335
  // todo: support short strings, and length of different integers, NUMC vs CHAR, min/max length
41332
- switch (text) {
41336
+ const extra = {
41337
+ qualifiedName: input.qualifiedName,
41338
+ conversionExit: input.conversionExit,
41339
+ ddicName: input.ddicName,
41340
+ description: input.description,
41341
+ };
41342
+ switch (input.text) {
41333
41343
  case "DEC": // 1 <= len <= 31
41334
41344
  case "D16F": // 1 <= len <= 31
41335
41345
  case "D16D":
@@ -41338,45 +41348,45 @@ class DDIC {
41338
41348
  case "DF34_DEC": // 1 <= len <= 31
41339
41349
  case "CURR": // 1 <= len <= 31
41340
41350
  case "QUAN": // 1 <= len <= 31
41341
- if (length === undefined) {
41342
- return new Types.UnknownType(text + " unknown length, " + infoText, infoText);
41351
+ if (input.length === undefined) {
41352
+ return new Types.UnknownType(input.text + " unknown length, " + input.infoText, input.infoText);
41343
41353
  }
41344
- else if (decimals === undefined) {
41345
- return new Types.PackedType(parseInt(length, 10), 0, { qualifiedName, conversionExit, ddicName });
41354
+ else if (input.decimals === undefined) {
41355
+ return new Types.PackedType(parseInt(input.length, 10), 0, extra);
41346
41356
  }
41347
- return new Types.PackedType(parseInt(length, 10), parseInt(decimals, 10), { qualifiedName, conversionExit, ddicName });
41357
+ return new Types.PackedType(parseInt(input.length, 10), parseInt(input.decimals, 10), extra);
41348
41358
  case "ACCP":
41349
- return new Types.CharacterType(6, { qualifiedName, conversionExit, ddicName }); // YYYYMM
41359
+ return new Types.CharacterType(6, extra); // YYYYMM
41350
41360
  case "LANG":
41351
- return new Types.CharacterType(1, { qualifiedName, conversionExit, ddicName });
41361
+ return new Types.CharacterType(1, extra);
41352
41362
  case "CLNT":
41353
- return new Types.CharacterType(3, { qualifiedName, conversionExit, ddicName });
41363
+ return new Types.CharacterType(3, extra);
41354
41364
  case "CUKY":
41355
- return new Types.CharacterType(5, { qualifiedName, conversionExit, ddicName });
41365
+ return new Types.CharacterType(5, extra);
41356
41366
  case "UNIT": // 2 <= len <= 3
41357
- return new Types.CharacterType(3, { qualifiedName, conversionExit, ddicName });
41367
+ return new Types.CharacterType(3, extra);
41358
41368
  case "UTCLONG":
41359
- return new Types.CharacterType(27, { qualifiedName, conversionExit, ddicName });
41369
+ return new Types.CharacterType(27, extra);
41360
41370
  case "NUMC": // 1 <= len <= 255
41361
- if (length === undefined) {
41362
- return new Types.UnknownType(text + " unknown length", infoText);
41371
+ if (input.length === undefined) {
41372
+ return new Types.UnknownType(input.text + " unknown length", input.infoText);
41363
41373
  }
41364
- return new Types.NumericType(parseInt(length, 10), qualifiedName);
41374
+ return new Types.NumericType(parseInt(input.length, 10), input.qualifiedName);
41365
41375
  case "CHAR": // 1 <= len <= 30000 (1333 for table fields)
41366
41376
  case "LCHR": // 256 <= len <= 32000
41367
- if (length === undefined) {
41368
- return new Types.UnknownType(text + " unknown length", infoText);
41377
+ if (input.length === undefined) {
41378
+ return new Types.UnknownType(input.text + " unknown length", input.infoText);
41369
41379
  }
41370
- return new Types.CharacterType(parseInt(length, 10), { qualifiedName, conversionExit, ddicName });
41380
+ return new Types.CharacterType(parseInt(input.length, 10), extra);
41371
41381
  case "RAW": // 1 <= len <= 32000
41372
41382
  case "LRAW": // 256 <= len <= 32000
41373
- if (length === undefined) {
41374
- return new Types.UnknownType(text + " unknown length", infoText);
41383
+ if (input.length === undefined) {
41384
+ return new Types.UnknownType(input.text + " unknown length", input.infoText);
41375
41385
  }
41376
- return new Types.HexType(parseInt(length, 10), qualifiedName);
41386
+ return new Types.HexType(parseInt(input.length, 10), input.qualifiedName);
41377
41387
  case "TIMN": // Native HANA
41378
41388
  case "TIMS":
41379
- return new Types.TimeType({ qualifiedName: qualifiedName }); //HHMMSS
41389
+ return new Types.TimeType({ qualifiedName: input.qualifiedName }); //HHMMSS
41380
41390
  case "DECFLOAT16": // len = 16
41381
41391
  case "DECFLOAT34": // len = 34
41382
41392
  case "D16R": // len = 16
@@ -41384,37 +41394,37 @@ class DDIC {
41384
41394
  case "DF16_RAW": // len = 16
41385
41395
  case "DF34_RAW": // len = 34
41386
41396
  case "FLTP": // len = 16
41387
- if (length === undefined) {
41388
- return new Types.UnknownType(text + " unknown length", infoText);
41397
+ if (input.length === undefined) {
41398
+ return new Types.UnknownType(input.text + " unknown length", input.infoText);
41389
41399
  }
41390
- return new Types.FloatingPointType(parseInt(length, 10), qualifiedName);
41400
+ return new Types.FloatingPointType(parseInt(input.length, 10), input.qualifiedName);
41391
41401
  case "DATN": // Native HANA
41392
41402
  case "DATS":
41393
- return new Types.DateType({ qualifiedName: qualifiedName }); //YYYYMMDD
41403
+ return new Types.DateType({ qualifiedName: input.qualifiedName }); //YYYYMMDD
41394
41404
  case "INT1":
41395
41405
  case "INT2":
41396
41406
  case "INT4":
41397
- return Types.IntegerType.get({ qualifiedName: qualifiedName });
41407
+ return Types.IntegerType.get({ qualifiedName: input.qualifiedName });
41398
41408
  case "INT8":
41399
- return new Types.Integer8Type({ qualifiedName: qualifiedName });
41409
+ return new Types.Integer8Type({ qualifiedName: input.qualifiedName });
41400
41410
  case "SSTR": // 1 <= len <= 1333
41401
41411
  case "SSTRING": // 1 <= len <= 1333
41402
41412
  case "STRG": // 256 <= len
41403
41413
  case "STRING": // 256 <= len
41404
- return Types.StringType.get({ qualifiedName: qualifiedName });
41414
+ return Types.StringType.get({ qualifiedName: input.qualifiedName });
41405
41415
  case "RSTR": // 256 <= len
41406
41416
  case "RAWSTRING": // 256 <= len
41407
41417
  case "GEOM_EWKB":
41408
- return new Types.XStringType({ qualifiedName: qualifiedName });
41418
+ return new Types.XStringType({ qualifiedName: input.qualifiedName });
41409
41419
  case "D16S":
41410
41420
  case "D34S":
41411
41421
  case "DF16_SCL":
41412
41422
  case "DF34_SCL":
41413
41423
  case "PREC":
41414
41424
  case "VARC":
41415
- return new Types.UnknownType(text + " is an obsolete data type", infoText);
41425
+ return new Types.UnknownType(input.text + " is an obsolete data type", input.infoText);
41416
41426
  default:
41417
- return new Types.UnknownType(text + " unknown", infoText);
41427
+ return new Types.UnknownType(input.text + " unknown", input.infoText);
41418
41428
  }
41419
41429
  }
41420
41430
  }
@@ -42709,6 +42719,9 @@ class LSPLookup {
42709
42719
  if (variable.getType().getDDICName() !== undefined) {
42710
42720
  value += "\n\nDDIC Name: ```" + variable.getType().getDDICName() + "```";
42711
42721
  }
42722
+ if (variable.getType().getDescription() !== undefined) {
42723
+ value += "\n\nDescription: " + variable.getType().getDescription();
42724
+ }
42712
42725
  return value;
42713
42726
  }
42714
42727
  static referenceHover(ref, scope, reg) {
@@ -43438,13 +43451,13 @@ class Help {
43438
43451
  /////////////////////////////////////////////////
43439
43452
  static dumpABAP(file, reg, textDocument, position) {
43440
43453
  let content = "";
43441
- content = `
43442
- <a href="#_tokens" rel="no-refresh">Tokens</a> |
43443
- <a href="#_statements" rel="no-refresh">Statements</a> |
43444
- <a href="#_structure" rel="no-refresh">Structure</a> |
43445
- <a href="#_files" rel="no-refresh">Files</a> |
43446
- <a href="#_info" rel="no-refresh">Info Dump</a>
43447
- <hr>
43454
+ content = `
43455
+ <a href="#_tokens" rel="no-refresh">Tokens</a> |
43456
+ <a href="#_statements" rel="no-refresh">Statements</a> |
43457
+ <a href="#_structure" rel="no-refresh">Structure</a> |
43458
+ <a href="#_files" rel="no-refresh">Files</a> |
43459
+ <a href="#_info" rel="no-refresh">Info Dump</a>
43460
+ <hr>
43448
43461
  ` +
43449
43462
  "<tt>" + textDocument.uri + " (" +
43450
43463
  (position.line + 1) + ", " +
@@ -46656,15 +46669,15 @@ class DataDefinition extends _abstract_object_1.AbstractObject {
46656
46669
  }
46657
46670
  }
46658
46671
  findSourcesAndRelations(tree) {
46659
- var _a, _b, _c, _d, _e, _f;
46672
+ var _a, _b, _c, _d, _e, _f, _g;
46660
46673
  for (const e of tree.findAllExpressions(expressions_1.CDSSource)) {
46661
- const name = e.getFirstToken().getStr();
46662
- const as = (_b = (_a = e.findDirectExpression(expressions_1.CDSAs)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(expressions_1.CDSName)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr();
46674
+ const name = ((_a = e.getFirstChild()) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase().replace(/ /g, "")) || "ERROR";
46675
+ const as = (_c = (_b = e.findDirectExpression(expressions_1.CDSAs)) === null || _b === void 0 ? void 0 : _b.findDirectExpression(expressions_1.CDSName)) === null || _c === void 0 ? void 0 : _c.getFirstToken().getStr();
46663
46676
  this.parsedData.sources.push({ name, as });
46664
46677
  }
46665
46678
  for (const e of tree.findAllExpressions(expressions_1.CDSRelation)) {
46666
46679
  const name = e.getFirstToken().getStr();
46667
- const as = (_d = (_c = e.findDirectExpression(expressions_1.CDSAs)) === null || _c === void 0 ? void 0 : _c.findDirectExpression(expressions_1.CDSName)) === null || _d === void 0 ? void 0 : _d.getFirstToken().getStr();
46680
+ const as = (_e = (_d = e.findDirectExpression(expressions_1.CDSAs)) === null || _d === void 0 ? void 0 : _d.findDirectExpression(expressions_1.CDSName)) === null || _e === void 0 ? void 0 : _e.getFirstToken().getStr();
46668
46681
  this.parsedData.relations.push({ name, as });
46669
46682
  }
46670
46683
  for (const e of tree.findAllExpressions(expressions_1.CDSAssociation)) {
@@ -46673,7 +46686,7 @@ class DataDefinition extends _abstract_object_1.AbstractObject {
46673
46686
  continue;
46674
46687
  }
46675
46688
  const name = j.getFirstToken().getStr();
46676
- const as = (_f = (_e = j.findDirectExpression(expressions_1.CDSAs)) === null || _e === void 0 ? void 0 : _e.findDirectExpression(expressions_1.CDSName)) === null || _f === void 0 ? void 0 : _f.getFirstToken().getStr();
46689
+ const as = (_g = (_f = j.findDirectExpression(expressions_1.CDSAs)) === null || _f === void 0 ? void 0 : _f.findDirectExpression(expressions_1.CDSName)) === null || _g === void 0 ? void 0 : _g.getFirstToken().getStr();
46677
46690
  this.parsedData.associations.push({
46678
46691
  name: name || "ERROR",
46679
46692
  as: as,
@@ -46733,6 +46746,7 @@ class DataElement extends _abstract_object_1.AbstractObject {
46733
46746
  return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.texts;
46734
46747
  }
46735
46748
  parseType(reg) {
46749
+ var _a;
46736
46750
  const references = [];
46737
46751
  let lookup = undefined;
46738
46752
  if (this.parsedXML === undefined) {
@@ -46761,7 +46775,16 @@ class DataElement extends _abstract_object_1.AbstractObject {
46761
46775
  lookup = { type: new Types.UnknownType("DATATYPE unexpectely empty in " + this.getName()) };
46762
46776
  }
46763
46777
  else {
46764
- lookup = { type: ddic.textToType(this.parsedXML.datatype, this.parsedXML.leng, this.parsedXML.decimals, this.getName(), this.getName(), undefined, this.getName()) };
46778
+ lookup = { type: ddic.textToType({
46779
+ text: this.parsedXML.datatype,
46780
+ length: this.parsedXML.leng,
46781
+ decimals: this.parsedXML.decimals,
46782
+ infoText: this.getName(),
46783
+ qualifiedName: this.getName(),
46784
+ conversionExit: undefined,
46785
+ ddicName: this.getName(),
46786
+ description: (_a = this.parsedXML.texts) === null || _a === void 0 ? void 0 : _a.heading,
46787
+ }) };
46765
46788
  }
46766
46789
  }
46767
46790
  }
@@ -46914,7 +46937,15 @@ class Domain extends _abstract_object_1.AbstractObject {
46914
46937
  return new Types.UnknownType("Domain " + this.getName() + " parser error", this.getName());
46915
46938
  }
46916
46939
  const ddic = new ddic_1.DDIC(reg);
46917
- return ddic.textToType(this.parsedXML.datatype, this.parsedXML.length, this.parsedXML.decimals, this.getName(), dataElement, this.parsedXML.conversionExit, dataElement);
46940
+ return ddic.textToType({
46941
+ text: this.parsedXML.datatype,
46942
+ length: this.parsedXML.length,
46943
+ decimals: this.parsedXML.decimals,
46944
+ infoText: this.getName(),
46945
+ qualifiedName: dataElement,
46946
+ conversionExit: this.parsedXML.conversionExit,
46947
+ ddicName: dataElement,
46948
+ });
46918
46949
  }
46919
46950
  parse() {
46920
46951
  var _a, _b, _c, _d, _e, _f, _g;
@@ -51428,7 +51459,12 @@ class Table extends _abstract_object_1.AbstractObject {
51428
51459
  const length = field.LENG ? field.LENG : field.INTLEN;
51429
51460
  components.push({
51430
51461
  name: field.FIELDNAME,
51431
- type: ddic.textToType(datatype, length, field.DECIMALS, this.getName() + "-" + field.FIELDNAME)
51462
+ type: ddic.textToType({
51463
+ text: datatype,
51464
+ length: length,
51465
+ decimals: field.DECIMALS,
51466
+ infoText: this.getName() + "-" + field.FIELDNAME,
51467
+ })
51432
51468
  });
51433
51469
  }
51434
51470
  else {
@@ -51663,7 +51699,12 @@ class TableType extends _abstract_object_1.AbstractObject {
51663
51699
  type = new Types.UnknownType("Table Type, empty DATATYPE" + this.getName(), this.getName());
51664
51700
  }
51665
51701
  else {
51666
- const row = ddic.textToType(this.parsedXML.datatype, this.parsedXML.leng, this.parsedXML.decimals, this.getName());
51702
+ const row = ddic.textToType({
51703
+ text: this.parsedXML.datatype,
51704
+ length: this.parsedXML.leng,
51705
+ decimals: this.parsedXML.decimals,
51706
+ infoText: this.getName(),
51707
+ });
51667
51708
  type = new Types.TableType(row, tableOptions, this.getName());
51668
51709
  }
51669
51710
  }
@@ -52780,7 +52821,7 @@ class Registry {
52780
52821
  }
52781
52822
  static abaplintVersion() {
52782
52823
  // magic, see build script "version.sh"
52783
- return "2.113.23";
52824
+ return "2.113.25";
52784
52825
  }
52785
52826
  getDDICReferences() {
52786
52827
  return this.ddicReferences;
@@ -53099,10 +53140,10 @@ class SevenBitAscii {
53099
53140
  key: "7bit_ascii",
53100
53141
  title: "Check for 7bit ascii",
53101
53142
  shortDescription: `Only allow characters from the 7bit ASCII set.`,
53102
- extendedInformation: `https://docs.abapopenchecks.org/checks/05/
53103
-
53104
- https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
53105
-
53143
+ extendedInformation: `https://docs.abapopenchecks.org/checks/05/
53144
+
53145
+ https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
53146
+
53106
53147
  Checkes files with extensions ".abap" and ".asddls"`,
53107
53148
  tags: [_irule_1.RuleTag.SingleFile],
53108
53149
  badExample: `WRITE '뽑'.`,
@@ -53308,10 +53349,10 @@ class Abapdoc extends _abap_rule_1.ABAPRule {
53308
53349
  key: "abapdoc",
53309
53350
  title: "Check abapdoc",
53310
53351
  shortDescription: `Various checks regarding abapdoc.`,
53311
- extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
53312
-
53313
- Plus class and interface definitions.
53314
-
53352
+ extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
53353
+
53354
+ Plus class and interface definitions.
53355
+
53315
53356
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#abap-doc-only-for-public-apis`,
53316
53357
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
53317
53358
  };
@@ -53448,27 +53489,27 @@ class AddTestAttributes extends _abap_rule_1.ABAPRule {
53448
53489
  title: "Add test attributes for tests classes with test methods",
53449
53490
  shortDescription: `Add test attributes DURATION and RISK LEVEL for tests classes with test methods`,
53450
53491
  tags: [_irule_1.RuleTag.SingleFile],
53451
- badExample: `CLASS ltcl_test1 DEFINITION FINAL FOR TESTING.
53452
- PUBLIC SECTION.
53453
- PROTECTED SECTION.
53454
- PRIVATE SECTION.
53455
- METHODS test FOR TESTING RAISING cx_static_check.
53456
- ENDCLASS.
53457
-
53458
- CLASS ltcl_test1 IMPLEMENTATION.
53459
- METHOD test.
53460
- ENDMETHOD.
53492
+ badExample: `CLASS ltcl_test1 DEFINITION FINAL FOR TESTING.
53493
+ PUBLIC SECTION.
53494
+ PROTECTED SECTION.
53495
+ PRIVATE SECTION.
53496
+ METHODS test FOR TESTING RAISING cx_static_check.
53497
+ ENDCLASS.
53498
+
53499
+ CLASS ltcl_test1 IMPLEMENTATION.
53500
+ METHOD test.
53501
+ ENDMETHOD.
53461
53502
  ENDCLASS.`,
53462
- goodExample: `CLASS ltcl_test2 DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
53463
- PUBLIC SECTION.
53464
- PROTECTED SECTION.
53465
- PRIVATE SECTION.
53466
- METHODS test FOR TESTING RAISING cx_static_check.
53467
- ENDCLASS.
53468
-
53469
- CLASS ltcl_test2 IMPLEMENTATION.
53470
- METHOD test.
53471
- ENDMETHOD.
53503
+ goodExample: `CLASS ltcl_test2 DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
53504
+ PUBLIC SECTION.
53505
+ PROTECTED SECTION.
53506
+ PRIVATE SECTION.
53507
+ METHODS test FOR TESTING RAISING cx_static_check.
53508
+ ENDCLASS.
53509
+
53510
+ CLASS ltcl_test2 IMPLEMENTATION.
53511
+ METHOD test.
53512
+ ENDMETHOD.
53472
53513
  ENDCLASS.`,
53473
53514
  };
53474
53515
  }
@@ -53554,49 +53595,49 @@ class AlignParameters extends _abap_rule_1.ABAPRule {
53554
53595
  key: "align_parameters",
53555
53596
  title: "Align Parameters",
53556
53597
  shortDescription: `Checks for vertially aligned parameters`,
53557
- extendedInformation: `Checks:
53558
- * function module calls
53559
- * method calls
53560
- * VALUE constructors
53561
- * NEW constructors
53562
- * RAISE EXCEPTION statements
53563
- * CREATE OBJECT statements
53564
- * RAISE EVENT statements
53565
-
53566
- https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
53567
-
53568
- Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
53569
-
53570
- If parameters are on the same row, no issues are reported, see
53598
+ extendedInformation: `Checks:
53599
+ * function module calls
53600
+ * method calls
53601
+ * VALUE constructors
53602
+ * NEW constructors
53603
+ * RAISE EXCEPTION statements
53604
+ * CREATE OBJECT statements
53605
+ * RAISE EVENT statements
53606
+
53607
+ https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
53608
+
53609
+ Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
53610
+
53611
+ If parameters are on the same row, no issues are reported, see
53571
53612
  https://rules.abaplint.org/max_one_method_parameter_per_line/ for splitting parameters to lines`,
53572
53613
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
53573
- badExample: `CALL FUNCTION 'FOOBAR'
53574
- EXPORTING
53575
- foo = 2
53576
- parameter = 3.
53577
-
53578
- foobar( moo = 1
53579
- param = 1 ).
53580
-
53581
- foo = VALUE #(
53582
- foo = bar
53614
+ badExample: `CALL FUNCTION 'FOOBAR'
53615
+ EXPORTING
53616
+ foo = 2
53617
+ parameter = 3.
53618
+
53619
+ foobar( moo = 1
53620
+ param = 1 ).
53621
+
53622
+ foo = VALUE #(
53623
+ foo = bar
53583
53624
  moo = 2 ).`,
53584
- goodExample: `CALL FUNCTION 'FOOBAR'
53585
- EXPORTING
53586
- foo = 2
53587
- parameter = 3.
53588
-
53589
- foobar( moo = 1
53590
- param = 1 ).
53591
-
53592
- foo = VALUE #(
53593
- foo = bar
53594
- moo = 2 ).
53595
-
53596
- DATA(sdf) = VALUE type(
53597
- common_val = 2
53598
- another_common = 5
53599
- ( row_value = 4
53625
+ goodExample: `CALL FUNCTION 'FOOBAR'
53626
+ EXPORTING
53627
+ foo = 2
53628
+ parameter = 3.
53629
+
53630
+ foobar( moo = 1
53631
+ param = 1 ).
53632
+
53633
+ foo = VALUE #(
53634
+ foo = bar
53635
+ moo = 2 ).
53636
+
53637
+ DATA(sdf) = VALUE type(
53638
+ common_val = 2
53639
+ another_common = 5
53640
+ ( row_value = 4
53600
53641
  value_foo = 5 ) ).`,
53601
53642
  };
53602
53643
  }
@@ -54030,37 +54071,37 @@ class AlignTypeExpressions extends _abap_rule_1.ABAPRule {
54030
54071
  key: "align_type_expressions",
54031
54072
  title: "Align TYPE expressions",
54032
54073
  shortDescription: `Align TYPE expressions in statements`,
54033
- extendedInformation: `
54034
- Currently works for METHODS + BEGIN OF
54035
-
54036
- If BEGIN OF has an INCLUDE TYPE its ignored
54037
-
54038
- Also note that clean ABAP does not recommend aligning TYPE clauses:
54074
+ extendedInformation: `
54075
+ Currently works for METHODS + BEGIN OF
54076
+
54077
+ If BEGIN OF has an INCLUDE TYPE its ignored
54078
+
54079
+ Also note that clean ABAP does not recommend aligning TYPE clauses:
54039
54080
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-align-type-clauses`,
54040
54081
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix],
54041
- badExample: `
54042
- TYPES: BEGIN OF foo,
54043
- bar TYPE i,
54044
- foobar TYPE i,
54045
- END OF foo.
54046
-
54047
- INTERFACE lif.
54048
- METHODS bar
54049
- IMPORTING
54050
- foo TYPE i
54051
- foobar TYPE i.
54082
+ badExample: `
54083
+ TYPES: BEGIN OF foo,
54084
+ bar TYPE i,
54085
+ foobar TYPE i,
54086
+ END OF foo.
54087
+
54088
+ INTERFACE lif.
54089
+ METHODS bar
54090
+ IMPORTING
54091
+ foo TYPE i
54092
+ foobar TYPE i.
54052
54093
  ENDINTERFACE.`,
54053
- goodExample: `
54054
- TYPES: BEGIN OF foo,
54055
- bar TYPE i,
54056
- foobar TYPE i,
54057
- END OF foo.
54058
-
54059
- INTERFACE lif.
54060
- METHODS bar
54061
- IMPORTING
54062
- foo TYPE i
54063
- foobar TYPE i.
54094
+ goodExample: `
54095
+ TYPES: BEGIN OF foo,
54096
+ bar TYPE i,
54097
+ foobar TYPE i,
54098
+ END OF foo.
54099
+
54100
+ INTERFACE lif.
54101
+ METHODS bar
54102
+ IMPORTING
54103
+ foo TYPE i
54104
+ foobar TYPE i.
54064
54105
  ENDINTERFACE.`,
54065
54106
  };
54066
54107
  }
@@ -54339,16 +54380,16 @@ class AmbiguousStatement extends _abap_rule_1.ABAPRule {
54339
54380
  return {
54340
54381
  key: "ambiguous_statement",
54341
54382
  title: "Check for ambigious statements",
54342
- shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
54343
- Add "TABLE" keyword or "@" for escaping SQL variables
54344
-
54383
+ shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
54384
+ Add "TABLE" keyword or "@" for escaping SQL variables
54385
+
54345
54386
  Only works if the target version is 740sp05 or above`,
54346
54387
  tags: [_irule_1.RuleTag.SingleFile],
54347
- badExample: `DELETE foo FROM bar.
54388
+ badExample: `DELETE foo FROM bar.
54348
54389
  MODIFY foo FROM bar.`,
54349
- goodExample: `DELETE foo FROM @bar.
54350
- DELETE TABLE itab FROM 2.
54351
- MODIFY zfoo FROM @wa.
54390
+ goodExample: `DELETE foo FROM @bar.
54391
+ DELETE TABLE itab FROM 2.
54392
+ MODIFY zfoo FROM @wa.
54352
54393
  MODIFY TABLE foo FROM bar.`,
54353
54394
  };
54354
54395
  }
@@ -54453,16 +54494,16 @@ class AvoidUse extends _abap_rule_1.ABAPRule {
54453
54494
  key: "avoid_use",
54454
54495
  title: "Avoid use of certain statements",
54455
54496
  shortDescription: `Detects usage of certain statements.`,
54456
- extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
54457
-
54458
- Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
54459
-
54460
- STATICS: use CLASS-DATA instead
54461
-
54462
- DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
54463
-
54464
- TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
54465
-
54497
+ extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
54498
+
54499
+ Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
54500
+
54501
+ STATICS: use CLASS-DATA instead
54502
+
54503
+ DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
54504
+
54505
+ TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
54506
+
54466
54507
  BREAK points`,
54467
54508
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
54468
54509
  };
@@ -54594,11 +54635,11 @@ class BeginEndNames extends _abap_rule_1.ABAPRule {
54594
54635
  title: "Check BEGIN END names",
54595
54636
  shortDescription: `Check BEGIN OF and END OF names match, plus there must be statements between BEGIN and END`,
54596
54637
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
54597
- badExample: `DATA: BEGIN OF stru,
54598
- field TYPE i,
54638
+ badExample: `DATA: BEGIN OF stru,
54639
+ field TYPE i,
54599
54640
  END OF structure_not_the_same.`,
54600
- goodExample: `DATA: BEGIN OF stru,
54601
- field TYPE i,
54641
+ goodExample: `DATA: BEGIN OF stru,
54642
+ field TYPE i,
54602
54643
  END OF stru.`,
54603
54644
  };
54604
54645
  }
@@ -54695,20 +54736,20 @@ class BeginSingleInclude extends _abap_rule_1.ABAPRule {
54695
54736
  title: "BEGIN contains single INCLUDE",
54696
54737
  shortDescription: `Finds TYPE BEGIN with just one INCLUDE TYPE, and DATA with single INCLUDE STRUCTURE`,
54697
54738
  tags: [_irule_1.RuleTag.SingleFile],
54698
- badExample: `TYPES: BEGIN OF dummy1.
54699
- INCLUDE TYPE dselc.
54700
- TYPES: END OF dummy1.
54701
-
54702
- DATA BEGIN OF foo.
54703
- INCLUDE STRUCTURE syst.
54704
- DATA END OF foo.
54705
-
54706
- STATICS BEGIN OF bar.
54707
- INCLUDE STRUCTURE syst.
54739
+ badExample: `TYPES: BEGIN OF dummy1.
54740
+ INCLUDE TYPE dselc.
54741
+ TYPES: END OF dummy1.
54742
+
54743
+ DATA BEGIN OF foo.
54744
+ INCLUDE STRUCTURE syst.
54745
+ DATA END OF foo.
54746
+
54747
+ STATICS BEGIN OF bar.
54748
+ INCLUDE STRUCTURE syst.
54708
54749
  STATICS END OF bar.`,
54709
- goodExample: `DATA BEGIN OF foo.
54710
- DATA field TYPE i.
54711
- INCLUDE STRUCTURE dselc.
54750
+ goodExample: `DATA BEGIN OF foo.
54751
+ DATA field TYPE i.
54752
+ INCLUDE STRUCTURE dselc.
54712
54753
  DATA END OF foo.`,
54713
54754
  };
54714
54755
  }
@@ -54798,9 +54839,9 @@ class CallTransactionAuthorityCheck extends _abap_rule_1.ABAPRule {
54798
54839
  extendedInformation: `https://docs.abapopenchecks.org/checks/54/`,
54799
54840
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
54800
54841
  badExample: `CALL TRANSACTION 'FOO'.`,
54801
- goodExample: `TRY.
54802
- CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
54803
- CATCH cx_sy_authorization_error.
54842
+ goodExample: `TRY.
54843
+ CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
54844
+ CATCH cx_sy_authorization_error.
54804
54845
  ENDTRY.`,
54805
54846
  };
54806
54847
  }
@@ -54865,10 +54906,10 @@ class CDSCommentStyle {
54865
54906
  key: "cds_comment_style",
54866
54907
  title: "CDS Comment Style",
54867
54908
  shortDescription: `Check for obsolete comment style`,
54868
- extendedInformation: `Check for obsolete comment style
54869
-
54870
- Comments starting with "--" are considered obsolete
54871
-
54909
+ extendedInformation: `Check for obsolete comment style
54910
+
54911
+ Comments starting with "--" are considered obsolete
54912
+
54872
54913
  https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abencds_general_syntax_rules.htm`,
54873
54914
  tags: [_irule_1.RuleTag.SingleFile],
54874
54915
  badExample: "-- this is a comment",
@@ -54934,10 +54975,10 @@ class CDSLegacyView {
54934
54975
  key: "cds_legacy_view",
54935
54976
  title: "CDS Legacy View",
54936
54977
  shortDescription: `Identify CDS Legacy Views`,
54937
- extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
54938
-
54939
- https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
54940
-
54978
+ extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
54979
+
54980
+ https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
54981
+
54941
54982
  v755 and up`,
54942
54983
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Upport],
54943
54984
  };
@@ -55092,10 +55133,10 @@ class ChainMainlyDeclarations extends _abap_rule_1.ABAPRule {
55092
55133
  key: "chain_mainly_declarations",
55093
55134
  title: "Chain mainly declarations",
55094
55135
  shortDescription: `Chain mainly declarations, allows chaining for the configured statements, reports errors for other statements.`,
55095
- extendedInformation: `
55096
- https://docs.abapopenchecks.org/checks/23/
55097
-
55098
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
55136
+ extendedInformation: `
55137
+ https://docs.abapopenchecks.org/checks/23/
55138
+
55139
+ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
55099
55140
  `,
55100
55141
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
55101
55142
  badExample: `CALL METHOD: bar.`,
@@ -55271,17 +55312,17 @@ class ChangeIfToCase extends _abap_rule_1.ABAPRule {
55271
55312
  title: "Change IF to CASE",
55272
55313
  shortDescription: `Finds IF constructs that can be changed to CASE`,
55273
55314
  // eslint-disable-next-line max-len
55274
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
55275
-
55315
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
55316
+
55276
55317
  If the first comparison is a boolean compare, no issue is reported.`,
55277
55318
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
55278
- badExample: `IF l_fcat-fieldname EQ 'FOO'.
55279
- ELSEIF l_fcat-fieldname = 'BAR'
55280
- OR l_fcat-fieldname = 'MOO'.
55319
+ badExample: `IF l_fcat-fieldname EQ 'FOO'.
55320
+ ELSEIF l_fcat-fieldname = 'BAR'
55321
+ OR l_fcat-fieldname = 'MOO'.
55281
55322
  ENDIF.`,
55282
- goodExample: `CASE l_fcat-fieldname.
55283
- WHEN 'FOO'.
55284
- WHEN 'BAR' OR 'MOO'.
55323
+ goodExample: `CASE l_fcat-fieldname.
55324
+ WHEN 'FOO'.
55325
+ WHEN 'BAR' OR 'MOO'.
55285
55326
  ENDCASE.`,
55286
55327
  };
55287
55328
  }
@@ -55418,8 +55459,8 @@ class CheckAbstract extends _abap_rule_1.ABAPRule {
55418
55459
  return {
55419
55460
  key: "check_abstract",
55420
55461
  title: "Check abstract methods and classes",
55421
- shortDescription: `Checks abstract methods and classes:
55422
- - class defined as abstract and final,
55462
+ shortDescription: `Checks abstract methods and classes:
55463
+ - class defined as abstract and final,
55423
55464
  - non-abstract class contains abstract methods`,
55424
55465
  extendedInformation: `If a class defines only constants, use an interface instead`,
55425
55466
  tags: [_irule_1.RuleTag.SingleFile],
@@ -55500,11 +55541,11 @@ class CheckComments extends _abap_rule_1.ABAPRule {
55500
55541
  return {
55501
55542
  key: "check_comments",
55502
55543
  title: "Check Comments",
55503
- shortDescription: `
55544
+ shortDescription: `
55504
55545
  Various checks for comment usage.`,
55505
- extendedInformation: `
55506
- Detects end of line comments. Comments starting with "#EC" or "##" are ignored
55507
-
55546
+ extendedInformation: `
55547
+ Detects end of line comments. Comments starting with "#EC" or "##" are ignored
55548
+
55508
55549
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#put-comments-before-the-statement-they-relate-to`,
55509
55550
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
55510
55551
  badExample: `WRITE 2. " descriptive comment`,
@@ -55666,9 +55707,9 @@ class CheckInclude {
55666
55707
  key: "check_include",
55667
55708
  title: "Check INCLUDEs",
55668
55709
  shortDescription: `Checks INCLUDE statements`,
55669
- extendedInformation: `
55670
- * Reports unused includes
55671
- * Errors if the includes are not found
55710
+ extendedInformation: `
55711
+ * Reports unused includes
55712
+ * Errors if the includes are not found
55672
55713
  * Error if including a main program`,
55673
55714
  tags: [_irule_1.RuleTag.Syntax],
55674
55715
  };
@@ -55744,14 +55785,14 @@ class CheckSubrc extends _abap_rule_1.ABAPRule {
55744
55785
  key: "check_subrc",
55745
55786
  title: "Check sy-subrc",
55746
55787
  shortDescription: `Check sy-subrc`,
55747
- extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
55748
-
55749
- If sy-dbcnt is checked after database statements, it is considered okay.
55750
-
55751
- "SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
55752
-
55753
- If IS ASSIGNED is checked after assigning, it is considered okay.
55754
-
55788
+ extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
55789
+
55790
+ If sy-dbcnt is checked after database statements, it is considered okay.
55791
+
55792
+ "SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
55793
+
55794
+ If IS ASSIGNED is checked after assigning, it is considered okay.
55795
+
55755
55796
  FIND statement with MATCH COUNT is considered okay if subrc is not checked`,
55756
55797
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
55757
55798
  pseudoComment: "EC CI_SUBRC",
@@ -56321,17 +56362,17 @@ class ClassicExceptionsOverlap extends _abap_rule_1.ABAPRule {
56321
56362
  shortDescription: `Find overlapping classic exceptions`,
56322
56363
  extendedInformation: `When debugging its typically good to know exactly which exception is caught`,
56323
56364
  tags: [_irule_1.RuleTag.SingleFile],
56324
- badExample: `CALL FUNCTION 'SOMETHING'
56325
- EXCEPTIONS
56326
- system_failure = 1 MESSAGE lv_message
56327
- communication_failure = 1 MESSAGE lv_message
56328
- resource_failure = 1
56365
+ badExample: `CALL FUNCTION 'SOMETHING'
56366
+ EXCEPTIONS
56367
+ system_failure = 1 MESSAGE lv_message
56368
+ communication_failure = 1 MESSAGE lv_message
56369
+ resource_failure = 1
56329
56370
  OTHERS = 1.`,
56330
- goodExample: `CALL FUNCTION 'SOMETHING'
56331
- EXCEPTIONS
56332
- system_failure = 1 MESSAGE lv_message
56333
- communication_failure = 2 MESSAGE lv_message
56334
- resource_failure = 3
56371
+ goodExample: `CALL FUNCTION 'SOMETHING'
56372
+ EXCEPTIONS
56373
+ system_failure = 1 MESSAGE lv_message
56374
+ communication_failure = 2 MESSAGE lv_message
56375
+ resource_failure = 3
56335
56376
  OTHERS = 4.`,
56336
56377
  };
56337
56378
  }
@@ -56577,7 +56618,7 @@ class CommentedCode extends _abap_rule_1.ABAPRule {
56577
56618
  key: "commented_code",
56578
56619
  title: "Find commented code",
56579
56620
  shortDescription: `Detects usage of commented out code.`,
56580
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it
56621
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it
56581
56622
  https://docs.abapopenchecks.org/checks/14/`,
56582
56623
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
56583
56624
  badExample: `* WRITE 'hello world'.`,
@@ -56810,10 +56851,10 @@ class ConstructorVisibilityPublic {
56810
56851
  key: "constructor_visibility_public",
56811
56852
  title: "Check constructor visibility is public",
56812
56853
  shortDescription: `Constructor must be placed in the public section, even if the class is not CREATE PUBLIC.`,
56813
- extendedInformation: `
56814
- This only applies to global classes.
56815
-
56816
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
56854
+ extendedInformation: `
56855
+ This only applies to global classes.
56856
+
56857
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
56817
56858
  https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abeninstance_constructor_guidl.htm`,
56818
56859
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
56819
56860
  };
@@ -56888,8 +56929,8 @@ class ContainsTab extends _abap_rule_1.ABAPRule {
56888
56929
  key: "contains_tab",
56889
56930
  title: "Code contains tab",
56890
56931
  shortDescription: `Checks for usage of tabs (enable to enforce spaces)`,
56891
- extendedInformation: `
56892
- https://docs.abapopenchecks.org/checks/09/
56932
+ extendedInformation: `
56933
+ https://docs.abapopenchecks.org/checks/09/
56893
56934
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
56894
56935
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
56895
56936
  badExample: `\tWRITE 'hello world'.`,
@@ -56976,10 +57017,10 @@ class CyclicOO {
56976
57017
  key: "cyclic_oo",
56977
57018
  title: "Cyclic OO",
56978
57019
  shortDescription: `Finds cyclic/circular OO references`,
56979
- extendedInformation: `Runs for global INTF + CLAS objects
56980
-
56981
- Objects must be without syntax errors for this rule to take effect
56982
-
57020
+ extendedInformation: `Runs for global INTF + CLAS objects
57021
+
57022
+ Objects must be without syntax errors for this rule to take effect
57023
+
56983
57024
  References in testclass includes are ignored`,
56984
57025
  };
56985
57026
  }
@@ -57222,7 +57263,7 @@ class DangerousStatement extends _abap_rule_1.ABAPRule {
57222
57263
  key: "dangerous_statement",
57223
57264
  title: "Dangerous statement",
57224
57265
  shortDescription: `Detects potentially dangerous statements`,
57225
- extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
57266
+ extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
57226
57267
  dynamic SQL can potentially create SQL injection problems`,
57227
57268
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
57228
57269
  };
@@ -57429,13 +57470,13 @@ class DefinitionsTop extends _abap_rule_1.ABAPRule {
57429
57470
  shortDescription: `Checks that definitions are placed at the beginning of METHODs, FORMs and FUNCTIONs.`,
57430
57471
  extendedInformation: `https://docs.abapopenchecks.org/checks/17/`,
57431
57472
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
57432
- badExample: `FROM foo.
57433
- WRITE 'hello'.
57434
- DATA int TYPE i.
57473
+ badExample: `FROM foo.
57474
+ WRITE 'hello'.
57475
+ DATA int TYPE i.
57435
57476
  ENDFORM.`,
57436
- goodExample: `FROM foo.
57437
- DATA int TYPE i.
57438
- WRITE 'hello'.
57477
+ goodExample: `FROM foo.
57478
+ DATA int TYPE i.
57479
+ WRITE 'hello'.
57439
57480
  ENDFORM.`,
57440
57481
  };
57441
57482
  }
@@ -57974,39 +58015,39 @@ class Downport {
57974
58015
  key: "downport",
57975
58016
  title: "Downport statement",
57976
58017
  shortDescription: `Downport functionality`,
57977
- extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with
57978
- a higher level language version. If successful, various rules are applied to downport the statement.
57979
- Target downport version is always v702, thus rule is only enabled if target version is v702.
57980
-
57981
- Current rules:
57982
- * NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/
57983
- * DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/
57984
- * FIELD-SYMBOL() definitions are outlined
57985
- * CONV is outlined
57986
- * COND is outlined
57987
- * REDUCE is outlined
57988
- * SWITCH is outlined
57989
- * FILTER is outlined
57990
- * APPEND expression is outlined
57991
- * INSERT expression is outlined
57992
- * EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/
57993
- * CAST changed to ?=
57994
- * LOOP AT method_call( ) is outlined
57995
- * VALUE # with structure fields
57996
- * VALUE # with internal table lines
57997
- * Table Expressions are outlined
57998
- * SELECT INTO @DATA definitions are outlined
57999
- * Some occurrences of string template formatting option ALPHA changed to function module call
58000
- * SELECT/INSERT/MODIFY/DELETE/UPDATE "," in field list removed, "@" in source/targets removed
58001
- * PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods
58002
- * RAISE EXCEPTION ... MESSAGE
58003
- * Moving with +=, -=, /=, *=, &&= is expanded
58004
- * line_exists and line_index is downported to READ TABLE
58005
- * ENUMs, but does not nessesarily give the correct type and value
58006
- * MESSAGE with non simple source
58007
-
58008
- Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.
58009
-
58018
+ extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with
58019
+ a higher level language version. If successful, various rules are applied to downport the statement.
58020
+ Target downport version is always v702, thus rule is only enabled if target version is v702.
58021
+
58022
+ Current rules:
58023
+ * NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/
58024
+ * DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/
58025
+ * FIELD-SYMBOL() definitions are outlined
58026
+ * CONV is outlined
58027
+ * COND is outlined
58028
+ * REDUCE is outlined
58029
+ * SWITCH is outlined
58030
+ * FILTER is outlined
58031
+ * APPEND expression is outlined
58032
+ * INSERT expression is outlined
58033
+ * EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/
58034
+ * CAST changed to ?=
58035
+ * LOOP AT method_call( ) is outlined
58036
+ * VALUE # with structure fields
58037
+ * VALUE # with internal table lines
58038
+ * Table Expressions are outlined
58039
+ * SELECT INTO @DATA definitions are outlined
58040
+ * Some occurrences of string template formatting option ALPHA changed to function module call
58041
+ * SELECT/INSERT/MODIFY/DELETE/UPDATE "," in field list removed, "@" in source/targets removed
58042
+ * PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods
58043
+ * RAISE EXCEPTION ... MESSAGE
58044
+ * Moving with +=, -=, /=, *=, &&= is expanded
58045
+ * line_exists and line_index is downported to READ TABLE
58046
+ * ENUMs, but does not nessesarily give the correct type and value
58047
+ * MESSAGE with non simple source
58048
+
58049
+ Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.
58050
+
58010
58051
  Make sure to test the downported code, it might not always be completely correct.`,
58011
58052
  tags: [_irule_1.RuleTag.Downport, _irule_1.RuleTag.Quickfix],
58012
58053
  };
@@ -58584,10 +58625,10 @@ Make sure to test the downported code, it might not always be completely correct
58584
58625
  const fieldName = f.concatTokens();
58585
58626
  fieldDefinition += indentation + " " + fieldName + " TYPE " + tableName + "-" + fieldName + ",\n";
58586
58627
  }
58587
- fieldDefinition = `DATA: BEGIN OF ${name},
58628
+ fieldDefinition = `DATA: BEGIN OF ${name},
58588
58629
  ${fieldDefinition}${indentation} END OF ${name}.`;
58589
58630
  }
58590
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
58631
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
58591
58632
  ${indentation}`);
58592
58633
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
58593
58634
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -58646,12 +58687,12 @@ ${indentation}`);
58646
58687
  }
58647
58688
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58648
58689
  const name = ((_g = inlineData.findFirstExpression(Expressions.TargetField)) === null || _g === void 0 ? void 0 : _g.concatTokens()) || "error";
58649
- let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
58650
- ${fieldDefinitions}${indentation} END OF ${uniqueName}.
58651
- ${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.
58690
+ let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
58691
+ ${fieldDefinitions}${indentation} END OF ${uniqueName}.
58692
+ ${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.
58652
58693
  ${indentation}`);
58653
58694
  if (fieldDefinitions === "") {
58654
- fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.
58695
+ fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.
58655
58696
  ${indentation}`);
58656
58697
  }
58657
58698
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
@@ -58719,7 +58760,7 @@ ${indentation}`);
58719
58760
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58720
58761
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
58721
58762
  const firstToken = high.getFirstToken();
58722
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
58763
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
58723
58764
  ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
58724
58765
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
58725
58766
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -58773,7 +58814,7 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
58773
58814
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58774
58815
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
58775
58816
  const firstToken = high.getFirstToken();
58776
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
58817
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
58777
58818
  ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
58778
58819
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
58779
58820
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -58815,14 +58856,14 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
58815
58856
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
58816
58857
  const firstToken = high.getFirstToken();
58817
58858
  // note that the tabix restore should be done before throwing the exception
58818
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.
58819
- ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
58820
- ${indentation}${tabixBackup} = sy-tabix.
58821
- ${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.
58822
- ${indentation}sy-tabix = ${tabixBackup}.
58823
- ${indentation}IF sy-subrc <> 0.
58824
- ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
58825
- ${indentation}ENDIF.
58859
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.
58860
+ ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
58861
+ ${indentation}${tabixBackup} = sy-tabix.
58862
+ ${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.
58863
+ ${indentation}sy-tabix = ${tabixBackup}.
58864
+ ${indentation}IF sy-subrc <> 0.
58865
+ ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
58866
+ ${indentation}ENDIF.
58826
58867
  ${indentation}`);
58827
58868
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, startToken.getStart(), tableExpression.getLastToken().getEnd(), uniqueName);
58828
58869
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -58879,7 +58920,7 @@ ${indentation}`);
58879
58920
  const className = classNames[0].concatTokens();
58880
58921
  const targetName = (_b = target.findFirstExpression(Expressions.TargetField)) === null || _b === void 0 ? void 0 : _b.concatTokens();
58881
58922
  const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
58882
- const code = ` DATA ${targetName} TYPE REF TO ${className}.
58923
+ const code = ` DATA ${targetName} TYPE REF TO ${className}.
58883
58924
  ${indentation}CATCH ${className} INTO ${targetName}.`;
58884
58925
  const fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getStart(), node.getEnd(), code);
58885
58926
  return issue_1.Issue.atToken(lowFile, node.getFirstToken(), "Outline DATA", this.getMetadata().key, this.conf.severity, fix);
@@ -59041,16 +59082,16 @@ ${indentation}CATCH ${className} INTO ${targetName}.`;
59041
59082
  const uniqueName1 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59042
59083
  const uniqueName2 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59043
59084
  const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
59044
- let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
59045
- ${indentation}${uniqueName1}-msgid = ${id}.
59085
+ let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
59086
+ ${indentation}${uniqueName1}-msgid = ${id}.
59046
59087
  ${indentation}${uniqueName1}-msgno = ${number}.\n`;
59047
59088
  if (withs.length > 0) {
59048
- abap += `${indentation}${uniqueName1}-attr1 = 'IF_T100_DYN_MSG~MSGV1'.
59049
- ${indentation}${uniqueName1}-attr2 = 'IF_T100_DYN_MSG~MSGV2'.
59050
- ${indentation}${uniqueName1}-attr3 = 'IF_T100_DYN_MSG~MSGV3'.
59089
+ abap += `${indentation}${uniqueName1}-attr1 = 'IF_T100_DYN_MSG~MSGV1'.
59090
+ ${indentation}${uniqueName1}-attr2 = 'IF_T100_DYN_MSG~MSGV2'.
59091
+ ${indentation}${uniqueName1}-attr3 = 'IF_T100_DYN_MSG~MSGV3'.
59051
59092
  ${indentation}${uniqueName1}-attr4 = 'IF_T100_DYN_MSG~MSGV4'.\n`;
59052
59093
  }
59053
- abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
59094
+ abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
59054
59095
  ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`;
59055
59096
  if (withs.length > 0) {
59056
59097
  abap += `${indentation}${uniqueName2}->if_t100_dyn_msg~msgty = 'E'.\n`;
@@ -59162,10 +59203,10 @@ ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`
59162
59203
  let code = "";
59163
59204
  if (sourceRef.findFirstExpression(Expressions.TableExpression)) {
59164
59205
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59165
- code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).
59166
- IF sy-subrc <> 0.
59167
- RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59168
- ENDIF.
59206
+ code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).
59207
+ IF sy-subrc <> 0.
59208
+ RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59209
+ ENDIF.
59169
59210
  GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
59170
59211
  }
59171
59212
  else {
@@ -59254,20 +59295,20 @@ GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
59254
59295
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59255
59296
  const uniqueFS = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59256
59297
  const uniqueNameIndex = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59257
- code += ` items LIKE ${loopSourceName},
59258
- END OF ${groupTargetName}type.
59259
- DATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.
59260
- DATA ${uniqueName} LIKE LINE OF ${groupTargetName}tab.
59298
+ code += ` items LIKE ${loopSourceName},
59299
+ END OF ${groupTargetName}type.
59300
+ DATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.
59301
+ DATA ${uniqueName} LIKE LINE OF ${groupTargetName}tab.
59261
59302
  LOOP AT ${loopSourceName} ${(_l = high.findFirstExpression(Expressions.LoopTarget)) === null || _l === void 0 ? void 0 : _l.concatTokens()}.\n`;
59262
59303
  if (groupIndexName !== undefined) {
59263
59304
  code += `DATA(${uniqueNameIndex}) = sy-tabix.\n`;
59264
59305
  }
59265
- code += `READ TABLE ${groupTargetName}tab ASSIGNING FIELD-SYMBOL(<${uniqueFS}>) WITH KEY ${condition}.
59306
+ code += `READ TABLE ${groupTargetName}tab ASSIGNING FIELD-SYMBOL(<${uniqueFS}>) WITH KEY ${condition}.
59266
59307
  IF sy-subrc = 0.\n`;
59267
59308
  if (groupCountName !== undefined) {
59268
59309
  code += ` <${uniqueFS}>-${groupCountName} = <${uniqueFS}>-${groupCountName} + 1.\n`;
59269
59310
  }
59270
- code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
59311
+ code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
59271
59312
  ELSE.\n`;
59272
59313
  code += ` CLEAR ${uniqueName}.\n`;
59273
59314
  for (const c of group.findAllExpressions(Expressions.LoopGroupByComponent)) {
@@ -59288,8 +59329,8 @@ ELSE.\n`;
59288
59329
  }
59289
59330
  code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE ${uniqueName}-items.\n`;
59290
59331
  code += ` INSERT ${uniqueName} INTO TABLE ${groupTargetName}tab.\n`;
59291
- code += `ENDIF.
59292
- ENDLOOP.
59332
+ code += `ENDIF.
59333
+ ENDLOOP.
59293
59334
  LOOP AT ${groupTargetName}tab ${groupTarget}.`;
59294
59335
  let fix = edit_helper_1.EditHelper.replaceRange(lowFile, high.getFirstToken().getStart(), high.getLastToken().getEnd(), code);
59295
59336
  for (const l of ((_m = highFile.getStructure()) === null || _m === void 0 ? void 0 : _m.findAllStructures(Structures.Loop)) || []) {
@@ -59461,7 +59502,7 @@ LOOP AT ${groupTargetName}tab ${groupTarget}.`;
59461
59502
  const enumName = (_b = high.findExpressionAfterToken("ENUM")) === null || _b === void 0 ? void 0 : _b.concatTokens();
59462
59503
  const structureName = (_c = high.findExpressionAfterToken("STRUCTURE")) === null || _c === void 0 ? void 0 : _c.concatTokens();
59463
59504
  // all ENUMS are char like?
59464
- let code = `TYPES ${enumName} TYPE string.
59505
+ let code = `TYPES ${enumName} TYPE string.
59465
59506
  CONSTANTS: BEGIN OF ${structureName},\n`;
59466
59507
  let count = 1;
59467
59508
  for (const e of enumStructure.findDirectStatements(Statements.TypeEnum).concat(enumStructure.findDirectStatements(Statements.Type))) {
@@ -59505,14 +59546,14 @@ CONSTANTS: BEGIN OF ${structureName},\n`;
59505
59546
  const tabixBackup = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59506
59547
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
59507
59548
  // restore tabix before exeption
59508
- const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.
59509
- ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
59510
- ${indentation}${tabixBackup} = sy-tabix.
59511
- ${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.
59512
- ${indentation}sy-tabix = ${tabixBackup}.
59513
- ${indentation}IF sy-subrc <> 0.
59514
- ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59515
- ${indentation}ENDIF.
59549
+ const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.
59550
+ ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
59551
+ ${indentation}${tabixBackup} = sy-tabix.
59552
+ ${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.
59553
+ ${indentation}sy-tabix = ${tabixBackup}.
59554
+ ${indentation}IF sy-subrc <> 0.
59555
+ ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59556
+ ${indentation}ENDIF.
59516
59557
  ${indentation}${uniqueName}`;
59517
59558
  const start = target.getFirstToken().getStart();
59518
59559
  const end = (_a = tableExpression.findDirectTokenByText("]")) === null || _a === void 0 ? void 0 : _a.getEnd();
@@ -59567,21 +59608,17 @@ ${indentation}${uniqueName}`;
59567
59608
  const fix = edit_helper_1.EditHelper.replaceRange(lowFile, op.getStart(), sourceStart, "= " + target + operator);
59568
59609
  return issue_1.Issue.atToken(lowFile, high.getFirstToken(), "Expand operator", this.getMetadata().key, this.conf.severity, fix);
59569
59610
  }
59570
- // must be very simple string templates, like "|{ ls_line-no ALPHA = IN }|"
59571
59611
  stringTemplateAlpha(low, high, lowFile, highSyntax) {
59572
59612
  var _a, _b;
59573
59613
  if (!(low.get() instanceof _statement_1.Unknown)) {
59574
59614
  return undefined;
59575
59615
  }
59576
- for (const child of high.findAllExpressionsRecursive(Expressions.StringTemplate)) {
59577
- const templateTokens = child.getChildren();
59578
- if (templateTokens.length !== 3
59579
- || templateTokens[0].getFirstToken().getStr() !== "|{"
59580
- || templateTokens[2].getFirstToken().getStr() !== "}|") {
59616
+ for (const child of high.findAllExpressionsRecursive(Expressions.StringTemplateSource)) {
59617
+ const formatting = (_a = child.findDirectExpression(Expressions.StringTemplateFormatting)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();
59618
+ if (formatting === undefined
59619
+ || (formatting === null || formatting === void 0 ? void 0 : formatting.startsWith("ALPHA = ")) === false) {
59581
59620
  continue;
59582
59621
  }
59583
- const templateSource = child.findDirectExpression(Expressions.StringTemplateSource);
59584
- const formatting = (_a = templateSource === null || templateSource === void 0 ? void 0 : templateSource.findDirectExpression(Expressions.StringTemplateFormatting)) === null || _a === void 0 ? void 0 : _a.concatTokens();
59585
59622
  let functionName = "";
59586
59623
  switch (formatting) {
59587
59624
  case "ALPHA = IN":
@@ -59594,13 +59631,13 @@ ${indentation}${uniqueName}`;
59594
59631
  return undefined;
59595
59632
  }
59596
59633
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
59597
- const source = (_b = templateSource === null || templateSource === void 0 ? void 0 : templateSource.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens();
59634
+ const source = (_b = child.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens();
59598
59635
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59599
- const code = `DATA ${uniqueName} TYPE string.
59600
- ${indentation}CALL FUNCTION '${functionName}'
59601
- ${indentation} EXPORTING
59602
- ${indentation} input = ${source}
59603
- ${indentation} IMPORTING
59636
+ const code = `DATA ${uniqueName} TYPE string.
59637
+ ${indentation}CALL FUNCTION '${functionName}'
59638
+ ${indentation} EXPORTING
59639
+ ${indentation} input = ${source}
59640
+ ${indentation} IMPORTING
59604
59641
  ${indentation} output = ${uniqueName}.\n`;
59605
59642
  const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), code);
59606
59643
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, child.getFirstToken().getStart(), child.getLastToken().getEnd(), uniqueName);
@@ -60912,12 +60949,12 @@ class EasyToFindMessages {
60912
60949
  key: "easy_to_find_messages",
60913
60950
  title: "Easy to find messages",
60914
60951
  shortDescription: `Make messages easy to find`,
60915
- extendedInformation: `All messages must be statically referenced exactly once
60916
-
60917
- Only MESSAGE and RAISE statments are counted as static references
60918
-
60919
- Also see rule "message_exists"
60920
-
60952
+ extendedInformation: `All messages must be statically referenced exactly once
60953
+
60954
+ Only MESSAGE and RAISE statments are counted as static references
60955
+
60956
+ Also see rule "message_exists"
60957
+
60921
60958
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#make-messages-easy-to-find`,
60922
60959
  tags: [_irule_1.RuleTag.Styleguide],
60923
60960
  };
@@ -60998,13 +61035,13 @@ class EmptyEvent extends _abap_rule_1.ABAPRule {
60998
61035
  shortDescription: `Empty selection screen or list processing event block`,
60999
61036
  extendedInformation: ``,
61000
61037
  tags: [_irule_1.RuleTag.SingleFile],
61001
- badExample: `
61002
- INITIALIZATION.
61003
- WRITE 'hello'.
61038
+ badExample: `
61039
+ INITIALIZATION.
61040
+ WRITE 'hello'.
61004
61041
  END-OF-SELECTION.`,
61005
- goodExample: `
61006
- START-OF-SELECTION.
61007
- PERFORM sdf.
61042
+ goodExample: `
61043
+ START-OF-SELECTION.
61044
+ PERFORM sdf.
61008
61045
  COMMIT WORK.`,
61009
61046
  };
61010
61047
  }
@@ -61096,8 +61133,8 @@ class EmptyLineinStatement extends _abap_rule_1.ABAPRule {
61096
61133
  key: "empty_line_in_statement",
61097
61134
  title: "Find empty lines in statements",
61098
61135
  shortDescription: `Checks that statements do not contain empty lines.`,
61099
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
61100
-
61136
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
61137
+
61101
61138
  https://docs.abapopenchecks.org/checks/41/`,
61102
61139
  tags: [_irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
61103
61140
  badExample: `WRITE\n\nhello.`,
@@ -61273,13 +61310,13 @@ class EmptyStructure extends _abap_rule_1.ABAPRule {
61273
61310
  shortDescription: `Checks that the code does not contain empty blocks.`,
61274
61311
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-empty-if-branches`,
61275
61312
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
61276
- badExample: `IF foo = bar.
61277
- ENDIF.
61278
-
61279
- DO 2 TIMES.
61313
+ badExample: `IF foo = bar.
61314
+ ENDIF.
61315
+
61316
+ DO 2 TIMES.
61280
61317
  ENDDO.`,
61281
- goodExample: `LOOP AT itab WHERE qty = 0 OR date > sy-datum.
61282
- ENDLOOP.
61318
+ goodExample: `LOOP AT itab WHERE qty = 0 OR date > sy-datum.
61319
+ ENDLOOP.
61283
61320
  result = xsdbool( sy-subrc = 0 ).`,
61284
61321
  };
61285
61322
  }
@@ -61421,10 +61458,10 @@ class ExitOrCheck extends _abap_rule_1.ABAPRule {
61421
61458
  return {
61422
61459
  key: "exit_or_check",
61423
61460
  title: "Find EXIT or CHECK outside loops",
61424
- shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
61461
+ shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
61425
61462
  Use RETURN to leave procesing blocks instead.`,
61426
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
61427
- https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
61463
+ extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
61464
+ https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
61428
61465
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#check-vs-return`,
61429
61466
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
61430
61467
  };
@@ -61507,12 +61544,12 @@ class ExpandMacros extends _abap_rule_1.ABAPRule {
61507
61544
  key: "expand_macros",
61508
61545
  title: "Expand Macros",
61509
61546
  shortDescription: `Allows expanding macro calls with quick fixes`,
61510
- extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
61511
-
61547
+ extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
61548
+
61512
61549
  Note that macros/DEFINE cannot be used in the ABAP Cloud programming model`,
61513
- badExample: `DEFINE _hello.
61514
- WRITE 'hello'.
61515
- END-OF-DEFINITION.
61550
+ badExample: `DEFINE _hello.
61551
+ WRITE 'hello'.
61552
+ END-OF-DEFINITION.
61516
61553
  _hello.`,
61517
61554
  goodExample: `WRITE 'hello'.`,
61518
61555
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
@@ -61599,7 +61636,7 @@ class Exporting extends _abap_rule_1.ABAPRule {
61599
61636
  shortDescription: `Detects EXPORTING statements which can be omitted.`,
61600
61637
  badExample: `call_method( EXPORTING foo = bar ).`,
61601
61638
  goodExample: `call_method( foo = bar ).`,
61602
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-optional-keyword-exporting
61639
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-optional-keyword-exporting
61603
61640
  https://docs.abapopenchecks.org/checks/30/`,
61604
61641
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
61605
61642
  };
@@ -61697,7 +61734,7 @@ class ForbiddenIdentifier extends _abap_rule_1.ABAPRule {
61697
61734
  key: "forbidden_identifier",
61698
61735
  title: "Forbidden Identifier",
61699
61736
  shortDescription: `Forbid use of specified identifiers, list of regex.`,
61700
- extendedInformation: `Used in the transpiler to find javascript keywords in ABAP identifiers,
61737
+ extendedInformation: `Used in the transpiler to find javascript keywords in ABAP identifiers,
61701
61738
  https://github.com/abaplint/transpiler/blob/bda94b8b56e2b7f2f87be2168f12361aa530220e/packages/transpiler/src/validation.ts#L44`,
61702
61739
  tags: [_irule_1.RuleTag.SingleFile],
61703
61740
  };
@@ -61939,8 +61976,8 @@ class ForbiddenVoidType {
61939
61976
  key: "forbidden_void_type",
61940
61977
  title: "Forbidden Void Types",
61941
61978
  shortDescription: `Avoid usage of specified void types.`,
61942
- extendedInformation: `Inspiration:
61943
- BOOLEAN, BOOLE_D, CHAR01, CHAR1, CHAR10, CHAR12, CHAR128, CHAR2, CHAR20, CHAR4, CHAR70,
61979
+ extendedInformation: `Inspiration:
61980
+ BOOLEAN, BOOLE_D, CHAR01, CHAR1, CHAR10, CHAR12, CHAR128, CHAR2, CHAR20, CHAR4, CHAR70,
61944
61981
  DATS, TIMS, DATUM, FLAG, INT4, NUMC3, NUMC4, SAP_BOOL, TEXT25, TEXT80, X255, XFELD`,
61945
61982
  };
61946
61983
  }
@@ -62183,9 +62220,9 @@ class FullyTypeITabs extends _abap_rule_1.ABAPRule {
62183
62220
  key: "fully_type_itabs",
62184
62221
  title: "Fully type internal tables",
62185
62222
  shortDescription: `No implict table types or table keys`,
62186
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-the-right-table-type
62223
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-the-right-table-type
62187
62224
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key`,
62188
- badExample: `DATA lt_foo TYPE TABLE OF ty.
62225
+ badExample: `DATA lt_foo TYPE TABLE OF ty.
62189
62226
  DATA lt_bar TYPE STANDARD TABLE OF ty.`,
62190
62227
  goodExample: `DATA lt_foo TYPE STANDARD TABLE OF ty WITH EMPTY KEY.`,
62191
62228
  tags: [_irule_1.RuleTag.SingleFile],
@@ -62370,26 +62407,26 @@ class FunctionalWriting extends _abap_rule_1.ABAPRule {
62370
62407
  key: "functional_writing",
62371
62408
  title: "Use functional writing",
62372
62409
  shortDescription: `Detects usage of call method when functional style calls can be used.`,
62373
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-calls
62410
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-calls
62374
62411
  https://docs.abapopenchecks.org/checks/07/`,
62375
62412
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
62376
- badExample: `CALL METHOD zcl_class=>method( ).
62377
- CALL METHOD cl_abap_typedescr=>describe_by_name
62378
- EXPORTING
62379
- p_name = 'NAME'
62380
- RECEIVING
62381
- p_descr_ref = lr_typedescr
62382
- EXCEPTIONS
62383
- type_not_found = 1
62413
+ badExample: `CALL METHOD zcl_class=>method( ).
62414
+ CALL METHOD cl_abap_typedescr=>describe_by_name
62415
+ EXPORTING
62416
+ p_name = 'NAME'
62417
+ RECEIVING
62418
+ p_descr_ref = lr_typedescr
62419
+ EXCEPTIONS
62420
+ type_not_found = 1
62384
62421
  OTHERS = 2.`,
62385
- goodExample: `zcl_class=>method( ).
62386
- cl_abap_typedescr=>describe_by_name(
62387
- EXPORTING
62388
- p_name = 'NAME'
62389
- RECEIVING
62390
- p_descr_ref = lr_typedescr
62391
- EXCEPTIONS
62392
- type_not_found = 1
62422
+ goodExample: `zcl_class=>method( ).
62423
+ cl_abap_typedescr=>describe_by_name(
62424
+ EXPORTING
62425
+ p_name = 'NAME'
62426
+ RECEIVING
62427
+ p_descr_ref = lr_typedescr
62428
+ EXCEPTIONS
62429
+ type_not_found = 1
62393
62430
  OTHERS = 2 ).`,
62394
62431
  };
62395
62432
  }
@@ -62500,14 +62537,14 @@ class GlobalClass extends _abap_rule_1.ABAPRule {
62500
62537
  key: "global_class",
62501
62538
  title: "Global class checks",
62502
62539
  shortDescription: `Checks related to global classes`,
62503
- extendedInformation: `* global classes must be in own files
62504
-
62505
- * file names must match class name
62506
-
62507
- * file names must match interface name
62508
-
62509
- * global classes must be global definitions
62510
-
62540
+ extendedInformation: `* global classes must be in own files
62541
+
62542
+ * file names must match class name
62543
+
62544
+ * file names must match interface name
62545
+
62546
+ * global classes must be global definitions
62547
+
62511
62548
  * global interfaces must be global definitions`,
62512
62549
  tags: [_irule_1.RuleTag.Syntax],
62513
62550
  };
@@ -62606,21 +62643,21 @@ class IdenticalConditions extends _abap_rule_1.ABAPRule {
62606
62643
  return {
62607
62644
  key: "identical_conditions",
62608
62645
  title: "Identical conditions",
62609
- shortDescription: `Find identical conditions in IF + CASE + WHILE etc
62610
-
62646
+ shortDescription: `Find identical conditions in IF + CASE + WHILE etc
62647
+
62611
62648
  Prerequsites: code is pretty printed with identical cAsE`,
62612
62649
  tags: [_irule_1.RuleTag.SingleFile],
62613
- badExample: `IF foo = bar OR 1 = a OR foo = bar.
62614
- ENDIF.
62615
- CASE bar.
62616
- WHEN '1'.
62617
- WHEN 'A' OR '1'.
62650
+ badExample: `IF foo = bar OR 1 = a OR foo = bar.
62651
+ ENDIF.
62652
+ CASE bar.
62653
+ WHEN '1'.
62654
+ WHEN 'A' OR '1'.
62618
62655
  ENDCASE.`,
62619
- goodExample: `IF foo = bar OR 1 = a.
62620
- ENDIF.
62621
- CASE bar.
62622
- WHEN '1'.
62623
- WHEN 'A'.
62656
+ goodExample: `IF foo = bar OR 1 = a.
62657
+ ENDIF.
62658
+ CASE bar.
62659
+ WHEN '1'.
62660
+ WHEN 'A'.
62624
62661
  ENDCASE.`,
62625
62662
  };
62626
62663
  }
@@ -62754,23 +62791,23 @@ class IdenticalContents extends _abap_rule_1.ABAPRule {
62754
62791
  key: "identical_contents",
62755
62792
  title: "Identical contents",
62756
62793
  shortDescription: `Find identical contents in blocks inside IFs, both in the beginning and in the end.`,
62757
- extendedInformation: `
62758
- Prerequsites: code is pretty printed with identical cAsE
62759
-
62794
+ extendedInformation: `
62795
+ Prerequsites: code is pretty printed with identical cAsE
62796
+
62760
62797
  Chained statments are ignored`,
62761
62798
  tags: [_irule_1.RuleTag.SingleFile],
62762
- badExample: `IF foo = bar.
62763
- WRITE 'bar'.
62764
- WRITE 'world'.
62765
- ELSE.
62766
- WRITE 'foo'.
62767
- WRITE 'world'.
62799
+ badExample: `IF foo = bar.
62800
+ WRITE 'bar'.
62801
+ WRITE 'world'.
62802
+ ELSE.
62803
+ WRITE 'foo'.
62804
+ WRITE 'world'.
62768
62805
  ENDIF.`,
62769
- goodExample: `IF foo = bar.
62770
- WRITE 'bar'.
62771
- ELSE.
62772
- WRITE 'foo'.
62773
- ENDIF.
62806
+ goodExample: `IF foo = bar.
62807
+ WRITE 'bar'.
62808
+ ELSE.
62809
+ WRITE 'foo'.
62810
+ ENDIF.
62774
62811
  WRITE 'world'.`,
62775
62812
  };
62776
62813
  }
@@ -62878,12 +62915,12 @@ class IdenticalDescriptions {
62878
62915
  key: "identical_descriptions",
62879
62916
  title: "Identical descriptions",
62880
62917
  shortDescription: `Searches for objects with the same type and same description`,
62881
- extendedInformation: `Case insensitive
62882
-
62883
- Only checks the master language descriptions
62884
-
62885
- Dependencies are skipped
62886
-
62918
+ extendedInformation: `Case insensitive
62919
+
62920
+ Only checks the master language descriptions
62921
+
62922
+ Dependencies are skipped
62923
+
62887
62924
  Works for: INTF, CLAS, DOMA, DTEL, FUNC in same FUGR`,
62888
62925
  tags: [],
62889
62926
  };
@@ -63057,43 +63094,43 @@ class IfInIf extends _abap_rule_1.ABAPRule {
63057
63094
  key: "if_in_if",
63058
63095
  title: "IF in IF",
63059
63096
  shortDescription: `Detects nested ifs which can be refactored.`,
63060
- extendedInformation: `
63061
- Directly nested IFs without ELSE can be refactored to a single condition using AND.
63062
-
63063
- ELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.
63064
-
63065
- https://docs.abapopenchecks.org/checks/01/
63097
+ extendedInformation: `
63098
+ Directly nested IFs without ELSE can be refactored to a single condition using AND.
63099
+
63100
+ ELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.
63101
+
63102
+ https://docs.abapopenchecks.org/checks/01/
63066
63103
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low`,
63067
- badExample: `IF condition1.
63068
- IF condition2.
63069
- ...
63070
- ENDIF.
63071
- ENDIF.
63072
-
63073
- IF condition1.
63074
- ...
63075
- ELSE.
63076
- IF condition2.
63077
- ...
63078
- ENDIF.
63104
+ badExample: `IF condition1.
63105
+ IF condition2.
63106
+ ...
63107
+ ENDIF.
63108
+ ENDIF.
63109
+
63110
+ IF condition1.
63111
+ ...
63112
+ ELSE.
63113
+ IF condition2.
63114
+ ...
63115
+ ENDIF.
63079
63116
  ENDIF.`,
63080
- goodExample: `IF ( condition1 ) AND ( condition2 ).
63081
- ...
63082
- ENDIF.
63083
-
63084
- IF condition1.
63085
- ...
63086
- ELSEIF condition2.
63087
- ...
63088
- ENDIF.
63089
-
63090
- CASE variable.
63091
- WHEN value1.
63092
- ...
63093
- WHEN value2.
63094
- IF condition2.
63095
- ...
63096
- ENDIF.
63117
+ goodExample: `IF ( condition1 ) AND ( condition2 ).
63118
+ ...
63119
+ ENDIF.
63120
+
63121
+ IF condition1.
63122
+ ...
63123
+ ELSEIF condition2.
63124
+ ...
63125
+ ENDIF.
63126
+
63127
+ CASE variable.
63128
+ WHEN value1.
63129
+ ...
63130
+ WHEN value2.
63131
+ IF condition2.
63132
+ ...
63133
+ ENDIF.
63097
63134
  ENDCASE.`,
63098
63135
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
63099
63136
  };
@@ -63278,9 +63315,9 @@ class ImplementMethods extends _abap_rule_1.ABAPRule {
63278
63315
  for (const i of ((_a = file.getStructure()) === null || _a === void 0 ? void 0 : _a.findAllStatements(Statements.ClassImplementation)) || []) {
63279
63316
  const name = (_b = i.findFirstExpression(Expressions.ClassName)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr().toUpperCase();
63280
63317
  if (name === impl.identifier.getName().toUpperCase()) {
63281
- return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
63282
- METHOD ${methodName.toLowerCase()}.
63283
- RETURN. " todo, implement method
63318
+ return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
63319
+ METHOD ${methodName.toLowerCase()}.
63320
+ RETURN. " todo, implement method
63284
63321
  ENDMETHOD.`);
63285
63322
  }
63286
63323
  }
@@ -63459,14 +63496,14 @@ class ImplicitStartOfSelection extends _abap_rule_1.ABAPRule {
63459
63496
  key: "implicit_start_of_selection",
63460
63497
  title: "Implicit START-OF-SELECTION",
63461
63498
  shortDescription: `Add explicit selection screen event handling`,
63462
- extendedInformation: `Only runs for executable programs
63463
-
63499
+ extendedInformation: `Only runs for executable programs
63500
+
63464
63501
  https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapstart-of-selection.htm`,
63465
63502
  tags: [_irule_1.RuleTag.SingleFile],
63466
- badExample: `REPORT zfoo.
63503
+ badExample: `REPORT zfoo.
63467
63504
  WRITE 'hello'.`,
63468
- goodExample: `
63469
- START-OF-SELECTION.
63505
+ goodExample: `
63506
+ START-OF-SELECTION.
63470
63507
  WRITE 'hello'.`,
63471
63508
  };
63472
63509
  }
@@ -63571,19 +63608,19 @@ class InStatementIndentation extends _abap_rule_1.ABAPRule {
63571
63608
  key: "in_statement_indentation",
63572
63609
  title: "In-statement indentation",
63573
63610
  shortDescription: "Checks alignment within statements which span multiple lines.",
63574
- extendedInformation: `Lines following the first line should be indented once (2 spaces).
63575
-
63576
- For block declaration statements, lines after the first should be indented an additional time (default: +2 spaces)
63611
+ extendedInformation: `Lines following the first line should be indented once (2 spaces).
63612
+
63613
+ For block declaration statements, lines after the first should be indented an additional time (default: +2 spaces)
63577
63614
  to distinguish them better from code within the block.`,
63578
- badExample: `IF 1 = 1
63579
- AND 2 = 2.
63580
- WRITE 'hello' &&
63581
- 'world'.
63615
+ badExample: `IF 1 = 1
63616
+ AND 2 = 2.
63617
+ WRITE 'hello' &&
63618
+ 'world'.
63582
63619
  ENDIF.`,
63583
- goodExample: `IF 1 = 1
63584
- AND 2 = 2.
63585
- WRITE 'hello' &&
63586
- 'world'.
63620
+ goodExample: `IF 1 = 1
63621
+ AND 2 = 2.
63622
+ WRITE 'hello' &&
63623
+ 'world'.
63587
63624
  ENDIF.`,
63588
63625
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
63589
63626
  };
@@ -63706,23 +63743,23 @@ class Indentation extends _abap_rule_1.ABAPRule {
63706
63743
  title: "Indentation",
63707
63744
  shortDescription: `Checks indentation`,
63708
63745
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
63709
- badExample: `CLASS lcl DEFINITION.
63710
- PRIVATE SECTION.
63711
- METHODS constructor.
63712
- ENDCLASS.
63713
-
63714
- CLASS lcl IMPLEMENTATION.
63715
- METHOD constructor.
63716
- ENDMETHOD.
63746
+ badExample: `CLASS lcl DEFINITION.
63747
+ PRIVATE SECTION.
63748
+ METHODS constructor.
63749
+ ENDCLASS.
63750
+
63751
+ CLASS lcl IMPLEMENTATION.
63752
+ METHOD constructor.
63753
+ ENDMETHOD.
63717
63754
  ENDCLASS.`,
63718
- goodExample: `CLASS lcl DEFINITION.
63719
- PRIVATE SECTION.
63720
- METHODS constructor.
63721
- ENDCLASS.
63722
-
63723
- CLASS lcl IMPLEMENTATION.
63724
- METHOD constructor.
63725
- ENDMETHOD.
63755
+ goodExample: `CLASS lcl DEFINITION.
63756
+ PRIVATE SECTION.
63757
+ METHODS constructor.
63758
+ ENDCLASS.
63759
+
63760
+ CLASS lcl IMPLEMENTATION.
63761
+ METHOD constructor.
63762
+ ENDMETHOD.
63726
63763
  ENDCLASS.`,
63727
63764
  };
63728
63765
  }
@@ -64123,9 +64160,9 @@ class IntfReferencingClas {
64123
64160
  key: "intf_referencing_clas",
64124
64161
  title: "INTF referencing CLAS",
64125
64162
  shortDescription: `Interface contains references to class`,
64126
- extendedInformation: `Only global interfaces are checked.
64127
- Only first level references are checked.
64128
- Exception class references are ignored.
64163
+ extendedInformation: `Only global interfaces are checked.
64164
+ Only first level references are checked.
64165
+ Exception class references are ignored.
64129
64166
  Void references are ignored.`,
64130
64167
  };
64131
64168
  }
@@ -64210,9 +64247,9 @@ class InvalidTableIndex extends _abap_rule_1.ABAPRule {
64210
64247
  title: "Invalid Table Index",
64211
64248
  shortDescription: `Issues error for constant table index zero, as ABAP starts from 1`,
64212
64249
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
64213
- badExample: `DATA(first) = table[ 0 ].
64250
+ badExample: `DATA(first) = table[ 0 ].
64214
64251
  READ TABLE gt_stack ASSIGNING <ls_stack> INDEX 0.`,
64215
- goodExample: `DATA(first) = table[ 1 ].
64252
+ goodExample: `DATA(first) = table[ 1 ].
64216
64253
  READ TABLE gt_stack ASSIGNING <ls_stack> INDEX 1.`,
64217
64254
  };
64218
64255
  }
@@ -64813,8 +64850,8 @@ class LineBreakStyle {
64813
64850
  return {
64814
64851
  key: "line_break_style",
64815
64852
  title: "Makes sure line breaks are consistent in the ABAP code",
64816
- shortDescription: `Enforces LF as newlines in ABAP files
64817
-
64853
+ shortDescription: `Enforces LF as newlines in ABAP files
64854
+
64818
64855
  abapGit does not work with CRLF`,
64819
64856
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
64820
64857
  };
@@ -64883,7 +64920,7 @@ class LineLength extends _abap_rule_1.ABAPRule {
64883
64920
  key: "line_length",
64884
64921
  title: "Line length",
64885
64922
  shortDescription: `Detects lines exceeding the provided maximum length.`,
64886
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length
64923
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length
64887
64924
  https://docs.abapopenchecks.org/checks/04/`,
64888
64925
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
64889
64926
  };
@@ -64954,7 +64991,7 @@ class LineOnlyPunc extends _abap_rule_1.ABAPRule {
64954
64991
  key: "line_only_punc",
64955
64992
  title: "Line containing only punctuation",
64956
64993
  shortDescription: `Detects lines containing only punctuation.`,
64957
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#close-brackets-at-line-end
64994
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#close-brackets-at-line-end
64958
64995
  https://docs.abapopenchecks.org/checks/16/`,
64959
64996
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
64960
64997
  badExample: "zcl_class=>method(\n).",
@@ -65217,15 +65254,15 @@ class LocalVariableNames extends _abap_rule_1.ABAPRule {
65217
65254
  return {
65218
65255
  key: "local_variable_names",
65219
65256
  title: "Local variable naming conventions",
65220
- shortDescription: `
65221
- Allows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols.
65257
+ shortDescription: `
65258
+ Allows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols.
65222
65259
  Regexes are case-insensitive.`,
65223
65260
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
65224
- badExample: `FORM bar.
65225
- DATA foo.
65261
+ badExample: `FORM bar.
65262
+ DATA foo.
65226
65263
  ENDFORM.`,
65227
- goodExample: `FORM bar.
65228
- DATA lv_foo.
65264
+ goodExample: `FORM bar.
65265
+ DATA lv_foo.
65229
65266
  ENDFORM.`,
65230
65267
  };
65231
65268
  }
@@ -65377,9 +65414,9 @@ class MacroNaming extends _abap_rule_1.ABAPRule {
65377
65414
  shortDescription: `Allows you to enforce a pattern for macro definitions`,
65378
65415
  extendedInformation: `Use rule "avoid_use" to avoid macros altogether.`,
65379
65416
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
65380
- badExample: `DEFINE something.
65417
+ badExample: `DEFINE something.
65381
65418
  END-OF-DEFINITION.`,
65382
- goodExample: `DEFINE _something.
65419
+ goodExample: `DEFINE _something.
65383
65420
  END-OF-DEFINITION.`,
65384
65421
  };
65385
65422
  }
@@ -65452,10 +65489,10 @@ class MainFileContents {
65452
65489
  key: "main_file_contents",
65453
65490
  title: "Main file contents",
65454
65491
  shortDescription: `Checks related to report declarations.`,
65455
- extendedInformation: `Does not run if the target version is Cloud
65456
-
65457
- * PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
65458
- * TYPEs must begin with "TYPE-POOL <name>."
65492
+ extendedInformation: `Does not run if the target version is Cloud
65493
+
65494
+ * PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
65495
+ * TYPEs must begin with "TYPE-POOL <name>."
65459
65496
  `,
65460
65497
  };
65461
65498
  }
@@ -65571,17 +65608,17 @@ class ManyParentheses extends _abap_rule_1.ABAPRule {
65571
65608
  title: "Too many parentheses",
65572
65609
  shortDescription: `Searches for expressions where extra parentheses can safely be removed`,
65573
65610
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
65574
- badExample: `
65575
- IF ( destination IS INITIAL ).
65576
- ENDIF.
65577
- IF foo = boo AND ( bar = lar AND moo = loo ).
65578
- ENDIF.
65611
+ badExample: `
65612
+ IF ( destination IS INITIAL ).
65613
+ ENDIF.
65614
+ IF foo = boo AND ( bar = lar AND moo = loo ).
65615
+ ENDIF.
65579
65616
  `,
65580
- goodExample: `
65581
- IF destination IS INITIAL.
65582
- ENDIF.
65583
- IF foo = boo AND bar = lar AND moo = loo.
65584
- ENDIF.
65617
+ goodExample: `
65618
+ IF destination IS INITIAL.
65619
+ ENDIF.
65620
+ IF foo = boo AND bar = lar AND moo = loo.
65621
+ ENDIF.
65585
65622
  `,
65586
65623
  };
65587
65624
  }
@@ -65755,14 +65792,14 @@ class MaxOneMethodParameterPerLine extends _abap_rule_1.ABAPRule {
65755
65792
  title: "Max one method parameter definition per line",
65756
65793
  shortDescription: `Keep max one method parameter description per line`,
65757
65794
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace],
65758
- badExample: `
65759
- METHODS apps_scope_token
65760
- IMPORTING
65795
+ badExample: `
65796
+ METHODS apps_scope_token
65797
+ IMPORTING
65761
65798
  body TYPE bodyapps_scope_token client_id TYPE str.`,
65762
- goodExample: `
65763
- METHODS apps_scope_token
65764
- IMPORTING
65765
- body TYPE bodyapps_scope_token
65799
+ goodExample: `
65800
+ METHODS apps_scope_token
65801
+ IMPORTING
65802
+ body TYPE bodyapps_scope_token
65766
65803
  client_id TYPE str.`,
65767
65804
  };
65768
65805
  }
@@ -65827,11 +65864,11 @@ class MaxOneStatement extends _abap_rule_1.ABAPRule {
65827
65864
  key: "max_one_statement",
65828
65865
  title: "Max one statement per line",
65829
65866
  shortDescription: `Checks that each line contains only a single statement.`,
65830
- extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
65831
-
65832
- Does not report anything for chained statements.
65833
-
65834
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line
65867
+ extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
65868
+
65869
+ Does not report anything for chained statements.
65870
+
65871
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line
65835
65872
  https://docs.abapopenchecks.org/checks/11/`,
65836
65873
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
65837
65874
  badExample: `WRITE foo. WRITE bar.`,
@@ -66169,8 +66206,8 @@ class MethodLength {
66169
66206
  key: "method_length",
66170
66207
  title: "Method/Form Length",
66171
66208
  shortDescription: `Checks relating to method/form length.`,
66172
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
66173
-
66209
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
66210
+
66174
66211
  Abstract methods without statements are considered okay.`,
66175
66212
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
66176
66213
  };
@@ -66275,20 +66312,20 @@ class MethodOverwritesBuiltIn extends _abap_rule_1.ABAPRule {
66275
66312
  key: "method_overwrites_builtin",
66276
66313
  title: "Method name overwrites builtin function",
66277
66314
  shortDescription: `Checks Method names that overwrite builtin SAP functions`,
66278
- extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
66279
-
66280
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
66281
-
66315
+ extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
66316
+
66317
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
66318
+
66282
66319
  Interface method names are ignored`,
66283
66320
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
66284
- badExample: `CLASS lcl DEFINITION.
66285
- PUBLIC SECTION.
66286
- METHODS matches.
66287
- ENDCLASS.
66288
-
66289
- CLASS lcl IMPLEMENTATION.
66290
- METHOD matches.
66291
- ENDMETHOD.
66321
+ badExample: `CLASS lcl DEFINITION.
66322
+ PUBLIC SECTION.
66323
+ METHODS matches.
66324
+ ENDCLASS.
66325
+
66326
+ CLASS lcl IMPLEMENTATION.
66327
+ METHOD matches.
66328
+ ENDMETHOD.
66292
66329
  ENDCLASS.`,
66293
66330
  };
66294
66331
  }
@@ -66479,12 +66516,12 @@ class MixReturning extends _abap_rule_1.ABAPRule {
66479
66516
  // eslint-disable-next-line max-len
66480
66517
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-either-returning-or-exporting-or-changing-but-not-a-combination`,
66481
66518
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
66482
- badExample: `CLASS lcl DEFINITION.
66483
- PUBLIC SECTION.
66484
- METHODS
66485
- foobar
66486
- EXPORTING foo TYPE i
66487
- RETURNING VALUE(rv_string) TYPE string.
66519
+ badExample: `CLASS lcl DEFINITION.
66520
+ PUBLIC SECTION.
66521
+ METHODS
66522
+ foobar
66523
+ EXPORTING foo TYPE i
66524
+ RETURNING VALUE(rv_string) TYPE string.
66488
66525
  ENDCLASS.`,
66489
66526
  };
66490
66527
  }
@@ -66864,7 +66901,7 @@ class Nesting extends _abap_rule_1.ABAPRule {
66864
66901
  key: "nesting",
66865
66902
  title: "Check nesting depth",
66866
66903
  shortDescription: `Checks for methods exceeding a maximum nesting depth`,
66867
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low
66904
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low
66868
66905
  https://docs.abapopenchecks.org/checks/74/`,
66869
66906
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
66870
66907
  };
@@ -67107,7 +67144,7 @@ class NoChainedAssignment extends _abap_rule_1.ABAPRule {
67107
67144
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-chain-assignments`,
67108
67145
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
67109
67146
  badExample: `var1 = var2 = var3.`,
67110
- goodExample: `var2 = var3.
67147
+ goodExample: `var2 = var3.
67111
67148
  var1 = var2.`,
67112
67149
  };
67113
67150
  }
@@ -67166,8 +67203,8 @@ class NoExternalFormCalls extends _abap_rule_1.ABAPRule {
67166
67203
  key: "no_external_form_calls",
67167
67204
  title: "No external FORM calls",
67168
67205
  shortDescription: `Detect external form calls`,
67169
- badExample: `PERFORM foo IN PROGRAM bar.
67170
-
67206
+ badExample: `PERFORM foo IN PROGRAM bar.
67207
+
67171
67208
  PERFORM foo(bar).`,
67172
67209
  tags: [_irule_1.RuleTag.SingleFile],
67173
67210
  };
@@ -67228,17 +67265,17 @@ class NoInlineInOptionalBranches extends _abap_rule_1.ABAPRule {
67228
67265
  key: "no_inline_in_optional_branches",
67229
67266
  title: "Don't declare inline in optional branches",
67230
67267
  shortDescription: `Don't declare inline in optional branches`,
67231
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
67232
-
67233
- Considered optional branches:
67234
- * inside IF/ELSEIF/ELSE
67235
- * inside LOOP
67236
- * inside WHILE
67237
- * inside CASE/WHEN, CASE TYPE OF
67238
- * inside DO
67239
- * inside SELECT loops
67240
-
67241
- Not considered optional branches:
67268
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
67269
+
67270
+ Considered optional branches:
67271
+ * inside IF/ELSEIF/ELSE
67272
+ * inside LOOP
67273
+ * inside WHILE
67274
+ * inside CASE/WHEN, CASE TYPE OF
67275
+ * inside DO
67276
+ * inside SELECT loops
67277
+
67278
+ Not considered optional branches:
67242
67279
  * TRY/CATCH/CLEANUP`,
67243
67280
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
67244
67281
  };
@@ -67338,12 +67375,12 @@ class NoPrefixes extends _abap_rule_1.ABAPRule {
67338
67375
  key: "no_prefixes",
67339
67376
  title: "No Prefixes",
67340
67377
  shortDescription: `Dont use hungarian notation`,
67341
- extendedInformation: `
67342
- Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
67343
- allowing all types to become voided, abaplint will then provide less precise syntax errors.
67344
-
67345
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
67346
-
67378
+ extendedInformation: `
67379
+ Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
67380
+ allowing all types to become voided, abaplint will then provide less precise syntax errors.
67381
+
67382
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
67383
+
67347
67384
  https://github.com/SAP/styleguides/blob/main/clean-abap/sub-sections/AvoidEncodings.md`,
67348
67385
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
67349
67386
  badExample: `DATA lv_foo TYPE i.`,
@@ -67522,7 +67559,7 @@ class NoPublicAttributes extends _abap_rule_1.ABAPRule {
67522
67559
  return {
67523
67560
  key: "no_public_attributes",
67524
67561
  title: "No public attributes",
67525
- shortDescription: `Checks that classes and interfaces don't contain any public attributes.
67562
+ shortDescription: `Checks that classes and interfaces don't contain any public attributes.
67526
67563
  Exceptions are excluded from this rule.`,
67527
67564
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#members-private-by-default-protected-only-if-needed`,
67528
67565
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
@@ -67623,13 +67660,13 @@ class NoYodaConditions extends _abap_rule_1.ABAPRule {
67623
67660
  key: "no_yoda_conditions",
67624
67661
  title: "No Yoda conditions",
67625
67662
  shortDescription: `Finds Yoda conditions and reports issues`,
67626
- extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
67627
-
67663
+ extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
67664
+
67628
67665
  Conditions with operators CP, NP, CS, NS, CA, NA, CO, CN are ignored`,
67629
67666
  tags: [_irule_1.RuleTag.SingleFile],
67630
- badExample: `IF 0 <> sy-subrc.
67667
+ badExample: `IF 0 <> sy-subrc.
67631
67668
  ENDIF.`,
67632
- goodExample: `IF sy-subrc <> 0.
67669
+ goodExample: `IF sy-subrc <> 0.
67633
67670
  ENDIF.`,
67634
67671
  };
67635
67672
  }
@@ -67730,8 +67767,8 @@ class NROBConsistency {
67730
67767
  key: "nrob_consistency",
67731
67768
  title: "Number range consistency",
67732
67769
  shortDescription: `Consistency checks for number ranges`,
67733
- extendedInformation: `Issue reported if percentage warning is over 50%
67734
-
67770
+ extendedInformation: `Issue reported if percentage warning is over 50%
67771
+
67735
67772
  Issue reported if the referenced domain is not found(taking error namespace into account)`,
67736
67773
  tags: [_irule_1.RuleTag.SingleFile],
67737
67774
  };
@@ -68008,58 +68045,58 @@ class ObsoleteStatement extends _abap_rule_1.ABAPRule {
68008
68045
  title: "Obsolete statements",
68009
68046
  shortDescription: `Checks for usages of certain obsolete statements`,
68010
68047
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
68011
- extendedInformation: `
68012
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
68013
-
68014
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
68015
-
68016
- SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
68017
-
68018
- IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
68019
-
68020
- WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
68021
-
68022
- FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
68023
-
68024
- TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
68025
-
68026
- LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
68027
-
68028
- COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
68029
-
68030
- OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
68031
-
68032
- PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
68033
-
68034
- RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
68035
-
68036
- PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
68037
-
68038
- MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
68039
-
68040
- SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
68041
- SELECT COUNT(*) is considered okay
68042
-
68043
- FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
68044
-
68045
- SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
68046
-
68047
- CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
68048
-
68049
- POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
68050
-
68051
- OCCURENCES: check for OCCURENCES vs OCCURRENCES
68052
-
68048
+ extendedInformation: `
68049
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
68050
+
68051
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
68052
+
68053
+ SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
68054
+
68055
+ IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
68056
+
68057
+ WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
68058
+
68059
+ FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
68060
+
68061
+ TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
68062
+
68063
+ LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
68064
+
68065
+ COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
68066
+
68067
+ OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
68068
+
68069
+ PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
68070
+
68071
+ RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
68072
+
68073
+ PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
68074
+
68075
+ MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
68076
+
68077
+ SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
68078
+ SELECT COUNT(*) is considered okay
68079
+
68080
+ FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
68081
+
68082
+ SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
68083
+
68084
+ CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
68085
+
68086
+ POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
68087
+
68088
+ OCCURENCES: check for OCCURENCES vs OCCURRENCES
68089
+
68053
68090
  CLIENT SPECIFIED, from 754: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abapselect_client_obsolete.htm`,
68054
- badExample: `REFRESH itab.
68055
-
68056
- COMPUTE foo = 2 + 2.
68057
-
68058
- MULTIPLY lv_foo BY 2.
68059
-
68060
- INTERFACE intf LOAD.
68061
-
68062
- IF foo IS SUPPLIED.
68091
+ badExample: `REFRESH itab.
68092
+
68093
+ COMPUTE foo = 2 + 2.
68094
+
68095
+ MULTIPLY lv_foo BY 2.
68096
+
68097
+ INTERFACE intf LOAD.
68098
+
68099
+ IF foo IS SUPPLIED.
68063
68100
  ENDIF.`,
68064
68101
  };
68065
68102
  }
@@ -68399,9 +68436,9 @@ class OmitParameterName {
68399
68436
  key: "omit_parameter_name",
68400
68437
  title: "Omit parameter name",
68401
68438
  shortDescription: `Omit the parameter name in single parameter calls`,
68402
- extendedInformation: `
68403
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
68404
-
68439
+ extendedInformation: `
68440
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
68441
+
68405
68442
  EXPORTING must already be omitted for this rule to take effect, https://rules.abaplint.org/exporting/`,
68406
68443
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
68407
68444
  badExample: `method( param = 2 ).`,
@@ -68607,20 +68644,20 @@ class OmitReceiving extends _abap_rule_1.ABAPRule {
68607
68644
  shortDescription: `Omit RECEIVING`,
68608
68645
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-receiving`,
68609
68646
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
68610
- badExample: `
68611
- upload_pack(
68612
- EXPORTING
68613
- io_client = lo_client
68614
- iv_url = iv_url
68615
- iv_deepen_level = iv_deepen_level
68616
- it_hashes = lt_hashes
68617
- RECEIVING
68647
+ badExample: `
68648
+ upload_pack(
68649
+ EXPORTING
68650
+ io_client = lo_client
68651
+ iv_url = iv_url
68652
+ iv_deepen_level = iv_deepen_level
68653
+ it_hashes = lt_hashes
68654
+ RECEIVING
68618
68655
  rt_objects = et_objects ).`,
68619
- goodExample: `
68620
- et_objects = upload_pack(
68621
- io_client = lo_client
68622
- iv_url = iv_url
68623
- iv_deepen_level = iv_deepen_level
68656
+ goodExample: `
68657
+ et_objects = upload_pack(
68658
+ io_client = lo_client
68659
+ iv_url = iv_url
68660
+ iv_deepen_level = iv_deepen_level
68624
68661
  it_hashes = lt_hashes ).`,
68625
68662
  };
68626
68663
  }
@@ -68684,8 +68721,8 @@ class Parser702Chaining extends _abap_rule_1.ABAPRule {
68684
68721
  return {
68685
68722
  key: "parser_702_chaining",
68686
68723
  title: "Parser Error, bad chanining on 702",
68687
- shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
68688
- this rule finds these and reports errors.
68724
+ shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
68725
+ this rule finds these and reports errors.
68689
68726
  Only active on target version 702 and below.`,
68690
68727
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
68691
68728
  };
@@ -68765,8 +68802,8 @@ class ParserError {
68765
68802
  return {
68766
68803
  key: "parser_error",
68767
68804
  title: "Parser error",
68768
- shortDescription: `Checks for syntax not recognized by abaplint.
68769
-
68805
+ shortDescription: `Checks for syntax not recognized by abaplint.
68806
+
68770
68807
  See recognized syntax at https://syntax.abaplint.org`,
68771
68808
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
68772
68809
  };
@@ -68851,7 +68888,7 @@ class ParserMissingSpace extends _abap_rule_1.ABAPRule {
68851
68888
  return {
68852
68889
  key: "parser_missing_space",
68853
68890
  title: "Parser Error, missing space",
68854
- shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.
68891
+ shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.
68855
68892
  This rule makes sure the spaces are consistently required across the language.`,
68856
68893
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
68857
68894
  badExample: `IF ( foo = 'bar').`,
@@ -69051,12 +69088,23 @@ This rule makes sure the spaces are consistently required across the language.`,
69051
69088
  if (children.length < 2) {
69052
69089
  return undefined;
69053
69090
  }
69054
- const nextLast = children[children.length - 2];
69055
- const last = children[children.length - 1];
69056
- if (nextLast.getStr().startsWith("'")
69057
- && nextLast.getRow() === last.getRow()
69058
- && nextLast.getEnd().getCol() === last.getStart().getCol()) {
69059
- return last.getEnd();
69091
+ if (children.length >= 4
69092
+ && children[0].getStr().toUpperCase() === "CONV") {
69093
+ const first = children[2];
69094
+ const second = children[3];
69095
+ if (first.getRow() === second.getRow()
69096
+ && first.getCol() + 1 === second.getStart().getCol()) {
69097
+ return second.getStart();
69098
+ }
69099
+ }
69100
+ {
69101
+ const nextLast = children[children.length - 2];
69102
+ const last = children[children.length - 1];
69103
+ if (nextLast.getStr().startsWith("'")
69104
+ && nextLast.getRow() === last.getRow()
69105
+ && nextLast.getEnd().getCol() === last.getStart().getCol()) {
69106
+ return last.getEnd();
69107
+ }
69060
69108
  }
69061
69109
  return undefined;
69062
69110
  }
@@ -69263,25 +69311,25 @@ class PreferInline {
69263
69311
  key: "prefer_inline",
69264
69312
  title: "Prefer Inline Declarations",
69265
69313
  shortDescription: `Prefer inline to up-front declarations.`,
69266
- extendedInformation: `EXPERIMENTAL
69267
-
69268
- Activates if language version is v740sp02 or above.
69269
-
69270
- Variables must be local(METHOD or FORM).
69271
-
69272
- No generic or void typed variables. No syntax errors.
69273
-
69274
- First position used must be a full/pure write.
69275
-
69276
- Move statment is not a cast(?=)
69277
-
69314
+ extendedInformation: `EXPERIMENTAL
69315
+
69316
+ Activates if language version is v740sp02 or above.
69317
+
69318
+ Variables must be local(METHOD or FORM).
69319
+
69320
+ No generic or void typed variables. No syntax errors.
69321
+
69322
+ First position used must be a full/pure write.
69323
+
69324
+ Move statment is not a cast(?=)
69325
+
69278
69326
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-inline-to-up-front-declarations`,
69279
69327
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Experimental, _irule_1.RuleTag.Quickfix],
69280
- badExample: `DATA foo TYPE i.
69281
- foo = 2.
69282
- DATA percentage TYPE decfloat34.
69328
+ badExample: `DATA foo TYPE i.
69329
+ foo = 2.
69330
+ DATA percentage TYPE decfloat34.
69283
69331
  percentage = ( comment_number / abs_statement_number ) * 100.`,
69284
- goodExample: `DATA(foo) = 2.
69332
+ goodExample: `DATA(foo) = 2.
69285
69333
  DATA(percentage) = CONV decfloat34( comment_number / abs_statement_number ) * 100.`,
69286
69334
  };
69287
69335
  }
@@ -69495,18 +69543,18 @@ class PreferIsNot extends _abap_rule_1.ABAPRule {
69495
69543
  key: "prefer_is_not",
69496
69544
  title: "Prefer IS NOT to NOT IS",
69497
69545
  shortDescription: `Prefer IS NOT to NOT IS`,
69498
- extendedInformation: `
69499
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
69500
-
69546
+ extendedInformation: `
69547
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
69548
+
69501
69549
  "if not is_valid( )." examples are skipped`,
69502
69550
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
69503
- goodExample: `IF variable IS NOT INITIAL.
69504
- IF variable NP 'TODO*'.
69505
- IF variable <> 42.
69551
+ goodExample: `IF variable IS NOT INITIAL.
69552
+ IF variable NP 'TODO*'.
69553
+ IF variable <> 42.
69506
69554
  IF variable CO 'hello'.`,
69507
- badExample: `IF NOT variable IS INITIAL.
69508
- IF NOT variable CP 'TODO*'.
69509
- IF NOT variable = 42.
69555
+ badExample: `IF NOT variable IS INITIAL.
69556
+ IF NOT variable CP 'TODO*'.
69557
+ IF NOT variable = 42.
69510
69558
  IF NOT variable CA 'hello'.`,
69511
69559
  };
69512
69560
  }
@@ -69694,14 +69742,14 @@ class PreferRaiseExceptionNew extends _abap_rule_1.ABAPRule {
69694
69742
  key: "prefer_raise_exception_new",
69695
69743
  title: "Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE",
69696
69744
  shortDescription: `Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE`,
69697
- extendedInformation: `
69698
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
69699
-
69745
+ extendedInformation: `
69746
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
69747
+
69700
69748
  From 752 and up`,
69701
69749
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
69702
69750
  goodExample: `RAISE EXCEPTION NEW cx_generation_error( previous = exception ).`,
69703
- badExample: `RAISE EXCEPTION TYPE cx_generation_error
69704
- EXPORTING
69751
+ badExample: `RAISE EXCEPTION TYPE cx_generation_error
69752
+ EXPORTING
69705
69753
  previous = exception.`,
69706
69754
  };
69707
69755
  }
@@ -69779,12 +69827,12 @@ class PreferReturningToExporting extends _abap_rule_1.ABAPRule {
69779
69827
  key: "prefer_returning_to_exporting",
69780
69828
  title: "Prefer RETURNING to EXPORTING",
69781
69829
  shortDescription: `Prefer RETURNING to EXPORTING. Generic types cannot be RETURNING.`,
69782
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting
69830
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting
69783
69831
  https://docs.abapopenchecks.org/checks/44/`,
69784
69832
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
69785
- badExample: `CLASS lcl DEFINITION.
69786
- PUBLIC SECTION.
69787
- METHODS test EXPORTING ev_foo TYPE i.
69833
+ badExample: `CLASS lcl DEFINITION.
69834
+ PUBLIC SECTION.
69835
+ METHODS test EXPORTING ev_foo TYPE i.
69788
69836
  ENDCLASS.`,
69789
69837
  };
69790
69838
  }
@@ -69880,8 +69928,8 @@ class PreferXsdbool extends _abap_rule_1.ABAPRule {
69880
69928
  key: "prefer_xsdbool",
69881
69929
  title: "Prefer xsdbool over boolc",
69882
69930
  shortDescription: `Prefer xsdbool over boolc`,
69883
- extendedInformation: `Activates if language version is v740sp08 or above.
69884
-
69931
+ extendedInformation: `Activates if language version is v740sp08 or above.
69932
+
69885
69933
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
69886
69934
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
69887
69935
  badExample: `DATA(sdf) = boolc( 1 = 2 ).`,
@@ -69953,9 +70001,9 @@ class PreferredCompareOperator extends _abap_rule_1.ABAPRule {
69953
70001
  title: "Preferred compare operator",
69954
70002
  shortDescription: `Configure undesired operator variants`,
69955
70003
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
69956
- badExample: `IF foo EQ bar.
70004
+ badExample: `IF foo EQ bar.
69957
70005
  ENDIF.`,
69958
- goodExample: `IF foo = bar.
70006
+ goodExample: `IF foo = bar.
69959
70007
  ENDIF.`,
69960
70008
  };
69961
70009
  }
@@ -70179,26 +70227,26 @@ class ReduceProceduralCode extends _abap_rule_1.ABAPRule {
70179
70227
  key: "reduce_procedural_code",
70180
70228
  title: "Reduce procedural code",
70181
70229
  shortDescription: `Checks FORM and FUNCTION-MODULE have few statements`,
70182
- extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
70183
-
70184
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
70185
-
70230
+ extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
70231
+
70232
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
70233
+
70186
70234
  Comments are not counted as statements.`,
70187
70235
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
70188
- badExample: `FORM foo.
70189
- DATA lv_bar TYPE i.
70190
- lv_bar = 2 + 2.
70191
- IF lv_bar = 4.
70192
- WRITE 'hello world'.
70193
- ENDIF.
70194
- DATA lv_bar TYPE i.
70195
- lv_bar = 2 + 2.
70196
- IF lv_bar = 4.
70197
- WRITE 'hello world'.
70198
- ENDIF.
70236
+ badExample: `FORM foo.
70237
+ DATA lv_bar TYPE i.
70238
+ lv_bar = 2 + 2.
70239
+ IF lv_bar = 4.
70240
+ WRITE 'hello world'.
70241
+ ENDIF.
70242
+ DATA lv_bar TYPE i.
70243
+ lv_bar = 2 + 2.
70244
+ IF lv_bar = 4.
70245
+ WRITE 'hello world'.
70246
+ ENDIF.
70199
70247
  ENDFORM.`,
70200
- goodExample: `FORM foo.
70201
- NEW zcl_global_class( )->run_logic( ).
70248
+ goodExample: `FORM foo.
70249
+ NEW zcl_global_class( )->run_logic( ).
70202
70250
  ENDFORM.`,
70203
70251
  };
70204
70252
  }
@@ -70442,10 +70490,10 @@ class RemoveDescriptions {
70442
70490
  return {
70443
70491
  key: "remove_descriptions",
70444
70492
  title: "Remove descriptions",
70445
- shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
70446
-
70447
- Class descriptions are required, see rule description_empty.
70448
-
70493
+ shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
70494
+
70495
+ Class descriptions are required, see rule description_empty.
70496
+
70449
70497
  Consider using ABAP Doc for documentation.`,
70450
70498
  tags: [],
70451
70499
  };
@@ -70570,14 +70618,14 @@ class RFCErrorHandling extends _abap_rule_1.ABAPRule {
70570
70618
  tags: [_irule_1.RuleTag.SingleFile],
70571
70619
  shortDescription: `Checks that exceptions 'system_failure' and 'communication_failure' are handled in RFC calls`,
70572
70620
  extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenrfc_exception.htm`,
70573
- badExample: `CALL FUNCTION 'ZRFC'
70621
+ badExample: `CALL FUNCTION 'ZRFC'
70574
70622
  DESTINATION lv_rfc.`,
70575
- goodExample: `CALL FUNCTION 'ZRFC'
70576
- DESTINATION lv_rfc
70577
- EXCEPTIONS
70578
- system_failure = 1 MESSAGE msg
70579
- communication_failure = 2 MESSAGE msg
70580
- resource_failure = 3
70623
+ goodExample: `CALL FUNCTION 'ZRFC'
70624
+ DESTINATION lv_rfc
70625
+ EXCEPTIONS
70626
+ system_failure = 1 MESSAGE msg
70627
+ communication_failure = 2 MESSAGE msg
70628
+ resource_failure = 3
70581
70629
  OTHERS = 4.`,
70582
70630
  };
70583
70631
  }
@@ -70661,11 +70709,11 @@ class SelectAddOrderBy {
70661
70709
  key: "select_add_order_by",
70662
70710
  title: "SELECT add ORDER BY",
70663
70711
  shortDescription: `SELECTs add ORDER BY clause`,
70664
- extendedInformation: `
70665
- This will make sure that the SELECT statement returns results in the same sequence on different databases
70666
-
70667
- add ORDER BY PRIMARY KEY if in doubt
70668
-
70712
+ extendedInformation: `
70713
+ This will make sure that the SELECT statement returns results in the same sequence on different databases
70714
+
70715
+ add ORDER BY PRIMARY KEY if in doubt
70716
+
70669
70717
  If the target is a sorted/hashed table, no issue is reported`,
70670
70718
  tags: [_irule_1.RuleTag.SingleFile],
70671
70719
  badExample: `SELECT * FROM db INTO TABLE @DATA(tab).`,
@@ -70796,14 +70844,14 @@ class SelectPerformance {
70796
70844
  key: "select_performance",
70797
70845
  title: "SELECT performance",
70798
70846
  shortDescription: `Various checks regarding SELECT performance.`,
70799
- extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
70800
-
70847
+ extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
70848
+
70801
70849
  SELECT *: not reported if using INTO/APPENDING CORRESPONDING FIELDS OF`,
70802
70850
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Performance],
70803
- badExample: `SELECT field1, field2 FROM table
70804
- INTO @DATA(structure) UP TO 1 ROWS ORDER BY field3 DESCENDING.
70851
+ badExample: `SELECT field1, field2 FROM table
70852
+ INTO @DATA(structure) UP TO 1 ROWS ORDER BY field3 DESCENDING.
70805
70853
  ENDSELECT.`,
70806
- goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
70854
+ goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
70807
70855
  INTO TABLE @DATA(table) ORDER BY field3 DESCENDING`,
70808
70856
  };
70809
70857
  }
@@ -70917,8 +70965,8 @@ class SelectSingleFullKey {
70917
70965
  key: "select_single_full_key",
70918
70966
  title: "Detect SELECT SINGLE which are possibily not unique",
70919
70967
  shortDescription: `Detect SELECT SINGLE which are possibily not unique`,
70920
- extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
70921
-
70968
+ extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
70969
+
70922
70970
  If the statement contains a JOIN it is not checked`,
70923
70971
  pseudoComment: "EC CI_NOORDER",
70924
70972
  tags: [_irule_1.RuleTag.Quickfix],
@@ -71342,8 +71390,8 @@ class SICFConsistency {
71342
71390
  key: "sicf_consistency",
71343
71391
  title: "SICF consistency",
71344
71392
  shortDescription: `Checks the validity of ICF services`,
71345
- extendedInformation: `* Class defined in handler must exist
71346
- * Class must not have any syntax errors
71393
+ extendedInformation: `* Class defined in handler must exist
71394
+ * Class must not have any syntax errors
71347
71395
  * Class must implement interface IF_HTTP_EXTENSION`,
71348
71396
  };
71349
71397
  }
@@ -71455,23 +71503,23 @@ class SlowParameterPassing {
71455
71503
  shortDescription: `Detects slow pass by value passing for methods where parameter is not changed`,
71456
71504
  extendedInformation: `Method parameters defined in interfaces is not checked`,
71457
71505
  tags: [_irule_1.RuleTag.Performance],
71458
- badExample: `CLASS lcl DEFINITION.
71459
- PUBLIC SECTION.
71460
- METHODS bar IMPORTING VALUE(sdf) TYPE string.
71461
- ENDCLASS.
71462
- CLASS lcl IMPLEMENTATION.
71463
- METHOD bar.
71464
- WRITE sdf.
71465
- ENDMETHOD.
71506
+ badExample: `CLASS lcl DEFINITION.
71507
+ PUBLIC SECTION.
71508
+ METHODS bar IMPORTING VALUE(sdf) TYPE string.
71509
+ ENDCLASS.
71510
+ CLASS lcl IMPLEMENTATION.
71511
+ METHOD bar.
71512
+ WRITE sdf.
71513
+ ENDMETHOD.
71466
71514
  ENDCLASS.`,
71467
- goodExample: `CLASS lcl DEFINITION.
71468
- PUBLIC SECTION.
71469
- METHODS bar IMPORTING sdf TYPE string.
71470
- ENDCLASS.
71471
- CLASS lcl IMPLEMENTATION.
71472
- METHOD bar.
71473
- WRITE sdf.
71474
- ENDMETHOD.
71515
+ goodExample: `CLASS lcl DEFINITION.
71516
+ PUBLIC SECTION.
71517
+ METHODS bar IMPORTING sdf TYPE string.
71518
+ ENDCLASS.
71519
+ CLASS lcl IMPLEMENTATION.
71520
+ METHOD bar.
71521
+ WRITE sdf.
71522
+ ENDMETHOD.
71475
71523
  ENDCLASS.`,
71476
71524
  };
71477
71525
  }
@@ -71728,8 +71776,8 @@ class SpaceBeforeDot extends _abap_rule_1.ABAPRule {
71728
71776
  key: "space_before_dot",
71729
71777
  title: "Space before dot",
71730
71778
  shortDescription: `Checks for extra spaces before dots at the ends of statements`,
71731
- extendedInformation: `
71732
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
71779
+ extendedInformation: `
71780
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
71733
71781
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#condense-your-code`,
71734
71782
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
71735
71783
  badExample: `WRITE bar .`,
@@ -71915,12 +71963,12 @@ class SQLValueConversion {
71915
71963
  key: "sql_value_conversion",
71916
71964
  title: "Implicit SQL Value Conversion",
71917
71965
  shortDescription: `Ensure types match when selecting from database`,
71918
- extendedInformation: `
71919
- * Integer to CHAR conversion
71920
- * Integer to NUMC conversion
71921
- * NUMC to Integer conversion
71922
- * CHAR to Integer conversion
71923
- * Source field longer than database field, CHAR -> CHAR
71966
+ extendedInformation: `
71967
+ * Integer to CHAR conversion
71968
+ * Integer to NUMC conversion
71969
+ * NUMC to Integer conversion
71970
+ * CHAR to Integer conversion
71971
+ * Source field longer than database field, CHAR -> CHAR
71924
71972
  * Source field longer than database field, NUMC -> NUMC`,
71925
71973
  tags: [],
71926
71974
  };
@@ -71992,7 +72040,7 @@ class StartAtTab extends _abap_rule_1.ABAPRule {
71992
72040
  key: "start_at_tab",
71993
72041
  title: "Start at tab",
71994
72042
  shortDescription: `Checks that statements start at tabstops.`,
71995
- extendedInformation: `Reports max 100 issues per file
72043
+ extendedInformation: `Reports max 100 issues per file
71996
72044
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
71997
72045
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
71998
72046
  badExample: ` WRITE a.`,
@@ -72169,12 +72217,12 @@ class StrictSQL extends _abap_rule_1.ABAPRule {
72169
72217
  key: "strict_sql",
72170
72218
  title: "Strict SQL",
72171
72219
  shortDescription: `Strict SQL`,
72172
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
72173
-
72174
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
72175
-
72176
- Also see separate rule sql_escape_host_variables
72177
-
72220
+ extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
72221
+
72222
+ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
72223
+
72224
+ Also see separate rule sql_escape_host_variables
72225
+
72178
72226
  Activates from v750 and up`,
72179
72227
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix],
72180
72228
  badExample: `SELECT * FROM ztabl INTO TABLE @rt_content WHERE type = @iv_type ORDER BY PRIMARY KEY.`,
@@ -72428,11 +72476,11 @@ class SyModification extends _abap_rule_1.ABAPRule {
72428
72476
  key: "sy_modification",
72429
72477
  title: "Modification of SY fields",
72430
72478
  shortDescription: `Finds modification of sy fields`,
72431
- extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
72432
-
72479
+ extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
72480
+
72433
72481
  Changes to SY-TVAR* fields are not reported`,
72434
72482
  tags: [_irule_1.RuleTag.SingleFile],
72435
- badExample: `sy-uname = 2.
72483
+ badExample: `sy-uname = 2.
72436
72484
  sy = sy.`,
72437
72485
  };
72438
72486
  }
@@ -72494,8 +72542,8 @@ class TABLEnhancementCategory {
72494
72542
  key: "tabl_enhancement_category",
72495
72543
  title: "TABL enhancement category must be set",
72496
72544
  shortDescription: `Checks that tables do not have the enhancement category 'not classified'.`,
72497
- extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
72498
-
72545
+ extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
72546
+
72499
72547
  You may use standard report RS_DDIC_CLASSIFICATION_FINAL for adjustment.`,
72500
72548
  tags: [],
72501
72549
  };
@@ -72560,8 +72608,8 @@ class TablesDeclaredLocally extends _abap_rule_1.ABAPRule {
72560
72608
  shortDescription: `TABLES are always global, so declare them globally`,
72561
72609
  extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abaptables.htm`,
72562
72610
  tags: [_irule_1.RuleTag.SingleFile],
72563
- badExample: `FORM foo.
72564
- TABLES t100.
72611
+ badExample: `FORM foo.
72612
+ TABLES t100.
72565
72613
  ENDFORM.`,
72566
72614
  goodExample: `TABLES t000.`,
72567
72615
  };
@@ -72689,9 +72737,9 @@ class TypeFormParameters extends _abap_rule_1.ABAPRule {
72689
72737
  title: "Type FORM parameters",
72690
72738
  shortDescription: `Checks for untyped FORM parameters`,
72691
72739
  tags: [_irule_1.RuleTag.SingleFile],
72692
- badExample: `FORM foo USING bar.
72740
+ badExample: `FORM foo USING bar.
72693
72741
  ENDFORM.`,
72694
- goodExample: `FORM foo USING bar TYPE string.
72742
+ goodExample: `FORM foo USING bar TYPE string.
72695
72743
  ENDFORM.`,
72696
72744
  };
72697
72745
  }
@@ -73364,38 +73412,38 @@ class UnnecessaryPragma extends _abap_rule_1.ABAPRule {
73364
73412
  key: "unnecessary_pragma",
73365
73413
  title: "Unnecessary Pragma",
73366
73414
  shortDescription: `Finds pragmas which can be removed`,
73367
- extendedInformation: `* NO_HANDLER with handler
73368
-
73369
- * NEEDED without definition
73370
-
73371
- * NO_TEXT without texts
73372
-
73373
- * SUBRC_OK where sy-subrc is checked
73374
-
73415
+ extendedInformation: `* NO_HANDLER with handler
73416
+
73417
+ * NEEDED without definition
73418
+
73419
+ * NO_TEXT without texts
73420
+
73421
+ * SUBRC_OK where sy-subrc is checked
73422
+
73375
73423
  NO_HANDLER inside macros are not checked`,
73376
73424
  tags: [_irule_1.RuleTag.SingleFile],
73377
- badExample: `TRY.
73378
- ...
73379
- CATCH zcx_abapgit_exception ##NO_HANDLER.
73380
- RETURN. " it has a handler
73381
- ENDTRY.
73382
- MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
73383
- SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
73384
- IF sy-subrc <> 0.
73425
+ badExample: `TRY.
73426
+ ...
73427
+ CATCH zcx_abapgit_exception ##NO_HANDLER.
73428
+ RETURN. " it has a handler
73429
+ ENDTRY.
73430
+ MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
73431
+ SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
73432
+ IF sy-subrc <> 0.
73385
73433
  ENDIF.`,
73386
- goodExample: `TRY.
73387
- ...
73388
- CATCH zcx_abapgit_exception.
73389
- RETURN.
73390
- ENDTRY.
73391
- MESSAGE w125(zbar) WITH c_foo INTO message.
73392
- SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
73393
- IF sy-subrc <> 0.
73394
- ENDIF.
73395
-
73396
- DATA: BEGIN OF blah ##NEEDED,
73397
- test1 TYPE string,
73398
- test2 TYPE string,
73434
+ goodExample: `TRY.
73435
+ ...
73436
+ CATCH zcx_abapgit_exception.
73437
+ RETURN.
73438
+ ENDTRY.
73439
+ MESSAGE w125(zbar) WITH c_foo INTO message.
73440
+ SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
73441
+ IF sy-subrc <> 0.
73442
+ ENDIF.
73443
+
73444
+ DATA: BEGIN OF blah ##NEEDED,
73445
+ test1 TYPE string,
73446
+ test2 TYPE string,
73399
73447
  END OF blah.`,
73400
73448
  };
73401
73449
  }
@@ -73562,18 +73610,18 @@ class UnnecessaryReturn extends _abap_rule_1.ABAPRule {
73562
73610
  shortDescription: `Finds unnecessary RETURN statements`,
73563
73611
  extendedInformation: `Finds unnecessary RETURN statements`,
73564
73612
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
73565
- badExample: `FORM hello1.
73566
- WRITE 'world'.
73567
- RETURN.
73568
- ENDFORM.
73569
-
73570
- FORM foo.
73571
- IF 1 = 2.
73572
- RETURN.
73573
- ENDIF.
73613
+ badExample: `FORM hello1.
73614
+ WRITE 'world'.
73615
+ RETURN.
73616
+ ENDFORM.
73617
+
73618
+ FORM foo.
73619
+ IF 1 = 2.
73620
+ RETURN.
73621
+ ENDIF.
73574
73622
  ENDFORM.`,
73575
- goodExample: `FORM hello2.
73576
- WRITE 'world'.
73623
+ goodExample: `FORM hello2.
73624
+ WRITE 'world'.
73577
73625
  ENDFORM.`,
73578
73626
  };
73579
73627
  }
@@ -73924,13 +73972,13 @@ class UnusedMacros {
73924
73972
  title: "Unused macros",
73925
73973
  shortDescription: `Checks for unused macro definitions definitions`,
73926
73974
  tags: [_irule_1.RuleTag.Quickfix],
73927
- badExample: `DEFINE foobar1.
73928
- WRITE 'hello'.
73975
+ badExample: `DEFINE foobar1.
73976
+ WRITE 'hello'.
73929
73977
  END-OF-DEFINITION.`,
73930
- goodExample: `DEFINE foobar2.
73931
- WRITE 'hello'.
73932
- END-OF-DEFINITION.
73933
-
73978
+ goodExample: `DEFINE foobar2.
73979
+ WRITE 'hello'.
73980
+ END-OF-DEFINITION.
73981
+
73934
73982
  foobar2.`,
73935
73983
  };
73936
73984
  }
@@ -74042,18 +74090,18 @@ class UnusedMethods {
74042
74090
  key: "unused_methods",
74043
74091
  title: "Unused methods",
74044
74092
  shortDescription: `Checks for unused methods`,
74045
- extendedInformation: `Checks private and protected methods.
74046
-
74047
- Unused methods are not reported if the object contains parser or syntax errors.
74048
- Quick fixes only appears for private methods or projected methods where the class doesnt have any subclasses.
74049
-
74050
- Skips:
74051
- * methods FOR TESTING
74052
- * methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
74053
- * class_constructor + constructor methods
74054
- * event handlers
74055
- * methods that are redefined
74056
- * INCLUDEs
74093
+ extendedInformation: `Checks private and protected methods.
74094
+
74095
+ Unused methods are not reported if the object contains parser or syntax errors.
74096
+ Quick fixes only appears for private methods or projected methods where the class doesnt have any subclasses.
74097
+
74098
+ Skips:
74099
+ * methods FOR TESTING
74100
+ * methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
74101
+ * class_constructor + constructor methods
74102
+ * event handlers
74103
+ * methods that are redefined
74104
+ * INCLUDEs
74057
74105
  `,
74058
74106
  tags: [_irule_1.RuleTag.Quickfix],
74059
74107
  pragma: "##CALLED",
@@ -74529,23 +74577,23 @@ class UnusedVariables {
74529
74577
  key: "unused_variables",
74530
74578
  title: "Unused variables",
74531
74579
  shortDescription: `Checks for unused variables and constants`,
74532
- extendedInformation: `Skips event parameters.
74533
-
74534
- Note that this currently does not work if the source code uses macros.
74535
-
74536
- Unused variables are not reported if the object contains parser or syntax errors.
74537
-
74580
+ extendedInformation: `Skips event parameters.
74581
+
74582
+ Note that this currently does not work if the source code uses macros.
74583
+
74584
+ Unused variables are not reported if the object contains parser or syntax errors.
74585
+
74538
74586
  Errors found in INCLUDES are reported for the main program.`,
74539
74587
  tags: [_irule_1.RuleTag.Quickfix],
74540
74588
  pragma: "##NEEDED",
74541
74589
  pseudoComment: "EC NEEDED",
74542
- badExample: `DATA: BEGIN OF blah1,
74543
- test TYPE string,
74544
- test2 TYPE string,
74590
+ badExample: `DATA: BEGIN OF blah1,
74591
+ test TYPE string,
74592
+ test2 TYPE string,
74545
74593
  END OF blah1.`,
74546
- goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
74547
- test TYPE string,
74548
- test2 TYPE string,
74594
+ goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
74595
+ test TYPE string,
74596
+ test2 TYPE string,
74549
74597
  END OF blah2.`,
74550
74598
  };
74551
74599
  }
@@ -74764,15 +74812,15 @@ class UseBoolExpression extends _abap_rule_1.ABAPRule {
74764
74812
  shortDescription: `Use boolean expression, xsdbool from 740sp08 and up, boolc from 702 and up`,
74765
74813
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
74766
74814
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
74767
- badExample: `IF line IS INITIAL.
74768
- has_entries = abap_false.
74769
- ELSE.
74770
- has_entries = abap_true.
74771
- ENDIF.
74772
-
74815
+ badExample: `IF line IS INITIAL.
74816
+ has_entries = abap_false.
74817
+ ELSE.
74818
+ has_entries = abap_true.
74819
+ ENDIF.
74820
+
74773
74821
  DATA(fsdf) = COND #( WHEN foo <> bar THEN abap_true ELSE abap_false ).`,
74774
- goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
74775
-
74822
+ goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
74823
+
74776
74824
  DATA(fsdf) = xsdbool( foo <> bar ).`,
74777
74825
  };
74778
74826
  }
@@ -74890,15 +74938,15 @@ class UseClassBasedExceptions extends _abap_rule_1.ABAPRule {
74890
74938
  shortDescription: `Use class based exceptions, checks interface and class definitions`,
74891
74939
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-class-based-exceptions`,
74892
74940
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
74893
- badExample: `INTERFACE lif.
74894
- METHODS load_data
74895
- EXCEPTIONS
74896
- invalid_parameter.
74941
+ badExample: `INTERFACE lif.
74942
+ METHODS load_data
74943
+ EXCEPTIONS
74944
+ invalid_parameter.
74897
74945
  ENDINTERFACE.`,
74898
- goodExample: `INTERFACE lif.
74899
- METHODS load_data
74900
- RAISING
74901
- cx_something.
74946
+ goodExample: `INTERFACE lif.
74947
+ METHODS load_data
74948
+ RAISING
74949
+ cx_something.
74902
74950
  ENDINTERFACE.`,
74903
74951
  };
74904
74952
  }
@@ -74958,15 +75006,15 @@ class UseLineExists extends _abap_rule_1.ABAPRule {
74958
75006
  key: "use_line_exists",
74959
75007
  title: "Use line_exists",
74960
75008
  shortDescription: `Use line_exists, from 740sp02 and up`,
74961
- extendedInformation: `
74962
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
74963
-
75009
+ extendedInformation: `
75010
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
75011
+
74964
75012
  Not reported if the READ TABLE statement contains BINARY SEARCH.`,
74965
75013
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
74966
- badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
74967
- IF sy-subrc = 0.
75014
+ badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
75015
+ IF sy-subrc = 0.
74968
75016
  ENDIF.`,
74969
- goodExample: `IF line_exists( my_table[ key = 'A' ] ).
75017
+ goodExample: `IF line_exists( my_table[ key = 'A' ] ).
74970
75018
  ENDIF.`,
74971
75019
  };
74972
75020
  }
@@ -75076,10 +75124,10 @@ class UseNew extends _abap_rule_1.ABAPRule {
75076
75124
  key: "use_new",
75077
75125
  title: "Use NEW",
75078
75126
  shortDescription: `Checks for deprecated CREATE OBJECT statements.`,
75079
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
75080
-
75081
- If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
75082
-
75127
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
75128
+
75129
+ If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
75130
+
75083
75131
  Applicable from v740sp02 and up`,
75084
75132
  badExample: `CREATE OBJECT ref.`,
75085
75133
  goodExample: `ref = NEW #( ).`,
@@ -75177,13 +75225,13 @@ class WhenOthersLast extends _abap_rule_1.ABAPRule {
75177
75225
  title: "WHEN OTHERS last",
75178
75226
  shortDescription: `Checks that WHEN OTHERS is placed the last within a CASE statement.`,
75179
75227
  tags: [_irule_1.RuleTag.SingleFile],
75180
- badExample: `CASE bar.
75181
- WHEN OTHERS.
75182
- WHEN 2.
75228
+ badExample: `CASE bar.
75229
+ WHEN OTHERS.
75230
+ WHEN 2.
75183
75231
  ENDCASE.`,
75184
- goodExample: `CASE bar.
75185
- WHEN 2.
75186
- WHEN OTHERS.
75232
+ goodExample: `CASE bar.
75233
+ WHEN 2.
75234
+ WHEN OTHERS.
75187
75235
  ENDCASE.`,
75188
75236
  };
75189
75237
  }