@abaplint/cli 2.105.4 → 2.105.5

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 +947 -930
  4. package/package.json +63 -63
package/build/cli.js CHANGED
@@ -20124,31 +20124,34 @@ class BuiltIn {
20124
20124
  constructor() {
20125
20125
  this.row = 1;
20126
20126
  }
20127
- buildDefinition(method, row) {
20128
- const token = new tokens_1.Identifier(new position_1.Position(row, 1), method.name);
20129
- return new BuiltInMethod(token, BuiltIn.filename, method, row);
20127
+ buildDefinition(method, name) {
20128
+ if (method.cache) {
20129
+ return method.cache;
20130
+ }
20131
+ const token = new tokens_1.Identifier(new position_1.Position(1, 1), name);
20132
+ const result = new BuiltInMethod(token, BuiltIn.filename, method, method.counter);
20133
+ method.cache = result;
20134
+ return result;
20130
20135
  }
20131
20136
  searchBuiltin(name) {
20132
20137
  if (name === undefined) {
20133
20138
  return undefined;
20134
20139
  }
20135
- // todo, optimize, use hash map
20136
- const index = BuiltIn.methods.findIndex(a => a.name === name.toUpperCase());
20137
- if (index < 0) {
20140
+ const def = BuiltIn.methods[name.toUpperCase()];
20141
+ if (def === undefined) {
20138
20142
  return undefined;
20139
20143
  }
20140
- return this.buildDefinition(BuiltIn.methods[index], index);
20144
+ return this.buildDefinition(def, name);
20141
20145
  }
20142
20146
  isPredicate(name) {
20143
20147
  if (name === undefined) {
20144
20148
  return undefined;
20145
20149
  }
20146
- // todo, optimize, use hash map
20147
- const index = BuiltIn.methods.findIndex(a => a.name === name.toUpperCase());
20148
- if (index < 0) {
20150
+ const def = BuiltIn.methods[name.toUpperCase()];
20151
+ if (def === undefined) {
20149
20152
  return undefined;
20150
20153
  }
20151
- return BuiltIn.methods[index].predicate;
20154
+ return def.predicate;
20152
20155
  }
20153
20156
  getTypes() {
20154
20157
  const ret = this.buildSY();
@@ -20163,32 +20166,36 @@ class BuiltIn {
20163
20166
  return ret;
20164
20167
  }
20165
20168
  get(extras) {
20166
- const ret = this.buildSY();
20167
- ret.push(this.buildVariable("screen")); // todo, add structure, or alternatively make native Statements
20168
- ret.push(this.buildConstant("%_ENDIAN"));
20169
- ret.push(this.buildConstant("%_CHARSIZE"));
20170
- ret.push(this.buildConstant("%_BACKSPACE", new basic_1.CharacterType(1), "\b"));
20171
- ret.push(this.buildConstant("%_CR_LF", new basic_1.CharacterType(2), "\r\n"));
20172
- ret.push(this.buildConstant("%_FORMFEED", new basic_1.CharacterType(1), "\f"));
20173
- ret.push(this.buildConstant("%_HORIZONTAL_TAB", new basic_1.CharacterType(1), "\t"));
20174
- ret.push(this.buildConstant("%_MAXCHAR", new basic_1.CharacterType(1), Buffer.from("FDFF", "hex").toString()));
20175
- ret.push(this.buildConstant("%_MINCHAR", new basic_1.CharacterType(1), Buffer.from("0000", "hex").toString()));
20176
- ret.push(this.buildConstant("%_NEWLINE", new basic_1.CharacterType(1), "\n"));
20177
- ret.push(this.buildConstant("%_VERTICAL_TAB", new basic_1.CharacterType(1), "\v"));
20178
- ret.push(this.buildConstant("abap_false", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "' '"));
20179
- ret.push(this.buildConstant("abap_true", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "'X'"));
20180
- ret.push(this.buildConstant("abap_undefined", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "'-'"));
20181
- ret.push(this.buildConstant("abap_off", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "' '"));
20182
- ret.push(this.buildConstant("abap_on", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "'X'"));
20183
- ret.push(this.buildConstant("col_background", basic_1.IntegerType.get(), "0"));
20184
- ret.push(this.buildConstant("col_heading", basic_1.IntegerType.get(), "1"));
20185
- ret.push(this.buildConstant("col_key", basic_1.IntegerType.get(), "4"));
20186
- ret.push(this.buildConstant("col_negative", basic_1.IntegerType.get(), "6"));
20187
- ret.push(this.buildConstant("col_group", basic_1.IntegerType.get(), "7"));
20188
- ret.push(this.buildConstant("col_normal", basic_1.IntegerType.get(), "2"));
20189
- ret.push(this.buildConstant("col_positive", basic_1.IntegerType.get(), "5"));
20190
- ret.push(this.buildConstant("col_total", basic_1.IntegerType.get(), "3"));
20191
- ret.push(this.buildConstant("space", new basic_1.CharacterType(1, { derivedFromConstant: true }), "' '"));
20169
+ const ret = [];
20170
+ if (BuiltIn.getCache.length === 0) {
20171
+ BuiltIn.getCache.push(...this.buildSY());
20172
+ BuiltIn.getCache.push(this.buildVariable("screen"));
20173
+ BuiltIn.getCache.push(this.buildConstant("%_ENDIAN"));
20174
+ BuiltIn.getCache.push(this.buildConstant("%_CHARSIZE"));
20175
+ BuiltIn.getCache.push(this.buildConstant("%_BACKSPACE", new basic_1.CharacterType(1), "\b"));
20176
+ BuiltIn.getCache.push(this.buildConstant("%_CR_LF", new basic_1.CharacterType(2), "\r\n"));
20177
+ BuiltIn.getCache.push(this.buildConstant("%_FORMFEED", new basic_1.CharacterType(1), "\f"));
20178
+ BuiltIn.getCache.push(this.buildConstant("%_HORIZONTAL_TAB", new basic_1.CharacterType(1), "\t"));
20179
+ BuiltIn.getCache.push(this.buildConstant("%_MAXCHAR", new basic_1.CharacterType(1), Buffer.from("FDFF", "hex").toString()));
20180
+ BuiltIn.getCache.push(this.buildConstant("%_MINCHAR", new basic_1.CharacterType(1), Buffer.from("0000", "hex").toString()));
20181
+ BuiltIn.getCache.push(this.buildConstant("%_NEWLINE", new basic_1.CharacterType(1), "\n"));
20182
+ BuiltIn.getCache.push(this.buildConstant("%_VERTICAL_TAB", new basic_1.CharacterType(1), "\v"));
20183
+ BuiltIn.getCache.push(this.buildConstant("abap_false", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "' '"));
20184
+ BuiltIn.getCache.push(this.buildConstant("abap_true", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "'X'"));
20185
+ BuiltIn.getCache.push(this.buildConstant("abap_undefined", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "'-'"));
20186
+ BuiltIn.getCache.push(this.buildConstant("abap_off", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "' '"));
20187
+ BuiltIn.getCache.push(this.buildConstant("abap_on", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "'X'"));
20188
+ BuiltIn.getCache.push(this.buildConstant("col_background", basic_1.IntegerType.get(), "0"));
20189
+ BuiltIn.getCache.push(this.buildConstant("col_heading", basic_1.IntegerType.get(), "1"));
20190
+ BuiltIn.getCache.push(this.buildConstant("col_key", basic_1.IntegerType.get(), "4"));
20191
+ BuiltIn.getCache.push(this.buildConstant("col_negative", basic_1.IntegerType.get(), "6"));
20192
+ BuiltIn.getCache.push(this.buildConstant("col_group", basic_1.IntegerType.get(), "7"));
20193
+ BuiltIn.getCache.push(this.buildConstant("col_normal", basic_1.IntegerType.get(), "2"));
20194
+ BuiltIn.getCache.push(this.buildConstant("col_positive", basic_1.IntegerType.get(), "5"));
20195
+ BuiltIn.getCache.push(this.buildConstant("col_total", basic_1.IntegerType.get(), "3"));
20196
+ BuiltIn.getCache.push(this.buildConstant("space", new basic_1.CharacterType(1, { derivedFromConstant: true }), "' '"));
20197
+ }
20198
+ ret.push(...BuiltIn.getCache);
20192
20199
  for (const e of extras) {
20193
20200
  const id = new tokens_1.Identifier(new position_1.Position(this.row++, 1), e);
20194
20201
  ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.VoidType(e), ["read_only" /* IdentifierMeta.ReadOnly */, "built-in" /* IdentifierMeta.BuiltIn */], "'?'"));
@@ -20196,6 +20203,10 @@ class BuiltIn {
20196
20203
  return ret;
20197
20204
  }
20198
20205
  /////////////////////////////
20206
+ buildVariable(name) {
20207
+ const id = new tokens_1.Identifier(new position_1.Position(this.row++, 1), name);
20208
+ return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.VoidType(name), ["built-in" /* IdentifierMeta.BuiltIn */]);
20209
+ }
20199
20210
  buildSY() {
20200
20211
  const components = [];
20201
20212
  // NOTE: fields must be in correct sequence for the syntax check
@@ -20390,62 +20401,60 @@ class BuiltIn {
20390
20401
  }
20391
20402
  return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, type, ["read_only" /* IdentifierMeta.ReadOnly */, "built-in" /* IdentifierMeta.BuiltIn */], value);
20392
20403
  }
20393
- buildVariable(name) {
20394
- const id = new tokens_1.Identifier(new position_1.Position(this.row++, 1), name);
20395
- return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.VoidType(name), ["built-in" /* IdentifierMeta.BuiltIn */]);
20396
- }
20397
20404
  }
20398
20405
  exports.BuiltIn = BuiltIn;
20399
20406
  BuiltIn.filename = "_builtin.prog.abap";
20407
+ BuiltIn.counter = 1;
20408
+ BuiltIn.getCache = [];
20400
20409
  // todo: "pcre" vs "regex", only one of these parameters are allowed
20401
20410
  // todo: "pcre", only possible from 755
20402
- BuiltIn.methods = [
20403
- {
20404
- name: "ABS",
20411
+ BuiltIn.methods = {
20412
+ "ABS": {
20413
+ counter: BuiltIn.counter++,
20405
20414
  mandatory: {
20406
20415
  "val": new basic_1.FloatType(),
20407
20416
  },
20408
20417
  return: basic_1.IntegerType.get(),
20409
20418
  },
20410
- {
20411
- name: "ACOS",
20419
+ "ACOS": {
20420
+ counter: BuiltIn.counter++,
20412
20421
  mandatory: {
20413
20422
  "val": new basic_1.FloatType(),
20414
20423
  },
20415
20424
  return: new basic_1.FloatType(),
20416
20425
  },
20417
- {
20418
- name: "ASIN",
20426
+ "ASIN": {
20427
+ counter: BuiltIn.counter++,
20419
20428
  mandatory: {
20420
20429
  "val": new basic_1.FloatType(),
20421
20430
  },
20422
20431
  return: new basic_1.FloatType(),
20423
20432
  },
20424
- {
20425
- name: "ATAN",
20433
+ "ATAN": {
20434
+ counter: BuiltIn.counter++,
20426
20435
  mandatory: {
20427
20436
  "val": new basic_1.FloatType(),
20428
20437
  },
20429
20438
  return: new basic_1.FloatType(),
20430
20439
  },
20431
- {
20432
- name: "BIT-SET",
20440
+ "BIT-SET": {
20441
+ counter: BuiltIn.counter++,
20433
20442
  mandatory: {
20434
20443
  "val": basic_1.IntegerType.get(),
20435
20444
  },
20436
20445
  return: new basic_1.XStringType(),
20437
20446
  version: version_1.Version.v702,
20438
20447
  },
20439
- {
20440
- name: "BOOLC",
20448
+ "BOOLC": {
20449
+ counter: BuiltIn.counter++,
20441
20450
  mandatory: {
20442
20451
  "val": basic_1.CLikeType.get(),
20443
20452
  },
20444
20453
  return: basic_1.StringType.get(),
20445
20454
  version: version_1.Version.v702,
20446
20455
  },
20447
- {
20448
- name: "BOOLX",
20456
+ "BOOLX": {
20457
+ counter: BuiltIn.counter++,
20449
20458
  mandatory: {
20450
20459
  "bool": basic_1.CLikeType.get(),
20451
20460
  },
@@ -20455,15 +20464,15 @@ BuiltIn.methods = [
20455
20464
  return: new basic_1.XStringType(),
20456
20465
  version: version_1.Version.v702,
20457
20466
  },
20458
- {
20459
- name: "CEIL",
20467
+ "CEIL": {
20468
+ counter: BuiltIn.counter++,
20460
20469
  mandatory: {
20461
20470
  "val": new basic_1.FloatType(),
20462
20471
  },
20463
20472
  return: basic_1.IntegerType.get(),
20464
20473
  },
20465
- {
20466
- name: "CHAR_OFF",
20474
+ "CHAR_OFF": {
20475
+ counter: BuiltIn.counter++,
20467
20476
  mandatory: {
20468
20477
  "val": basic_1.CLikeType.get(),
20469
20478
  "add": basic_1.IntegerType.get(),
@@ -20474,15 +20483,15 @@ BuiltIn.methods = [
20474
20483
  return: basic_1.IntegerType.get(),
20475
20484
  version: version_1.Version.v702,
20476
20485
  },
20477
- {
20478
- name: "CHARLEN",
20486
+ "CHARLEN": {
20487
+ counter: BuiltIn.counter++,
20479
20488
  mandatory: {
20480
20489
  "val": basic_1.CLikeType.get(),
20481
20490
  },
20482
20491
  return: basic_1.IntegerType.get(),
20483
20492
  },
20484
- {
20485
- name: "CMAX",
20493
+ "CMAX": {
20494
+ counter: BuiltIn.counter++,
20486
20495
  mandatory: {
20487
20496
  "val1": basic_1.CLikeType.get(),
20488
20497
  "val2": basic_1.CLikeType.get(),
@@ -20498,8 +20507,8 @@ BuiltIn.methods = [
20498
20507
  return: basic_1.StringType.get(),
20499
20508
  version: version_1.Version.v702,
20500
20509
  },
20501
- {
20502
- name: "CMIN",
20510
+ "CMIN": {
20511
+ counter: BuiltIn.counter++,
20503
20512
  mandatory: {
20504
20513
  "val1": basic_1.CLikeType.get(),
20505
20514
  "val2": basic_1.CLikeType.get(),
@@ -20515,8 +20524,8 @@ BuiltIn.methods = [
20515
20524
  return: basic_1.StringType.get(),
20516
20525
  version: version_1.Version.v702,
20517
20526
  },
20518
- {
20519
- name: "CONCAT_LINES_OF",
20527
+ "CONCAT_LINES_OF": {
20528
+ counter: BuiltIn.counter++,
20520
20529
  mandatory: {
20521
20530
  "table": new basic_1.TableType(new basic_1.AnyType(), { withHeader: false, keyType: basic_1.TableKeyType.default }),
20522
20531
  },
@@ -20526,8 +20535,8 @@ BuiltIn.methods = [
20526
20535
  return: basic_1.StringType.get(),
20527
20536
  version: version_1.Version.v702,
20528
20537
  },
20529
- {
20530
- name: "CONDENSE",
20538
+ "CONDENSE": {
20539
+ counter: BuiltIn.counter++,
20531
20540
  mandatory: {
20532
20541
  "val": basic_1.CLikeType.get(),
20533
20542
  },
@@ -20539,8 +20548,8 @@ BuiltIn.methods = [
20539
20548
  return: basic_1.StringType.get(),
20540
20549
  version: version_1.Version.v702,
20541
20550
  },
20542
- {
20543
- name: "CONTAINS",
20551
+ "CONTAINS": {
20552
+ counter: BuiltIn.counter++,
20544
20553
  mandatory: {
20545
20554
  "val": basic_1.CLikeType.get(),
20546
20555
  },
@@ -20559,8 +20568,8 @@ BuiltIn.methods = [
20559
20568
  predicate: true,
20560
20569
  version: version_1.Version.v702,
20561
20570
  },
20562
- {
20563
- name: "CONTAINS_ANY_NOT_OF",
20571
+ "CONTAINS_ANY_NOT_OF": {
20572
+ counter: BuiltIn.counter++,
20564
20573
  mandatory: {
20565
20574
  "val": basic_1.CLikeType.get(),
20566
20575
  },
@@ -20575,8 +20584,8 @@ BuiltIn.methods = [
20575
20584
  predicate: true,
20576
20585
  return: new basic_1.CharacterType(1), version: version_1.Version.v702,
20577
20586
  },
20578
- {
20579
- name: "CONTAINS_ANY_OF",
20587
+ "CONTAINS_ANY_OF": {
20588
+ counter: BuiltIn.counter++,
20580
20589
  mandatory: {
20581
20590
  "val": basic_1.CLikeType.get(),
20582
20591
  },
@@ -20592,22 +20601,22 @@ BuiltIn.methods = [
20592
20601
  predicate: true,
20593
20602
  version: version_1.Version.v702,
20594
20603
  },
20595
- {
20596
- name: "COS",
20604
+ "COS": {
20605
+ counter: BuiltIn.counter++,
20597
20606
  mandatory: {
20598
20607
  "val": new basic_1.FloatType(),
20599
20608
  },
20600
20609
  return: new basic_1.FloatType(),
20601
20610
  },
20602
- {
20603
- name: "COSH",
20611
+ "COSH": {
20612
+ counter: BuiltIn.counter++,
20604
20613
  mandatory: {
20605
20614
  "val": new basic_1.FloatType(),
20606
20615
  },
20607
20616
  return: new basic_1.FloatType(),
20608
20617
  },
20609
- {
20610
- name: "COUNT",
20618
+ "COUNT": {
20619
+ counter: BuiltIn.counter++,
20611
20620
  mandatory: {
20612
20621
  "val": basic_1.CLikeType.get(),
20613
20622
  },
@@ -20622,8 +20631,8 @@ BuiltIn.methods = [
20622
20631
  return: basic_1.IntegerType.get(),
20623
20632
  version: version_1.Version.v702,
20624
20633
  },
20625
- {
20626
- name: "COUNT_ANY_NOT_OF",
20634
+ "COUNT_ANY_NOT_OF": {
20635
+ counter: BuiltIn.counter++,
20627
20636
  mandatory: {
20628
20637
  "val": basic_1.CLikeType.get(),
20629
20638
  },
@@ -20638,8 +20647,8 @@ BuiltIn.methods = [
20638
20647
  return: basic_1.IntegerType.get(),
20639
20648
  version: version_1.Version.v702,
20640
20649
  },
20641
- {
20642
- name: "COUNT_ANY_OF",
20650
+ "COUNT_ANY_OF": {
20651
+ counter: BuiltIn.counter++,
20643
20652
  mandatory: {
20644
20653
  "val": basic_1.CLikeType.get(),
20645
20654
  },
@@ -20654,15 +20663,15 @@ BuiltIn.methods = [
20654
20663
  return: basic_1.IntegerType.get(),
20655
20664
  version: version_1.Version.v702,
20656
20665
  },
20657
- {
20658
- name: "DBMAXLEN",
20666
+ "DBMAXLEN": {
20667
+ counter: BuiltIn.counter++,
20659
20668
  mandatory: {
20660
20669
  "val": basic_1.CLikeType.get(),
20661
20670
  },
20662
20671
  return: basic_1.IntegerType.get(),
20663
20672
  },
20664
- {
20665
- name: "DISTANCE",
20673
+ "DISTANCE": {
20674
+ counter: BuiltIn.counter++,
20666
20675
  mandatory: {
20667
20676
  "val1": basic_1.CLikeType.get(),
20668
20677
  "val2": basic_1.CLikeType.get(),
@@ -20670,8 +20679,8 @@ BuiltIn.methods = [
20670
20679
  return: basic_1.IntegerType.get(),
20671
20680
  version: version_1.Version.v702,
20672
20681
  },
20673
- {
20674
- name: "ESCAPE",
20682
+ "ESCAPE": {
20683
+ counter: BuiltIn.counter++,
20675
20684
  mandatory: {
20676
20685
  "val": basic_1.CLikeType.get(),
20677
20686
  "format": basic_1.CLikeType.get(),
@@ -20679,15 +20688,15 @@ BuiltIn.methods = [
20679
20688
  return: basic_1.StringType.get(),
20680
20689
  version: version_1.Version.v702,
20681
20690
  },
20682
- {
20683
- name: "EXP",
20691
+ "EXP": {
20692
+ counter: BuiltIn.counter++,
20684
20693
  mandatory: {
20685
20694
  "val": new basic_1.FloatType(),
20686
20695
  },
20687
20696
  return: new basic_1.FloatType(),
20688
20697
  },
20689
- {
20690
- name: "FIND",
20698
+ "FIND": {
20699
+ counter: BuiltIn.counter++,
20691
20700
  mandatory: {
20692
20701
  "val": basic_1.CLikeType.get(),
20693
20702
  },
@@ -20703,8 +20712,8 @@ BuiltIn.methods = [
20703
20712
  return: basic_1.IntegerType.get(),
20704
20713
  version: version_1.Version.v702,
20705
20714
  },
20706
- {
20707
- name: "FIND_ANY_NOT_OF",
20715
+ "FIND_ANY_NOT_OF": {
20716
+ counter: BuiltIn.counter++,
20708
20717
  mandatory: {
20709
20718
  "val": basic_1.CLikeType.get(),
20710
20719
  },
@@ -20717,8 +20726,8 @@ BuiltIn.methods = [
20717
20726
  return: basic_1.IntegerType.get(),
20718
20727
  version: version_1.Version.v702,
20719
20728
  },
20720
- {
20721
- name: "FIND_ANY_OF",
20729
+ "FIND_ANY_OF": {
20730
+ counter: BuiltIn.counter++,
20722
20731
  mandatory: {
20723
20732
  "val": basic_1.CLikeType.get(),
20724
20733
  },
@@ -20731,8 +20740,8 @@ BuiltIn.methods = [
20731
20740
  return: basic_1.IntegerType.get(),
20732
20741
  version: version_1.Version.v702,
20733
20742
  },
20734
- {
20735
- name: "FIND_END",
20743
+ "FIND_END": {
20744
+ counter: BuiltIn.counter++,
20736
20745
  mandatory: {
20737
20746
  "val": basic_1.CLikeType.get(),
20738
20747
  },
@@ -20748,22 +20757,22 @@ BuiltIn.methods = [
20748
20757
  return: basic_1.IntegerType.get(),
20749
20758
  version: version_1.Version.v702,
20750
20759
  },
20751
- {
20752
- name: "FLOOR",
20760
+ "FLOOR": {
20761
+ counter: BuiltIn.counter++,
20753
20762
  mandatory: {
20754
20763
  "val": new basic_1.FloatType(),
20755
20764
  },
20756
20765
  return: basic_1.IntegerType.get(),
20757
20766
  },
20758
- {
20759
- name: "FRAC",
20767
+ "FRAC": {
20768
+ counter: BuiltIn.counter++,
20760
20769
  mandatory: {
20761
20770
  "val": new basic_1.FloatType(),
20762
20771
  },
20763
20772
  return: basic_1.IntegerType.get(),
20764
20773
  },
20765
- {
20766
- name: "FROM_MIXED",
20774
+ "FROM_MIXED": {
20775
+ counter: BuiltIn.counter++,
20767
20776
  mandatory: {
20768
20777
  "val": basic_1.CLikeType.get()
20769
20778
  },
@@ -20775,8 +20784,8 @@ BuiltIn.methods = [
20775
20784
  return: basic_1.StringType.get(),
20776
20785
  version: version_1.Version.v702,
20777
20786
  },
20778
- {
20779
- name: "INSERT",
20787
+ "INSERT": {
20788
+ counter: BuiltIn.counter++,
20780
20789
  mandatory: {
20781
20790
  "val": basic_1.CLikeType.get(),
20782
20791
  "sub": basic_1.CLikeType.get(),
@@ -20787,8 +20796,8 @@ BuiltIn.methods = [
20787
20796
  return: basic_1.StringType.get(),
20788
20797
  version: version_1.Version.v702,
20789
20798
  },
20790
- {
20791
- name: "IPOW",
20799
+ "IPOW": {
20800
+ counter: BuiltIn.counter++,
20792
20801
  mandatory: {
20793
20802
  "base": new basic_1.FloatType(),
20794
20803
  "exp": new basic_1.FloatType(),
@@ -20796,8 +20805,8 @@ BuiltIn.methods = [
20796
20805
  return: basic_1.IntegerType.get(),
20797
20806
  version: version_1.Version.v740sp02,
20798
20807
  },
20799
- {
20800
- name: "LINE_EXISTS",
20808
+ "LINE_EXISTS": {
20809
+ counter: BuiltIn.counter++,
20801
20810
  mandatory: {
20802
20811
  "val": new basic_1.AnyType(),
20803
20812
  },
@@ -20805,37 +20814,37 @@ BuiltIn.methods = [
20805
20814
  predicate: true,
20806
20815
  version: version_1.Version.v740sp02,
20807
20816
  },
20808
- {
20809
- name: "LINE_INDEX",
20817
+ "LINE_INDEX": {
20818
+ counter: BuiltIn.counter++,
20810
20819
  mandatory: {
20811
20820
  "val": new basic_1.AnyType(),
20812
20821
  },
20813
20822
  return: basic_1.IntegerType.get(),
20814
20823
  version: version_1.Version.v740sp02,
20815
20824
  },
20816
- {
20817
- name: "LINES",
20825
+ "LINES": {
20826
+ counter: BuiltIn.counter++,
20818
20827
  mandatory: {
20819
20828
  "val": new basic_1.TableType(new basic_1.AnyType(), { withHeader: false, keyType: basic_1.TableKeyType.default }),
20820
20829
  },
20821
20830
  return: basic_1.IntegerType.get(),
20822
20831
  },
20823
- {
20824
- name: "LOG",
20832
+ "LOG": {
20833
+ counter: BuiltIn.counter++,
20825
20834
  mandatory: {
20826
20835
  "val": new basic_1.FloatType(),
20827
20836
  },
20828
20837
  return: new basic_1.FloatType(),
20829
20838
  },
20830
- {
20831
- name: "LOG10",
20839
+ "LOG10": {
20840
+ counter: BuiltIn.counter++,
20832
20841
  mandatory: {
20833
20842
  "val": new basic_1.FloatType(),
20834
20843
  },
20835
20844
  return: new basic_1.FloatType(),
20836
20845
  },
20837
- {
20838
- name: "MATCH",
20846
+ "MATCH": {
20847
+ counter: BuiltIn.counter++,
20839
20848
  mandatory: {
20840
20849
  "val": basic_1.CLikeType.get(),
20841
20850
  }, optional: {
@@ -20847,8 +20856,8 @@ BuiltIn.methods = [
20847
20856
  return: basic_1.StringType.get(),
20848
20857
  version: version_1.Version.v702,
20849
20858
  },
20850
- {
20851
- name: "MATCHES",
20859
+ "MATCHES": {
20860
+ counter: BuiltIn.counter++,
20852
20861
  mandatory: {
20853
20862
  "val": basic_1.CLikeType.get(),
20854
20863
  },
@@ -20863,8 +20872,8 @@ BuiltIn.methods = [
20863
20872
  predicate: true,
20864
20873
  version: version_1.Version.v702,
20865
20874
  },
20866
- {
20867
- name: "NMAX",
20875
+ "NMAX": {
20876
+ counter: BuiltIn.counter++,
20868
20877
  mandatory: {
20869
20878
  "val1": basic_1.CLikeType.get(),
20870
20879
  "val2": basic_1.CLikeType.get(),
@@ -20881,8 +20890,8 @@ BuiltIn.methods = [
20881
20890
  return: basic_1.IntegerType.get(),
20882
20891
  version: version_1.Version.v702,
20883
20892
  },
20884
- {
20885
- name: "NMIN",
20893
+ "NMIN": {
20894
+ counter: BuiltIn.counter++,
20886
20895
  mandatory: {
20887
20896
  "val1": basic_1.CLikeType.get(),
20888
20897
  "val2": basic_1.CLikeType.get(),
@@ -20899,15 +20908,15 @@ BuiltIn.methods = [
20899
20908
  return: basic_1.IntegerType.get(),
20900
20909
  version: version_1.Version.v702,
20901
20910
  },
20902
- {
20903
- name: "NUMOFCHAR",
20911
+ "NUMOFCHAR": {
20912
+ counter: BuiltIn.counter++,
20904
20913
  mandatory: {
20905
20914
  "val": basic_1.CLikeType.get(),
20906
20915
  },
20907
20916
  return: basic_1.IntegerType.get(),
20908
20917
  },
20909
- {
20910
- name: "REPEAT",
20918
+ "REPEAT": {
20919
+ counter: BuiltIn.counter++,
20911
20920
  mandatory: {
20912
20921
  "val": basic_1.CLikeType.get(),
20913
20922
  "occ": basic_1.CLikeType.get(),
@@ -20915,8 +20924,8 @@ BuiltIn.methods = [
20915
20924
  return: basic_1.StringType.get(),
20916
20925
  version: version_1.Version.v702,
20917
20926
  },
20918
- {
20919
- name: "REPLACE",
20927
+ "REPLACE": {
20928
+ counter: BuiltIn.counter++,
20920
20929
  mandatory: {
20921
20930
  "val": basic_1.CLikeType.get(),
20922
20931
  "with": basic_1.CLikeType.get(),
@@ -20933,8 +20942,8 @@ BuiltIn.methods = [
20933
20942
  return: basic_1.StringType.get(),
20934
20943
  version: version_1.Version.v702,
20935
20944
  },
20936
- {
20937
- name: "RESCALE",
20945
+ "RESCALE": {
20946
+ counter: BuiltIn.counter++,
20938
20947
  mandatory: {
20939
20948
  "val": new basic_1.FloatType(),
20940
20949
  },
@@ -20946,16 +20955,16 @@ BuiltIn.methods = [
20946
20955
  return: new basic_1.FloatType(),
20947
20956
  version: version_1.Version.v702,
20948
20957
  },
20949
- {
20950
- name: "REVERSE",
20958
+ "REVERSE": {
20959
+ counter: BuiltIn.counter++,
20951
20960
  mandatory: {
20952
20961
  "val": basic_1.CLikeType.get(),
20953
20962
  },
20954
20963
  return: basic_1.StringType.get(),
20955
20964
  version: version_1.Version.v702,
20956
20965
  },
20957
- {
20958
- name: "ROUND",
20966
+ "ROUND": {
20967
+ counter: BuiltIn.counter++,
20959
20968
  mandatory: {
20960
20969
  "val": new basic_1.FloatType(),
20961
20970
  },
@@ -20967,8 +20976,8 @@ BuiltIn.methods = [
20967
20976
  return: basic_1.IntegerType.get(),
20968
20977
  version: version_1.Version.v702,
20969
20978
  },
20970
- {
20971
- name: "SEGMENT",
20979
+ "SEGMENT": {
20980
+ counter: BuiltIn.counter++,
20972
20981
  mandatory: {
20973
20982
  "val": basic_1.CLikeType.get(),
20974
20983
  "index": basic_1.IntegerType.get(),
@@ -20980,8 +20989,8 @@ BuiltIn.methods = [
20980
20989
  return: basic_1.StringType.get(),
20981
20990
  version: version_1.Version.v702,
20982
20991
  },
20983
- {
20984
- name: "SHIFT_LEFT",
20992
+ "SHIFT_LEFT": {
20993
+ counter: BuiltIn.counter++,
20985
20994
  mandatory: {
20986
20995
  "val": basic_1.CLikeType.get(),
20987
20996
  },
@@ -20993,8 +21002,8 @@ BuiltIn.methods = [
20993
21002
  return: basic_1.StringType.get(),
20994
21003
  version: version_1.Version.v702,
20995
21004
  },
20996
- {
20997
- name: "SHIFT_RIGHT",
21005
+ "SHIFT_RIGHT": {
21006
+ counter: BuiltIn.counter++,
20998
21007
  mandatory: {
20999
21008
  "val": basic_1.CLikeType.get(),
21000
21009
  },
@@ -21006,43 +21015,43 @@ BuiltIn.methods = [
21006
21015
  return: basic_1.StringType.get(),
21007
21016
  version: version_1.Version.v702,
21008
21017
  },
21009
- {
21010
- name: "SIGN",
21018
+ "SIGN": {
21019
+ counter: BuiltIn.counter++,
21011
21020
  mandatory: {
21012
21021
  "val": new basic_1.FloatType(),
21013
21022
  },
21014
21023
  return: basic_1.IntegerType.get(),
21015
21024
  },
21016
- {
21017
- name: "SIN",
21025
+ "SIN": {
21026
+ counter: BuiltIn.counter++,
21018
21027
  mandatory: {
21019
21028
  "val": new basic_1.FloatType(),
21020
21029
  },
21021
21030
  return: new basic_1.FloatType(),
21022
21031
  },
21023
- {
21024
- name: "SINH",
21032
+ "SINH": {
21033
+ counter: BuiltIn.counter++,
21025
21034
  mandatory: {
21026
21035
  "val": new basic_1.FloatType(),
21027
21036
  },
21028
21037
  return: new basic_1.FloatType(),
21029
21038
  },
21030
- {
21031
- name: "SQRT",
21039
+ "SQRT": {
21040
+ counter: BuiltIn.counter++,
21032
21041
  mandatory: {
21033
21042
  "val": new basic_1.FloatType(),
21034
21043
  },
21035
21044
  return: new basic_1.FloatType(),
21036
21045
  },
21037
- {
21038
- name: "STRLEN",
21046
+ "STRLEN": {
21047
+ counter: BuiltIn.counter++,
21039
21048
  mandatory: {
21040
21049
  "val": basic_1.CLikeType.get(),
21041
21050
  },
21042
21051
  return: basic_1.IntegerType.get(),
21043
21052
  },
21044
- {
21045
- name: "SUBSTRING",
21053
+ "SUBSTRING": {
21054
+ counter: BuiltIn.counter++,
21046
21055
  mandatory: {
21047
21056
  "val": basic_1.CLikeType.get(),
21048
21057
  },
@@ -21053,8 +21062,8 @@ BuiltIn.methods = [
21053
21062
  return: basic_1.StringType.get(),
21054
21063
  version: version_1.Version.v702,
21055
21064
  },
21056
- {
21057
- name: "SUBSTRING_AFTER",
21065
+ "SUBSTRING_AFTER": {
21066
+ counter: BuiltIn.counter++,
21058
21067
  mandatory: {
21059
21068
  "val": basic_1.CLikeType.get(),
21060
21069
  },
@@ -21069,8 +21078,8 @@ BuiltIn.methods = [
21069
21078
  return: basic_1.StringType.get(),
21070
21079
  version: version_1.Version.v702,
21071
21080
  },
21072
- {
21073
- name: "SUBSTRING_BEFORE",
21081
+ "SUBSTRING_BEFORE": {
21082
+ counter: BuiltIn.counter++,
21074
21083
  mandatory: {
21075
21084
  "val": basic_1.CLikeType.get(),
21076
21085
  },
@@ -21085,8 +21094,8 @@ BuiltIn.methods = [
21085
21094
  return: basic_1.StringType.get(),
21086
21095
  version: version_1.Version.v702,
21087
21096
  },
21088
- {
21089
- name: "SUBSTRING_FROM",
21097
+ "SUBSTRING_FROM": {
21098
+ counter: BuiltIn.counter++,
21090
21099
  mandatory: {
21091
21100
  "val": basic_1.CLikeType.get(),
21092
21101
  },
@@ -21101,8 +21110,8 @@ BuiltIn.methods = [
21101
21110
  return: basic_1.StringType.get(),
21102
21111
  version: version_1.Version.v702,
21103
21112
  },
21104
- {
21105
- name: "SUBSTRING_TO",
21113
+ "SUBSTRING_TO": {
21114
+ counter: BuiltIn.counter++,
21106
21115
  mandatory: {
21107
21116
  "val": basic_1.CLikeType.get(),
21108
21117
  },
@@ -21117,30 +21126,30 @@ BuiltIn.methods = [
21117
21126
  return: basic_1.StringType.get(),
21118
21127
  version: version_1.Version.v702,
21119
21128
  },
21120
- {
21121
- name: "TAN",
21129
+ "TAN": {
21130
+ counter: BuiltIn.counter++,
21122
21131
  mandatory: {
21123
21132
  "val": new basic_1.FloatType(),
21124
21133
  },
21125
21134
  return: new basic_1.FloatType(),
21126
21135
  },
21127
- {
21128
- name: "TANH",
21136
+ "TANH": {
21137
+ counter: BuiltIn.counter++,
21129
21138
  mandatory: {
21130
21139
  "val": new basic_1.FloatType(),
21131
21140
  },
21132
21141
  return: new basic_1.FloatType(),
21133
21142
  },
21134
- {
21135
- name: "TO_LOWER",
21143
+ "TO_LOWER": {
21144
+ counter: BuiltIn.counter++,
21136
21145
  mandatory: {
21137
21146
  "val": basic_1.CLikeType.get(),
21138
21147
  },
21139
21148
  return: basic_1.StringType.get(),
21140
21149
  version: version_1.Version.v702,
21141
21150
  },
21142
- {
21143
- name: "TO_MIXED",
21151
+ "TO_MIXED": {
21152
+ counter: BuiltIn.counter++,
21144
21153
  mandatory: {
21145
21154
  "val": basic_1.CLikeType.get(),
21146
21155
  },
@@ -21152,14 +21161,14 @@ BuiltIn.methods = [
21152
21161
  return: basic_1.StringType.get(),
21153
21162
  version: version_1.Version.v702,
21154
21163
  },
21155
- {
21156
- name: "TO_UPPER",
21164
+ "TO_UPPER": {
21165
+ counter: BuiltIn.counter++,
21157
21166
  mandatory: { "val": basic_1.CLikeType.get() },
21158
21167
  return: basic_1.StringType.get(),
21159
21168
  version: version_1.Version.v702,
21160
21169
  },
21161
- {
21162
- name: "TRANSLATE",
21170
+ "TRANSLATE": {
21171
+ counter: BuiltIn.counter++,
21163
21172
  mandatory: {
21164
21173
  "val": basic_1.CLikeType.get(),
21165
21174
  "from": basic_1.CLikeType.get(),
@@ -21168,15 +21177,15 @@ BuiltIn.methods = [
21168
21177
  return: basic_1.StringType.get(),
21169
21178
  version: version_1.Version.v702,
21170
21179
  },
21171
- {
21172
- name: "TRUNC",
21180
+ "TRUNC": {
21181
+ counter: BuiltIn.counter++,
21173
21182
  mandatory: {
21174
21183
  "val": new basic_1.FloatType(),
21175
21184
  },
21176
21185
  return: basic_1.IntegerType.get(),
21177
21186
  },
21178
- {
21179
- name: "UTCLONG_ADD",
21187
+ "UTCLONG_ADD": {
21188
+ counter: BuiltIn.counter++,
21180
21189
  mandatory: {
21181
21190
  "val": new basic_1.UTCLongType(),
21182
21191
  },
@@ -21189,13 +21198,13 @@ BuiltIn.methods = [
21189
21198
  return: new basic_1.UTCLongType(),
21190
21199
  version: version_1.Version.v754,
21191
21200
  },
21192
- {
21193
- name: "UTCLONG_CURRENT",
21201
+ "UTCLONG_CURRENT": {
21202
+ counter: BuiltIn.counter++,
21194
21203
  return: new basic_1.UTCLongType(),
21195
21204
  version: version_1.Version.v754,
21196
21205
  },
21197
- {
21198
- name: "UTCLONG_DIFF",
21206
+ "UTCLONG_DIFF": {
21207
+ counter: BuiltIn.counter++,
21199
21208
  mandatory: {
21200
21209
  "high": new basic_1.UTCLongType(),
21201
21210
  "low": new basic_1.UTCLongType(),
@@ -21203,22 +21212,22 @@ BuiltIn.methods = [
21203
21212
  return: new basic_1.FloatType(),
21204
21213
  version: version_1.Version.v754,
21205
21214
  },
21206
- {
21207
- name: "XSDBOOL",
21215
+ "XSDBOOL": {
21216
+ counter: BuiltIn.counter++,
21208
21217
  mandatory: {
21209
21218
  "val": basic_1.CLikeType.get(),
21210
21219
  },
21211
21220
  return: new basic_1.CharacterType(1),
21212
21221
  version: version_1.Version.v740sp08,
21213
21222
  },
21214
- {
21215
- name: "XSTRLEN",
21223
+ "XSTRLEN": {
21224
+ counter: BuiltIn.counter++,
21216
21225
  mandatory: {
21217
21226
  "val": new basic_1.XSequenceType(),
21218
21227
  },
21219
21228
  return: basic_1.IntegerType.get(),
21220
21229
  },
21221
- ];
21230
+ };
21222
21231
  //# sourceMappingURL=_builtin.js.map
21223
21232
 
21224
21233
  /***/ }),
@@ -21239,7 +21248,6 @@ const position_1 = __webpack_require__(/*! ../../position */ "./node_modules/@ab
21239
21248
  const spaghetti_scope_1 = __webpack_require__(/*! ./spaghetti_scope */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/spaghetti_scope.js");
21240
21249
  const _identifier_1 = __webpack_require__(/*! ../4_file_information/_identifier */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/_identifier.js");
21241
21250
  const _scope_type_1 = __webpack_require__(/*! ./_scope_type */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js");
21242
- const _reference_1 = __webpack_require__(/*! ./_reference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js");
21243
21251
  const syntax_1 = __webpack_require__(/*! ./syntax */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js");
21244
21252
  class CurrentScope {
21245
21253
  static buildDefault(reg, obj) {
@@ -21331,8 +21339,14 @@ class CurrentScope {
21331
21339
  this.current.getData().forms.push(...f);
21332
21340
  }
21333
21341
  addInterfaceDefinition(i) {
21334
- var _a;
21335
- (_a = this.current) === null || _a === void 0 ? void 0 : _a.getData().idefs.push(i);
21342
+ if (this.current === undefined) {
21343
+ return;
21344
+ }
21345
+ const name = i.getName().toUpperCase();
21346
+ if (this.current.getData().cdefs[name] !== undefined) {
21347
+ throw new Error(`Interface "${name}" already defined`);
21348
+ }
21349
+ this.current.getData().idefs[name] = i;
21336
21350
  }
21337
21351
  addNamedIdentifier(name, identifier) {
21338
21352
  if (this.current === undefined) {
@@ -21427,11 +21441,10 @@ class CurrentScope {
21427
21441
  }
21428
21442
  return false;
21429
21443
  }
21430
- // todo, found + type can be removed from method output?
21431
21444
  existsObject(name) {
21432
21445
  var _a, _b, _c;
21433
21446
  if (name === undefined) {
21434
- return { found: false };
21447
+ return undefined;
21435
21448
  }
21436
21449
  let prefixRTTI = "";
21437
21450
  if (this.parentObj.getType() === "PROG") {
@@ -21445,28 +21458,28 @@ class CurrentScope {
21445
21458
  if (findLocalClass.isGlobal() === true) {
21446
21459
  prefixRTTI = "";
21447
21460
  }
21448
- return { found: true, id: findLocalClass, type: _reference_1.ReferenceType.ObjectOrientedReference, ooType: "CLAS", RTTIName: prefixRTTI + "\\CLASS=" + findLocalClass.getName() };
21461
+ return { id: findLocalClass, ooType: "CLAS", RTTIName: prefixRTTI + "\\CLASS=" + findLocalClass.getName() };
21449
21462
  }
21450
21463
  const globalClas = this.reg.getObject("CLAS", name);
21451
21464
  if (globalClas) {
21452
- return { found: true, id: globalClas.getIdentifier(), type: _reference_1.ReferenceType.ObjectOrientedReference, ooType: "CLAS", RTTIName: "\\CLASS=" + globalClas.getName() };
21465
+ return { id: globalClas.getIdentifier(), ooType: "CLAS", RTTIName: "\\CLASS=" + globalClas.getName() };
21453
21466
  }
21454
21467
  const findLocalInterface = (_b = this.current) === null || _b === void 0 ? void 0 : _b.findInterfaceDefinition(name);
21455
21468
  if (findLocalInterface) {
21456
21469
  if (findLocalInterface.isGlobal() === true) {
21457
21470
  prefixRTTI = "";
21458
21471
  }
21459
- return { found: true, id: findLocalInterface, type: _reference_1.ReferenceType.ObjectOrientedReference, ooType: "INTF", RTTIName: prefixRTTI + "\\INTERFACE=" + findLocalInterface.getName() };
21472
+ return { id: findLocalInterface, ooType: "INTF", RTTIName: prefixRTTI + "\\INTERFACE=" + findLocalInterface.getName() };
21460
21473
  }
21461
21474
  const globalIntf = this.reg.getObject("INTF", name);
21462
21475
  if (globalIntf) {
21463
- return { found: true, id: globalIntf.getIdentifier(), type: _reference_1.ReferenceType.ObjectOrientedReference, ooType: "INTF", RTTIName: "\\INTERFACE=" + globalIntf.getName() };
21476
+ return { id: globalIntf.getIdentifier(), ooType: "INTF", RTTIName: "\\INTERFACE=" + globalIntf.getName() };
21464
21477
  }
21465
21478
  const def = (_c = this.current) === null || _c === void 0 ? void 0 : _c.findDeferred(name);
21466
21479
  if (def !== undefined) {
21467
- return { found: true, id: def };
21480
+ return { id: def };
21468
21481
  }
21469
- return { found: false };
21482
+ return undefined;
21470
21483
  }
21471
21484
  ///////////////////////////
21472
21485
  /** Lookup class in local and global scope */
@@ -23509,7 +23522,7 @@ class BasicTypes {
23509
23522
  else if (firstNode.get() instanceof Expressions.ClassName) {
23510
23523
  const obj = this.scope.findObjectDefinition(firstName);
23511
23524
  if (obj === undefined) {
23512
- if (this.scope.existsObject(firstName).found === true) {
23525
+ if (this.scope.existsObject(firstName) !== undefined) {
23513
23526
  return undefined;
23514
23527
  }
23515
23528
  else if (this.scope.getDDIC().inErrorNamespace(firstName) === true) {
@@ -23556,7 +23569,7 @@ class BasicTypes {
23556
23569
  return new Types.GenericObjectReferenceType();
23557
23570
  }
23558
23571
  const search = this.scope.existsObject(name);
23559
- if (search.found === true && search.id) {
23572
+ if (search === null || search === void 0 ? void 0 : search.id) {
23560
23573
  this.scope.addReference(chain.getFirstToken(), search.id, _reference_1.ReferenceType.ObjectOrientedReference, this.filename, { ooType: search.ooType, ooName: name });
23561
23574
  return new Types.ObjectReferenceType(search.id, { qualifiedName: name, RTTIName: search.RTTIName });
23562
23575
  }
@@ -24732,8 +24745,8 @@ class FieldChain {
24732
24745
  return new basic_1.GenericObjectReferenceType();
24733
24746
  }
24734
24747
  const found = scope.existsObject(classNam);
24735
- if (found.found === true && found.id) {
24736
- scope.addReference(classTok, found.id, found.type, filename);
24748
+ if (found === null || found === void 0 ? void 0 : found.id) {
24749
+ scope.addReference(classTok, found.id, _reference_1.ReferenceType.ObjectOrientedReference, filename);
24737
24750
  return new basic_1.ObjectReferenceType(found.id);
24738
24751
  }
24739
24752
  else if (scope.getDDIC().inErrorNamespace(classNam) === false) {
@@ -25545,8 +25558,13 @@ class MethodCallParam {
25545
25558
  else if (child instanceof nodes_1.ExpressionNode
25546
25559
  && (child.get() instanceof Expressions.Source
25547
25560
  || child.get() instanceof Expressions.ConstantString)) {
25548
- if (!(method instanceof basic_1.VoidType) && method.getParameters().getImporting().length === 0) {
25549
- throw new Error("Method \"" + method.getName() + "\" has no importing parameters");
25561
+ if (!(method instanceof basic_1.VoidType)) {
25562
+ if (method.getParameters().getImporting().length === 0) {
25563
+ throw new Error("Method \"" + method.getName() + "\" has no importing parameters");
25564
+ }
25565
+ else if (method.getParameters().getRequiredParameters().length > 1) {
25566
+ throw new Error("Method \"" + method.getName() + "\" has more than one importing or changing parameter");
25567
+ }
25550
25568
  }
25551
25569
  let targetType = undefined;
25552
25570
  if (!(method instanceof basic_1.VoidType)) {
@@ -27281,6 +27299,7 @@ const field_offset_1 = __webpack_require__(/*! ./field_offset */ "./node_modules
27281
27299
  const _reference_1 = __webpack_require__(/*! ../_reference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js");
27282
27300
  const table_expression_1 = __webpack_require__(/*! ./table_expression */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/table_expression.js");
27283
27301
  const expressions_1 = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
27302
+ const field_length_1 = __webpack_require__(/*! ./field_length */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/field_length.js");
27284
27303
  class Target {
27285
27304
  runSyntax(node, scope, filename) {
27286
27305
  const concat = node.concatTokens();
@@ -27363,8 +27382,18 @@ class Target {
27363
27382
  }
27364
27383
  const offset = node.findDirectExpression(Expressions.FieldOffset);
27365
27384
  if (offset) {
27385
+ if (context instanceof basic_1.XStringType || context instanceof basic_1.StringType) {
27386
+ throw new Error("xstring/string offset/length in writer position not possible");
27387
+ }
27366
27388
  new field_offset_1.FieldOffset().runSyntax(offset, scope, filename);
27367
27389
  }
27390
+ const length = node.findDirectExpression(Expressions.FieldLength);
27391
+ if (length) {
27392
+ if (context instanceof basic_1.XStringType || context instanceof basic_1.StringType) {
27393
+ throw new Error("xstring/string offset/length in writer position not possible");
27394
+ }
27395
+ new field_length_1.FieldLength().runSyntax(length, scope, filename);
27396
+ }
27368
27397
  return context;
27369
27398
  }
27370
27399
  /////////////////////////////////
@@ -27750,7 +27779,7 @@ class ScopeData {
27750
27779
  this.data = {
27751
27780
  vars: {},
27752
27781
  cdefs: {},
27753
- idefs: [], // todo, refactor to object
27782
+ idefs: {},
27754
27783
  forms: [], // todo, refactor to object
27755
27784
  types: {},
27756
27785
  extraLikeTypes: {},
@@ -27852,26 +27881,13 @@ class SpaghettiScopeNode extends ScopeData {
27852
27881
  }
27853
27882
  return undefined;
27854
27883
  }
27855
- // todo, can be deleted, not called from anywhere?
27856
- listFormDefinitions() {
27857
- let search = this;
27858
- const ret = [];
27859
- while (search !== undefined) {
27860
- for (const form of search.getData().forms) {
27861
- ret.push(form);
27862
- }
27863
- search = search.getParent();
27864
- }
27865
- return ret;
27866
- }
27867
- // todo, optimize
27868
27884
  findInterfaceDefinition(name) {
27869
27885
  let search = this;
27886
+ const upper = name.toUpperCase();
27870
27887
  while (search !== undefined) {
27871
- for (const idef of search.getData().idefs) {
27872
- if (idef.getName().toUpperCase() === name.toUpperCase()) {
27873
- return idef;
27874
- }
27888
+ const idef = search.getData().idefs[upper];
27889
+ if (idef) {
27890
+ return idef;
27875
27891
  }
27876
27892
  search = search.getParent();
27877
27893
  }
@@ -27881,9 +27897,9 @@ class SpaghettiScopeNode extends ScopeData {
27881
27897
  let search = this;
27882
27898
  const upper = name.toUpperCase();
27883
27899
  while (search !== undefined) {
27884
- const data = search.getData();
27885
- if (data.types[upper]) {
27886
- return data.types[upper];
27900
+ const found = search.getData().types[upper];
27901
+ if (found) {
27902
+ return found;
27887
27903
  }
27888
27904
  search = search.getParent();
27889
27905
  }
@@ -28589,8 +28605,8 @@ class Catch {
28589
28605
  const token = c.getFirstToken();
28590
28606
  const className = token.getStr().toUpperCase();
28591
28607
  const found = scope.existsObject(className);
28592
- if (found.found === true && found.id) {
28593
- scope.addReference(token, found.id, found.type, filename);
28608
+ if (found === null || found === void 0 ? void 0 : found.id) {
28609
+ scope.addReference(token, found.id, _reference_1.ReferenceType.ObjectOrientedReference, filename);
28594
28610
  }
28595
28611
  else if (scope.getDDIC().inErrorNamespace(className) === false) {
28596
28612
  const extra = { ooName: className, ooType: "Void" };
@@ -28609,7 +28625,7 @@ class Catch {
28609
28625
  if (target === null || target === void 0 ? void 0 : target.findDirectExpression(Expressions.InlineData)) {
28610
28626
  const token = (_b = target.findFirstExpression(Expressions.TargetField)) === null || _b === void 0 ? void 0 : _b.getFirstToken();
28611
28627
  const found = scope.existsObject(firstClassName);
28612
- if (token && found.found === true && firstClassName && found.id) {
28628
+ if (token && firstClassName && (found === null || found === void 0 ? void 0 : found.id)) {
28613
28629
  const identifier = new _typed_identifier_1.TypedIdentifier(token, filename, new basic_1.ObjectReferenceType(found.id), ["inline" /* IdentifierMeta.InlineDefinition */]);
28614
28630
  scope.addIdentifier(identifier);
28615
28631
  scope.addReference(token, identifier, _reference_1.ReferenceType.DataWriteReference, filename);
@@ -28812,7 +28828,7 @@ class ClassLocalFriends {
28812
28828
  const className = classNames[i].concatTokens();
28813
28829
  // make sure to check also DEFINITION DEFERRED
28814
28830
  const found = scope.existsObject(className);
28815
- if (found.found === false) {
28831
+ if (found === undefined) {
28816
28832
  throw new Error(`Class ${className.toUpperCase()} not found`);
28817
28833
  }
28818
28834
  }
@@ -31242,8 +31258,8 @@ class Raise {
31242
31258
  const className = classTok === null || classTok === void 0 ? void 0 : classTok.getStr();
31243
31259
  if (className) {
31244
31260
  const found = scope.existsObject(className);
31245
- if (found.found === true && found.id) {
31246
- scope.addReference(classTok, found.id, found.type, filename);
31261
+ if (found === null || found === void 0 ? void 0 : found.id) {
31262
+ scope.addReference(classTok, found.id, _reference_1.ReferenceType.ObjectOrientedReference, filename);
31247
31263
  const def = scope.findObjectDefinition(className);
31248
31264
  method = (_b = helper.searchMethodName(def, "CONSTRUCTOR")) === null || _b === void 0 ? void 0 : _b.method;
31249
31265
  }
@@ -34078,13 +34094,13 @@ class FlowGraph {
34078
34094
  this.label = label;
34079
34095
  }
34080
34096
  toDigraph() {
34081
- return `digraph G {
34082
- labelloc="t";
34083
- label="${this.label}";
34084
- graph [fontname = "helvetica"];
34085
- node [fontname = "helvetica", shape="box"];
34086
- edge [fontname = "helvetica"];
34087
- ${this.toTextEdges()}
34097
+ return `digraph G {
34098
+ labelloc="t";
34099
+ label="${this.label}";
34100
+ graph [fontname = "helvetica"];
34101
+ node [fontname = "helvetica", shape="box"];
34102
+ edge [fontname = "helvetica"];
34103
+ ${this.toTextEdges()}
34088
34104
  }`;
34089
34105
  }
34090
34106
  listSources(node) {
@@ -36792,8 +36808,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
36792
36808
  exports.VoidType = void 0;
36793
36809
  const _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js");
36794
36810
  class VoidType extends _abstract_type_1.AbstractType {
36795
- constructor(voided, name) {
36796
- super({ qualifiedName: name });
36811
+ constructor(voided, qualifiedName) {
36812
+ super({ qualifiedName: qualifiedName });
36797
36813
  this.voided = voided;
36798
36814
  }
36799
36815
  getVoided() {
@@ -42088,13 +42104,13 @@ class Help {
42088
42104
  /////////////////////////////////////////////////
42089
42105
  static dumpABAP(file, reg, textDocument, position) {
42090
42106
  let content = "";
42091
- content = `
42092
- <a href="#_tokens" rel="no-refresh">Tokens</a> |
42093
- <a href="#_statements" rel="no-refresh">Statements</a> |
42094
- <a href="#_structure" rel="no-refresh">Structure</a> |
42095
- <a href="#_files" rel="no-refresh">Files</a> |
42096
- <a href="#_info" rel="no-refresh">Info Dump</a>
42097
- <hr>
42107
+ content = `
42108
+ <a href="#_tokens" rel="no-refresh">Tokens</a> |
42109
+ <a href="#_statements" rel="no-refresh">Statements</a> |
42110
+ <a href="#_structure" rel="no-refresh">Structure</a> |
42111
+ <a href="#_files" rel="no-refresh">Files</a> |
42112
+ <a href="#_info" rel="no-refresh">Info Dump</a>
42113
+ <hr>
42098
42114
  ` +
42099
42115
  "<tt>" + textDocument.uri + " (" +
42100
42116
  (position.line + 1) + ", " +
@@ -47303,7 +47319,7 @@ class NeptuneAPI extends _abstract_object_1.AbstractObject {
47303
47319
  }
47304
47320
  getAllowedNaming() {
47305
47321
  return {
47306
- maxLength: 30,
47322
+ maxLength: 100,
47307
47323
  allowNamespace: true,
47308
47324
  };
47309
47325
  }
@@ -51080,7 +51096,7 @@ class Registry {
51080
51096
  }
51081
51097
  static abaplintVersion() {
51082
51098
  // magic, see build script "version.sh"
51083
- return "2.105.4";
51099
+ return "2.105.5";
51084
51100
  }
51085
51101
  getDDICReferences() {
51086
51102
  return this.ddicReferences;
@@ -51396,10 +51412,10 @@ class SevenBitAscii {
51396
51412
  key: "7bit_ascii",
51397
51413
  title: "Check for 7bit ascii",
51398
51414
  shortDescription: `Only allow characters from the 7bit ASCII set.`,
51399
- extendedInformation: `https://docs.abapopenchecks.org/checks/05/
51400
-
51401
- https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
51402
-
51415
+ extendedInformation: `https://docs.abapopenchecks.org/checks/05/
51416
+
51417
+ https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
51418
+
51403
51419
  Checkes files with extensions ".abap" and ".asddls"`,
51404
51420
  tags: [_irule_1.RuleTag.SingleFile],
51405
51421
  };
@@ -51601,10 +51617,10 @@ class Abapdoc extends _abap_rule_1.ABAPRule {
51601
51617
  key: "abapdoc",
51602
51618
  title: "Check abapdoc",
51603
51619
  shortDescription: `Various checks regarding abapdoc.`,
51604
- extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
51605
-
51606
- Plus class and interface definitions.
51607
-
51620
+ extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
51621
+
51622
+ Plus class and interface definitions.
51623
+
51608
51624
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#abap-doc-only-for-public-apis`,
51609
51625
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
51610
51626
  };
@@ -51739,49 +51755,49 @@ class AlignParameters extends _abap_rule_1.ABAPRule {
51739
51755
  key: "align_parameters",
51740
51756
  title: "Align Parameters",
51741
51757
  shortDescription: `Checks for vertially aligned parameters`,
51742
- extendedInformation: `Checks:
51743
- * function module calls
51744
- * method calls
51745
- * VALUE constructors
51746
- * NEW constructors
51747
- * RAISE EXCEPTION statements
51748
- * CREATE OBJECT statements
51749
- * RAISE EVENT statements
51750
-
51751
- https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
51752
-
51753
- Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
51754
-
51755
- If parameters are on the same row, no issues are reported, see
51758
+ extendedInformation: `Checks:
51759
+ * function module calls
51760
+ * method calls
51761
+ * VALUE constructors
51762
+ * NEW constructors
51763
+ * RAISE EXCEPTION statements
51764
+ * CREATE OBJECT statements
51765
+ * RAISE EVENT statements
51766
+
51767
+ https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
51768
+
51769
+ Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
51770
+
51771
+ If parameters are on the same row, no issues are reported, see
51756
51772
  https://rules.abaplint.org/max_one_method_parameter_per_line/ for splitting parameters to lines`,
51757
51773
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
51758
- badExample: `CALL FUNCTION 'FOOBAR'
51759
- EXPORTING
51760
- foo = 2
51761
- parameter = 3.
51762
-
51763
- foobar( moo = 1
51764
- param = 1 ).
51765
-
51766
- foo = VALUE #(
51767
- foo = bar
51774
+ badExample: `CALL FUNCTION 'FOOBAR'
51775
+ EXPORTING
51776
+ foo = 2
51777
+ parameter = 3.
51778
+
51779
+ foobar( moo = 1
51780
+ param = 1 ).
51781
+
51782
+ foo = VALUE #(
51783
+ foo = bar
51768
51784
  moo = 2 ).`,
51769
- goodExample: `CALL FUNCTION 'FOOBAR'
51770
- EXPORTING
51771
- foo = 2
51772
- parameter = 3.
51773
-
51774
- foobar( moo = 1
51775
- param = 1 ).
51776
-
51777
- foo = VALUE #(
51778
- foo = bar
51779
- moo = 2 ).
51780
-
51781
- DATA(sdf) = VALUE type(
51782
- common_val = 2
51783
- another_common = 5
51784
- ( row_value = 4
51785
+ goodExample: `CALL FUNCTION 'FOOBAR'
51786
+ EXPORTING
51787
+ foo = 2
51788
+ parameter = 3.
51789
+
51790
+ foobar( moo = 1
51791
+ param = 1 ).
51792
+
51793
+ foo = VALUE #(
51794
+ foo = bar
51795
+ moo = 2 ).
51796
+
51797
+ DATA(sdf) = VALUE type(
51798
+ common_val = 2
51799
+ another_common = 5
51800
+ ( row_value = 4
51785
51801
  value_foo = 5 ) ).`,
51786
51802
  };
51787
51803
  }
@@ -52256,15 +52272,15 @@ class AmbiguousStatement extends _abap_rule_1.ABAPRule {
52256
52272
  return {
52257
52273
  key: "ambiguous_statement",
52258
52274
  title: "Check for ambigious statements",
52259
- shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
52260
- Add "TABLE" keyword or "@" for escaping SQL variables
52261
-
52275
+ shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
52276
+ Add "TABLE" keyword or "@" for escaping SQL variables
52277
+
52262
52278
  Only works if the target version is 740sp05 or above`,
52263
52279
  tags: [_irule_1.RuleTag.SingleFile],
52264
- badExample: `DELETE foo FROM bar.
52280
+ badExample: `DELETE foo FROM bar.
52265
52281
  MODIFY foo FROM bar.`,
52266
- goodExample: `DELETE foo FROM @bar.
52267
- MODIFY TABLE foo FROM bar.
52282
+ goodExample: `DELETE foo FROM @bar.
52283
+ MODIFY TABLE foo FROM bar.
52268
52284
  MODIFY zfoo FROM @wa.`,
52269
52285
  };
52270
52286
  }
@@ -52368,16 +52384,16 @@ class AvoidUse extends _abap_rule_1.ABAPRule {
52368
52384
  key: "avoid_use",
52369
52385
  title: "Avoid use of certain statements",
52370
52386
  shortDescription: `Detects usage of certain statements.`,
52371
- extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
52372
-
52373
- Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
52374
-
52375
- STATICS: use CLASS-DATA instead
52376
-
52377
- DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
52378
-
52379
- TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
52380
-
52387
+ extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
52388
+
52389
+ Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
52390
+
52391
+ STATICS: use CLASS-DATA instead
52392
+
52393
+ DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
52394
+
52395
+ TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
52396
+
52381
52397
  BREAK points`,
52382
52398
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
52383
52399
  };
@@ -52498,11 +52514,11 @@ class BeginEndNames extends _abap_rule_1.ABAPRule {
52498
52514
  title: "Check BEGIN END names",
52499
52515
  shortDescription: `Check BEGIN OF and END OF names match, plus there must be statements between BEGIN and END`,
52500
52516
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
52501
- badExample: `DATA: BEGIN OF stru,
52502
- field TYPE i,
52517
+ badExample: `DATA: BEGIN OF stru,
52518
+ field TYPE i,
52503
52519
  END OF structure_not_the_same.`,
52504
- goodExample: `DATA: BEGIN OF stru,
52505
- field TYPE i,
52520
+ goodExample: `DATA: BEGIN OF stru,
52521
+ field TYPE i,
52506
52522
  END OF stru.`,
52507
52523
  };
52508
52524
  }
@@ -52595,19 +52611,19 @@ class BeginSingleInclude extends _abap_rule_1.ABAPRule {
52595
52611
  title: "BEGIN contains single INCLUDE",
52596
52612
  shortDescription: `Finds TYPE BEGIN with just one INCLUDE TYPE, and DATA with single INCLUDE STRUCTURE`,
52597
52613
  tags: [_irule_1.RuleTag.SingleFile],
52598
- badExample: `TYPES: BEGIN OF dummy1.
52599
- INCLUDE TYPE dselc.
52600
- TYPES: END OF dummy1.
52601
-
52602
- DATA BEGIN OF foo.
52603
- INCLUDE STRUCTURE syst.
52604
- DATA END OF foo.
52605
-
52606
- STATICS BEGIN OF bar.
52607
- INCLUDE STRUCTURE syst.
52614
+ badExample: `TYPES: BEGIN OF dummy1.
52615
+ INCLUDE TYPE dselc.
52616
+ TYPES: END OF dummy1.
52617
+
52618
+ DATA BEGIN OF foo.
52619
+ INCLUDE STRUCTURE syst.
52620
+ DATA END OF foo.
52621
+
52622
+ STATICS BEGIN OF bar.
52623
+ INCLUDE STRUCTURE syst.
52608
52624
  STATICS END OF bar.`,
52609
- goodExample: `DATA BEGIN OF foo.
52610
- INCLUDE STRUCTURE dselc.
52625
+ goodExample: `DATA BEGIN OF foo.
52626
+ INCLUDE STRUCTURE dselc.
52611
52627
  DATA END OF foo.`,
52612
52628
  };
52613
52629
  }
@@ -52697,9 +52713,9 @@ class CallTransactionAuthorityCheck extends _abap_rule_1.ABAPRule {
52697
52713
  extendedInformation: `https://docs.abapopenchecks.org/checks/54/`,
52698
52714
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
52699
52715
  badExample: `CALL TRANSACTION 'FOO'.`,
52700
- goodExample: `TRY.
52701
- CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
52702
- CATCH cx_sy_authorization_error.
52716
+ goodExample: `TRY.
52717
+ CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
52718
+ CATCH cx_sy_authorization_error.
52703
52719
  ENDTRY.`,
52704
52720
  };
52705
52721
  }
@@ -52764,10 +52780,10 @@ class CDSCommentStyle {
52764
52780
  key: "cds_comment_style",
52765
52781
  title: "CDS Comment Style",
52766
52782
  shortDescription: `Check for obsolete comment style`,
52767
- extendedInformation: `Check for obsolete comment style
52768
-
52769
- Comments starting with "--" are considered obsolete
52770
-
52783
+ extendedInformation: `Check for obsolete comment style
52784
+
52785
+ Comments starting with "--" are considered obsolete
52786
+
52771
52787
  https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abencds_general_syntax_rules.htm`,
52772
52788
  tags: [_irule_1.RuleTag.SingleFile],
52773
52789
  badExample: "-- this is a comment",
@@ -52834,10 +52850,10 @@ class CDSLegacyView {
52834
52850
  title: "CDS Legacy View",
52835
52851
  shortDescription: `Identify CDS Legacy Views`,
52836
52852
  // eslint-disable-next-line max-len
52837
- extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
52838
-
52839
- https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
52840
-
52853
+ extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
52854
+
52855
+ https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
52856
+
52841
52857
  v755 and up`,
52842
52858
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Upport],
52843
52859
  };
@@ -52992,10 +53008,10 @@ class ChainMainlyDeclarations extends _abap_rule_1.ABAPRule {
52992
53008
  key: "chain_mainly_declarations",
52993
53009
  title: "Chain mainly declarations",
52994
53010
  shortDescription: `Chain mainly declarations, allows chaining for the configured statements, reports errors for other statements.`,
52995
- extendedInformation: `
52996
- https://docs.abapopenchecks.org/checks/23/
52997
-
52998
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
53011
+ extendedInformation: `
53012
+ https://docs.abapopenchecks.org/checks/23/
53013
+
53014
+ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
52999
53015
  `,
53000
53016
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
53001
53017
  badExample: `CALL METHOD: bar.`,
@@ -53171,17 +53187,17 @@ class ChangeIfToCase extends _abap_rule_1.ABAPRule {
53171
53187
  title: "Change IF to CASE",
53172
53188
  shortDescription: `Finds IF constructs that can be changed to CASE`,
53173
53189
  // eslint-disable-next-line max-len
53174
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
53175
-
53190
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
53191
+
53176
53192
  If the first comparison is a boolean compare, no issue is reported.`,
53177
53193
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
53178
- badExample: `IF l_fcat-fieldname EQ 'FOO'.
53179
- ELSEIF l_fcat-fieldname = 'BAR'
53180
- OR l_fcat-fieldname = 'MOO'.
53194
+ badExample: `IF l_fcat-fieldname EQ 'FOO'.
53195
+ ELSEIF l_fcat-fieldname = 'BAR'
53196
+ OR l_fcat-fieldname = 'MOO'.
53181
53197
  ENDIF.`,
53182
- goodExample: `CASE l_fcat-fieldname.
53183
- WHEN 'FOO'.
53184
- WHEN 'BAR' OR 'MOO'.
53198
+ goodExample: `CASE l_fcat-fieldname.
53199
+ WHEN 'FOO'.
53200
+ WHEN 'BAR' OR 'MOO'.
53185
53201
  ENDCASE.`,
53186
53202
  };
53187
53203
  }
@@ -53318,8 +53334,8 @@ class CheckAbstract extends _abap_rule_1.ABAPRule {
53318
53334
  return {
53319
53335
  key: "check_abstract",
53320
53336
  title: "Check abstract methods and classes",
53321
- shortDescription: `Checks abstract methods and classes:
53322
- - class defined as abstract and final,
53337
+ shortDescription: `Checks abstract methods and classes:
53338
+ - class defined as abstract and final,
53323
53339
  - non-abstract class contains abstract methods`,
53324
53340
  extendedInformation: `If a class defines only constants, use an interface instead`,
53325
53341
  tags: [_irule_1.RuleTag.SingleFile],
@@ -53400,11 +53416,11 @@ class CheckComments extends _abap_rule_1.ABAPRule {
53400
53416
  return {
53401
53417
  key: "check_comments",
53402
53418
  title: "Check Comments",
53403
- shortDescription: `
53419
+ shortDescription: `
53404
53420
  Various checks for comment usage.`,
53405
- extendedInformation: `
53406
- Detects end of line comments. Comments starting with "#EC" or "##" are ignored
53407
-
53421
+ extendedInformation: `
53422
+ Detects end of line comments. Comments starting with "#EC" or "##" are ignored
53423
+
53408
53424
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#put-comments-before-the-statement-they-relate-to`,
53409
53425
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
53410
53426
  badExample: `WRITE 2. " descriptive comment`,
@@ -53566,9 +53582,9 @@ class CheckInclude {
53566
53582
  key: "check_include",
53567
53583
  title: "Check INCLUDEs",
53568
53584
  shortDescription: `Checks INCLUDE statements`,
53569
- extendedInformation: `
53570
- * Reports unused includes
53571
- * Errors if the includes are not found
53585
+ extendedInformation: `
53586
+ * Reports unused includes
53587
+ * Errors if the includes are not found
53572
53588
  * Error if including a main program`,
53573
53589
  tags: [_irule_1.RuleTag.Syntax],
53574
53590
  };
@@ -53643,14 +53659,14 @@ class CheckSubrc extends _abap_rule_1.ABAPRule {
53643
53659
  key: "check_subrc",
53644
53660
  title: "Check sy-subrc",
53645
53661
  shortDescription: `Check sy-subrc`,
53646
- extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
53647
-
53648
- If sy-dbcnt is checked after database statements, it is considered okay.
53649
-
53650
- "SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
53651
-
53652
- If IS ASSIGNED is checked after assigning, it is considered okay.
53653
-
53662
+ extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
53663
+
53664
+ If sy-dbcnt is checked after database statements, it is considered okay.
53665
+
53666
+ "SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
53667
+
53668
+ If IS ASSIGNED is checked after assigning, it is considered okay.
53669
+
53654
53670
  FIND statement with MATCH COUNT is considered okay if subrc is not checked`,
53655
53671
  tags: [_irule_1.RuleTag.SingleFile],
53656
53672
  pseudoComment: "EC CI_SUBRC",
@@ -54203,17 +54219,17 @@ class ClassicExceptionsOverlap extends _abap_rule_1.ABAPRule {
54203
54219
  shortDescription: `Find overlapping classic exceptions`,
54204
54220
  extendedInformation: `When debugging its typically good to know exactly which exception is caught`,
54205
54221
  tags: [_irule_1.RuleTag.SingleFile],
54206
- badExample: `CALL FUNCTION 'SOMETHING'
54207
- EXCEPTIONS
54208
- system_failure = 1 MESSAGE lv_message
54209
- communication_failure = 1 MESSAGE lv_message
54210
- resource_failure = 1
54222
+ badExample: `CALL FUNCTION 'SOMETHING'
54223
+ EXCEPTIONS
54224
+ system_failure = 1 MESSAGE lv_message
54225
+ communication_failure = 1 MESSAGE lv_message
54226
+ resource_failure = 1
54211
54227
  OTHERS = 1.`,
54212
- goodExample: `CALL FUNCTION 'SOMETHING'
54213
- EXCEPTIONS
54214
- system_failure = 1 MESSAGE lv_message
54215
- communication_failure = 2 MESSAGE lv_message
54216
- resource_failure = 3
54228
+ goodExample: `CALL FUNCTION 'SOMETHING'
54229
+ EXCEPTIONS
54230
+ system_failure = 1 MESSAGE lv_message
54231
+ communication_failure = 2 MESSAGE lv_message
54232
+ resource_failure = 3
54217
54233
  OTHERS = 4.`,
54218
54234
  };
54219
54235
  }
@@ -54459,7 +54475,7 @@ class CommentedCode extends _abap_rule_1.ABAPRule {
54459
54475
  key: "commented_code",
54460
54476
  title: "Find commented code",
54461
54477
  shortDescription: `Detects usage of commented out code.`,
54462
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it
54478
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it
54463
54479
  https://docs.abapopenchecks.org/checks/14/`,
54464
54480
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
54465
54481
  };
@@ -54691,10 +54707,10 @@ class ConstructorVisibilityPublic {
54691
54707
  key: "constructor_visibility_public",
54692
54708
  title: "Check constructor visibility is public",
54693
54709
  shortDescription: `Constructor must be placed in the public section, even if the class is not CREATE PUBLIC.`,
54694
- extendedInformation: `
54695
- This only applies to global classes.
54696
-
54697
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
54710
+ extendedInformation: `
54711
+ This only applies to global classes.
54712
+
54713
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
54698
54714
  https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abeninstance_constructor_guidl.htm`,
54699
54715
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
54700
54716
  };
@@ -54769,8 +54785,8 @@ class ContainsTab extends _abap_rule_1.ABAPRule {
54769
54785
  key: "contains_tab",
54770
54786
  title: "Code contains tab",
54771
54787
  shortDescription: `Checks for usage of tabs (enable to enforce spaces)`,
54772
- extendedInformation: `
54773
- https://docs.abapopenchecks.org/checks/09/
54788
+ extendedInformation: `
54789
+ https://docs.abapopenchecks.org/checks/09/
54774
54790
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
54775
54791
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
54776
54792
  };
@@ -54855,10 +54871,10 @@ class CyclicOO {
54855
54871
  key: "cyclic_oo",
54856
54872
  title: "Cyclic OO",
54857
54873
  shortDescription: `Finds cyclic OO references`,
54858
- extendedInformation: `Runs for global INTF + CLAS objects
54859
-
54860
- Objects must be without syntax errors for this rule to take effect
54861
-
54874
+ extendedInformation: `Runs for global INTF + CLAS objects
54875
+
54876
+ Objects must be without syntax errors for this rule to take effect
54877
+
54862
54878
  References in testclass includes are ignored`,
54863
54879
  };
54864
54880
  }
@@ -55100,7 +55116,7 @@ class DangerousStatement extends _abap_rule_1.ABAPRule {
55100
55116
  key: "dangerous_statement",
55101
55117
  title: "Dangerous statement",
55102
55118
  shortDescription: `Detects potentially dangerous statements`,
55103
- extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
55119
+ extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
55104
55120
  dynamic SQL can potentially create SQL injection problems`,
55105
55121
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
55106
55122
  };
@@ -55304,13 +55320,13 @@ class DefinitionsTop extends _abap_rule_1.ABAPRule {
55304
55320
  shortDescription: `Checks that definitions are placed at the beginning of METHODs, FORMs and FUNCTIONs.`,
55305
55321
  extendedInformation: `https://docs.abapopenchecks.org/checks/17/`,
55306
55322
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
55307
- badExample: `FROM foo.
55308
- WRITE 'hello'.
55309
- DATA int TYPE i.
55323
+ badExample: `FROM foo.
55324
+ WRITE 'hello'.
55325
+ DATA int TYPE i.
55310
55326
  ENDFORM.`,
55311
- goodExample: `FROM foo.
55312
- DATA int TYPE i.
55313
- WRITE 'hello'.
55327
+ goodExample: `FROM foo.
55328
+ DATA int TYPE i.
55329
+ WRITE 'hello'.
55314
55330
  ENDFORM.`,
55315
55331
  };
55316
55332
  }
@@ -55846,39 +55862,39 @@ class Downport {
55846
55862
  key: "downport",
55847
55863
  title: "Downport statement",
55848
55864
  shortDescription: `Downport functionality`,
55849
- extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with
55850
- a higher level language version. If successful, various rules are applied to downport the statement.
55851
- Target downport version is always v702, thus rule is only enabled if target version is v702.
55852
-
55853
- Current rules:
55854
- * NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/
55855
- * DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/
55856
- * FIELD-SYMBOL() definitions are outlined
55857
- * CONV is outlined
55858
- * COND is outlined
55859
- * REDUCE is outlined
55860
- * SWITCH is outlined
55861
- * FILTER is outlined
55862
- * APPEND expression is outlined
55863
- * INSERT expression is outlined
55864
- * EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/
55865
- * CAST changed to ?=
55866
- * LOOP AT method_call( ) is outlined
55867
- * VALUE # with structure fields
55868
- * VALUE # with internal table lines
55869
- * Table Expressions are outlined
55870
- * SELECT INTO @DATA definitions are outlined
55871
- * Some occurrences of string template formatting option ALPHA changed to function module call
55872
- * SELECT/INSERT/MODIFY/DELETE/UPDATE "," in field list removed, "@" in source/targets removed
55873
- * PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods
55874
- * RAISE EXCEPTION ... MESSAGE
55875
- * Moving with +=, -=, /=, *=, &&= is expanded
55876
- * line_exists and line_index is downported to READ TABLE
55877
- * ENUMs, but does not nessesarily give the correct type and value
55878
- * MESSAGE with non simple source
55879
-
55880
- Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.
55881
-
55865
+ extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with
55866
+ a higher level language version. If successful, various rules are applied to downport the statement.
55867
+ Target downport version is always v702, thus rule is only enabled if target version is v702.
55868
+
55869
+ Current rules:
55870
+ * NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/
55871
+ * DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/
55872
+ * FIELD-SYMBOL() definitions are outlined
55873
+ * CONV is outlined
55874
+ * COND is outlined
55875
+ * REDUCE is outlined
55876
+ * SWITCH is outlined
55877
+ * FILTER is outlined
55878
+ * APPEND expression is outlined
55879
+ * INSERT expression is outlined
55880
+ * EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/
55881
+ * CAST changed to ?=
55882
+ * LOOP AT method_call( ) is outlined
55883
+ * VALUE # with structure fields
55884
+ * VALUE # with internal table lines
55885
+ * Table Expressions are outlined
55886
+ * SELECT INTO @DATA definitions are outlined
55887
+ * Some occurrences of string template formatting option ALPHA changed to function module call
55888
+ * SELECT/INSERT/MODIFY/DELETE/UPDATE "," in field list removed, "@" in source/targets removed
55889
+ * PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods
55890
+ * RAISE EXCEPTION ... MESSAGE
55891
+ * Moving with +=, -=, /=, *=, &&= is expanded
55892
+ * line_exists and line_index is downported to READ TABLE
55893
+ * ENUMs, but does not nessesarily give the correct type and value
55894
+ * MESSAGE with non simple source
55895
+
55896
+ Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.
55897
+
55882
55898
  Make sure to test the downported code, it might not always be completely correct.`,
55883
55899
  tags: [_irule_1.RuleTag.Downport, _irule_1.RuleTag.Quickfix],
55884
55900
  };
@@ -56452,10 +56468,10 @@ Make sure to test the downported code, it might not always be completely correct
56452
56468
  const fieldName = f.concatTokens();
56453
56469
  fieldDefinition += indentation + " " + fieldName + " TYPE " + tableName + "-" + fieldName + ",\n";
56454
56470
  }
56455
- fieldDefinition = `DATA: BEGIN OF ${name},
56471
+ fieldDefinition = `DATA: BEGIN OF ${name},
56456
56472
  ${fieldDefinition}${indentation} END OF ${name}.`;
56457
56473
  }
56458
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
56474
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
56459
56475
  ${indentation}`);
56460
56476
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
56461
56477
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -56499,12 +56515,12 @@ ${indentation}`);
56499
56515
  }
56500
56516
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
56501
56517
  const name = ((_c = inlineData.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || "error";
56502
- let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
56503
- ${fieldDefinitions}${indentation} END OF ${uniqueName}.
56504
- ${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.
56518
+ let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
56519
+ ${fieldDefinitions}${indentation} END OF ${uniqueName}.
56520
+ ${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.
56505
56521
  ${indentation}`);
56506
56522
  if (fieldDefinitions === "") {
56507
- fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.
56523
+ fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.
56508
56524
  ${indentation}`);
56509
56525
  }
56510
56526
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
@@ -56572,7 +56588,7 @@ ${indentation}`);
56572
56588
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
56573
56589
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
56574
56590
  const firstToken = high.getFirstToken();
56575
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
56591
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
56576
56592
  ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
56577
56593
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
56578
56594
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -56610,7 +56626,7 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
56610
56626
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
56611
56627
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
56612
56628
  const firstToken = high.getFirstToken();
56613
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
56629
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
56614
56630
  ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
56615
56631
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
56616
56632
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -56652,14 +56668,14 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
56652
56668
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
56653
56669
  const firstToken = high.getFirstToken();
56654
56670
  // note that the tabix restore should be done before throwing the exception
56655
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.
56656
- ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
56657
- ${indentation}${tabixBackup} = sy-tabix.
56658
- ${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.
56659
- ${indentation}sy-tabix = ${tabixBackup}.
56660
- ${indentation}IF sy-subrc <> 0.
56661
- ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
56662
- ${indentation}ENDIF.
56671
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.
56672
+ ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
56673
+ ${indentation}${tabixBackup} = sy-tabix.
56674
+ ${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.
56675
+ ${indentation}sy-tabix = ${tabixBackup}.
56676
+ ${indentation}IF sy-subrc <> 0.
56677
+ ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
56678
+ ${indentation}ENDIF.
56663
56679
  ${indentation}`);
56664
56680
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, startToken.getStart(), tableExpression.getLastToken().getEnd(), uniqueName);
56665
56681
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -56716,7 +56732,7 @@ ${indentation}`);
56716
56732
  const className = classNames[0].concatTokens();
56717
56733
  const targetName = (_b = target.findFirstExpression(Expressions.TargetField)) === null || _b === void 0 ? void 0 : _b.concatTokens();
56718
56734
  const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
56719
- const code = ` DATA ${targetName} TYPE REF TO ${className}.
56735
+ const code = ` DATA ${targetName} TYPE REF TO ${className}.
56720
56736
  ${indentation}CATCH ${className} INTO ${targetName}.`;
56721
56737
  const fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getStart(), node.getEnd(), code);
56722
56738
  return issue_1.Issue.atToken(lowFile, node.getFirstToken(), "Outline DATA", this.getMetadata().key, this.conf.severity, fix);
@@ -56878,16 +56894,16 @@ ${indentation}CATCH ${className} INTO ${targetName}.`;
56878
56894
  const uniqueName1 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
56879
56895
  const uniqueName2 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
56880
56896
  const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
56881
- let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
56882
- ${indentation}${uniqueName1}-msgid = ${id}.
56897
+ let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
56898
+ ${indentation}${uniqueName1}-msgid = ${id}.
56883
56899
  ${indentation}${uniqueName1}-msgno = ${number}.\n`;
56884
56900
  if (withs.length > 0) {
56885
- abap += `${indentation}${uniqueName1}-attr1 = 'IF_T100_DYN_MSG~MSGV1'.
56886
- ${indentation}${uniqueName1}-attr2 = 'IF_T100_DYN_MSG~MSGV2'.
56887
- ${indentation}${uniqueName1}-attr3 = 'IF_T100_DYN_MSG~MSGV3'.
56901
+ abap += `${indentation}${uniqueName1}-attr1 = 'IF_T100_DYN_MSG~MSGV1'.
56902
+ ${indentation}${uniqueName1}-attr2 = 'IF_T100_DYN_MSG~MSGV2'.
56903
+ ${indentation}${uniqueName1}-attr3 = 'IF_T100_DYN_MSG~MSGV3'.
56888
56904
  ${indentation}${uniqueName1}-attr4 = 'IF_T100_DYN_MSG~MSGV4'.\n`;
56889
56905
  }
56890
- abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
56906
+ abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
56891
56907
  ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`;
56892
56908
  if (withs.length > 0) {
56893
56909
  abap += `${indentation}${uniqueName2}->if_t100_dyn_msg~msgty = 'E'.\n`;
@@ -56999,10 +57015,10 @@ ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`
56999
57015
  let code = "";
57000
57016
  if (sourceRef.findFirstExpression(Expressions.TableExpression)) {
57001
57017
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
57002
- code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).
57003
- IF sy-subrc <> 0.
57004
- RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
57005
- ENDIF.
57018
+ code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).
57019
+ IF sy-subrc <> 0.
57020
+ RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
57021
+ ENDIF.
57006
57022
  GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
57007
57023
  }
57008
57024
  else {
@@ -57078,20 +57094,20 @@ GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
57078
57094
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
57079
57095
  const uniqueFS = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
57080
57096
  const uniqueNameIndex = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
57081
- code += ` items LIKE ${loopSourceName},
57082
- END OF ${groupTargetName}type.
57083
- DATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.
57084
- DATA ${uniqueName} LIKE LINE OF ${groupTargetName}tab.
57097
+ code += ` items LIKE ${loopSourceName},
57098
+ END OF ${groupTargetName}type.
57099
+ DATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.
57100
+ DATA ${uniqueName} LIKE LINE OF ${groupTargetName}tab.
57085
57101
  LOOP AT ${loopSourceName} ${(_l = high.findFirstExpression(Expressions.LoopTarget)) === null || _l === void 0 ? void 0 : _l.concatTokens()}.\n`;
57086
57102
  if (groupIndexName !== undefined) {
57087
57103
  code += `DATA(${uniqueNameIndex}) = sy-tabix.\n`;
57088
57104
  }
57089
- code += `READ TABLE ${groupTargetName}tab ASSIGNING FIELD-SYMBOL(<${uniqueFS}>) WITH KEY ${condition}.
57105
+ code += `READ TABLE ${groupTargetName}tab ASSIGNING FIELD-SYMBOL(<${uniqueFS}>) WITH KEY ${condition}.
57090
57106
  IF sy-subrc = 0.\n`;
57091
57107
  if (groupCountName !== undefined) {
57092
57108
  code += ` <${uniqueFS}>-${groupCountName} = <${uniqueFS}>-${groupCountName} + 1.\n`;
57093
57109
  }
57094
- code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
57110
+ code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
57095
57111
  ELSE.\n`;
57096
57112
  code += ` CLEAR ${uniqueName}.\n`;
57097
57113
  for (const c of group.findAllExpressions(Expressions.LoopGroupByComponent)) {
@@ -57112,8 +57128,8 @@ ELSE.\n`;
57112
57128
  }
57113
57129
  code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE ${uniqueName}-items.\n`;
57114
57130
  code += ` INSERT ${uniqueName} INTO TABLE ${groupTargetName}tab.\n`;
57115
- code += `ENDIF.
57116
- ENDLOOP.
57131
+ code += `ENDIF.
57132
+ ENDLOOP.
57117
57133
  LOOP AT ${groupTargetName}tab ${groupTarget}.`;
57118
57134
  let fix = edit_helper_1.EditHelper.replaceRange(lowFile, high.getFirstToken().getStart(), high.getLastToken().getEnd(), code);
57119
57135
  for (const l of ((_m = highFile.getStructure()) === null || _m === void 0 ? void 0 : _m.findAllStructures(Structures.Loop)) || []) {
@@ -57281,7 +57297,7 @@ LOOP AT ${groupTargetName}tab ${groupTarget}.`;
57281
57297
  const enumName = (_b = high.findExpressionAfterToken("ENUM")) === null || _b === void 0 ? void 0 : _b.concatTokens();
57282
57298
  const structureName = (_c = high.findExpressionAfterToken("STRUCTURE")) === null || _c === void 0 ? void 0 : _c.concatTokens();
57283
57299
  // all ENUMS are char like?
57284
- let code = `TYPES ${enumName} TYPE string.
57300
+ let code = `TYPES ${enumName} TYPE string.
57285
57301
  CONSTANTS: BEGIN OF ${structureName},\n`;
57286
57302
  let count = 1;
57287
57303
  for (const e of enumStructure.findDirectStatements(Statements.TypeEnum).concat(enumStructure.findDirectStatements(Statements.Type))) {
@@ -57325,14 +57341,14 @@ CONSTANTS: BEGIN OF ${structureName},\n`;
57325
57341
  const tabixBackup = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
57326
57342
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
57327
57343
  // restore tabix before exeption
57328
- const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.
57329
- ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
57330
- ${indentation}${tabixBackup} = sy-tabix.
57331
- ${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.
57332
- ${indentation}sy-tabix = ${tabixBackup}.
57333
- ${indentation}IF sy-subrc <> 0.
57334
- ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
57335
- ${indentation}ENDIF.
57344
+ const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.
57345
+ ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
57346
+ ${indentation}${tabixBackup} = sy-tabix.
57347
+ ${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.
57348
+ ${indentation}sy-tabix = ${tabixBackup}.
57349
+ ${indentation}IF sy-subrc <> 0.
57350
+ ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
57351
+ ${indentation}ENDIF.
57336
57352
  ${indentation}${uniqueName}`;
57337
57353
  const start = target.getFirstToken().getStart();
57338
57354
  const end = (_a = tableExpression.findDirectTokenByText("]")) === null || _a === void 0 ? void 0 : _a.getEnd();
@@ -57416,11 +57432,11 @@ ${indentation}${uniqueName}`;
57416
57432
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
57417
57433
  const source = (_b = templateSource === null || templateSource === void 0 ? void 0 : templateSource.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens();
57418
57434
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
57419
- const code = `DATA ${uniqueName} TYPE string.
57420
- ${indentation}CALL FUNCTION '${functionName}'
57421
- ${indentation} EXPORTING
57422
- ${indentation} input = ${source}
57423
- ${indentation} IMPORTING
57435
+ const code = `DATA ${uniqueName} TYPE string.
57436
+ ${indentation}CALL FUNCTION '${functionName}'
57437
+ ${indentation} EXPORTING
57438
+ ${indentation} input = ${source}
57439
+ ${indentation} IMPORTING
57424
57440
  ${indentation} output = ${uniqueName}.\n`;
57425
57441
  const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), code);
57426
57442
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, child.getFirstToken().getStart(), child.getLastToken().getEnd(), uniqueName);
@@ -58732,12 +58748,12 @@ class EasyToFindMessages {
58732
58748
  key: "easy_to_find_messages",
58733
58749
  title: "Easy to find messages",
58734
58750
  shortDescription: `Make messages easy to find`,
58735
- extendedInformation: `All messages must be statically referenced exactly once
58736
-
58737
- Only MESSAGE and RAISE statments are counted as static references
58738
-
58739
- Also see rule "message_exists"
58740
-
58751
+ extendedInformation: `All messages must be statically referenced exactly once
58752
+
58753
+ Only MESSAGE and RAISE statments are counted as static references
58754
+
58755
+ Also see rule "message_exists"
58756
+
58741
58757
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#make-messages-easy-to-find`,
58742
58758
  tags: [_irule_1.RuleTag.Styleguide],
58743
58759
  };
@@ -58822,8 +58838,8 @@ class EmptyLineinStatement extends _abap_rule_1.ABAPRule {
58822
58838
  key: "empty_line_in_statement",
58823
58839
  title: "Find empty lines in statements",
58824
58840
  shortDescription: `Checks that statements do not contain empty lines.`,
58825
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
58826
-
58841
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
58842
+
58827
58843
  https://docs.abapopenchecks.org/checks/41/`,
58828
58844
  tags: [_irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
58829
58845
  badExample: `WRITE\n\nhello.`,
@@ -59115,10 +59131,10 @@ class ExitOrCheck extends _abap_rule_1.ABAPRule {
59115
59131
  return {
59116
59132
  key: "exit_or_check",
59117
59133
  title: "Find EXIT or CHECK outside loops",
59118
- shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
59134
+ shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
59119
59135
  Use RETURN to leave procesing blocks instead.`,
59120
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
59121
- https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
59136
+ extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
59137
+ https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
59122
59138
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#check-vs-return`,
59123
59139
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
59124
59140
  };
@@ -59201,12 +59217,12 @@ class ExpandMacros extends _abap_rule_1.ABAPRule {
59201
59217
  key: "expand_macros",
59202
59218
  title: "Expand Macros",
59203
59219
  shortDescription: `Allows expanding macro calls with quick fixes`,
59204
- extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
59205
-
59220
+ extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
59221
+
59206
59222
  Note that macros/DEFINE cannot be used in the ABAP Cloud programming model`,
59207
- badExample: `DEFINE _hello.
59208
- WRITE 'hello'.
59209
- END-OF-DEFINITION.
59223
+ badExample: `DEFINE _hello.
59224
+ WRITE 'hello'.
59225
+ END-OF-DEFINITION.
59210
59226
  _hello.`,
59211
59227
  goodExample: `WRITE 'hello'.`,
59212
59228
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
@@ -59293,7 +59309,7 @@ class Exporting extends _abap_rule_1.ABAPRule {
59293
59309
  shortDescription: `Detects EXPORTING statements which can be omitted.`,
59294
59310
  badExample: `call_method( EXPORTING foo = bar ).`,
59295
59311
  goodExample: `call_method( foo = bar ).`,
59296
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-optional-keyword-exporting
59312
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-optional-keyword-exporting
59297
59313
  https://docs.abapopenchecks.org/checks/30/`,
59298
59314
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
59299
59315
  };
@@ -59391,7 +59407,7 @@ class ForbiddenIdentifier extends _abap_rule_1.ABAPRule {
59391
59407
  key: "forbidden_identifier",
59392
59408
  title: "Forbidden Identifier",
59393
59409
  shortDescription: `Forbid use of specified identifiers, list of regex.`,
59394
- extendedInformation: `Used in the transpiler to find javascript keywords in ABAP identifiers,
59410
+ extendedInformation: `Used in the transpiler to find javascript keywords in ABAP identifiers,
59395
59411
  https://github.com/abaplint/transpiler/blob/bda94b8b56e2b7f2f87be2168f12361aa530220e/packages/transpiler/src/validation.ts#L44`,
59396
59412
  tags: [_irule_1.RuleTag.SingleFile],
59397
59413
  };
@@ -59633,8 +59649,8 @@ class ForbiddenVoidType {
59633
59649
  key: "forbidden_void_type",
59634
59650
  title: "Forbidden Void Types",
59635
59651
  shortDescription: `Avoid usage of specified void types.`,
59636
- extendedInformation: `Inspiration:
59637
- BOOLEAN, BOOLE_D, CHAR01, CHAR1, CHAR10, CHAR12, CHAR128, CHAR2, CHAR20, CHAR4, CHAR70,
59652
+ extendedInformation: `Inspiration:
59653
+ BOOLEAN, BOOLE_D, CHAR01, CHAR1, CHAR10, CHAR12, CHAR128, CHAR2, CHAR20, CHAR4, CHAR70,
59638
59654
  DATS, TIMS, DATUM, FLAG, INT4, NUMC3, NUMC4, SAP_BOOL, TEXT25, TEXT80, X255, XFELD`,
59639
59655
  };
59640
59656
  }
@@ -59877,7 +59893,7 @@ class FullyTypeITabs extends _abap_rule_1.ABAPRule {
59877
59893
  key: "fully_type_itabs",
59878
59894
  title: "Fully type internal tables",
59879
59895
  shortDescription: `No implict table types or table keys`,
59880
- badExample: `DATA lt_foo TYPE TABLE OF ty.
59896
+ badExample: `DATA lt_foo TYPE TABLE OF ty.
59881
59897
  DATA lt_bar TYPE STANDARD TABLE OF ty.`,
59882
59898
  goodExample: `DATA lt_foo TYPE STANDARD TABLE OF ty WITH EMPTY KEY.`,
59883
59899
  tags: [_irule_1.RuleTag.SingleFile],
@@ -60062,26 +60078,26 @@ class FunctionalWriting extends _abap_rule_1.ABAPRule {
60062
60078
  key: "functional_writing",
60063
60079
  title: "Use functional writing",
60064
60080
  shortDescription: `Detects usage of call method when functional style calls can be used.`,
60065
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-calls
60081
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-calls
60066
60082
  https://docs.abapopenchecks.org/checks/07/`,
60067
60083
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
60068
- badExample: `CALL METHOD zcl_class=>method( ).
60069
- CALL METHOD cl_abap_typedescr=>describe_by_name
60070
- EXPORTING
60071
- p_name = 'NAME'
60072
- RECEIVING
60073
- p_descr_ref = lr_typedescr
60074
- EXCEPTIONS
60075
- type_not_found = 1
60084
+ badExample: `CALL METHOD zcl_class=>method( ).
60085
+ CALL METHOD cl_abap_typedescr=>describe_by_name
60086
+ EXPORTING
60087
+ p_name = 'NAME'
60088
+ RECEIVING
60089
+ p_descr_ref = lr_typedescr
60090
+ EXCEPTIONS
60091
+ type_not_found = 1
60076
60092
  OTHERS = 2.`,
60077
- goodExample: `zcl_class=>method( ).
60078
- cl_abap_typedescr=>describe_by_name(
60079
- EXPORTING
60080
- p_name = 'NAME'
60081
- RECEIVING
60082
- p_descr_ref = lr_typedescr
60083
- EXCEPTIONS
60084
- type_not_found = 1
60093
+ goodExample: `zcl_class=>method( ).
60094
+ cl_abap_typedescr=>describe_by_name(
60095
+ EXPORTING
60096
+ p_name = 'NAME'
60097
+ RECEIVING
60098
+ p_descr_ref = lr_typedescr
60099
+ EXCEPTIONS
60100
+ type_not_found = 1
60085
60101
  OTHERS = 2 ).`,
60086
60102
  };
60087
60103
  }
@@ -60192,14 +60208,14 @@ class GlobalClass extends _abap_rule_1.ABAPRule {
60192
60208
  key: "global_class",
60193
60209
  title: "Global class checks",
60194
60210
  shortDescription: `Checks related to global classes`,
60195
- extendedInformation: `* global classes must be in own files
60196
-
60197
- * file names must match class name
60198
-
60199
- * file names must match interface name
60200
-
60201
- * global classes must be global definitions
60202
-
60211
+ extendedInformation: `* global classes must be in own files
60212
+
60213
+ * file names must match class name
60214
+
60215
+ * file names must match interface name
60216
+
60217
+ * global classes must be global definitions
60218
+
60203
60219
  * global interfaces must be global definitions`,
60204
60220
  tags: [_irule_1.RuleTag.Syntax],
60205
60221
  };
@@ -60298,8 +60314,8 @@ class IdenticalConditions extends _abap_rule_1.ABAPRule {
60298
60314
  return {
60299
60315
  key: "identical_conditions",
60300
60316
  title: "Identical conditions",
60301
- shortDescription: `Find identical conditions in IF + CASE + WHILE etc
60302
-
60317
+ shortDescription: `Find identical conditions in IF + CASE + WHILE etc
60318
+
60303
60319
  Prerequsites: code is pretty printed with identical cAsE`,
60304
60320
  tags: [_irule_1.RuleTag.SingleFile],
60305
60321
  };
@@ -60430,23 +60446,23 @@ class IdenticalContents extends _abap_rule_1.ABAPRule {
60430
60446
  key: "identical_contents",
60431
60447
  title: "Identical contents",
60432
60448
  shortDescription: `Find identical contents in blocks inside IFs, both in the beginning and in the end.`,
60433
- extendedInformation: `
60434
- Prerequsites: code is pretty printed with identical cAsE
60435
-
60449
+ extendedInformation: `
60450
+ Prerequsites: code is pretty printed with identical cAsE
60451
+
60436
60452
  Chained statments are ignored`,
60437
60453
  tags: [_irule_1.RuleTag.SingleFile],
60438
- badExample: `IF foo = bar.
60439
- WRITE 'bar'.
60440
- WRITE 'world'.
60441
- ELSE.
60442
- WRITE 'foo'.
60443
- WRITE 'world'.
60454
+ badExample: `IF foo = bar.
60455
+ WRITE 'bar'.
60456
+ WRITE 'world'.
60457
+ ELSE.
60458
+ WRITE 'foo'.
60459
+ WRITE 'world'.
60444
60460
  ENDIF.`,
60445
- goodExample: `IF foo = bar.
60446
- WRITE 'bar'.
60447
- ELSE.
60448
- WRITE 'foo'.
60449
- ENDIF.
60461
+ goodExample: `IF foo = bar.
60462
+ WRITE 'bar'.
60463
+ ELSE.
60464
+ WRITE 'foo'.
60465
+ ENDIF.
60450
60466
  WRITE 'world'.`,
60451
60467
  };
60452
60468
  }
@@ -60549,12 +60565,12 @@ class IdenticalDescriptions {
60549
60565
  key: "identical_descriptions",
60550
60566
  title: "Identical descriptions",
60551
60567
  shortDescription: `Searches for objects with the same type and same description`,
60552
- extendedInformation: `Case insensitive
60553
-
60554
- Only checks the master language descriptions
60555
-
60556
- Dependencies are skipped
60557
-
60568
+ extendedInformation: `Case insensitive
60569
+
60570
+ Only checks the master language descriptions
60571
+
60572
+ Dependencies are skipped
60573
+
60558
60574
  Works for: INTF, CLAS, DOMA, DTEL, FUNC in same FUGR`,
60559
60575
  tags: [],
60560
60576
  };
@@ -60728,43 +60744,43 @@ class IfInIf extends _abap_rule_1.ABAPRule {
60728
60744
  key: "if_in_if",
60729
60745
  title: "IF in IF",
60730
60746
  shortDescription: `Detects nested ifs which can be refactored.`,
60731
- extendedInformation: `
60732
- Directly nested IFs without ELSE can be refactored to a single condition using AND.
60733
-
60734
- ELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.
60735
-
60736
- https://docs.abapopenchecks.org/checks/01/
60747
+ extendedInformation: `
60748
+ Directly nested IFs without ELSE can be refactored to a single condition using AND.
60749
+
60750
+ ELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.
60751
+
60752
+ https://docs.abapopenchecks.org/checks/01/
60737
60753
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low`,
60738
- badExample: `IF condition1.
60739
- IF condition2.
60740
- ...
60741
- ENDIF.
60742
- ENDIF.
60743
-
60744
- IF condition1.
60745
- ...
60746
- ELSE.
60747
- IF condition2.
60748
- ...
60749
- ENDIF.
60754
+ badExample: `IF condition1.
60755
+ IF condition2.
60756
+ ...
60757
+ ENDIF.
60758
+ ENDIF.
60759
+
60760
+ IF condition1.
60761
+ ...
60762
+ ELSE.
60763
+ IF condition2.
60764
+ ...
60765
+ ENDIF.
60750
60766
  ENDIF.`,
60751
- goodExample: `IF ( condition1 ) AND ( condition2 ).
60752
- ...
60753
- ENDIF.
60754
-
60755
- IF condition1.
60756
- ...
60757
- ELSEIF condition2.
60758
- ...
60759
- ENDIF.
60760
-
60761
- CASE variable.
60762
- WHEN value1.
60763
- ...
60764
- WHEN value2.
60765
- IF condition2.
60766
- ...
60767
- ENDIF.
60767
+ goodExample: `IF ( condition1 ) AND ( condition2 ).
60768
+ ...
60769
+ ENDIF.
60770
+
60771
+ IF condition1.
60772
+ ...
60773
+ ELSEIF condition2.
60774
+ ...
60775
+ ENDIF.
60776
+
60777
+ CASE variable.
60778
+ WHEN value1.
60779
+ ...
60780
+ WHEN value2.
60781
+ IF condition2.
60782
+ ...
60783
+ ENDIF.
60768
60784
  ENDCASE.`,
60769
60785
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
60770
60786
  };
@@ -60949,9 +60965,9 @@ class ImplementMethods extends _abap_rule_1.ABAPRule {
60949
60965
  for (const i of ((_a = file.getStructure()) === null || _a === void 0 ? void 0 : _a.findAllStatements(Statements.ClassImplementation)) || []) {
60950
60966
  const name = (_b = i.findFirstExpression(Expressions.ClassName)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr().toUpperCase();
60951
60967
  if (name === impl.identifier.getName().toUpperCase()) {
60952
- return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
60953
- METHOD ${methodName.toLowerCase()}.
60954
- RETURN. " todo, implement method
60968
+ return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
60969
+ METHOD ${methodName.toLowerCase()}.
60970
+ RETURN. " todo, implement method
60955
60971
  ENDMETHOD.`);
60956
60972
  }
60957
60973
  }
@@ -61139,19 +61155,19 @@ class InStatementIndentation extends _abap_rule_1.ABAPRule {
61139
61155
  key: "in_statement_indentation",
61140
61156
  title: "In-statement indentation",
61141
61157
  shortDescription: "Checks alignment within statements which span multiple lines.",
61142
- extendedInformation: `Lines following the first line should be indented once (2 spaces).
61143
-
61144
- For block declaration statements, lines after the first should be indented an additional time (default: +2 spaces)
61158
+ extendedInformation: `Lines following the first line should be indented once (2 spaces).
61159
+
61160
+ For block declaration statements, lines after the first should be indented an additional time (default: +2 spaces)
61145
61161
  to distinguish them better from code within the block.`,
61146
- badExample: `IF 1 = 1
61147
- AND 2 = 2.
61148
- WRITE 'hello' &&
61149
- 'world'.
61162
+ badExample: `IF 1 = 1
61163
+ AND 2 = 2.
61164
+ WRITE 'hello' &&
61165
+ 'world'.
61150
61166
  ENDIF.`,
61151
- goodExample: `IF 1 = 1
61152
- AND 2 = 2.
61153
- WRITE 'hello' &&
61154
- 'world'.
61167
+ goodExample: `IF 1 = 1
61168
+ AND 2 = 2.
61169
+ WRITE 'hello' &&
61170
+ 'world'.
61155
61171
  ENDIF.`,
61156
61172
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
61157
61173
  };
@@ -61656,9 +61672,9 @@ class IntfReferencingClas {
61656
61672
  key: "intf_referencing_clas",
61657
61673
  title: "INTF referencing CLAS",
61658
61674
  shortDescription: `Interface contains references to class`,
61659
- extendedInformation: `Only global interfaces are checked.
61660
- Only first level references are checked.
61661
- Exception class references are ignored.
61675
+ extendedInformation: `Only global interfaces are checked.
61676
+ Only first level references are checked.
61677
+ Exception class references are ignored.
61662
61678
  Void references are ignored.`,
61663
61679
  };
61664
61680
  }
@@ -62253,8 +62269,8 @@ class LineBreakStyle {
62253
62269
  return {
62254
62270
  key: "line_break_style",
62255
62271
  title: "Makes sure line breaks are consistent in the ABAP code",
62256
- shortDescription: `Enforces LF as newlines in ABAP files
62257
-
62272
+ shortDescription: `Enforces LF as newlines in ABAP files
62273
+
62258
62274
  abapGit does not work with CRLF`,
62259
62275
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
62260
62276
  };
@@ -62323,7 +62339,7 @@ class LineLength extends _abap_rule_1.ABAPRule {
62323
62339
  key: "line_length",
62324
62340
  title: "Line length",
62325
62341
  shortDescription: `Detects lines exceeding the provided maximum length.`,
62326
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length
62342
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length
62327
62343
  https://docs.abapopenchecks.org/checks/04/`,
62328
62344
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
62329
62345
  };
@@ -62394,7 +62410,7 @@ class LineOnlyPunc extends _abap_rule_1.ABAPRule {
62394
62410
  key: "line_only_punc",
62395
62411
  title: "Line containing only punctuation",
62396
62412
  shortDescription: `Detects lines containing only punctuation.`,
62397
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#close-brackets-at-line-end
62413
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#close-brackets-at-line-end
62398
62414
  https://docs.abapopenchecks.org/checks/16/`,
62399
62415
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
62400
62416
  badExample: "zcl_class=>method(\n).",
@@ -62654,8 +62670,8 @@ class LocalVariableNames extends _abap_rule_1.ABAPRule {
62654
62670
  return {
62655
62671
  key: "local_variable_names",
62656
62672
  title: "Local variable naming conventions",
62657
- shortDescription: `
62658
- Allows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols.
62673
+ shortDescription: `
62674
+ Allows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols.
62659
62675
  Regexes are case-insensitive.`,
62660
62676
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
62661
62677
  };
@@ -62802,10 +62818,10 @@ class MainFileContents {
62802
62818
  key: "main_file_contents",
62803
62819
  title: "Main file contents",
62804
62820
  shortDescription: `Checks related to report declarations.`,
62805
- extendedInformation: `Does not run if the target version is Cloud
62806
-
62807
- * PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
62808
- * TYPEs must begin with "TYPE-POOL <name>."
62821
+ extendedInformation: `Does not run if the target version is Cloud
62822
+
62823
+ * PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
62824
+ * TYPEs must begin with "TYPE-POOL <name>."
62809
62825
  `,
62810
62826
  };
62811
62827
  }
@@ -62921,17 +62937,17 @@ class ManyParentheses extends _abap_rule_1.ABAPRule {
62921
62937
  title: "Too many parentheses",
62922
62938
  shortDescription: `Searches for expressions where extra parentheses can safely be removed`,
62923
62939
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
62924
- badExample: `
62925
- IF ( destination IS INITIAL ).
62926
- ENDIF.
62927
- IF foo = boo AND ( bar = lar AND moo = loo ).
62928
- ENDIF.
62940
+ badExample: `
62941
+ IF ( destination IS INITIAL ).
62942
+ ENDIF.
62943
+ IF foo = boo AND ( bar = lar AND moo = loo ).
62944
+ ENDIF.
62929
62945
  `,
62930
- goodExample: `
62931
- IF destination IS INITIAL.
62932
- ENDIF.
62933
- IF foo = boo AND bar = lar AND moo = loo.
62934
- ENDIF.
62946
+ goodExample: `
62947
+ IF destination IS INITIAL.
62948
+ ENDIF.
62949
+ IF foo = boo AND bar = lar AND moo = loo.
62950
+ ENDIF.
62935
62951
  `,
62936
62952
  };
62937
62953
  }
@@ -63105,14 +63121,14 @@ class MaxOneMethodParameterPerLine extends _abap_rule_1.ABAPRule {
63105
63121
  title: "Max one method parameter definition per line",
63106
63122
  shortDescription: `Keep max one method parameter description per line`,
63107
63123
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace],
63108
- badExample: `
63109
- METHODS apps_scope_token
63110
- IMPORTING
63124
+ badExample: `
63125
+ METHODS apps_scope_token
63126
+ IMPORTING
63111
63127
  body TYPE bodyapps_scope_token client_id TYPE str.`,
63112
- goodExample: `
63113
- METHODS apps_scope_token
63114
- IMPORTING
63115
- body TYPE bodyapps_scope_token
63128
+ goodExample: `
63129
+ METHODS apps_scope_token
63130
+ IMPORTING
63131
+ body TYPE bodyapps_scope_token
63116
63132
  client_id TYPE str.`,
63117
63133
  };
63118
63134
  }
@@ -63177,11 +63193,11 @@ class MaxOneStatement extends _abap_rule_1.ABAPRule {
63177
63193
  key: "max_one_statement",
63178
63194
  title: "Max one statement per line",
63179
63195
  shortDescription: `Checks that each line contains only a single statement.`,
63180
- extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
63181
-
63182
- Does not report anything for chained statements.
63183
-
63184
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line
63196
+ extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
63197
+
63198
+ Does not report anything for chained statements.
63199
+
63200
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line
63185
63201
  https://docs.abapopenchecks.org/checks/11/`,
63186
63202
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
63187
63203
  badExample: `WRITE foo. WRITE bar.`,
@@ -63518,8 +63534,8 @@ class MethodLength {
63518
63534
  key: "method_length",
63519
63535
  title: "Method/Form Length",
63520
63536
  shortDescription: `Checks relating to method/form length.`,
63521
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
63522
-
63537
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
63538
+
63523
63539
  Abstract methods without statements are considered okay.`,
63524
63540
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
63525
63541
  };
@@ -63618,10 +63634,10 @@ class MethodOverwritesBuiltIn extends _abap_rule_1.ABAPRule {
63618
63634
  key: "method_overwrites_builtin",
63619
63635
  title: "Method name overwrites builtin function",
63620
63636
  shortDescription: `Checks Method names that overwrite builtin SAP functions`,
63621
- extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
63622
-
63623
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
63624
-
63637
+ extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
63638
+
63639
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
63640
+
63625
63641
  Interface method names are ignored`,
63626
63642
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
63627
63643
  };
@@ -64191,7 +64207,7 @@ class Nesting extends _abap_rule_1.ABAPRule {
64191
64207
  key: "nesting",
64192
64208
  title: "Check nesting depth",
64193
64209
  shortDescription: `Checks for methods exceeding a maximum nesting depth`,
64194
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low
64210
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low
64195
64211
  https://docs.abapopenchecks.org/checks/74/`,
64196
64212
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
64197
64213
  };
@@ -64434,7 +64450,7 @@ class NoChainedAssignment extends _abap_rule_1.ABAPRule {
64434
64450
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-chain-assignments`,
64435
64451
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
64436
64452
  badExample: `var1 = var2 = var3.`,
64437
- goodExample: `var2 = var3.
64453
+ goodExample: `var2 = var3.
64438
64454
  var1 = var2.`,
64439
64455
  };
64440
64456
  }
@@ -64493,8 +64509,8 @@ class NoExternalFormCalls extends _abap_rule_1.ABAPRule {
64493
64509
  key: "no_external_form_calls",
64494
64510
  title: "No external FORM calls",
64495
64511
  shortDescription: `Detect external form calls`,
64496
- badExample: `PERFORM foo IN PROGRAM bar.
64497
-
64512
+ badExample: `PERFORM foo IN PROGRAM bar.
64513
+
64498
64514
  PERFORM foo(bar).`,
64499
64515
  tags: [_irule_1.RuleTag.SingleFile],
64500
64516
  };
@@ -64555,17 +64571,17 @@ class NoInlineInOptionalBranches extends _abap_rule_1.ABAPRule {
64555
64571
  key: "no_inline_in_optional_branches",
64556
64572
  title: "Don't declare inline in optional branches",
64557
64573
  shortDescription: `Don't declare inline in optional branches`,
64558
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
64559
-
64560
- Considered optional branches:
64561
- * inside IF/ELSEIF/ELSE
64562
- * inside LOOP
64563
- * inside WHILE
64564
- * inside CASE/WHEN, CASE TYPE OF
64565
- * inside DO
64566
- * inside SELECT loops
64567
-
64568
- Not considered optional branches:
64574
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
64575
+
64576
+ Considered optional branches:
64577
+ * inside IF/ELSEIF/ELSE
64578
+ * inside LOOP
64579
+ * inside WHILE
64580
+ * inside CASE/WHEN, CASE TYPE OF
64581
+ * inside DO
64582
+ * inside SELECT loops
64583
+
64584
+ Not considered optional branches:
64569
64585
  * TRY/CATCH/CLEANUP`,
64570
64586
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
64571
64587
  };
@@ -64664,12 +64680,12 @@ class NoPrefixes extends _abap_rule_1.ABAPRule {
64664
64680
  key: "no_prefixes",
64665
64681
  title: "No Prefixes",
64666
64682
  shortDescription: `Dont use hungarian notation`,
64667
- extendedInformation: `
64668
- Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
64669
- allowing all types to become voided, abaplint will then provide less precise syntax errors.
64670
-
64671
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
64672
-
64683
+ extendedInformation: `
64684
+ Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
64685
+ allowing all types to become voided, abaplint will then provide less precise syntax errors.
64686
+
64687
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
64688
+
64673
64689
  https://github.com/SAP/styleguides/blob/main/clean-abap/sub-sections/AvoidEncodings.md`,
64674
64690
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
64675
64691
  badExample: `DATA lv_foo TYPE i.`,
@@ -64842,7 +64858,7 @@ class NoPublicAttributes extends _abap_rule_1.ABAPRule {
64842
64858
  return {
64843
64859
  key: "no_public_attributes",
64844
64860
  title: "No public attributes",
64845
- shortDescription: `Checks that classes and interfaces don't contain any public attributes.
64861
+ shortDescription: `Checks that classes and interfaces don't contain any public attributes.
64846
64862
  Exceptions are excluded from this rule.`,
64847
64863
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#members-private-by-default-protected-only-if-needed`,
64848
64864
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
@@ -64943,13 +64959,13 @@ class NoYodaConditions extends _abap_rule_1.ABAPRule {
64943
64959
  key: "no_yoda_conditions",
64944
64960
  title: "No Yoda conditions",
64945
64961
  shortDescription: `Finds Yoda conditions and reports issues`,
64946
- extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
64947
-
64962
+ extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
64963
+
64948
64964
  Conditions with operators CP, NP, CS, NS, CA, NA, CO, CN are ignored`,
64949
64965
  tags: [_irule_1.RuleTag.SingleFile],
64950
- badExample: `IF 0 <> sy-subrc.
64966
+ badExample: `IF 0 <> sy-subrc.
64951
64967
  ENDIF.`,
64952
- goodExample: `IF sy-subrc <> 0.
64968
+ goodExample: `IF sy-subrc <> 0.
64953
64969
  ENDIF.`,
64954
64970
  };
64955
64971
  }
@@ -65050,8 +65066,8 @@ class NROBConsistency {
65050
65066
  key: "nrob_consistency",
65051
65067
  title: "Number range consistency",
65052
65068
  shortDescription: `Consistency checks for number ranges`,
65053
- extendedInformation: `Issue reported if percentage warning is over 50%
65054
-
65069
+ extendedInformation: `Issue reported if percentage warning is over 50%
65070
+
65055
65071
  Issue reported if the referenced domain is not found(taking error namespace into account)`,
65056
65072
  tags: [_irule_1.RuleTag.SingleFile],
65057
65073
  };
@@ -65328,58 +65344,58 @@ class ObsoleteStatement extends _abap_rule_1.ABAPRule {
65328
65344
  title: "Obsolete statements",
65329
65345
  shortDescription: `Checks for usages of certain obsolete statements`,
65330
65346
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
65331
- extendedInformation: `
65332
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
65333
-
65334
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
65335
-
65336
- SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
65337
-
65338
- IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
65339
-
65340
- WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
65341
-
65342
- FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
65343
-
65344
- TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
65345
-
65346
- LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
65347
-
65348
- COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
65349
-
65350
- OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
65351
-
65352
- PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
65353
-
65354
- RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
65355
-
65356
- PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
65357
-
65358
- MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
65359
-
65360
- SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
65361
- SELECT COUNT(*) is considered okay
65362
-
65363
- FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
65364
-
65365
- SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
65366
-
65367
- CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
65368
-
65369
- POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
65370
-
65371
- OCCURENCES: check for OCCURENCES vs OCCURRENCES
65372
-
65347
+ extendedInformation: `
65348
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
65349
+
65350
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
65351
+
65352
+ SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
65353
+
65354
+ IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
65355
+
65356
+ WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
65357
+
65358
+ FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
65359
+
65360
+ TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
65361
+
65362
+ LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
65363
+
65364
+ COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
65365
+
65366
+ OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
65367
+
65368
+ PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
65369
+
65370
+ RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
65371
+
65372
+ PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
65373
+
65374
+ MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
65375
+
65376
+ SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
65377
+ SELECT COUNT(*) is considered okay
65378
+
65379
+ FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
65380
+
65381
+ SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
65382
+
65383
+ CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
65384
+
65385
+ POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
65386
+
65387
+ OCCURENCES: check for OCCURENCES vs OCCURRENCES
65388
+
65373
65389
  CLIENT SPECIFIED, from 754: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abapselect_client_obsolete.htm`,
65374
- badExample: `REFRESH itab.
65375
-
65376
- COMPUTE foo = 2 + 2.
65377
-
65378
- MULTIPLY lv_foo BY 2.
65379
-
65380
- INTERFACE intf LOAD.
65381
-
65382
- IF foo IS SUPPLIED.
65390
+ badExample: `REFRESH itab.
65391
+
65392
+ COMPUTE foo = 2 + 2.
65393
+
65394
+ MULTIPLY lv_foo BY 2.
65395
+
65396
+ INTERFACE intf LOAD.
65397
+
65398
+ IF foo IS SUPPLIED.
65383
65399
  ENDIF.`,
65384
65400
  };
65385
65401
  }
@@ -65719,9 +65735,9 @@ class OmitParameterName {
65719
65735
  key: "omit_parameter_name",
65720
65736
  title: "Omit parameter name",
65721
65737
  shortDescription: `Omit the parameter name in single parameter calls`,
65722
- extendedInformation: `
65723
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
65724
-
65738
+ extendedInformation: `
65739
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
65740
+
65725
65741
  EXPORTING must already be omitted for this rule to take effect, https://rules.abaplint.org/exporting/`,
65726
65742
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
65727
65743
  badExample: `method( param = 2 ).`,
@@ -65927,20 +65943,20 @@ class OmitReceiving extends _abap_rule_1.ABAPRule {
65927
65943
  shortDescription: `Omit RECEIVING`,
65928
65944
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-receiving`,
65929
65945
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
65930
- badExample: `
65931
- upload_pack(
65932
- EXPORTING
65933
- io_client = lo_client
65934
- iv_url = iv_url
65935
- iv_deepen_level = iv_deepen_level
65936
- it_hashes = lt_hashes
65937
- RECEIVING
65946
+ badExample: `
65947
+ upload_pack(
65948
+ EXPORTING
65949
+ io_client = lo_client
65950
+ iv_url = iv_url
65951
+ iv_deepen_level = iv_deepen_level
65952
+ it_hashes = lt_hashes
65953
+ RECEIVING
65938
65954
  rt_objects = et_objects ).`,
65939
- goodExample: `
65940
- et_objects = upload_pack(
65941
- io_client = lo_client
65942
- iv_url = iv_url
65943
- iv_deepen_level = iv_deepen_level
65955
+ goodExample: `
65956
+ et_objects = upload_pack(
65957
+ io_client = lo_client
65958
+ iv_url = iv_url
65959
+ iv_deepen_level = iv_deepen_level
65944
65960
  it_hashes = lt_hashes ).`,
65945
65961
  };
65946
65962
  }
@@ -66004,8 +66020,8 @@ class Parser702Chaining extends _abap_rule_1.ABAPRule {
66004
66020
  return {
66005
66021
  key: "parser_702_chaining",
66006
66022
  title: "Parser Error, bad chanining on 702",
66007
- shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
66008
- this rule finds these and reports errors.
66023
+ shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
66024
+ this rule finds these and reports errors.
66009
66025
  Only active on target version 702 and below.`,
66010
66026
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
66011
66027
  };
@@ -66085,8 +66101,8 @@ class ParserError {
66085
66101
  return {
66086
66102
  key: "parser_error",
66087
66103
  title: "Parser error",
66088
- shortDescription: `Checks for syntax not recognized by abaplint.
66089
-
66104
+ shortDescription: `Checks for syntax not recognized by abaplint.
66105
+
66090
66106
  See recognized syntax at https://syntax.abaplint.org`,
66091
66107
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
66092
66108
  };
@@ -66171,7 +66187,7 @@ class ParserMissingSpace extends _abap_rule_1.ABAPRule {
66171
66187
  return {
66172
66188
  key: "parser_missing_space",
66173
66189
  title: "Parser Error, missing space",
66174
- shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.
66190
+ shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.
66175
66191
  This rule makes sure the spaces are consistently required across the language.`,
66176
66192
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
66177
66193
  badExample: `IF ( foo = 'bar').`,
@@ -66583,25 +66599,25 @@ class PreferInline {
66583
66599
  key: "prefer_inline",
66584
66600
  title: "Prefer Inline Declarations",
66585
66601
  shortDescription: `Prefer inline to up-front declarations.`,
66586
- extendedInformation: `EXPERIMENTAL
66587
-
66588
- Activates if language version is v740sp02 or above.
66589
-
66590
- Variables must be local(METHOD or FORM).
66591
-
66592
- No generic or void typed variables. No syntax errors.
66593
-
66594
- First position used must be a full/pure write.
66595
-
66596
- Move statment is not a cast(?=)
66597
-
66602
+ extendedInformation: `EXPERIMENTAL
66603
+
66604
+ Activates if language version is v740sp02 or above.
66605
+
66606
+ Variables must be local(METHOD or FORM).
66607
+
66608
+ No generic or void typed variables. No syntax errors.
66609
+
66610
+ First position used must be a full/pure write.
66611
+
66612
+ Move statment is not a cast(?=)
66613
+
66598
66614
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-inline-to-up-front-declarations`,
66599
66615
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Experimental, _irule_1.RuleTag.Quickfix],
66600
- badExample: `DATA foo TYPE i.
66601
- foo = 2.
66602
- DATA percentage TYPE decfloat34.
66616
+ badExample: `DATA foo TYPE i.
66617
+ foo = 2.
66618
+ DATA percentage TYPE decfloat34.
66603
66619
  percentage = ( comment_number / abs_statement_number ) * 100.`,
66604
- goodExample: `DATA(foo) = 2.
66620
+ goodExample: `DATA(foo) = 2.
66605
66621
  DATA(percentage) = CONV decfloat34( comment_number / abs_statement_number ) * 100.`,
66606
66622
  };
66607
66623
  }
@@ -66815,18 +66831,18 @@ class PreferIsNot extends _abap_rule_1.ABAPRule {
66815
66831
  key: "prefer_is_not",
66816
66832
  title: "Prefer IS NOT to NOT IS",
66817
66833
  shortDescription: `Prefer IS NOT to NOT IS`,
66818
- extendedInformation: `
66819
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
66820
-
66834
+ extendedInformation: `
66835
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
66836
+
66821
66837
  "if not is_valid( )." examples are skipped`,
66822
66838
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
66823
- goodExample: `IF variable IS NOT INITIAL.
66824
- IF variable NP 'TODO*'.
66825
- IF variable <> 42.
66839
+ goodExample: `IF variable IS NOT INITIAL.
66840
+ IF variable NP 'TODO*'.
66841
+ IF variable <> 42.
66826
66842
  IF variable CO 'hello'.`,
66827
- badExample: `IF NOT variable IS INITIAL.
66828
- IF NOT variable CP 'TODO*'.
66829
- IF NOT variable = 42.
66843
+ badExample: `IF NOT variable IS INITIAL.
66844
+ IF NOT variable CP 'TODO*'.
66845
+ IF NOT variable = 42.
66830
66846
  IF NOT variable CA 'hello'.`,
66831
66847
  };
66832
66848
  }
@@ -67014,14 +67030,14 @@ class PreferRaiseExceptionNew extends _abap_rule_1.ABAPRule {
67014
67030
  key: "prefer_raise_exception_new",
67015
67031
  title: "Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE",
67016
67032
  shortDescription: `Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE`,
67017
- extendedInformation: `
67018
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
67019
-
67033
+ extendedInformation: `
67034
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
67035
+
67020
67036
  From 752 and up`,
67021
67037
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
67022
67038
  goodExample: `RAISE EXCEPTION NEW cx_generation_error( previous = exception ).`,
67023
- badExample: `RAISE EXCEPTION TYPE cx_generation_error
67024
- EXPORTING
67039
+ badExample: `RAISE EXCEPTION TYPE cx_generation_error
67040
+ EXPORTING
67025
67041
  previous = exception.`,
67026
67042
  };
67027
67043
  }
@@ -67099,7 +67115,7 @@ class PreferReturningToExporting extends _abap_rule_1.ABAPRule {
67099
67115
  key: "prefer_returning_to_exporting",
67100
67116
  title: "Prefer RETURNING to EXPORTING",
67101
67117
  shortDescription: `Prefer RETURNING to EXPORTING. Generic types cannot be RETURNING.`,
67102
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting
67118
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting
67103
67119
  https://docs.abapopenchecks.org/checks/44/`,
67104
67120
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
67105
67121
  };
@@ -67196,8 +67212,8 @@ class PreferXsdbool extends _abap_rule_1.ABAPRule {
67196
67212
  key: "prefer_xsdbool",
67197
67213
  title: "Prefer xsdbool over boolc",
67198
67214
  shortDescription: `Prefer xsdbool over boolc`,
67199
- extendedInformation: `Activates if language version is v740sp08 or above.
67200
-
67215
+ extendedInformation: `Activates if language version is v740sp08 or above.
67216
+
67201
67217
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
67202
67218
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
67203
67219
  badExample: `DATA(sdf) = boolc( 1 = 2 ).`,
@@ -67491,26 +67507,26 @@ class ReduceProceduralCode extends _abap_rule_1.ABAPRule {
67491
67507
  key: "reduce_procedural_code",
67492
67508
  title: "Reduce procedural code",
67493
67509
  shortDescription: `Checks FORM and FUNCTION-MODULE have few statements`,
67494
- extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
67495
-
67496
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
67497
-
67510
+ extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
67511
+
67512
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
67513
+
67498
67514
  Comments are not counted as statements.`,
67499
67515
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
67500
- badExample: `FORM foo.
67501
- DATA lv_bar TYPE i.
67502
- lv_bar = 2 + 2.
67503
- IF lv_bar = 4.
67504
- WRITE 'hello world'.
67505
- ENDIF.
67506
- DATA lv_bar TYPE i.
67507
- lv_bar = 2 + 2.
67508
- IF lv_bar = 4.
67509
- WRITE 'hello world'.
67510
- ENDIF.
67516
+ badExample: `FORM foo.
67517
+ DATA lv_bar TYPE i.
67518
+ lv_bar = 2 + 2.
67519
+ IF lv_bar = 4.
67520
+ WRITE 'hello world'.
67521
+ ENDIF.
67522
+ DATA lv_bar TYPE i.
67523
+ lv_bar = 2 + 2.
67524
+ IF lv_bar = 4.
67525
+ WRITE 'hello world'.
67526
+ ENDIF.
67511
67527
  ENDFORM.`,
67512
- goodExample: `FORM foo.
67513
- NEW zcl_global_class( )->run_logic( ).
67528
+ goodExample: `FORM foo.
67529
+ NEW zcl_global_class( )->run_logic( ).
67514
67530
  ENDFORM.`,
67515
67531
  };
67516
67532
  }
@@ -67754,10 +67770,10 @@ class RemoveDescriptions {
67754
67770
  return {
67755
67771
  key: "remove_descriptions",
67756
67772
  title: "Remove descriptions",
67757
- shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
67758
-
67759
- Class descriptions are required, see rule description_empty.
67760
-
67773
+ shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
67774
+
67775
+ Class descriptions are required, see rule description_empty.
67776
+
67761
67777
  Consider using ABAP Doc for documentation.`,
67762
67778
  tags: [],
67763
67779
  };
@@ -67882,16 +67898,16 @@ class RFCErrorHandling extends _abap_rule_1.ABAPRule {
67882
67898
  tags: [_irule_1.RuleTag.SingleFile],
67883
67899
  shortDescription: `Checks that exceptions 'system_failure' and 'communication_failure' are handled in RFC calls`,
67884
67900
  extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenrfc_exception.htm`,
67885
- badExample: `
67886
- CALL FUNCTION 'ZRFC'
67901
+ badExample: `
67902
+ CALL FUNCTION 'ZRFC'
67887
67903
  DESTINATION lv_rfc.`,
67888
- goodExample: `
67889
- CALL FUNCTION 'ZRFC'
67890
- DESTINATION lv_rfc
67891
- EXCEPTIONS
67892
- system_failure = 1 MESSAGE msg
67893
- communication_failure = 2 MESSAGE msg
67894
- resource_failure = 3
67904
+ goodExample: `
67905
+ CALL FUNCTION 'ZRFC'
67906
+ DESTINATION lv_rfc
67907
+ EXCEPTIONS
67908
+ system_failure = 1 MESSAGE msg
67909
+ communication_failure = 2 MESSAGE msg
67910
+ resource_failure = 3
67895
67911
  OTHERS = 4.`,
67896
67912
  };
67897
67913
  }
@@ -67975,11 +67991,11 @@ class SelectAddOrderBy {
67975
67991
  key: "select_add_order_by",
67976
67992
  title: "SELECT add ORDER BY",
67977
67993
  shortDescription: `SELECTs add ORDER BY clause`,
67978
- extendedInformation: `
67979
- This will make sure that the SELECT statement returns results in the same sequence on different databases
67980
-
67981
- add ORDER BY PRIMARY KEY if in doubt
67982
-
67994
+ extendedInformation: `
67995
+ This will make sure that the SELECT statement returns results in the same sequence on different databases
67996
+
67997
+ add ORDER BY PRIMARY KEY if in doubt
67998
+
67983
67999
  If the target is a sorted/hashed table, no issue is reported`,
67984
68000
  tags: [_irule_1.RuleTag.SingleFile],
67985
68001
  };
@@ -68108,14 +68124,14 @@ class SelectPerformance {
68108
68124
  key: "select_performance",
68109
68125
  title: "SELECT performance",
68110
68126
  shortDescription: `Various checks regarding SELECT performance.`,
68111
- extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
68112
-
68127
+ extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
68128
+
68113
68129
  SELECT *: not reported if using INTO/APPENDING CORRESPONDING FIELDS OF`,
68114
68130
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Performance],
68115
- badExample: `SELECT field1, field2 FROM table
68116
- INTO @DATA(structure) UP TO 1 ROWS ORDER BY field3 DESCENDING.
68131
+ badExample: `SELECT field1, field2 FROM table
68132
+ INTO @DATA(structure) UP TO 1 ROWS ORDER BY field3 DESCENDING.
68117
68133
  ENDSELECT.`,
68118
- goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
68134
+ goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
68119
68135
  INTO TABLE @DATA(table) ORDER BY field3 DESCENDING`,
68120
68136
  };
68121
68137
  }
@@ -68227,8 +68243,8 @@ class SelectSingleFullKey {
68227
68243
  key: "select_single_full_key",
68228
68244
  title: "Detect SELECT SINGLE which are possibily not unique",
68229
68245
  shortDescription: `Detect SELECT SINGLE which are possibily not unique`,
68230
- extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
68231
-
68246
+ extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
68247
+
68232
68248
  If the statement contains a JOIN it is not checked`,
68233
68249
  pseudoComment: "EC CI_NOORDER",
68234
68250
  tags: [],
@@ -68645,8 +68661,8 @@ class SICFConsistency {
68645
68661
  key: "sicf_consistency",
68646
68662
  title: "SICF consistency",
68647
68663
  shortDescription: `Checks the validity of ICF services`,
68648
- extendedInformation: `* Class defined in handler must exist
68649
- * Class must not have any syntax errors
68664
+ extendedInformation: `* Class defined in handler must exist
68665
+ * Class must not have any syntax errors
68650
68666
  * Class must implement interface IF_HTTP_EXTENSION`,
68651
68667
  };
68652
68668
  }
@@ -69013,8 +69029,8 @@ class SpaceBeforeDot extends _abap_rule_1.ABAPRule {
69013
69029
  key: "space_before_dot",
69014
69030
  title: "Space before dot",
69015
69031
  shortDescription: `Checks for extra spaces before dots at the ends of statements`,
69016
- extendedInformation: `
69017
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
69032
+ extendedInformation: `
69033
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
69018
69034
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#condense-your-code`,
69019
69035
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
69020
69036
  badExample: `WRITE bar .`,
@@ -69200,12 +69216,12 @@ class SQLValueConversion {
69200
69216
  key: "sql_value_conversion",
69201
69217
  title: "Implicit SQL Value Conversion",
69202
69218
  shortDescription: `Ensure types match when selecting from database`,
69203
- extendedInformation: `
69204
- * Integer to CHAR conversion
69205
- * Integer to NUMC conversion
69206
- * NUMC to Integer conversion
69207
- * CHAR to Integer conversion
69208
- * Source field longer than database field, CHAR -> CHAR
69219
+ extendedInformation: `
69220
+ * Integer to CHAR conversion
69221
+ * Integer to NUMC conversion
69222
+ * NUMC to Integer conversion
69223
+ * CHAR to Integer conversion
69224
+ * Source field longer than database field, CHAR -> CHAR
69209
69225
  * Source field longer than database field, NUMC -> NUMC`,
69210
69226
  tags: [],
69211
69227
  };
@@ -69277,7 +69293,7 @@ class StartAtTab extends _abap_rule_1.ABAPRule {
69277
69293
  key: "start_at_tab",
69278
69294
  title: "Start at tab",
69279
69295
  shortDescription: `Checks that statements start at tabstops.`,
69280
- extendedInformation: `Reports max 100 issues per file
69296
+ extendedInformation: `Reports max 100 issues per file
69281
69297
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
69282
69298
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
69283
69299
  badExample: ` WRITE a.`,
@@ -69454,12 +69470,12 @@ class StrictSQL extends _abap_rule_1.ABAPRule {
69454
69470
  key: "strict_sql",
69455
69471
  title: "Strict SQL",
69456
69472
  shortDescription: `Strict SQL`,
69457
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
69458
-
69459
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
69460
-
69461
- Also see separate rule sql_escape_host_variables
69462
-
69473
+ extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
69474
+
69475
+ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
69476
+
69477
+ Also see separate rule sql_escape_host_variables
69478
+
69463
69479
  Activates from v750 and up`,
69464
69480
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix],
69465
69481
  };
@@ -69711,11 +69727,11 @@ class SyModification extends _abap_rule_1.ABAPRule {
69711
69727
  key: "sy_modification",
69712
69728
  title: "Modification of SY fields",
69713
69729
  shortDescription: `Finds modification of sy fields`,
69714
- extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
69715
-
69730
+ extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
69731
+
69716
69732
  Changes to SY-TVAR* fields are not reported`,
69717
69733
  tags: [_irule_1.RuleTag.SingleFile],
69718
- badExample: `sy-uname = 2.
69734
+ badExample: `sy-uname = 2.
69719
69735
  sy = sy.`,
69720
69736
  };
69721
69737
  }
@@ -69777,8 +69793,8 @@ class TABLEnhancementCategory {
69777
69793
  key: "tabl_enhancement_category",
69778
69794
  title: "TABL enhancement category must be set",
69779
69795
  shortDescription: `Checks that tables do not have the enhancement category 'not classified'.`,
69780
- extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
69781
-
69796
+ extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
69797
+
69782
69798
  You may use standard report RS_DDIC_CLASSIFICATION_FINAL for adjustment.`,
69783
69799
  tags: [],
69784
69800
  };
@@ -69906,9 +69922,9 @@ class TypeFormParameters extends _abap_rule_1.ABAPRule {
69906
69922
  title: "Type FORM parameters",
69907
69923
  shortDescription: `Checks for untyped FORM parameters`,
69908
69924
  tags: [_irule_1.RuleTag.SingleFile],
69909
- badExample: `FORM foo USING bar.
69925
+ badExample: `FORM foo USING bar.
69910
69926
  ENDFORM.`,
69911
- goodExample: `FORM foo USING bar TYPE string.
69927
+ goodExample: `FORM foo USING bar TYPE string.
69912
69928
  ENDFORM.`,
69913
69929
  };
69914
69930
  }
@@ -70392,7 +70408,8 @@ class UnknownTypes {
70392
70408
  }
70393
70409
  }
70394
70410
  }
70395
- for (const v of nodeData.idefs) {
70411
+ for (const name in nodeData.idefs) {
70412
+ const v = nodeData.idefs[name];
70396
70413
  const found = this.checkParameters(v);
70397
70414
  if (found) {
70398
70415
  const message = "Contains unknown, " + found.found;
@@ -70573,38 +70590,38 @@ class UnnecessaryPragma extends _abap_rule_1.ABAPRule {
70573
70590
  key: "unnecessary_pragma",
70574
70591
  title: "Unnecessary Pragma",
70575
70592
  shortDescription: `Finds pragmas which can be removed`,
70576
- extendedInformation: `* NO_HANDLER with handler
70577
-
70578
- * NEEDED without definition
70579
-
70580
- * NO_TEXT without texts
70581
-
70582
- * SUBRC_OK where sy-subrc is checked
70583
-
70593
+ extendedInformation: `* NO_HANDLER with handler
70594
+
70595
+ * NEEDED without definition
70596
+
70597
+ * NO_TEXT without texts
70598
+
70599
+ * SUBRC_OK where sy-subrc is checked
70600
+
70584
70601
  NO_HANDLER inside macros are not checked`,
70585
70602
  tags: [_irule_1.RuleTag.SingleFile],
70586
- badExample: `TRY.
70587
- ...
70588
- CATCH zcx_abapgit_exception ##NO_HANDLER.
70589
- RETURN. " it has a handler
70590
- ENDTRY.
70591
- MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
70592
- SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
70593
- IF sy-subrc <> 0.
70603
+ badExample: `TRY.
70604
+ ...
70605
+ CATCH zcx_abapgit_exception ##NO_HANDLER.
70606
+ RETURN. " it has a handler
70607
+ ENDTRY.
70608
+ MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
70609
+ SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
70610
+ IF sy-subrc <> 0.
70594
70611
  ENDIF.`,
70595
- goodExample: `TRY.
70596
- ...
70597
- CATCH zcx_abapgit_exception.
70598
- RETURN.
70599
- ENDTRY.
70600
- MESSAGE w125(zbar) WITH c_foo INTO message.
70601
- SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
70602
- IF sy-subrc <> 0.
70603
- ENDIF.
70604
-
70605
- DATA: BEGIN OF blah ##NEEDED,
70606
- test1 TYPE string,
70607
- test2 TYPE string,
70612
+ goodExample: `TRY.
70613
+ ...
70614
+ CATCH zcx_abapgit_exception.
70615
+ RETURN.
70616
+ ENDTRY.
70617
+ MESSAGE w125(zbar) WITH c_foo INTO message.
70618
+ SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
70619
+ IF sy-subrc <> 0.
70620
+ ENDIF.
70621
+
70622
+ DATA: BEGIN OF blah ##NEEDED,
70623
+ test1 TYPE string,
70624
+ test2 TYPE string,
70608
70625
  END OF blah.`,
70609
70626
  };
70610
70627
  }
@@ -70762,18 +70779,18 @@ class UnnecessaryReturn extends _abap_rule_1.ABAPRule {
70762
70779
  shortDescription: `Finds unnecessary RETURN statements`,
70763
70780
  extendedInformation: `Finds unnecessary RETURN statements`,
70764
70781
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
70765
- badExample: `FORM hello1.
70766
- WRITE 'world'.
70767
- RETURN.
70768
- ENDFORM.
70769
-
70770
- FORM foo.
70771
- IF 1 = 2.
70772
- RETURN.
70773
- ENDIF.
70782
+ badExample: `FORM hello1.
70783
+ WRITE 'world'.
70784
+ RETURN.
70785
+ ENDFORM.
70786
+
70787
+ FORM foo.
70788
+ IF 1 = 2.
70789
+ RETURN.
70790
+ ENDIF.
70774
70791
  ENDFORM.`,
70775
- goodExample: `FORM hello2.
70776
- WRITE 'world'.
70792
+ goodExample: `FORM hello2.
70793
+ WRITE 'world'.
70777
70794
  ENDFORM.`,
70778
70795
  };
70779
70796
  }
@@ -71140,17 +71157,17 @@ class UnusedMethods {
71140
71157
  key: "unused_methods",
71141
71158
  title: "Unused methods",
71142
71159
  shortDescription: `Checks for unused methods`,
71143
- extendedInformation: `Checks private and protected methods.
71144
-
71145
- Unused methods are not reported if the object contains parser or syntax errors.
71146
-
71147
- Skips:
71148
- * methods FOR TESTING
71149
- * methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
71150
- * class_constructor + constructor methods
71151
- * event handlers
71152
- * methods that are redefined
71153
- * INCLUDEs
71160
+ extendedInformation: `Checks private and protected methods.
71161
+
71162
+ Unused methods are not reported if the object contains parser or syntax errors.
71163
+
71164
+ Skips:
71165
+ * methods FOR TESTING
71166
+ * methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
71167
+ * class_constructor + constructor methods
71168
+ * event handlers
71169
+ * methods that are redefined
71170
+ * INCLUDEs
71154
71171
  `,
71155
71172
  tags: [],
71156
71173
  pragma: "##CALLED",
@@ -71540,23 +71557,23 @@ class UnusedVariables {
71540
71557
  key: "unused_variables",
71541
71558
  title: "Unused variables",
71542
71559
  shortDescription: `Checks for unused variables and constants`,
71543
- extendedInformation: `Skips event parameters.
71544
-
71545
- Note that this currently does not work if the source code uses macros.
71546
-
71547
- Unused variables are not reported if the object contains parser or syntax errors.
71548
-
71560
+ extendedInformation: `Skips event parameters.
71561
+
71562
+ Note that this currently does not work if the source code uses macros.
71563
+
71564
+ Unused variables are not reported if the object contains parser or syntax errors.
71565
+
71549
71566
  Errors found in INCLUDES are reported for the main program.`,
71550
71567
  tags: [_irule_1.RuleTag.Quickfix],
71551
71568
  pragma: "##NEEDED",
71552
71569
  pseudoComment: "EC NEEDED",
71553
- badExample: `DATA: BEGIN OF blah1,
71554
- test TYPE string,
71555
- test2 TYPE string,
71570
+ badExample: `DATA: BEGIN OF blah1,
71571
+ test TYPE string,
71572
+ test2 TYPE string,
71556
71573
  END OF blah1.`,
71557
- goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
71558
- test TYPE string,
71559
- test2 TYPE string,
71574
+ goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
71575
+ test TYPE string,
71576
+ test2 TYPE string,
71560
71577
  END OF blah2.`,
71561
71578
  };
71562
71579
  }
@@ -71775,15 +71792,15 @@ class UseBoolExpression extends _abap_rule_1.ABAPRule {
71775
71792
  shortDescription: `Use boolean expression, xsdbool from 740sp08 and up, boolc from 702 and up`,
71776
71793
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
71777
71794
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
71778
- badExample: `IF line IS INITIAL.
71779
- has_entries = abap_false.
71780
- ELSE.
71781
- has_entries = abap_true.
71782
- ENDIF.
71783
-
71795
+ badExample: `IF line IS INITIAL.
71796
+ has_entries = abap_false.
71797
+ ELSE.
71798
+ has_entries = abap_true.
71799
+ ENDIF.
71800
+
71784
71801
  DATA(fsdf) = COND #( WHEN foo <> bar THEN abap_true ELSE abap_false ).`,
71785
- goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
71786
-
71802
+ goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
71803
+
71787
71804
  DATA(fsdf) = xsdbool( foo <> bar ).`,
71788
71805
  };
71789
71806
  }
@@ -71959,15 +71976,15 @@ class UseLineExists extends _abap_rule_1.ABAPRule {
71959
71976
  key: "use_line_exists",
71960
71977
  title: "Use line_exists",
71961
71978
  shortDescription: `Use line_exists, from 740sp02 and up`,
71962
- extendedInformation: `
71963
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
71964
-
71979
+ extendedInformation: `
71980
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
71981
+
71965
71982
  Not reported if the READ TABLE statement contains BINARY SEARCH.`,
71966
71983
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
71967
- badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
71968
- IF sy-subrc = 0.
71984
+ badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
71985
+ IF sy-subrc = 0.
71969
71986
  ENDIF.`,
71970
- goodExample: `IF line_exists( my_table[ key = 'A' ] ).
71987
+ goodExample: `IF line_exists( my_table[ key = 'A' ] ).
71971
71988
  ENDIF.`,
71972
71989
  };
71973
71990
  }
@@ -72077,10 +72094,10 @@ class UseNew extends _abap_rule_1.ABAPRule {
72077
72094
  key: "use_new",
72078
72095
  title: "Use NEW",
72079
72096
  shortDescription: `Checks for deprecated CREATE OBJECT statements.`,
72080
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
72081
-
72082
- If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
72083
-
72097
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
72098
+
72099
+ If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
72100
+
72084
72101
  Applicable from v740sp02 and up`,
72085
72102
  badExample: `CREATE OBJECT ref.`,
72086
72103
  goodExample: `ref = NEW #( ).`,
@@ -72178,13 +72195,13 @@ class WhenOthersLast extends _abap_rule_1.ABAPRule {
72178
72195
  title: "WHEN OTHERS last",
72179
72196
  shortDescription: `Checks that WHEN OTHERS is placed the last within a CASE statement.`,
72180
72197
  tags: [_irule_1.RuleTag.SingleFile],
72181
- badExample: `CASE bar.
72182
- WHEN OTHERS.
72183
- WHEN 2.
72198
+ badExample: `CASE bar.
72199
+ WHEN OTHERS.
72200
+ WHEN 2.
72184
72201
  ENDCASE.`,
72185
- goodExample: `CASE bar.
72186
- WHEN 2.
72187
- WHEN OTHERS.
72202
+ goodExample: `CASE bar.
72203
+ WHEN 2.
72204
+ WHEN OTHERS.
72188
72205
  ENDCASE.`,
72189
72206
  };
72190
72207
  }