@abaplint/cli 2.105.3 → 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 +1006 -954
  4. package/package.json +63 -63
package/build/cli.js CHANGED
@@ -11662,7 +11662,8 @@ class DeleteMemory {
11662
11662
  getMatcher() {
11663
11663
  const memory = (0, combi_1.seq)("MEMORY ID", expressions_1.Source);
11664
11664
  const id = (0, combi_1.seq)("ID", expressions_1.Source);
11665
- const shared = (0, combi_1.seq)("SHARED MEMORY", expressions_1.Field, "(", expressions_1.Field, ")", id);
11665
+ const client = (0, combi_1.seq)("CLIENT", expressions_1.Source);
11666
+ const shared = (0, combi_1.seq)("SHARED MEMORY", expressions_1.Field, "(", expressions_1.Field, ")", (0, combi_1.optPrio)(client), id);
11666
11667
  const ret = (0, combi_1.seq)("DELETE FROM", (0, combi_1.alt)(memory, shared));
11667
11668
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
11668
11669
  }
@@ -20123,31 +20124,34 @@ class BuiltIn {
20123
20124
  constructor() {
20124
20125
  this.row = 1;
20125
20126
  }
20126
- buildDefinition(method, row) {
20127
- const token = new tokens_1.Identifier(new position_1.Position(row, 1), method.name);
20128
- 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;
20129
20135
  }
20130
20136
  searchBuiltin(name) {
20131
20137
  if (name === undefined) {
20132
20138
  return undefined;
20133
20139
  }
20134
- // todo, optimize, use hash map
20135
- const index = BuiltIn.methods.findIndex(a => a.name === name.toUpperCase());
20136
- if (index < 0) {
20140
+ const def = BuiltIn.methods[name.toUpperCase()];
20141
+ if (def === undefined) {
20137
20142
  return undefined;
20138
20143
  }
20139
- return this.buildDefinition(BuiltIn.methods[index], index);
20144
+ return this.buildDefinition(def, name);
20140
20145
  }
20141
20146
  isPredicate(name) {
20142
20147
  if (name === undefined) {
20143
20148
  return undefined;
20144
20149
  }
20145
- // todo, optimize, use hash map
20146
- const index = BuiltIn.methods.findIndex(a => a.name === name.toUpperCase());
20147
- if (index < 0) {
20150
+ const def = BuiltIn.methods[name.toUpperCase()];
20151
+ if (def === undefined) {
20148
20152
  return undefined;
20149
20153
  }
20150
- return BuiltIn.methods[index].predicate;
20154
+ return def.predicate;
20151
20155
  }
20152
20156
  getTypes() {
20153
20157
  const ret = this.buildSY();
@@ -20162,32 +20166,36 @@ class BuiltIn {
20162
20166
  return ret;
20163
20167
  }
20164
20168
  get(extras) {
20165
- const ret = this.buildSY();
20166
- ret.push(this.buildVariable("screen")); // todo, add structure, or alternatively make native Statements
20167
- ret.push(this.buildConstant("%_ENDIAN"));
20168
- ret.push(this.buildConstant("%_CHARSIZE"));
20169
- ret.push(this.buildConstant("%_BACKSPACE", new basic_1.CharacterType(1), "\b"));
20170
- ret.push(this.buildConstant("%_CR_LF", new basic_1.CharacterType(2), "\r\n"));
20171
- ret.push(this.buildConstant("%_FORMFEED", new basic_1.CharacterType(1), "\f"));
20172
- ret.push(this.buildConstant("%_HORIZONTAL_TAB", new basic_1.CharacterType(1), "\t"));
20173
- ret.push(this.buildConstant("%_MAXCHAR", new basic_1.CharacterType(1), Buffer.from("FDFF", "hex").toString()));
20174
- ret.push(this.buildConstant("%_MINCHAR", new basic_1.CharacterType(1), Buffer.from("0000", "hex").toString()));
20175
- ret.push(this.buildConstant("%_NEWLINE", new basic_1.CharacterType(1), "\n"));
20176
- ret.push(this.buildConstant("%_VERTICAL_TAB", new basic_1.CharacterType(1), "\v"));
20177
- ret.push(this.buildConstant("abap_false", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "' '"));
20178
- ret.push(this.buildConstant("abap_true", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "'X'"));
20179
- ret.push(this.buildConstant("abap_undefined", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "'-'"));
20180
- ret.push(this.buildConstant("abap_off", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "' '"));
20181
- ret.push(this.buildConstant("abap_on", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "'X'"));
20182
- ret.push(this.buildConstant("col_background", basic_1.IntegerType.get(), "0"));
20183
- ret.push(this.buildConstant("col_heading", basic_1.IntegerType.get(), "1"));
20184
- ret.push(this.buildConstant("col_key", basic_1.IntegerType.get(), "4"));
20185
- ret.push(this.buildConstant("col_negative", basic_1.IntegerType.get(), "6"));
20186
- ret.push(this.buildConstant("col_group", basic_1.IntegerType.get(), "7"));
20187
- ret.push(this.buildConstant("col_normal", basic_1.IntegerType.get(), "2"));
20188
- ret.push(this.buildConstant("col_positive", basic_1.IntegerType.get(), "5"));
20189
- ret.push(this.buildConstant("col_total", basic_1.IntegerType.get(), "3"));
20190
- 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);
20191
20199
  for (const e of extras) {
20192
20200
  const id = new tokens_1.Identifier(new position_1.Position(this.row++, 1), e);
20193
20201
  ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.VoidType(e), ["read_only" /* IdentifierMeta.ReadOnly */, "built-in" /* IdentifierMeta.BuiltIn */], "'?'"));
@@ -20195,6 +20203,10 @@ class BuiltIn {
20195
20203
  return ret;
20196
20204
  }
20197
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
+ }
20198
20210
  buildSY() {
20199
20211
  const components = [];
20200
20212
  // NOTE: fields must be in correct sequence for the syntax check
@@ -20389,62 +20401,60 @@ class BuiltIn {
20389
20401
  }
20390
20402
  return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, type, ["read_only" /* IdentifierMeta.ReadOnly */, "built-in" /* IdentifierMeta.BuiltIn */], value);
20391
20403
  }
20392
- buildVariable(name) {
20393
- const id = new tokens_1.Identifier(new position_1.Position(this.row++, 1), name);
20394
- return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.VoidType(name), ["built-in" /* IdentifierMeta.BuiltIn */]);
20395
- }
20396
20404
  }
20397
20405
  exports.BuiltIn = BuiltIn;
20398
20406
  BuiltIn.filename = "_builtin.prog.abap";
20407
+ BuiltIn.counter = 1;
20408
+ BuiltIn.getCache = [];
20399
20409
  // todo: "pcre" vs "regex", only one of these parameters are allowed
20400
20410
  // todo: "pcre", only possible from 755
20401
- BuiltIn.methods = [
20402
- {
20403
- name: "ABS",
20411
+ BuiltIn.methods = {
20412
+ "ABS": {
20413
+ counter: BuiltIn.counter++,
20404
20414
  mandatory: {
20405
20415
  "val": new basic_1.FloatType(),
20406
20416
  },
20407
20417
  return: basic_1.IntegerType.get(),
20408
20418
  },
20409
- {
20410
- name: "ACOS",
20419
+ "ACOS": {
20420
+ counter: BuiltIn.counter++,
20411
20421
  mandatory: {
20412
20422
  "val": new basic_1.FloatType(),
20413
20423
  },
20414
20424
  return: new basic_1.FloatType(),
20415
20425
  },
20416
- {
20417
- name: "ASIN",
20426
+ "ASIN": {
20427
+ counter: BuiltIn.counter++,
20418
20428
  mandatory: {
20419
20429
  "val": new basic_1.FloatType(),
20420
20430
  },
20421
20431
  return: new basic_1.FloatType(),
20422
20432
  },
20423
- {
20424
- name: "ATAN",
20433
+ "ATAN": {
20434
+ counter: BuiltIn.counter++,
20425
20435
  mandatory: {
20426
20436
  "val": new basic_1.FloatType(),
20427
20437
  },
20428
20438
  return: new basic_1.FloatType(),
20429
20439
  },
20430
- {
20431
- name: "BIT-SET",
20440
+ "BIT-SET": {
20441
+ counter: BuiltIn.counter++,
20432
20442
  mandatory: {
20433
20443
  "val": basic_1.IntegerType.get(),
20434
20444
  },
20435
20445
  return: new basic_1.XStringType(),
20436
20446
  version: version_1.Version.v702,
20437
20447
  },
20438
- {
20439
- name: "BOOLC",
20448
+ "BOOLC": {
20449
+ counter: BuiltIn.counter++,
20440
20450
  mandatory: {
20441
20451
  "val": basic_1.CLikeType.get(),
20442
20452
  },
20443
20453
  return: basic_1.StringType.get(),
20444
20454
  version: version_1.Version.v702,
20445
20455
  },
20446
- {
20447
- name: "BOOLX",
20456
+ "BOOLX": {
20457
+ counter: BuiltIn.counter++,
20448
20458
  mandatory: {
20449
20459
  "bool": basic_1.CLikeType.get(),
20450
20460
  },
@@ -20454,15 +20464,15 @@ BuiltIn.methods = [
20454
20464
  return: new basic_1.XStringType(),
20455
20465
  version: version_1.Version.v702,
20456
20466
  },
20457
- {
20458
- name: "CEIL",
20467
+ "CEIL": {
20468
+ counter: BuiltIn.counter++,
20459
20469
  mandatory: {
20460
20470
  "val": new basic_1.FloatType(),
20461
20471
  },
20462
20472
  return: basic_1.IntegerType.get(),
20463
20473
  },
20464
- {
20465
- name: "CHAR_OFF",
20474
+ "CHAR_OFF": {
20475
+ counter: BuiltIn.counter++,
20466
20476
  mandatory: {
20467
20477
  "val": basic_1.CLikeType.get(),
20468
20478
  "add": basic_1.IntegerType.get(),
@@ -20473,15 +20483,15 @@ BuiltIn.methods = [
20473
20483
  return: basic_1.IntegerType.get(),
20474
20484
  version: version_1.Version.v702,
20475
20485
  },
20476
- {
20477
- name: "CHARLEN",
20486
+ "CHARLEN": {
20487
+ counter: BuiltIn.counter++,
20478
20488
  mandatory: {
20479
20489
  "val": basic_1.CLikeType.get(),
20480
20490
  },
20481
20491
  return: basic_1.IntegerType.get(),
20482
20492
  },
20483
- {
20484
- name: "CMAX",
20493
+ "CMAX": {
20494
+ counter: BuiltIn.counter++,
20485
20495
  mandatory: {
20486
20496
  "val1": basic_1.CLikeType.get(),
20487
20497
  "val2": basic_1.CLikeType.get(),
@@ -20497,8 +20507,8 @@ BuiltIn.methods = [
20497
20507
  return: basic_1.StringType.get(),
20498
20508
  version: version_1.Version.v702,
20499
20509
  },
20500
- {
20501
- name: "CMIN",
20510
+ "CMIN": {
20511
+ counter: BuiltIn.counter++,
20502
20512
  mandatory: {
20503
20513
  "val1": basic_1.CLikeType.get(),
20504
20514
  "val2": basic_1.CLikeType.get(),
@@ -20514,8 +20524,8 @@ BuiltIn.methods = [
20514
20524
  return: basic_1.StringType.get(),
20515
20525
  version: version_1.Version.v702,
20516
20526
  },
20517
- {
20518
- name: "CONCAT_LINES_OF",
20527
+ "CONCAT_LINES_OF": {
20528
+ counter: BuiltIn.counter++,
20519
20529
  mandatory: {
20520
20530
  "table": new basic_1.TableType(new basic_1.AnyType(), { withHeader: false, keyType: basic_1.TableKeyType.default }),
20521
20531
  },
@@ -20525,8 +20535,8 @@ BuiltIn.methods = [
20525
20535
  return: basic_1.StringType.get(),
20526
20536
  version: version_1.Version.v702,
20527
20537
  },
20528
- {
20529
- name: "CONDENSE",
20538
+ "CONDENSE": {
20539
+ counter: BuiltIn.counter++,
20530
20540
  mandatory: {
20531
20541
  "val": basic_1.CLikeType.get(),
20532
20542
  },
@@ -20538,8 +20548,8 @@ BuiltIn.methods = [
20538
20548
  return: basic_1.StringType.get(),
20539
20549
  version: version_1.Version.v702,
20540
20550
  },
20541
- {
20542
- name: "CONTAINS",
20551
+ "CONTAINS": {
20552
+ counter: BuiltIn.counter++,
20543
20553
  mandatory: {
20544
20554
  "val": basic_1.CLikeType.get(),
20545
20555
  },
@@ -20558,8 +20568,8 @@ BuiltIn.methods = [
20558
20568
  predicate: true,
20559
20569
  version: version_1.Version.v702,
20560
20570
  },
20561
- {
20562
- name: "CONTAINS_ANY_NOT_OF",
20571
+ "CONTAINS_ANY_NOT_OF": {
20572
+ counter: BuiltIn.counter++,
20563
20573
  mandatory: {
20564
20574
  "val": basic_1.CLikeType.get(),
20565
20575
  },
@@ -20574,8 +20584,8 @@ BuiltIn.methods = [
20574
20584
  predicate: true,
20575
20585
  return: new basic_1.CharacterType(1), version: version_1.Version.v702,
20576
20586
  },
20577
- {
20578
- name: "CONTAINS_ANY_OF",
20587
+ "CONTAINS_ANY_OF": {
20588
+ counter: BuiltIn.counter++,
20579
20589
  mandatory: {
20580
20590
  "val": basic_1.CLikeType.get(),
20581
20591
  },
@@ -20591,22 +20601,22 @@ BuiltIn.methods = [
20591
20601
  predicate: true,
20592
20602
  version: version_1.Version.v702,
20593
20603
  },
20594
- {
20595
- name: "COS",
20604
+ "COS": {
20605
+ counter: BuiltIn.counter++,
20596
20606
  mandatory: {
20597
20607
  "val": new basic_1.FloatType(),
20598
20608
  },
20599
20609
  return: new basic_1.FloatType(),
20600
20610
  },
20601
- {
20602
- name: "COSH",
20611
+ "COSH": {
20612
+ counter: BuiltIn.counter++,
20603
20613
  mandatory: {
20604
20614
  "val": new basic_1.FloatType(),
20605
20615
  },
20606
20616
  return: new basic_1.FloatType(),
20607
20617
  },
20608
- {
20609
- name: "COUNT",
20618
+ "COUNT": {
20619
+ counter: BuiltIn.counter++,
20610
20620
  mandatory: {
20611
20621
  "val": basic_1.CLikeType.get(),
20612
20622
  },
@@ -20621,8 +20631,8 @@ BuiltIn.methods = [
20621
20631
  return: basic_1.IntegerType.get(),
20622
20632
  version: version_1.Version.v702,
20623
20633
  },
20624
- {
20625
- name: "COUNT_ANY_NOT_OF",
20634
+ "COUNT_ANY_NOT_OF": {
20635
+ counter: BuiltIn.counter++,
20626
20636
  mandatory: {
20627
20637
  "val": basic_1.CLikeType.get(),
20628
20638
  },
@@ -20637,8 +20647,8 @@ BuiltIn.methods = [
20637
20647
  return: basic_1.IntegerType.get(),
20638
20648
  version: version_1.Version.v702,
20639
20649
  },
20640
- {
20641
- name: "COUNT_ANY_OF",
20650
+ "COUNT_ANY_OF": {
20651
+ counter: BuiltIn.counter++,
20642
20652
  mandatory: {
20643
20653
  "val": basic_1.CLikeType.get(),
20644
20654
  },
@@ -20653,15 +20663,15 @@ BuiltIn.methods = [
20653
20663
  return: basic_1.IntegerType.get(),
20654
20664
  version: version_1.Version.v702,
20655
20665
  },
20656
- {
20657
- name: "DBMAXLEN",
20666
+ "DBMAXLEN": {
20667
+ counter: BuiltIn.counter++,
20658
20668
  mandatory: {
20659
20669
  "val": basic_1.CLikeType.get(),
20660
20670
  },
20661
20671
  return: basic_1.IntegerType.get(),
20662
20672
  },
20663
- {
20664
- name: "DISTANCE",
20673
+ "DISTANCE": {
20674
+ counter: BuiltIn.counter++,
20665
20675
  mandatory: {
20666
20676
  "val1": basic_1.CLikeType.get(),
20667
20677
  "val2": basic_1.CLikeType.get(),
@@ -20669,8 +20679,8 @@ BuiltIn.methods = [
20669
20679
  return: basic_1.IntegerType.get(),
20670
20680
  version: version_1.Version.v702,
20671
20681
  },
20672
- {
20673
- name: "ESCAPE",
20682
+ "ESCAPE": {
20683
+ counter: BuiltIn.counter++,
20674
20684
  mandatory: {
20675
20685
  "val": basic_1.CLikeType.get(),
20676
20686
  "format": basic_1.CLikeType.get(),
@@ -20678,15 +20688,15 @@ BuiltIn.methods = [
20678
20688
  return: basic_1.StringType.get(),
20679
20689
  version: version_1.Version.v702,
20680
20690
  },
20681
- {
20682
- name: "EXP",
20691
+ "EXP": {
20692
+ counter: BuiltIn.counter++,
20683
20693
  mandatory: {
20684
20694
  "val": new basic_1.FloatType(),
20685
20695
  },
20686
20696
  return: new basic_1.FloatType(),
20687
20697
  },
20688
- {
20689
- name: "FIND",
20698
+ "FIND": {
20699
+ counter: BuiltIn.counter++,
20690
20700
  mandatory: {
20691
20701
  "val": basic_1.CLikeType.get(),
20692
20702
  },
@@ -20702,8 +20712,8 @@ BuiltIn.methods = [
20702
20712
  return: basic_1.IntegerType.get(),
20703
20713
  version: version_1.Version.v702,
20704
20714
  },
20705
- {
20706
- name: "FIND_ANY_NOT_OF",
20715
+ "FIND_ANY_NOT_OF": {
20716
+ counter: BuiltIn.counter++,
20707
20717
  mandatory: {
20708
20718
  "val": basic_1.CLikeType.get(),
20709
20719
  },
@@ -20716,8 +20726,8 @@ BuiltIn.methods = [
20716
20726
  return: basic_1.IntegerType.get(),
20717
20727
  version: version_1.Version.v702,
20718
20728
  },
20719
- {
20720
- name: "FIND_ANY_OF",
20729
+ "FIND_ANY_OF": {
20730
+ counter: BuiltIn.counter++,
20721
20731
  mandatory: {
20722
20732
  "val": basic_1.CLikeType.get(),
20723
20733
  },
@@ -20730,8 +20740,8 @@ BuiltIn.methods = [
20730
20740
  return: basic_1.IntegerType.get(),
20731
20741
  version: version_1.Version.v702,
20732
20742
  },
20733
- {
20734
- name: "FIND_END",
20743
+ "FIND_END": {
20744
+ counter: BuiltIn.counter++,
20735
20745
  mandatory: {
20736
20746
  "val": basic_1.CLikeType.get(),
20737
20747
  },
@@ -20747,22 +20757,22 @@ BuiltIn.methods = [
20747
20757
  return: basic_1.IntegerType.get(),
20748
20758
  version: version_1.Version.v702,
20749
20759
  },
20750
- {
20751
- name: "FLOOR",
20760
+ "FLOOR": {
20761
+ counter: BuiltIn.counter++,
20752
20762
  mandatory: {
20753
20763
  "val": new basic_1.FloatType(),
20754
20764
  },
20755
20765
  return: basic_1.IntegerType.get(),
20756
20766
  },
20757
- {
20758
- name: "FRAC",
20767
+ "FRAC": {
20768
+ counter: BuiltIn.counter++,
20759
20769
  mandatory: {
20760
20770
  "val": new basic_1.FloatType(),
20761
20771
  },
20762
20772
  return: basic_1.IntegerType.get(),
20763
20773
  },
20764
- {
20765
- name: "FROM_MIXED",
20774
+ "FROM_MIXED": {
20775
+ counter: BuiltIn.counter++,
20766
20776
  mandatory: {
20767
20777
  "val": basic_1.CLikeType.get()
20768
20778
  },
@@ -20774,8 +20784,8 @@ BuiltIn.methods = [
20774
20784
  return: basic_1.StringType.get(),
20775
20785
  version: version_1.Version.v702,
20776
20786
  },
20777
- {
20778
- name: "INSERT",
20787
+ "INSERT": {
20788
+ counter: BuiltIn.counter++,
20779
20789
  mandatory: {
20780
20790
  "val": basic_1.CLikeType.get(),
20781
20791
  "sub": basic_1.CLikeType.get(),
@@ -20786,8 +20796,8 @@ BuiltIn.methods = [
20786
20796
  return: basic_1.StringType.get(),
20787
20797
  version: version_1.Version.v702,
20788
20798
  },
20789
- {
20790
- name: "IPOW",
20799
+ "IPOW": {
20800
+ counter: BuiltIn.counter++,
20791
20801
  mandatory: {
20792
20802
  "base": new basic_1.FloatType(),
20793
20803
  "exp": new basic_1.FloatType(),
@@ -20795,8 +20805,8 @@ BuiltIn.methods = [
20795
20805
  return: basic_1.IntegerType.get(),
20796
20806
  version: version_1.Version.v740sp02,
20797
20807
  },
20798
- {
20799
- name: "LINE_EXISTS",
20808
+ "LINE_EXISTS": {
20809
+ counter: BuiltIn.counter++,
20800
20810
  mandatory: {
20801
20811
  "val": new basic_1.AnyType(),
20802
20812
  },
@@ -20804,37 +20814,37 @@ BuiltIn.methods = [
20804
20814
  predicate: true,
20805
20815
  version: version_1.Version.v740sp02,
20806
20816
  },
20807
- {
20808
- name: "LINE_INDEX",
20817
+ "LINE_INDEX": {
20818
+ counter: BuiltIn.counter++,
20809
20819
  mandatory: {
20810
20820
  "val": new basic_1.AnyType(),
20811
20821
  },
20812
20822
  return: basic_1.IntegerType.get(),
20813
20823
  version: version_1.Version.v740sp02,
20814
20824
  },
20815
- {
20816
- name: "LINES",
20825
+ "LINES": {
20826
+ counter: BuiltIn.counter++,
20817
20827
  mandatory: {
20818
20828
  "val": new basic_1.TableType(new basic_1.AnyType(), { withHeader: false, keyType: basic_1.TableKeyType.default }),
20819
20829
  },
20820
20830
  return: basic_1.IntegerType.get(),
20821
20831
  },
20822
- {
20823
- name: "LOG",
20832
+ "LOG": {
20833
+ counter: BuiltIn.counter++,
20824
20834
  mandatory: {
20825
20835
  "val": new basic_1.FloatType(),
20826
20836
  },
20827
20837
  return: new basic_1.FloatType(),
20828
20838
  },
20829
- {
20830
- name: "LOG10",
20839
+ "LOG10": {
20840
+ counter: BuiltIn.counter++,
20831
20841
  mandatory: {
20832
20842
  "val": new basic_1.FloatType(),
20833
20843
  },
20834
20844
  return: new basic_1.FloatType(),
20835
20845
  },
20836
- {
20837
- name: "MATCH",
20846
+ "MATCH": {
20847
+ counter: BuiltIn.counter++,
20838
20848
  mandatory: {
20839
20849
  "val": basic_1.CLikeType.get(),
20840
20850
  }, optional: {
@@ -20846,8 +20856,8 @@ BuiltIn.methods = [
20846
20856
  return: basic_1.StringType.get(),
20847
20857
  version: version_1.Version.v702,
20848
20858
  },
20849
- {
20850
- name: "MATCHES",
20859
+ "MATCHES": {
20860
+ counter: BuiltIn.counter++,
20851
20861
  mandatory: {
20852
20862
  "val": basic_1.CLikeType.get(),
20853
20863
  },
@@ -20862,8 +20872,8 @@ BuiltIn.methods = [
20862
20872
  predicate: true,
20863
20873
  version: version_1.Version.v702,
20864
20874
  },
20865
- {
20866
- name: "NMAX",
20875
+ "NMAX": {
20876
+ counter: BuiltIn.counter++,
20867
20877
  mandatory: {
20868
20878
  "val1": basic_1.CLikeType.get(),
20869
20879
  "val2": basic_1.CLikeType.get(),
@@ -20880,8 +20890,8 @@ BuiltIn.methods = [
20880
20890
  return: basic_1.IntegerType.get(),
20881
20891
  version: version_1.Version.v702,
20882
20892
  },
20883
- {
20884
- name: "NMIN",
20893
+ "NMIN": {
20894
+ counter: BuiltIn.counter++,
20885
20895
  mandatory: {
20886
20896
  "val1": basic_1.CLikeType.get(),
20887
20897
  "val2": basic_1.CLikeType.get(),
@@ -20898,15 +20908,15 @@ BuiltIn.methods = [
20898
20908
  return: basic_1.IntegerType.get(),
20899
20909
  version: version_1.Version.v702,
20900
20910
  },
20901
- {
20902
- name: "NUMOFCHAR",
20911
+ "NUMOFCHAR": {
20912
+ counter: BuiltIn.counter++,
20903
20913
  mandatory: {
20904
20914
  "val": basic_1.CLikeType.get(),
20905
20915
  },
20906
20916
  return: basic_1.IntegerType.get(),
20907
20917
  },
20908
- {
20909
- name: "REPEAT",
20918
+ "REPEAT": {
20919
+ counter: BuiltIn.counter++,
20910
20920
  mandatory: {
20911
20921
  "val": basic_1.CLikeType.get(),
20912
20922
  "occ": basic_1.CLikeType.get(),
@@ -20914,8 +20924,8 @@ BuiltIn.methods = [
20914
20924
  return: basic_1.StringType.get(),
20915
20925
  version: version_1.Version.v702,
20916
20926
  },
20917
- {
20918
- name: "REPLACE",
20927
+ "REPLACE": {
20928
+ counter: BuiltIn.counter++,
20919
20929
  mandatory: {
20920
20930
  "val": basic_1.CLikeType.get(),
20921
20931
  "with": basic_1.CLikeType.get(),
@@ -20932,8 +20942,8 @@ BuiltIn.methods = [
20932
20942
  return: basic_1.StringType.get(),
20933
20943
  version: version_1.Version.v702,
20934
20944
  },
20935
- {
20936
- name: "RESCALE",
20945
+ "RESCALE": {
20946
+ counter: BuiltIn.counter++,
20937
20947
  mandatory: {
20938
20948
  "val": new basic_1.FloatType(),
20939
20949
  },
@@ -20945,16 +20955,16 @@ BuiltIn.methods = [
20945
20955
  return: new basic_1.FloatType(),
20946
20956
  version: version_1.Version.v702,
20947
20957
  },
20948
- {
20949
- name: "REVERSE",
20958
+ "REVERSE": {
20959
+ counter: BuiltIn.counter++,
20950
20960
  mandatory: {
20951
20961
  "val": basic_1.CLikeType.get(),
20952
20962
  },
20953
20963
  return: basic_1.StringType.get(),
20954
20964
  version: version_1.Version.v702,
20955
20965
  },
20956
- {
20957
- name: "ROUND",
20966
+ "ROUND": {
20967
+ counter: BuiltIn.counter++,
20958
20968
  mandatory: {
20959
20969
  "val": new basic_1.FloatType(),
20960
20970
  },
@@ -20966,8 +20976,8 @@ BuiltIn.methods = [
20966
20976
  return: basic_1.IntegerType.get(),
20967
20977
  version: version_1.Version.v702,
20968
20978
  },
20969
- {
20970
- name: "SEGMENT",
20979
+ "SEGMENT": {
20980
+ counter: BuiltIn.counter++,
20971
20981
  mandatory: {
20972
20982
  "val": basic_1.CLikeType.get(),
20973
20983
  "index": basic_1.IntegerType.get(),
@@ -20979,8 +20989,8 @@ BuiltIn.methods = [
20979
20989
  return: basic_1.StringType.get(),
20980
20990
  version: version_1.Version.v702,
20981
20991
  },
20982
- {
20983
- name: "SHIFT_LEFT",
20992
+ "SHIFT_LEFT": {
20993
+ counter: BuiltIn.counter++,
20984
20994
  mandatory: {
20985
20995
  "val": basic_1.CLikeType.get(),
20986
20996
  },
@@ -20992,8 +21002,8 @@ BuiltIn.methods = [
20992
21002
  return: basic_1.StringType.get(),
20993
21003
  version: version_1.Version.v702,
20994
21004
  },
20995
- {
20996
- name: "SHIFT_RIGHT",
21005
+ "SHIFT_RIGHT": {
21006
+ counter: BuiltIn.counter++,
20997
21007
  mandatory: {
20998
21008
  "val": basic_1.CLikeType.get(),
20999
21009
  },
@@ -21005,43 +21015,43 @@ BuiltIn.methods = [
21005
21015
  return: basic_1.StringType.get(),
21006
21016
  version: version_1.Version.v702,
21007
21017
  },
21008
- {
21009
- name: "SIGN",
21018
+ "SIGN": {
21019
+ counter: BuiltIn.counter++,
21010
21020
  mandatory: {
21011
21021
  "val": new basic_1.FloatType(),
21012
21022
  },
21013
21023
  return: basic_1.IntegerType.get(),
21014
21024
  },
21015
- {
21016
- name: "SIN",
21025
+ "SIN": {
21026
+ counter: BuiltIn.counter++,
21017
21027
  mandatory: {
21018
21028
  "val": new basic_1.FloatType(),
21019
21029
  },
21020
21030
  return: new basic_1.FloatType(),
21021
21031
  },
21022
- {
21023
- name: "SINH",
21032
+ "SINH": {
21033
+ counter: BuiltIn.counter++,
21024
21034
  mandatory: {
21025
21035
  "val": new basic_1.FloatType(),
21026
21036
  },
21027
21037
  return: new basic_1.FloatType(),
21028
21038
  },
21029
- {
21030
- name: "SQRT",
21039
+ "SQRT": {
21040
+ counter: BuiltIn.counter++,
21031
21041
  mandatory: {
21032
21042
  "val": new basic_1.FloatType(),
21033
21043
  },
21034
21044
  return: new basic_1.FloatType(),
21035
21045
  },
21036
- {
21037
- name: "STRLEN",
21046
+ "STRLEN": {
21047
+ counter: BuiltIn.counter++,
21038
21048
  mandatory: {
21039
21049
  "val": basic_1.CLikeType.get(),
21040
21050
  },
21041
21051
  return: basic_1.IntegerType.get(),
21042
21052
  },
21043
- {
21044
- name: "SUBSTRING",
21053
+ "SUBSTRING": {
21054
+ counter: BuiltIn.counter++,
21045
21055
  mandatory: {
21046
21056
  "val": basic_1.CLikeType.get(),
21047
21057
  },
@@ -21052,8 +21062,8 @@ BuiltIn.methods = [
21052
21062
  return: basic_1.StringType.get(),
21053
21063
  version: version_1.Version.v702,
21054
21064
  },
21055
- {
21056
- name: "SUBSTRING_AFTER",
21065
+ "SUBSTRING_AFTER": {
21066
+ counter: BuiltIn.counter++,
21057
21067
  mandatory: {
21058
21068
  "val": basic_1.CLikeType.get(),
21059
21069
  },
@@ -21068,8 +21078,8 @@ BuiltIn.methods = [
21068
21078
  return: basic_1.StringType.get(),
21069
21079
  version: version_1.Version.v702,
21070
21080
  },
21071
- {
21072
- name: "SUBSTRING_BEFORE",
21081
+ "SUBSTRING_BEFORE": {
21082
+ counter: BuiltIn.counter++,
21073
21083
  mandatory: {
21074
21084
  "val": basic_1.CLikeType.get(),
21075
21085
  },
@@ -21084,8 +21094,8 @@ BuiltIn.methods = [
21084
21094
  return: basic_1.StringType.get(),
21085
21095
  version: version_1.Version.v702,
21086
21096
  },
21087
- {
21088
- name: "SUBSTRING_FROM",
21097
+ "SUBSTRING_FROM": {
21098
+ counter: BuiltIn.counter++,
21089
21099
  mandatory: {
21090
21100
  "val": basic_1.CLikeType.get(),
21091
21101
  },
@@ -21100,8 +21110,8 @@ BuiltIn.methods = [
21100
21110
  return: basic_1.StringType.get(),
21101
21111
  version: version_1.Version.v702,
21102
21112
  },
21103
- {
21104
- name: "SUBSTRING_TO",
21113
+ "SUBSTRING_TO": {
21114
+ counter: BuiltIn.counter++,
21105
21115
  mandatory: {
21106
21116
  "val": basic_1.CLikeType.get(),
21107
21117
  },
@@ -21116,30 +21126,30 @@ BuiltIn.methods = [
21116
21126
  return: basic_1.StringType.get(),
21117
21127
  version: version_1.Version.v702,
21118
21128
  },
21119
- {
21120
- name: "TAN",
21129
+ "TAN": {
21130
+ counter: BuiltIn.counter++,
21121
21131
  mandatory: {
21122
21132
  "val": new basic_1.FloatType(),
21123
21133
  },
21124
21134
  return: new basic_1.FloatType(),
21125
21135
  },
21126
- {
21127
- name: "TANH",
21136
+ "TANH": {
21137
+ counter: BuiltIn.counter++,
21128
21138
  mandatory: {
21129
21139
  "val": new basic_1.FloatType(),
21130
21140
  },
21131
21141
  return: new basic_1.FloatType(),
21132
21142
  },
21133
- {
21134
- name: "TO_LOWER",
21143
+ "TO_LOWER": {
21144
+ counter: BuiltIn.counter++,
21135
21145
  mandatory: {
21136
21146
  "val": basic_1.CLikeType.get(),
21137
21147
  },
21138
21148
  return: basic_1.StringType.get(),
21139
21149
  version: version_1.Version.v702,
21140
21150
  },
21141
- {
21142
- name: "TO_MIXED",
21151
+ "TO_MIXED": {
21152
+ counter: BuiltIn.counter++,
21143
21153
  mandatory: {
21144
21154
  "val": basic_1.CLikeType.get(),
21145
21155
  },
@@ -21151,14 +21161,14 @@ BuiltIn.methods = [
21151
21161
  return: basic_1.StringType.get(),
21152
21162
  version: version_1.Version.v702,
21153
21163
  },
21154
- {
21155
- name: "TO_UPPER",
21164
+ "TO_UPPER": {
21165
+ counter: BuiltIn.counter++,
21156
21166
  mandatory: { "val": basic_1.CLikeType.get() },
21157
21167
  return: basic_1.StringType.get(),
21158
21168
  version: version_1.Version.v702,
21159
21169
  },
21160
- {
21161
- name: "TRANSLATE",
21170
+ "TRANSLATE": {
21171
+ counter: BuiltIn.counter++,
21162
21172
  mandatory: {
21163
21173
  "val": basic_1.CLikeType.get(),
21164
21174
  "from": basic_1.CLikeType.get(),
@@ -21167,15 +21177,15 @@ BuiltIn.methods = [
21167
21177
  return: basic_1.StringType.get(),
21168
21178
  version: version_1.Version.v702,
21169
21179
  },
21170
- {
21171
- name: "TRUNC",
21180
+ "TRUNC": {
21181
+ counter: BuiltIn.counter++,
21172
21182
  mandatory: {
21173
21183
  "val": new basic_1.FloatType(),
21174
21184
  },
21175
21185
  return: basic_1.IntegerType.get(),
21176
21186
  },
21177
- {
21178
- name: "UTCLONG_ADD",
21187
+ "UTCLONG_ADD": {
21188
+ counter: BuiltIn.counter++,
21179
21189
  mandatory: {
21180
21190
  "val": new basic_1.UTCLongType(),
21181
21191
  },
@@ -21188,13 +21198,13 @@ BuiltIn.methods = [
21188
21198
  return: new basic_1.UTCLongType(),
21189
21199
  version: version_1.Version.v754,
21190
21200
  },
21191
- {
21192
- name: "UTCLONG_CURRENT",
21201
+ "UTCLONG_CURRENT": {
21202
+ counter: BuiltIn.counter++,
21193
21203
  return: new basic_1.UTCLongType(),
21194
21204
  version: version_1.Version.v754,
21195
21205
  },
21196
- {
21197
- name: "UTCLONG_DIFF",
21206
+ "UTCLONG_DIFF": {
21207
+ counter: BuiltIn.counter++,
21198
21208
  mandatory: {
21199
21209
  "high": new basic_1.UTCLongType(),
21200
21210
  "low": new basic_1.UTCLongType(),
@@ -21202,22 +21212,22 @@ BuiltIn.methods = [
21202
21212
  return: new basic_1.FloatType(),
21203
21213
  version: version_1.Version.v754,
21204
21214
  },
21205
- {
21206
- name: "XSDBOOL",
21215
+ "XSDBOOL": {
21216
+ counter: BuiltIn.counter++,
21207
21217
  mandatory: {
21208
21218
  "val": basic_1.CLikeType.get(),
21209
21219
  },
21210
21220
  return: new basic_1.CharacterType(1),
21211
21221
  version: version_1.Version.v740sp08,
21212
21222
  },
21213
- {
21214
- name: "XSTRLEN",
21223
+ "XSTRLEN": {
21224
+ counter: BuiltIn.counter++,
21215
21225
  mandatory: {
21216
21226
  "val": new basic_1.XSequenceType(),
21217
21227
  },
21218
21228
  return: basic_1.IntegerType.get(),
21219
21229
  },
21220
- ];
21230
+ };
21221
21231
  //# sourceMappingURL=_builtin.js.map
21222
21232
 
21223
21233
  /***/ }),
@@ -21238,7 +21248,6 @@ const position_1 = __webpack_require__(/*! ../../position */ "./node_modules/@ab
21238
21248
  const spaghetti_scope_1 = __webpack_require__(/*! ./spaghetti_scope */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/spaghetti_scope.js");
21239
21249
  const _identifier_1 = __webpack_require__(/*! ../4_file_information/_identifier */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/_identifier.js");
21240
21250
  const _scope_type_1 = __webpack_require__(/*! ./_scope_type */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js");
21241
- const _reference_1 = __webpack_require__(/*! ./_reference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js");
21242
21251
  const syntax_1 = __webpack_require__(/*! ./syntax */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js");
21243
21252
  class CurrentScope {
21244
21253
  static buildDefault(reg, obj) {
@@ -21330,8 +21339,14 @@ class CurrentScope {
21330
21339
  this.current.getData().forms.push(...f);
21331
21340
  }
21332
21341
  addInterfaceDefinition(i) {
21333
- var _a;
21334
- (_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;
21335
21350
  }
21336
21351
  addNamedIdentifier(name, identifier) {
21337
21352
  if (this.current === undefined) {
@@ -21426,11 +21441,10 @@ class CurrentScope {
21426
21441
  }
21427
21442
  return false;
21428
21443
  }
21429
- // todo, found + type can be removed from method output?
21430
21444
  existsObject(name) {
21431
21445
  var _a, _b, _c;
21432
21446
  if (name === undefined) {
21433
- return { found: false };
21447
+ return undefined;
21434
21448
  }
21435
21449
  let prefixRTTI = "";
21436
21450
  if (this.parentObj.getType() === "PROG") {
@@ -21444,28 +21458,28 @@ class CurrentScope {
21444
21458
  if (findLocalClass.isGlobal() === true) {
21445
21459
  prefixRTTI = "";
21446
21460
  }
21447
- 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() };
21448
21462
  }
21449
21463
  const globalClas = this.reg.getObject("CLAS", name);
21450
21464
  if (globalClas) {
21451
- 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() };
21452
21466
  }
21453
21467
  const findLocalInterface = (_b = this.current) === null || _b === void 0 ? void 0 : _b.findInterfaceDefinition(name);
21454
21468
  if (findLocalInterface) {
21455
21469
  if (findLocalInterface.isGlobal() === true) {
21456
21470
  prefixRTTI = "";
21457
21471
  }
21458
- 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() };
21459
21473
  }
21460
21474
  const globalIntf = this.reg.getObject("INTF", name);
21461
21475
  if (globalIntf) {
21462
- 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() };
21463
21477
  }
21464
21478
  const def = (_c = this.current) === null || _c === void 0 ? void 0 : _c.findDeferred(name);
21465
21479
  if (def !== undefined) {
21466
- return { found: true, id: def };
21480
+ return { id: def };
21467
21481
  }
21468
- return { found: false };
21482
+ return undefined;
21469
21483
  }
21470
21484
  ///////////////////////////
21471
21485
  /** Lookup class in local and global scope */
@@ -22585,6 +22599,8 @@ class TypeUtils {
22585
22599
  else if (source instanceof basic_1.ObjectReferenceType) {
22586
22600
  if (target instanceof basic_1.XSequenceType
22587
22601
  || target instanceof basic_1.IntegerType
22602
+ || target instanceof basic_1.StructureType
22603
+ || target instanceof basic_1.TableType
22588
22604
  || target instanceof basic_1.XStringType) {
22589
22605
  return false;
22590
22606
  }
@@ -23506,7 +23522,7 @@ class BasicTypes {
23506
23522
  else if (firstNode.get() instanceof Expressions.ClassName) {
23507
23523
  const obj = this.scope.findObjectDefinition(firstName);
23508
23524
  if (obj === undefined) {
23509
- if (this.scope.existsObject(firstName).found === true) {
23525
+ if (this.scope.existsObject(firstName) !== undefined) {
23510
23526
  return undefined;
23511
23527
  }
23512
23528
  else if (this.scope.getDDIC().inErrorNamespace(firstName) === true) {
@@ -23553,7 +23569,7 @@ class BasicTypes {
23553
23569
  return new Types.GenericObjectReferenceType();
23554
23570
  }
23555
23571
  const search = this.scope.existsObject(name);
23556
- if (search.found === true && search.id) {
23572
+ if (search === null || search === void 0 ? void 0 : search.id) {
23557
23573
  this.scope.addReference(chain.getFirstToken(), search.id, _reference_1.ReferenceType.ObjectOrientedReference, this.filename, { ooType: search.ooType, ooName: name });
23558
23574
  return new Types.ObjectReferenceType(search.id, { qualifiedName: name, RTTIName: search.RTTIName });
23559
23575
  }
@@ -24729,8 +24745,8 @@ class FieldChain {
24729
24745
  return new basic_1.GenericObjectReferenceType();
24730
24746
  }
24731
24747
  const found = scope.existsObject(classNam);
24732
- if (found.found === true && found.id) {
24733
- 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);
24734
24750
  return new basic_1.ObjectReferenceType(found.id);
24735
24751
  }
24736
24752
  else if (scope.getDDIC().inErrorNamespace(classNam) === false) {
@@ -25542,8 +25558,13 @@ class MethodCallParam {
25542
25558
  else if (child instanceof nodes_1.ExpressionNode
25543
25559
  && (child.get() instanceof Expressions.Source
25544
25560
  || child.get() instanceof Expressions.ConstantString)) {
25545
- if (!(method instanceof basic_1.VoidType) && method.getParameters().getImporting().length === 0) {
25546
- 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
+ }
25547
25568
  }
25548
25569
  let targetType = undefined;
25549
25570
  if (!(method instanceof basic_1.VoidType)) {
@@ -27278,6 +27299,7 @@ const field_offset_1 = __webpack_require__(/*! ./field_offset */ "./node_modules
27278
27299
  const _reference_1 = __webpack_require__(/*! ../_reference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js");
27279
27300
  const table_expression_1 = __webpack_require__(/*! ./table_expression */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/table_expression.js");
27280
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");
27281
27303
  class Target {
27282
27304
  runSyntax(node, scope, filename) {
27283
27305
  const concat = node.concatTokens();
@@ -27360,8 +27382,18 @@ class Target {
27360
27382
  }
27361
27383
  const offset = node.findDirectExpression(Expressions.FieldOffset);
27362
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
+ }
27363
27388
  new field_offset_1.FieldOffset().runSyntax(offset, scope, filename);
27364
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
+ }
27365
27397
  return context;
27366
27398
  }
27367
27399
  /////////////////////////////////
@@ -27747,7 +27779,7 @@ class ScopeData {
27747
27779
  this.data = {
27748
27780
  vars: {},
27749
27781
  cdefs: {},
27750
- idefs: [], // todo, refactor to object
27782
+ idefs: {},
27751
27783
  forms: [], // todo, refactor to object
27752
27784
  types: {},
27753
27785
  extraLikeTypes: {},
@@ -27849,26 +27881,13 @@ class SpaghettiScopeNode extends ScopeData {
27849
27881
  }
27850
27882
  return undefined;
27851
27883
  }
27852
- // todo, can be deleted, not called from anywhere?
27853
- listFormDefinitions() {
27854
- let search = this;
27855
- const ret = [];
27856
- while (search !== undefined) {
27857
- for (const form of search.getData().forms) {
27858
- ret.push(form);
27859
- }
27860
- search = search.getParent();
27861
- }
27862
- return ret;
27863
- }
27864
- // todo, optimize
27865
27884
  findInterfaceDefinition(name) {
27866
27885
  let search = this;
27886
+ const upper = name.toUpperCase();
27867
27887
  while (search !== undefined) {
27868
- for (const idef of search.getData().idefs) {
27869
- if (idef.getName().toUpperCase() === name.toUpperCase()) {
27870
- return idef;
27871
- }
27888
+ const idef = search.getData().idefs[upper];
27889
+ if (idef) {
27890
+ return idef;
27872
27891
  }
27873
27892
  search = search.getParent();
27874
27893
  }
@@ -27878,9 +27897,9 @@ class SpaghettiScopeNode extends ScopeData {
27878
27897
  let search = this;
27879
27898
  const upper = name.toUpperCase();
27880
27899
  while (search !== undefined) {
27881
- const data = search.getData();
27882
- if (data.types[upper]) {
27883
- return data.types[upper];
27900
+ const found = search.getData().types[upper];
27901
+ if (found) {
27902
+ return found;
27884
27903
  }
27885
27904
  search = search.getParent();
27886
27905
  }
@@ -28586,8 +28605,8 @@ class Catch {
28586
28605
  const token = c.getFirstToken();
28587
28606
  const className = token.getStr().toUpperCase();
28588
28607
  const found = scope.existsObject(className);
28589
- if (found.found === true && found.id) {
28590
- 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);
28591
28610
  }
28592
28611
  else if (scope.getDDIC().inErrorNamespace(className) === false) {
28593
28612
  const extra = { ooName: className, ooType: "Void" };
@@ -28606,7 +28625,7 @@ class Catch {
28606
28625
  if (target === null || target === void 0 ? void 0 : target.findDirectExpression(Expressions.InlineData)) {
28607
28626
  const token = (_b = target.findFirstExpression(Expressions.TargetField)) === null || _b === void 0 ? void 0 : _b.getFirstToken();
28608
28627
  const found = scope.existsObject(firstClassName);
28609
- if (token && found.found === true && firstClassName && found.id) {
28628
+ if (token && firstClassName && (found === null || found === void 0 ? void 0 : found.id)) {
28610
28629
  const identifier = new _typed_identifier_1.TypedIdentifier(token, filename, new basic_1.ObjectReferenceType(found.id), ["inline" /* IdentifierMeta.InlineDefinition */]);
28611
28630
  scope.addIdentifier(identifier);
28612
28631
  scope.addReference(token, identifier, _reference_1.ReferenceType.DataWriteReference, filename);
@@ -28809,7 +28828,7 @@ class ClassLocalFriends {
28809
28828
  const className = classNames[i].concatTokens();
28810
28829
  // make sure to check also DEFINITION DEFERRED
28811
28830
  const found = scope.existsObject(className);
28812
- if (found.found === false) {
28831
+ if (found === undefined) {
28813
28832
  throw new Error(`Class ${className.toUpperCase()} not found`);
28814
28833
  }
28815
28834
  }
@@ -31239,8 +31258,8 @@ class Raise {
31239
31258
  const className = classTok === null || classTok === void 0 ? void 0 : classTok.getStr();
31240
31259
  if (className) {
31241
31260
  const found = scope.existsObject(className);
31242
- if (found.found === true && found.id) {
31243
- 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);
31244
31263
  const def = scope.findObjectDefinition(className);
31245
31264
  method = (_b = helper.searchMethodName(def, "CONSTRUCTOR")) === null || _b === void 0 ? void 0 : _b.method;
31246
31265
  }
@@ -34075,13 +34094,13 @@ class FlowGraph {
34075
34094
  this.label = label;
34076
34095
  }
34077
34096
  toDigraph() {
34078
- return `digraph G {
34079
- labelloc="t";
34080
- label="${this.label}";
34081
- graph [fontname = "helvetica"];
34082
- node [fontname = "helvetica", shape="box"];
34083
- edge [fontname = "helvetica"];
34084
- ${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()}
34085
34104
  }`;
34086
34105
  }
34087
34106
  listSources(node) {
@@ -36789,8 +36808,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
36789
36808
  exports.VoidType = void 0;
36790
36809
  const _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js");
36791
36810
  class VoidType extends _abstract_type_1.AbstractType {
36792
- constructor(voided, name) {
36793
- super({ qualifiedName: name });
36811
+ constructor(voided, qualifiedName) {
36812
+ super({ qualifiedName: qualifiedName });
36794
36813
  this.voided = voided;
36795
36814
  }
36796
36815
  getVoided() {
@@ -42085,13 +42104,13 @@ class Help {
42085
42104
  /////////////////////////////////////////////////
42086
42105
  static dumpABAP(file, reg, textDocument, position) {
42087
42106
  let content = "";
42088
- content = `
42089
- <a href="#_tokens" rel="no-refresh">Tokens</a> |
42090
- <a href="#_statements" rel="no-refresh">Statements</a> |
42091
- <a href="#_structure" rel="no-refresh">Structure</a> |
42092
- <a href="#_files" rel="no-refresh">Files</a> |
42093
- <a href="#_info" rel="no-refresh">Info Dump</a>
42094
- <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>
42095
42114
  ` +
42096
42115
  "<tt>" + textDocument.uri + " (" +
42097
42116
  (position.line + 1) + ", " +
@@ -46698,6 +46717,29 @@ __exportStar(__webpack_require__(/*! ./message_class */ "./node_modules/@abaplin
46698
46717
  __exportStar(__webpack_require__(/*! ./messaging_channel */ "./node_modules/@abaplint/core/build/src/objects/messaging_channel.js"), exports);
46699
46718
  __exportStar(__webpack_require__(/*! ./mime_object */ "./node_modules/@abaplint/core/build/src/objects/mime_object.js"), exports);
46700
46719
  __exportStar(__webpack_require__(/*! ./namespace */ "./node_modules/@abaplint/core/build/src/objects/namespace.js"), exports);
46720
+ __exportStar(__webpack_require__(/*! ./neptune_api */ "./node_modules/@abaplint/core/build/src/objects/neptune_api.js"), exports);
46721
+ __exportStar(__webpack_require__(/*! ./neptune_app */ "./node_modules/@abaplint/core/build/src/objects/neptune_app.js"), exports);
46722
+ __exportStar(__webpack_require__(/*! ./neptune_custom_color */ "./node_modules/@abaplint/core/build/src/objects/neptune_custom_color.js"), exports);
46723
+ __exportStar(__webpack_require__(/*! ./neptune_custom_js_helper */ "./node_modules/@abaplint/core/build/src/objects/neptune_custom_js_helper.js"), exports);
46724
+ __exportStar(__webpack_require__(/*! ./neptune_documentation */ "./node_modules/@abaplint/core/build/src/objects/neptune_documentation.js"), exports);
46725
+ __exportStar(__webpack_require__(/*! ./neptune_enhancement */ "./node_modules/@abaplint/core/build/src/objects/neptune_enhancement.js"), exports);
46726
+ __exportStar(__webpack_require__(/*! ./neptune_launchpad_layout */ "./node_modules/@abaplint/core/build/src/objects/neptune_launchpad_layout.js"), exports);
46727
+ __exportStar(__webpack_require__(/*! ./neptune_launchpad */ "./node_modules/@abaplint/core/build/src/objects/neptune_launchpad.js"), exports);
46728
+ __exportStar(__webpack_require__(/*! ./neptune_login_page */ "./node_modules/@abaplint/core/build/src/objects/neptune_login_page.js"), exports);
46729
+ __exportStar(__webpack_require__(/*! ./neptune_media_library */ "./node_modules/@abaplint/core/build/src/objects/neptune_media_library.js"), exports);
46730
+ __exportStar(__webpack_require__(/*! ./neptune_media_pack */ "./node_modules/@abaplint/core/build/src/objects/neptune_media_pack.js"), exports);
46731
+ __exportStar(__webpack_require__(/*! ./neptune_metadata */ "./node_modules/@abaplint/core/build/src/objects/neptune_metadata.js"), exports);
46732
+ __exportStar(__webpack_require__(/*! ./neptune_mobile_client */ "./node_modules/@abaplint/core/build/src/objects/neptune_mobile_client.js"), exports);
46733
+ __exportStar(__webpack_require__(/*! ./neptune_odata */ "./node_modules/@abaplint/core/build/src/objects/neptune_odata.js"), exports);
46734
+ __exportStar(__webpack_require__(/*! ./neptune_policy */ "./node_modules/@abaplint/core/build/src/objects/neptune_policy.js"), exports);
46735
+ __exportStar(__webpack_require__(/*! ./neptune_rfc_mapping */ "./node_modules/@abaplint/core/build/src/objects/neptune_rfc_mapping.js"), exports);
46736
+ __exportStar(__webpack_require__(/*! ./neptune_rich_text_template */ "./node_modules/@abaplint/core/build/src/objects/neptune_rich_text_template.js"), exports);
46737
+ __exportStar(__webpack_require__(/*! ./neptune_splash_screen */ "./node_modules/@abaplint/core/build/src/objects/neptune_splash_screen.js"), exports);
46738
+ __exportStar(__webpack_require__(/*! ./neptune_sticky_banner */ "./node_modules/@abaplint/core/build/src/objects/neptune_sticky_banner.js"), exports);
46739
+ __exportStar(__webpack_require__(/*! ./neptune_tile_group */ "./node_modules/@abaplint/core/build/src/objects/neptune_tile_group.js"), exports);
46740
+ __exportStar(__webpack_require__(/*! ./neptune_tile_layout */ "./node_modules/@abaplint/core/build/src/objects/neptune_tile_layout.js"), exports);
46741
+ __exportStar(__webpack_require__(/*! ./neptune_tile */ "./node_modules/@abaplint/core/build/src/objects/neptune_tile.js"), exports);
46742
+ __exportStar(__webpack_require__(/*! ./neptune_url_alias */ "./node_modules/@abaplint/core/build/src/objects/neptune_url_alias.js"), exports);
46701
46743
  __exportStar(__webpack_require__(/*! ./number_range */ "./node_modules/@abaplint/core/build/src/objects/number_range.js"), exports);
46702
46744
  __exportStar(__webpack_require__(/*! ./oauth2_profile */ "./node_modules/@abaplint/core/build/src/objects/oauth2_profile.js"), exports);
46703
46745
  __exportStar(__webpack_require__(/*! ./object_characteristic */ "./node_modules/@abaplint/core/build/src/objects/object_characteristic.js"), exports);
@@ -46722,6 +46764,7 @@ __exportStar(__webpack_require__(/*! ./service_definition */ "./node_modules/@ab
46722
46764
  __exportStar(__webpack_require__(/*! ./shared_memory */ "./node_modules/@abaplint/core/build/src/objects/shared_memory.js"), exports);
46723
46765
  __exportStar(__webpack_require__(/*! ./smart_form */ "./node_modules/@abaplint/core/build/src/objects/smart_form.js"), exports);
46724
46766
  __exportStar(__webpack_require__(/*! ./smart_style */ "./node_modules/@abaplint/core/build/src/objects/smart_style.js"), exports);
46767
+ __exportStar(__webpack_require__(/*! ./standard_task */ "./node_modules/@abaplint/core/build/src/objects/standard_task.js"), exports);
46725
46768
  __exportStar(__webpack_require__(/*! ./switch_assignment_hierarchy */ "./node_modules/@abaplint/core/build/src/objects/switch_assignment_hierarchy.js"), exports);
46726
46769
  __exportStar(__webpack_require__(/*! ./switch_assignments */ "./node_modules/@abaplint/core/build/src/objects/switch_assignments.js"), exports);
46727
46770
  __exportStar(__webpack_require__(/*! ./table_type */ "./node_modules/@abaplint/core/build/src/objects/table_type.js"), exports);
@@ -46739,29 +46782,6 @@ __exportStar(__webpack_require__(/*! ./web_dynpro_application */ "./node_modules
46739
46782
  __exportStar(__webpack_require__(/*! ./web_dynpro_component_configuration */ "./node_modules/@abaplint/core/build/src/objects/web_dynpro_component_configuration.js"), exports);
46740
46783
  __exportStar(__webpack_require__(/*! ./web_dynpro_component */ "./node_modules/@abaplint/core/build/src/objects/web_dynpro_component.js"), exports);
46741
46784
  __exportStar(__webpack_require__(/*! ./web_mime */ "./node_modules/@abaplint/core/build/src/objects/web_mime.js"), exports);
46742
- __exportStar(__webpack_require__(/*! ./neptune_metadata */ "./node_modules/@abaplint/core/build/src/objects/neptune_metadata.js"), exports);
46743
- __exportStar(__webpack_require__(/*! ./neptune_app */ "./node_modules/@abaplint/core/build/src/objects/neptune_app.js"), exports);
46744
- __exportStar(__webpack_require__(/*! ./neptune_api */ "./node_modules/@abaplint/core/build/src/objects/neptune_api.js"), exports);
46745
- __exportStar(__webpack_require__(/*! ./neptune_launchpad */ "./node_modules/@abaplint/core/build/src/objects/neptune_launchpad.js"), exports);
46746
- __exportStar(__webpack_require__(/*! ./neptune_tile_group */ "./node_modules/@abaplint/core/build/src/objects/neptune_tile_group.js"), exports);
46747
- __exportStar(__webpack_require__(/*! ./neptune_tile */ "./node_modules/@abaplint/core/build/src/objects/neptune_tile.js"), exports);
46748
- __exportStar(__webpack_require__(/*! ./neptune_policy */ "./node_modules/@abaplint/core/build/src/objects/neptune_policy.js"), exports);
46749
- __exportStar(__webpack_require__(/*! ./neptune_launchpad_layout */ "./node_modules/@abaplint/core/build/src/objects/neptune_launchpad_layout.js"), exports);
46750
- __exportStar(__webpack_require__(/*! ./neptune_tile_layout */ "./node_modules/@abaplint/core/build/src/objects/neptune_tile_layout.js"), exports);
46751
- __exportStar(__webpack_require__(/*! ./neptune_enhancement */ "./node_modules/@abaplint/core/build/src/objects/neptune_enhancement.js"), exports);
46752
- __exportStar(__webpack_require__(/*! ./neptune_login_page */ "./node_modules/@abaplint/core/build/src/objects/neptune_login_page.js"), exports);
46753
- __exportStar(__webpack_require__(/*! ./neptune_sticky_banner */ "./node_modules/@abaplint/core/build/src/objects/neptune_sticky_banner.js"), exports);
46754
- __exportStar(__webpack_require__(/*! ./neptune_splash_screen */ "./node_modules/@abaplint/core/build/src/objects/neptune_splash_screen.js"), exports);
46755
- __exportStar(__webpack_require__(/*! ./neptune_custom_color */ "./node_modules/@abaplint/core/build/src/objects/neptune_custom_color.js"), exports);
46756
- __exportStar(__webpack_require__(/*! ./neptune_rich_text_template */ "./node_modules/@abaplint/core/build/src/objects/neptune_rich_text_template.js"), exports);
46757
- __exportStar(__webpack_require__(/*! ./neptune_custom_js_helper */ "./node_modules/@abaplint/core/build/src/objects/neptune_custom_js_helper.js"), exports);
46758
- __exportStar(__webpack_require__(/*! ./neptune_documentation */ "./node_modules/@abaplint/core/build/src/objects/neptune_documentation.js"), exports);
46759
- __exportStar(__webpack_require__(/*! ./neptune_rfc_mapping */ "./node_modules/@abaplint/core/build/src/objects/neptune_rfc_mapping.js"), exports);
46760
- __exportStar(__webpack_require__(/*! ./neptune_media_library */ "./node_modules/@abaplint/core/build/src/objects/neptune_media_library.js"), exports);
46761
- __exportStar(__webpack_require__(/*! ./neptune_media_pack */ "./node_modules/@abaplint/core/build/src/objects/neptune_media_pack.js"), exports);
46762
- __exportStar(__webpack_require__(/*! ./neptune_url_alias */ "./node_modules/@abaplint/core/build/src/objects/neptune_url_alias.js"), exports);
46763
- __exportStar(__webpack_require__(/*! ./neptune_odata */ "./node_modules/@abaplint/core/build/src/objects/neptune_odata.js"), exports);
46764
- __exportStar(__webpack_require__(/*! ./neptune_mobile_client */ "./node_modules/@abaplint/core/build/src/objects/neptune_mobile_client.js"), exports);
46765
46785
  //# sourceMappingURL=index.js.map
46766
46786
 
46767
46787
  /***/ }),
@@ -47299,7 +47319,7 @@ class NeptuneAPI extends _abstract_object_1.AbstractObject {
47299
47319
  }
47300
47320
  getAllowedNaming() {
47301
47321
  return {
47302
- maxLength: 30,
47322
+ maxLength: 100,
47303
47323
  allowNamespace: true,
47304
47324
  };
47305
47325
  }
@@ -49466,6 +49486,37 @@ exports.SmartStyle = SmartStyle;
49466
49486
 
49467
49487
  /***/ }),
49468
49488
 
49489
+ /***/ "./node_modules/@abaplint/core/build/src/objects/standard_task.js":
49490
+ /*!************************************************************************!*\
49491
+ !*** ./node_modules/@abaplint/core/build/src/objects/standard_task.js ***!
49492
+ \************************************************************************/
49493
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
49494
+
49495
+ "use strict";
49496
+
49497
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
49498
+ exports.StandardTask = void 0;
49499
+ const _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ "./node_modules/@abaplint/core/build/src/objects/_abstract_object.js");
49500
+ class StandardTask extends _abstract_object_1.AbstractObject {
49501
+ getType() {
49502
+ return "PDTS";
49503
+ }
49504
+ getAllowedNaming() {
49505
+ return {
49506
+ maxLength: 30,
49507
+ allowNamespace: true,
49508
+ };
49509
+ }
49510
+ getDescription() {
49511
+ // todo
49512
+ return undefined;
49513
+ }
49514
+ }
49515
+ exports.StandardTask = StandardTask;
49516
+ //# sourceMappingURL=standard_task.js.map
49517
+
49518
+ /***/ }),
49519
+
49469
49520
  /***/ "./node_modules/@abaplint/core/build/src/objects/switch_assignment_hierarchy.js":
49470
49521
  /*!**************************************************************************************!*\
49471
49522
  !*** ./node_modules/@abaplint/core/build/src/objects/switch_assignment_hierarchy.js ***!
@@ -51045,7 +51096,7 @@ class Registry {
51045
51096
  }
51046
51097
  static abaplintVersion() {
51047
51098
  // magic, see build script "version.sh"
51048
- return "2.105.3";
51099
+ return "2.105.5";
51049
51100
  }
51050
51101
  getDDICReferences() {
51051
51102
  return this.ddicReferences;
@@ -51361,10 +51412,10 @@ class SevenBitAscii {
51361
51412
  key: "7bit_ascii",
51362
51413
  title: "Check for 7bit ascii",
51363
51414
  shortDescription: `Only allow characters from the 7bit ASCII set.`,
51364
- extendedInformation: `https://docs.abapopenchecks.org/checks/05/
51365
-
51366
- https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
51367
-
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
+
51368
51419
  Checkes files with extensions ".abap" and ".asddls"`,
51369
51420
  tags: [_irule_1.RuleTag.SingleFile],
51370
51421
  };
@@ -51566,10 +51617,10 @@ class Abapdoc extends _abap_rule_1.ABAPRule {
51566
51617
  key: "abapdoc",
51567
51618
  title: "Check abapdoc",
51568
51619
  shortDescription: `Various checks regarding abapdoc.`,
51569
- extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
51570
-
51571
- Plus class and interface definitions.
51572
-
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
+
51573
51624
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#abap-doc-only-for-public-apis`,
51574
51625
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
51575
51626
  };
@@ -51704,49 +51755,49 @@ class AlignParameters extends _abap_rule_1.ABAPRule {
51704
51755
  key: "align_parameters",
51705
51756
  title: "Align Parameters",
51706
51757
  shortDescription: `Checks for vertially aligned parameters`,
51707
- extendedInformation: `Checks:
51708
- * function module calls
51709
- * method calls
51710
- * VALUE constructors
51711
- * NEW constructors
51712
- * RAISE EXCEPTION statements
51713
- * CREATE OBJECT statements
51714
- * RAISE EVENT statements
51715
-
51716
- https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
51717
-
51718
- Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
51719
-
51720
- 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
51721
51772
  https://rules.abaplint.org/max_one_method_parameter_per_line/ for splitting parameters to lines`,
51722
51773
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
51723
- badExample: `CALL FUNCTION 'FOOBAR'
51724
- EXPORTING
51725
- foo = 2
51726
- parameter = 3.
51727
-
51728
- foobar( moo = 1
51729
- param = 1 ).
51730
-
51731
- foo = VALUE #(
51732
- 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
51733
51784
  moo = 2 ).`,
51734
- goodExample: `CALL FUNCTION 'FOOBAR'
51735
- EXPORTING
51736
- foo = 2
51737
- parameter = 3.
51738
-
51739
- foobar( moo = 1
51740
- param = 1 ).
51741
-
51742
- foo = VALUE #(
51743
- foo = bar
51744
- moo = 2 ).
51745
-
51746
- DATA(sdf) = VALUE type(
51747
- common_val = 2
51748
- another_common = 5
51749
- ( 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
51750
51801
  value_foo = 5 ) ).`,
51751
51802
  };
51752
51803
  }
@@ -52221,15 +52272,15 @@ class AmbiguousStatement extends _abap_rule_1.ABAPRule {
52221
52272
  return {
52222
52273
  key: "ambiguous_statement",
52223
52274
  title: "Check for ambigious statements",
52224
- shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
52225
- Add "TABLE" keyword or "@" for escaping SQL variables
52226
-
52275
+ shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
52276
+ Add "TABLE" keyword or "@" for escaping SQL variables
52277
+
52227
52278
  Only works if the target version is 740sp05 or above`,
52228
52279
  tags: [_irule_1.RuleTag.SingleFile],
52229
- badExample: `DELETE foo FROM bar.
52280
+ badExample: `DELETE foo FROM bar.
52230
52281
  MODIFY foo FROM bar.`,
52231
- goodExample: `DELETE foo FROM @bar.
52232
- MODIFY TABLE foo FROM bar.
52282
+ goodExample: `DELETE foo FROM @bar.
52283
+ MODIFY TABLE foo FROM bar.
52233
52284
  MODIFY zfoo FROM @wa.`,
52234
52285
  };
52235
52286
  }
@@ -52333,16 +52384,16 @@ class AvoidUse extends _abap_rule_1.ABAPRule {
52333
52384
  key: "avoid_use",
52334
52385
  title: "Avoid use of certain statements",
52335
52386
  shortDescription: `Detects usage of certain statements.`,
52336
- extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
52337
-
52338
- Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
52339
-
52340
- STATICS: use CLASS-DATA instead
52341
-
52342
- DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
52343
-
52344
- TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
52345
-
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
+
52346
52397
  BREAK points`,
52347
52398
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
52348
52399
  };
@@ -52463,11 +52514,11 @@ class BeginEndNames extends _abap_rule_1.ABAPRule {
52463
52514
  title: "Check BEGIN END names",
52464
52515
  shortDescription: `Check BEGIN OF and END OF names match, plus there must be statements between BEGIN and END`,
52465
52516
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
52466
- badExample: `DATA: BEGIN OF stru,
52467
- field TYPE i,
52517
+ badExample: `DATA: BEGIN OF stru,
52518
+ field TYPE i,
52468
52519
  END OF structure_not_the_same.`,
52469
- goodExample: `DATA: BEGIN OF stru,
52470
- field TYPE i,
52520
+ goodExample: `DATA: BEGIN OF stru,
52521
+ field TYPE i,
52471
52522
  END OF stru.`,
52472
52523
  };
52473
52524
  }
@@ -52560,19 +52611,19 @@ class BeginSingleInclude extends _abap_rule_1.ABAPRule {
52560
52611
  title: "BEGIN contains single INCLUDE",
52561
52612
  shortDescription: `Finds TYPE BEGIN with just one INCLUDE TYPE, and DATA with single INCLUDE STRUCTURE`,
52562
52613
  tags: [_irule_1.RuleTag.SingleFile],
52563
- badExample: `TYPES: BEGIN OF dummy1.
52564
- INCLUDE TYPE dselc.
52565
- TYPES: END OF dummy1.
52566
-
52567
- DATA BEGIN OF foo.
52568
- INCLUDE STRUCTURE syst.
52569
- DATA END OF foo.
52570
-
52571
- STATICS BEGIN OF bar.
52572
- 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.
52573
52624
  STATICS END OF bar.`,
52574
- goodExample: `DATA BEGIN OF foo.
52575
- INCLUDE STRUCTURE dselc.
52625
+ goodExample: `DATA BEGIN OF foo.
52626
+ INCLUDE STRUCTURE dselc.
52576
52627
  DATA END OF foo.`,
52577
52628
  };
52578
52629
  }
@@ -52662,9 +52713,9 @@ class CallTransactionAuthorityCheck extends _abap_rule_1.ABAPRule {
52662
52713
  extendedInformation: `https://docs.abapopenchecks.org/checks/54/`,
52663
52714
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
52664
52715
  badExample: `CALL TRANSACTION 'FOO'.`,
52665
- goodExample: `TRY.
52666
- CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
52667
- CATCH cx_sy_authorization_error.
52716
+ goodExample: `TRY.
52717
+ CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
52718
+ CATCH cx_sy_authorization_error.
52668
52719
  ENDTRY.`,
52669
52720
  };
52670
52721
  }
@@ -52729,10 +52780,10 @@ class CDSCommentStyle {
52729
52780
  key: "cds_comment_style",
52730
52781
  title: "CDS Comment Style",
52731
52782
  shortDescription: `Check for obsolete comment style`,
52732
- extendedInformation: `Check for obsolete comment style
52733
-
52734
- Comments starting with "--" are considered obsolete
52735
-
52783
+ extendedInformation: `Check for obsolete comment style
52784
+
52785
+ Comments starting with "--" are considered obsolete
52786
+
52736
52787
  https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abencds_general_syntax_rules.htm`,
52737
52788
  tags: [_irule_1.RuleTag.SingleFile],
52738
52789
  badExample: "-- this is a comment",
@@ -52799,10 +52850,10 @@ class CDSLegacyView {
52799
52850
  title: "CDS Legacy View",
52800
52851
  shortDescription: `Identify CDS Legacy Views`,
52801
52852
  // eslint-disable-next-line max-len
52802
- extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
52803
-
52804
- https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
52805
-
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
+
52806
52857
  v755 and up`,
52807
52858
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Upport],
52808
52859
  };
@@ -52957,10 +53008,10 @@ class ChainMainlyDeclarations extends _abap_rule_1.ABAPRule {
52957
53008
  key: "chain_mainly_declarations",
52958
53009
  title: "Chain mainly declarations",
52959
53010
  shortDescription: `Chain mainly declarations, allows chaining for the configured statements, reports errors for other statements.`,
52960
- extendedInformation: `
52961
- https://docs.abapopenchecks.org/checks/23/
52962
-
52963
- 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
52964
53015
  `,
52965
53016
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
52966
53017
  badExample: `CALL METHOD: bar.`,
@@ -53136,17 +53187,17 @@ class ChangeIfToCase extends _abap_rule_1.ABAPRule {
53136
53187
  title: "Change IF to CASE",
53137
53188
  shortDescription: `Finds IF constructs that can be changed to CASE`,
53138
53189
  // eslint-disable-next-line max-len
53139
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
53140
-
53190
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
53191
+
53141
53192
  If the first comparison is a boolean compare, no issue is reported.`,
53142
53193
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
53143
- badExample: `IF l_fcat-fieldname EQ 'FOO'.
53144
- ELSEIF l_fcat-fieldname = 'BAR'
53145
- 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'.
53146
53197
  ENDIF.`,
53147
- goodExample: `CASE l_fcat-fieldname.
53148
- WHEN 'FOO'.
53149
- WHEN 'BAR' OR 'MOO'.
53198
+ goodExample: `CASE l_fcat-fieldname.
53199
+ WHEN 'FOO'.
53200
+ WHEN 'BAR' OR 'MOO'.
53150
53201
  ENDCASE.`,
53151
53202
  };
53152
53203
  }
@@ -53283,8 +53334,8 @@ class CheckAbstract extends _abap_rule_1.ABAPRule {
53283
53334
  return {
53284
53335
  key: "check_abstract",
53285
53336
  title: "Check abstract methods and classes",
53286
- shortDescription: `Checks abstract methods and classes:
53287
- - class defined as abstract and final,
53337
+ shortDescription: `Checks abstract methods and classes:
53338
+ - class defined as abstract and final,
53288
53339
  - non-abstract class contains abstract methods`,
53289
53340
  extendedInformation: `If a class defines only constants, use an interface instead`,
53290
53341
  tags: [_irule_1.RuleTag.SingleFile],
@@ -53365,11 +53416,11 @@ class CheckComments extends _abap_rule_1.ABAPRule {
53365
53416
  return {
53366
53417
  key: "check_comments",
53367
53418
  title: "Check Comments",
53368
- shortDescription: `
53419
+ shortDescription: `
53369
53420
  Various checks for comment usage.`,
53370
- extendedInformation: `
53371
- Detects end of line comments. Comments starting with "#EC" or "##" are ignored
53372
-
53421
+ extendedInformation: `
53422
+ Detects end of line comments. Comments starting with "#EC" or "##" are ignored
53423
+
53373
53424
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#put-comments-before-the-statement-they-relate-to`,
53374
53425
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
53375
53426
  badExample: `WRITE 2. " descriptive comment`,
@@ -53531,9 +53582,9 @@ class CheckInclude {
53531
53582
  key: "check_include",
53532
53583
  title: "Check INCLUDEs",
53533
53584
  shortDescription: `Checks INCLUDE statements`,
53534
- extendedInformation: `
53535
- * Reports unused includes
53536
- * Errors if the includes are not found
53585
+ extendedInformation: `
53586
+ * Reports unused includes
53587
+ * Errors if the includes are not found
53537
53588
  * Error if including a main program`,
53538
53589
  tags: [_irule_1.RuleTag.Syntax],
53539
53590
  };
@@ -53608,14 +53659,14 @@ class CheckSubrc extends _abap_rule_1.ABAPRule {
53608
53659
  key: "check_subrc",
53609
53660
  title: "Check sy-subrc",
53610
53661
  shortDescription: `Check sy-subrc`,
53611
- extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
53612
-
53613
- If sy-dbcnt is checked after database statements, it is considered okay.
53614
-
53615
- "SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
53616
-
53617
- If IS ASSIGNED is checked after assigning, it is considered okay.
53618
-
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
+
53619
53670
  FIND statement with MATCH COUNT is considered okay if subrc is not checked`,
53620
53671
  tags: [_irule_1.RuleTag.SingleFile],
53621
53672
  pseudoComment: "EC CI_SUBRC",
@@ -54168,17 +54219,17 @@ class ClassicExceptionsOverlap extends _abap_rule_1.ABAPRule {
54168
54219
  shortDescription: `Find overlapping classic exceptions`,
54169
54220
  extendedInformation: `When debugging its typically good to know exactly which exception is caught`,
54170
54221
  tags: [_irule_1.RuleTag.SingleFile],
54171
- badExample: `CALL FUNCTION 'SOMETHING'
54172
- EXCEPTIONS
54173
- system_failure = 1 MESSAGE lv_message
54174
- communication_failure = 1 MESSAGE lv_message
54175
- 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
54176
54227
  OTHERS = 1.`,
54177
- goodExample: `CALL FUNCTION 'SOMETHING'
54178
- EXCEPTIONS
54179
- system_failure = 1 MESSAGE lv_message
54180
- communication_failure = 2 MESSAGE lv_message
54181
- 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
54182
54233
  OTHERS = 4.`,
54183
54234
  };
54184
54235
  }
@@ -54424,7 +54475,7 @@ class CommentedCode extends _abap_rule_1.ABAPRule {
54424
54475
  key: "commented_code",
54425
54476
  title: "Find commented code",
54426
54477
  shortDescription: `Detects usage of commented out code.`,
54427
- 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
54428
54479
  https://docs.abapopenchecks.org/checks/14/`,
54429
54480
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
54430
54481
  };
@@ -54656,10 +54707,10 @@ class ConstructorVisibilityPublic {
54656
54707
  key: "constructor_visibility_public",
54657
54708
  title: "Check constructor visibility is public",
54658
54709
  shortDescription: `Constructor must be placed in the public section, even if the class is not CREATE PUBLIC.`,
54659
- extendedInformation: `
54660
- This only applies to global classes.
54661
-
54662
- 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
54663
54714
  https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abeninstance_constructor_guidl.htm`,
54664
54715
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
54665
54716
  };
@@ -54734,8 +54785,8 @@ class ContainsTab extends _abap_rule_1.ABAPRule {
54734
54785
  key: "contains_tab",
54735
54786
  title: "Code contains tab",
54736
54787
  shortDescription: `Checks for usage of tabs (enable to enforce spaces)`,
54737
- extendedInformation: `
54738
- https://docs.abapopenchecks.org/checks/09/
54788
+ extendedInformation: `
54789
+ https://docs.abapopenchecks.org/checks/09/
54739
54790
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
54740
54791
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
54741
54792
  };
@@ -54820,10 +54871,10 @@ class CyclicOO {
54820
54871
  key: "cyclic_oo",
54821
54872
  title: "Cyclic OO",
54822
54873
  shortDescription: `Finds cyclic OO references`,
54823
- extendedInformation: `Runs for global INTF + CLAS objects
54824
-
54825
- Objects must be without syntax errors for this rule to take effect
54826
-
54874
+ extendedInformation: `Runs for global INTF + CLAS objects
54875
+
54876
+ Objects must be without syntax errors for this rule to take effect
54877
+
54827
54878
  References in testclass includes are ignored`,
54828
54879
  };
54829
54880
  }
@@ -55065,7 +55116,7 @@ class DangerousStatement extends _abap_rule_1.ABAPRule {
55065
55116
  key: "dangerous_statement",
55066
55117
  title: "Dangerous statement",
55067
55118
  shortDescription: `Detects potentially dangerous statements`,
55068
- extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
55119
+ extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
55069
55120
  dynamic SQL can potentially create SQL injection problems`,
55070
55121
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
55071
55122
  };
@@ -55269,13 +55320,13 @@ class DefinitionsTop extends _abap_rule_1.ABAPRule {
55269
55320
  shortDescription: `Checks that definitions are placed at the beginning of METHODs, FORMs and FUNCTIONs.`,
55270
55321
  extendedInformation: `https://docs.abapopenchecks.org/checks/17/`,
55271
55322
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
55272
- badExample: `FROM foo.
55273
- WRITE 'hello'.
55274
- DATA int TYPE i.
55323
+ badExample: `FROM foo.
55324
+ WRITE 'hello'.
55325
+ DATA int TYPE i.
55275
55326
  ENDFORM.`,
55276
- goodExample: `FROM foo.
55277
- DATA int TYPE i.
55278
- WRITE 'hello'.
55327
+ goodExample: `FROM foo.
55328
+ DATA int TYPE i.
55329
+ WRITE 'hello'.
55279
55330
  ENDFORM.`,
55280
55331
  };
55281
55332
  }
@@ -55811,39 +55862,39 @@ class Downport {
55811
55862
  key: "downport",
55812
55863
  title: "Downport statement",
55813
55864
  shortDescription: `Downport functionality`,
55814
- extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with
55815
- a higher level language version. If successful, various rules are applied to downport the statement.
55816
- Target downport version is always v702, thus rule is only enabled if target version is v702.
55817
-
55818
- Current rules:
55819
- * NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/
55820
- * DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/
55821
- * FIELD-SYMBOL() definitions are outlined
55822
- * CONV is outlined
55823
- * COND is outlined
55824
- * REDUCE is outlined
55825
- * SWITCH is outlined
55826
- * FILTER is outlined
55827
- * APPEND expression is outlined
55828
- * INSERT expression is outlined
55829
- * EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/
55830
- * CAST changed to ?=
55831
- * LOOP AT method_call( ) is outlined
55832
- * VALUE # with structure fields
55833
- * VALUE # with internal table lines
55834
- * Table Expressions are outlined
55835
- * SELECT INTO @DATA definitions are outlined
55836
- * Some occurrences of string template formatting option ALPHA changed to function module call
55837
- * SELECT/INSERT/MODIFY/DELETE/UPDATE "," in field list removed, "@" in source/targets removed
55838
- * PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods
55839
- * RAISE EXCEPTION ... MESSAGE
55840
- * Moving with +=, -=, /=, *=, &&= is expanded
55841
- * line_exists and line_index is downported to READ TABLE
55842
- * ENUMs, but does not nessesarily give the correct type and value
55843
- * MESSAGE with non simple source
55844
-
55845
- Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.
55846
-
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
+
55847
55898
  Make sure to test the downported code, it might not always be completely correct.`,
55848
55899
  tags: [_irule_1.RuleTag.Downport, _irule_1.RuleTag.Quickfix],
55849
55900
  };
@@ -56417,10 +56468,10 @@ Make sure to test the downported code, it might not always be completely correct
56417
56468
  const fieldName = f.concatTokens();
56418
56469
  fieldDefinition += indentation + " " + fieldName + " TYPE " + tableName + "-" + fieldName + ",\n";
56419
56470
  }
56420
- fieldDefinition = `DATA: BEGIN OF ${name},
56471
+ fieldDefinition = `DATA: BEGIN OF ${name},
56421
56472
  ${fieldDefinition}${indentation} END OF ${name}.`;
56422
56473
  }
56423
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
56474
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
56424
56475
  ${indentation}`);
56425
56476
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
56426
56477
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -56464,12 +56515,12 @@ ${indentation}`);
56464
56515
  }
56465
56516
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
56466
56517
  const name = ((_c = inlineData.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || "error";
56467
- let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
56468
- ${fieldDefinitions}${indentation} END OF ${uniqueName}.
56469
- ${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.
56470
56521
  ${indentation}`);
56471
56522
  if (fieldDefinitions === "") {
56472
- 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.
56473
56524
  ${indentation}`);
56474
56525
  }
56475
56526
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
@@ -56537,7 +56588,7 @@ ${indentation}`);
56537
56588
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
56538
56589
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
56539
56590
  const firstToken = high.getFirstToken();
56540
- 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()}.
56541
56592
  ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
56542
56593
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
56543
56594
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -56575,7 +56626,7 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
56575
56626
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
56576
56627
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
56577
56628
  const firstToken = high.getFirstToken();
56578
- 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()}.
56579
56630
  ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
56580
56631
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
56581
56632
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -56617,14 +56668,14 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
56617
56668
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
56618
56669
  const firstToken = high.getFirstToken();
56619
56670
  // note that the tabix restore should be done before throwing the exception
56620
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.
56621
- ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
56622
- ${indentation}${tabixBackup} = sy-tabix.
56623
- ${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.
56624
- ${indentation}sy-tabix = ${tabixBackup}.
56625
- ${indentation}IF sy-subrc <> 0.
56626
- ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
56627
- ${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.
56628
56679
  ${indentation}`);
56629
56680
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, startToken.getStart(), tableExpression.getLastToken().getEnd(), uniqueName);
56630
56681
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -56681,7 +56732,7 @@ ${indentation}`);
56681
56732
  const className = classNames[0].concatTokens();
56682
56733
  const targetName = (_b = target.findFirstExpression(Expressions.TargetField)) === null || _b === void 0 ? void 0 : _b.concatTokens();
56683
56734
  const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
56684
- const code = ` DATA ${targetName} TYPE REF TO ${className}.
56735
+ const code = ` DATA ${targetName} TYPE REF TO ${className}.
56685
56736
  ${indentation}CATCH ${className} INTO ${targetName}.`;
56686
56737
  const fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getStart(), node.getEnd(), code);
56687
56738
  return issue_1.Issue.atToken(lowFile, node.getFirstToken(), "Outline DATA", this.getMetadata().key, this.conf.severity, fix);
@@ -56843,16 +56894,16 @@ ${indentation}CATCH ${className} INTO ${targetName}.`;
56843
56894
  const uniqueName1 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
56844
56895
  const uniqueName2 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
56845
56896
  const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
56846
- let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
56847
- ${indentation}${uniqueName1}-msgid = ${id}.
56897
+ let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
56898
+ ${indentation}${uniqueName1}-msgid = ${id}.
56848
56899
  ${indentation}${uniqueName1}-msgno = ${number}.\n`;
56849
56900
  if (withs.length > 0) {
56850
- abap += `${indentation}${uniqueName1}-attr1 = 'IF_T100_DYN_MSG~MSGV1'.
56851
- ${indentation}${uniqueName1}-attr2 = 'IF_T100_DYN_MSG~MSGV2'.
56852
- ${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'.
56853
56904
  ${indentation}${uniqueName1}-attr4 = 'IF_T100_DYN_MSG~MSGV4'.\n`;
56854
56905
  }
56855
- abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
56906
+ abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
56856
56907
  ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`;
56857
56908
  if (withs.length > 0) {
56858
56909
  abap += `${indentation}${uniqueName2}->if_t100_dyn_msg~msgty = 'E'.\n`;
@@ -56964,10 +57015,10 @@ ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`
56964
57015
  let code = "";
56965
57016
  if (sourceRef.findFirstExpression(Expressions.TableExpression)) {
56966
57017
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
56967
- code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).
56968
- IF sy-subrc <> 0.
56969
- RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
56970
- 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.
56971
57022
  GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
56972
57023
  }
56973
57024
  else {
@@ -57043,20 +57094,20 @@ GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
57043
57094
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
57044
57095
  const uniqueFS = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
57045
57096
  const uniqueNameIndex = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
57046
- code += ` items LIKE ${loopSourceName},
57047
- END OF ${groupTargetName}type.
57048
- DATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.
57049
- 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.
57050
57101
  LOOP AT ${loopSourceName} ${(_l = high.findFirstExpression(Expressions.LoopTarget)) === null || _l === void 0 ? void 0 : _l.concatTokens()}.\n`;
57051
57102
  if (groupIndexName !== undefined) {
57052
57103
  code += `DATA(${uniqueNameIndex}) = sy-tabix.\n`;
57053
57104
  }
57054
- 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}.
57055
57106
  IF sy-subrc = 0.\n`;
57056
57107
  if (groupCountName !== undefined) {
57057
57108
  code += ` <${uniqueFS}>-${groupCountName} = <${uniqueFS}>-${groupCountName} + 1.\n`;
57058
57109
  }
57059
- code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
57110
+ code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
57060
57111
  ELSE.\n`;
57061
57112
  code += ` CLEAR ${uniqueName}.\n`;
57062
57113
  for (const c of group.findAllExpressions(Expressions.LoopGroupByComponent)) {
@@ -57077,8 +57128,8 @@ ELSE.\n`;
57077
57128
  }
57078
57129
  code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE ${uniqueName}-items.\n`;
57079
57130
  code += ` INSERT ${uniqueName} INTO TABLE ${groupTargetName}tab.\n`;
57080
- code += `ENDIF.
57081
- ENDLOOP.
57131
+ code += `ENDIF.
57132
+ ENDLOOP.
57082
57133
  LOOP AT ${groupTargetName}tab ${groupTarget}.`;
57083
57134
  let fix = edit_helper_1.EditHelper.replaceRange(lowFile, high.getFirstToken().getStart(), high.getLastToken().getEnd(), code);
57084
57135
  for (const l of ((_m = highFile.getStructure()) === null || _m === void 0 ? void 0 : _m.findAllStructures(Structures.Loop)) || []) {
@@ -57246,7 +57297,7 @@ LOOP AT ${groupTargetName}tab ${groupTarget}.`;
57246
57297
  const enumName = (_b = high.findExpressionAfterToken("ENUM")) === null || _b === void 0 ? void 0 : _b.concatTokens();
57247
57298
  const structureName = (_c = high.findExpressionAfterToken("STRUCTURE")) === null || _c === void 0 ? void 0 : _c.concatTokens();
57248
57299
  // all ENUMS are char like?
57249
- let code = `TYPES ${enumName} TYPE string.
57300
+ let code = `TYPES ${enumName} TYPE string.
57250
57301
  CONSTANTS: BEGIN OF ${structureName},\n`;
57251
57302
  let count = 1;
57252
57303
  for (const e of enumStructure.findDirectStatements(Statements.TypeEnum).concat(enumStructure.findDirectStatements(Statements.Type))) {
@@ -57290,14 +57341,14 @@ CONSTANTS: BEGIN OF ${structureName},\n`;
57290
57341
  const tabixBackup = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
57291
57342
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
57292
57343
  // restore tabix before exeption
57293
- const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.
57294
- ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
57295
- ${indentation}${tabixBackup} = sy-tabix.
57296
- ${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.
57297
- ${indentation}sy-tabix = ${tabixBackup}.
57298
- ${indentation}IF sy-subrc <> 0.
57299
- ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
57300
- ${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.
57301
57352
  ${indentation}${uniqueName}`;
57302
57353
  const start = target.getFirstToken().getStart();
57303
57354
  const end = (_a = tableExpression.findDirectTokenByText("]")) === null || _a === void 0 ? void 0 : _a.getEnd();
@@ -57381,11 +57432,11 @@ ${indentation}${uniqueName}`;
57381
57432
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
57382
57433
  const source = (_b = templateSource === null || templateSource === void 0 ? void 0 : templateSource.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens();
57383
57434
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
57384
- const code = `DATA ${uniqueName} TYPE string.
57385
- ${indentation}CALL FUNCTION '${functionName}'
57386
- ${indentation} EXPORTING
57387
- ${indentation} input = ${source}
57388
- ${indentation} IMPORTING
57435
+ const code = `DATA ${uniqueName} TYPE string.
57436
+ ${indentation}CALL FUNCTION '${functionName}'
57437
+ ${indentation} EXPORTING
57438
+ ${indentation} input = ${source}
57439
+ ${indentation} IMPORTING
57389
57440
  ${indentation} output = ${uniqueName}.\n`;
57390
57441
  const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), code);
57391
57442
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, child.getFirstToken().getStart(), child.getLastToken().getEnd(), uniqueName);
@@ -58697,12 +58748,12 @@ class EasyToFindMessages {
58697
58748
  key: "easy_to_find_messages",
58698
58749
  title: "Easy to find messages",
58699
58750
  shortDescription: `Make messages easy to find`,
58700
- extendedInformation: `All messages must be statically referenced exactly once
58701
-
58702
- Only MESSAGE and RAISE statments are counted as static references
58703
-
58704
- Also see rule "message_exists"
58705
-
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
+
58706
58757
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#make-messages-easy-to-find`,
58707
58758
  tags: [_irule_1.RuleTag.Styleguide],
58708
58759
  };
@@ -58787,8 +58838,8 @@ class EmptyLineinStatement extends _abap_rule_1.ABAPRule {
58787
58838
  key: "empty_line_in_statement",
58788
58839
  title: "Find empty lines in statements",
58789
58840
  shortDescription: `Checks that statements do not contain empty lines.`,
58790
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
58791
-
58841
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
58842
+
58792
58843
  https://docs.abapopenchecks.org/checks/41/`,
58793
58844
  tags: [_irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
58794
58845
  badExample: `WRITE\n\nhello.`,
@@ -59080,10 +59131,10 @@ class ExitOrCheck extends _abap_rule_1.ABAPRule {
59080
59131
  return {
59081
59132
  key: "exit_or_check",
59082
59133
  title: "Find EXIT or CHECK outside loops",
59083
- shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
59134
+ shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
59084
59135
  Use RETURN to leave procesing blocks instead.`,
59085
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
59086
- 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
59087
59138
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#check-vs-return`,
59088
59139
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
59089
59140
  };
@@ -59166,12 +59217,12 @@ class ExpandMacros extends _abap_rule_1.ABAPRule {
59166
59217
  key: "expand_macros",
59167
59218
  title: "Expand Macros",
59168
59219
  shortDescription: `Allows expanding macro calls with quick fixes`,
59169
- extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
59170
-
59220
+ extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
59221
+
59171
59222
  Note that macros/DEFINE cannot be used in the ABAP Cloud programming model`,
59172
- badExample: `DEFINE _hello.
59173
- WRITE 'hello'.
59174
- END-OF-DEFINITION.
59223
+ badExample: `DEFINE _hello.
59224
+ WRITE 'hello'.
59225
+ END-OF-DEFINITION.
59175
59226
  _hello.`,
59176
59227
  goodExample: `WRITE 'hello'.`,
59177
59228
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
@@ -59258,7 +59309,7 @@ class Exporting extends _abap_rule_1.ABAPRule {
59258
59309
  shortDescription: `Detects EXPORTING statements which can be omitted.`,
59259
59310
  badExample: `call_method( EXPORTING foo = bar ).`,
59260
59311
  goodExample: `call_method( foo = bar ).`,
59261
- 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
59262
59313
  https://docs.abapopenchecks.org/checks/30/`,
59263
59314
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
59264
59315
  };
@@ -59356,7 +59407,7 @@ class ForbiddenIdentifier extends _abap_rule_1.ABAPRule {
59356
59407
  key: "forbidden_identifier",
59357
59408
  title: "Forbidden Identifier",
59358
59409
  shortDescription: `Forbid use of specified identifiers, list of regex.`,
59359
- 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,
59360
59411
  https://github.com/abaplint/transpiler/blob/bda94b8b56e2b7f2f87be2168f12361aa530220e/packages/transpiler/src/validation.ts#L44`,
59361
59412
  tags: [_irule_1.RuleTag.SingleFile],
59362
59413
  };
@@ -59598,8 +59649,8 @@ class ForbiddenVoidType {
59598
59649
  key: "forbidden_void_type",
59599
59650
  title: "Forbidden Void Types",
59600
59651
  shortDescription: `Avoid usage of specified void types.`,
59601
- extendedInformation: `Inspiration:
59602
- 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,
59603
59654
  DATS, TIMS, DATUM, FLAG, INT4, NUMC3, NUMC4, SAP_BOOL, TEXT25, TEXT80, X255, XFELD`,
59604
59655
  };
59605
59656
  }
@@ -59842,7 +59893,7 @@ class FullyTypeITabs extends _abap_rule_1.ABAPRule {
59842
59893
  key: "fully_type_itabs",
59843
59894
  title: "Fully type internal tables",
59844
59895
  shortDescription: `No implict table types or table keys`,
59845
- badExample: `DATA lt_foo TYPE TABLE OF ty.
59896
+ badExample: `DATA lt_foo TYPE TABLE OF ty.
59846
59897
  DATA lt_bar TYPE STANDARD TABLE OF ty.`,
59847
59898
  goodExample: `DATA lt_foo TYPE STANDARD TABLE OF ty WITH EMPTY KEY.`,
59848
59899
  tags: [_irule_1.RuleTag.SingleFile],
@@ -60027,26 +60078,26 @@ class FunctionalWriting extends _abap_rule_1.ABAPRule {
60027
60078
  key: "functional_writing",
60028
60079
  title: "Use functional writing",
60029
60080
  shortDescription: `Detects usage of call method when functional style calls can be used.`,
60030
- 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
60031
60082
  https://docs.abapopenchecks.org/checks/07/`,
60032
60083
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
60033
- badExample: `CALL METHOD zcl_class=>method( ).
60034
- CALL METHOD cl_abap_typedescr=>describe_by_name
60035
- EXPORTING
60036
- p_name = 'NAME'
60037
- RECEIVING
60038
- p_descr_ref = lr_typedescr
60039
- EXCEPTIONS
60040
- 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
60041
60092
  OTHERS = 2.`,
60042
- goodExample: `zcl_class=>method( ).
60043
- cl_abap_typedescr=>describe_by_name(
60044
- EXPORTING
60045
- p_name = 'NAME'
60046
- RECEIVING
60047
- p_descr_ref = lr_typedescr
60048
- EXCEPTIONS
60049
- 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
60050
60101
  OTHERS = 2 ).`,
60051
60102
  };
60052
60103
  }
@@ -60157,14 +60208,14 @@ class GlobalClass extends _abap_rule_1.ABAPRule {
60157
60208
  key: "global_class",
60158
60209
  title: "Global class checks",
60159
60210
  shortDescription: `Checks related to global classes`,
60160
- extendedInformation: `* global classes must be in own files
60161
-
60162
- * file names must match class name
60163
-
60164
- * file names must match interface name
60165
-
60166
- * global classes must be global definitions
60167
-
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
+
60168
60219
  * global interfaces must be global definitions`,
60169
60220
  tags: [_irule_1.RuleTag.Syntax],
60170
60221
  };
@@ -60263,8 +60314,8 @@ class IdenticalConditions extends _abap_rule_1.ABAPRule {
60263
60314
  return {
60264
60315
  key: "identical_conditions",
60265
60316
  title: "Identical conditions",
60266
- shortDescription: `Find identical conditions in IF + CASE + WHILE etc
60267
-
60317
+ shortDescription: `Find identical conditions in IF + CASE + WHILE etc
60318
+
60268
60319
  Prerequsites: code is pretty printed with identical cAsE`,
60269
60320
  tags: [_irule_1.RuleTag.SingleFile],
60270
60321
  };
@@ -60395,23 +60446,23 @@ class IdenticalContents extends _abap_rule_1.ABAPRule {
60395
60446
  key: "identical_contents",
60396
60447
  title: "Identical contents",
60397
60448
  shortDescription: `Find identical contents in blocks inside IFs, both in the beginning and in the end.`,
60398
- extendedInformation: `
60399
- Prerequsites: code is pretty printed with identical cAsE
60400
-
60449
+ extendedInformation: `
60450
+ Prerequsites: code is pretty printed with identical cAsE
60451
+
60401
60452
  Chained statments are ignored`,
60402
60453
  tags: [_irule_1.RuleTag.SingleFile],
60403
- badExample: `IF foo = bar.
60404
- WRITE 'bar'.
60405
- WRITE 'world'.
60406
- ELSE.
60407
- WRITE 'foo'.
60408
- WRITE 'world'.
60454
+ badExample: `IF foo = bar.
60455
+ WRITE 'bar'.
60456
+ WRITE 'world'.
60457
+ ELSE.
60458
+ WRITE 'foo'.
60459
+ WRITE 'world'.
60409
60460
  ENDIF.`,
60410
- goodExample: `IF foo = bar.
60411
- WRITE 'bar'.
60412
- ELSE.
60413
- WRITE 'foo'.
60414
- ENDIF.
60461
+ goodExample: `IF foo = bar.
60462
+ WRITE 'bar'.
60463
+ ELSE.
60464
+ WRITE 'foo'.
60465
+ ENDIF.
60415
60466
  WRITE 'world'.`,
60416
60467
  };
60417
60468
  }
@@ -60514,12 +60565,12 @@ class IdenticalDescriptions {
60514
60565
  key: "identical_descriptions",
60515
60566
  title: "Identical descriptions",
60516
60567
  shortDescription: `Searches for objects with the same type and same description`,
60517
- extendedInformation: `Case insensitive
60518
-
60519
- Only checks the master language descriptions
60520
-
60521
- Dependencies are skipped
60522
-
60568
+ extendedInformation: `Case insensitive
60569
+
60570
+ Only checks the master language descriptions
60571
+
60572
+ Dependencies are skipped
60573
+
60523
60574
  Works for: INTF, CLAS, DOMA, DTEL, FUNC in same FUGR`,
60524
60575
  tags: [],
60525
60576
  };
@@ -60693,43 +60744,43 @@ class IfInIf extends _abap_rule_1.ABAPRule {
60693
60744
  key: "if_in_if",
60694
60745
  title: "IF in IF",
60695
60746
  shortDescription: `Detects nested ifs which can be refactored.`,
60696
- extendedInformation: `
60697
- Directly nested IFs without ELSE can be refactored to a single condition using AND.
60698
-
60699
- ELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.
60700
-
60701
- 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/
60702
60753
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low`,
60703
- badExample: `IF condition1.
60704
- IF condition2.
60705
- ...
60706
- ENDIF.
60707
- ENDIF.
60708
-
60709
- IF condition1.
60710
- ...
60711
- ELSE.
60712
- IF condition2.
60713
- ...
60714
- 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.
60715
60766
  ENDIF.`,
60716
- goodExample: `IF ( condition1 ) AND ( condition2 ).
60717
- ...
60718
- ENDIF.
60719
-
60720
- IF condition1.
60721
- ...
60722
- ELSEIF condition2.
60723
- ...
60724
- ENDIF.
60725
-
60726
- CASE variable.
60727
- WHEN value1.
60728
- ...
60729
- WHEN value2.
60730
- IF condition2.
60731
- ...
60732
- 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.
60733
60784
  ENDCASE.`,
60734
60785
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
60735
60786
  };
@@ -60914,9 +60965,9 @@ class ImplementMethods extends _abap_rule_1.ABAPRule {
60914
60965
  for (const i of ((_a = file.getStructure()) === null || _a === void 0 ? void 0 : _a.findAllStatements(Statements.ClassImplementation)) || []) {
60915
60966
  const name = (_b = i.findFirstExpression(Expressions.ClassName)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr().toUpperCase();
60916
60967
  if (name === impl.identifier.getName().toUpperCase()) {
60917
- return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
60918
- METHOD ${methodName.toLowerCase()}.
60919
- RETURN. " todo, implement method
60968
+ return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
60969
+ METHOD ${methodName.toLowerCase()}.
60970
+ RETURN. " todo, implement method
60920
60971
  ENDMETHOD.`);
60921
60972
  }
60922
60973
  }
@@ -61104,19 +61155,19 @@ class InStatementIndentation extends _abap_rule_1.ABAPRule {
61104
61155
  key: "in_statement_indentation",
61105
61156
  title: "In-statement indentation",
61106
61157
  shortDescription: "Checks alignment within statements which span multiple lines.",
61107
- extendedInformation: `Lines following the first line should be indented once (2 spaces).
61108
-
61109
- 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)
61110
61161
  to distinguish them better from code within the block.`,
61111
- badExample: `IF 1 = 1
61112
- AND 2 = 2.
61113
- WRITE 'hello' &&
61114
- 'world'.
61162
+ badExample: `IF 1 = 1
61163
+ AND 2 = 2.
61164
+ WRITE 'hello' &&
61165
+ 'world'.
61115
61166
  ENDIF.`,
61116
- goodExample: `IF 1 = 1
61117
- AND 2 = 2.
61118
- WRITE 'hello' &&
61119
- 'world'.
61167
+ goodExample: `IF 1 = 1
61168
+ AND 2 = 2.
61169
+ WRITE 'hello' &&
61170
+ 'world'.
61120
61171
  ENDIF.`,
61121
61172
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
61122
61173
  };
@@ -61621,9 +61672,9 @@ class IntfReferencingClas {
61621
61672
  key: "intf_referencing_clas",
61622
61673
  title: "INTF referencing CLAS",
61623
61674
  shortDescription: `Interface contains references to class`,
61624
- extendedInformation: `Only global interfaces are checked.
61625
- Only first level references are checked.
61626
- 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.
61627
61678
  Void references are ignored.`,
61628
61679
  };
61629
61680
  }
@@ -62218,8 +62269,8 @@ class LineBreakStyle {
62218
62269
  return {
62219
62270
  key: "line_break_style",
62220
62271
  title: "Makes sure line breaks are consistent in the ABAP code",
62221
- shortDescription: `Enforces LF as newlines in ABAP files
62222
-
62272
+ shortDescription: `Enforces LF as newlines in ABAP files
62273
+
62223
62274
  abapGit does not work with CRLF`,
62224
62275
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
62225
62276
  };
@@ -62288,7 +62339,7 @@ class LineLength extends _abap_rule_1.ABAPRule {
62288
62339
  key: "line_length",
62289
62340
  title: "Line length",
62290
62341
  shortDescription: `Detects lines exceeding the provided maximum length.`,
62291
- 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
62292
62343
  https://docs.abapopenchecks.org/checks/04/`,
62293
62344
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
62294
62345
  };
@@ -62359,7 +62410,7 @@ class LineOnlyPunc extends _abap_rule_1.ABAPRule {
62359
62410
  key: "line_only_punc",
62360
62411
  title: "Line containing only punctuation",
62361
62412
  shortDescription: `Detects lines containing only punctuation.`,
62362
- 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
62363
62414
  https://docs.abapopenchecks.org/checks/16/`,
62364
62415
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
62365
62416
  badExample: "zcl_class=>method(\n).",
@@ -62619,8 +62670,8 @@ class LocalVariableNames extends _abap_rule_1.ABAPRule {
62619
62670
  return {
62620
62671
  key: "local_variable_names",
62621
62672
  title: "Local variable naming conventions",
62622
- shortDescription: `
62623
- 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.
62624
62675
  Regexes are case-insensitive.`,
62625
62676
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
62626
62677
  };
@@ -62767,10 +62818,10 @@ class MainFileContents {
62767
62818
  key: "main_file_contents",
62768
62819
  title: "Main file contents",
62769
62820
  shortDescription: `Checks related to report declarations.`,
62770
- extendedInformation: `Does not run if the target version is Cloud
62771
-
62772
- * PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
62773
- * 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>."
62774
62825
  `,
62775
62826
  };
62776
62827
  }
@@ -62886,17 +62937,17 @@ class ManyParentheses extends _abap_rule_1.ABAPRule {
62886
62937
  title: "Too many parentheses",
62887
62938
  shortDescription: `Searches for expressions where extra parentheses can safely be removed`,
62888
62939
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
62889
- badExample: `
62890
- IF ( destination IS INITIAL ).
62891
- ENDIF.
62892
- IF foo = boo AND ( bar = lar AND moo = loo ).
62893
- ENDIF.
62940
+ badExample: `
62941
+ IF ( destination IS INITIAL ).
62942
+ ENDIF.
62943
+ IF foo = boo AND ( bar = lar AND moo = loo ).
62944
+ ENDIF.
62894
62945
  `,
62895
- goodExample: `
62896
- IF destination IS INITIAL.
62897
- ENDIF.
62898
- IF foo = boo AND bar = lar AND moo = loo.
62899
- ENDIF.
62946
+ goodExample: `
62947
+ IF destination IS INITIAL.
62948
+ ENDIF.
62949
+ IF foo = boo AND bar = lar AND moo = loo.
62950
+ ENDIF.
62900
62951
  `,
62901
62952
  };
62902
62953
  }
@@ -63070,14 +63121,14 @@ class MaxOneMethodParameterPerLine extends _abap_rule_1.ABAPRule {
63070
63121
  title: "Max one method parameter definition per line",
63071
63122
  shortDescription: `Keep max one method parameter description per line`,
63072
63123
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace],
63073
- badExample: `
63074
- METHODS apps_scope_token
63075
- IMPORTING
63124
+ badExample: `
63125
+ METHODS apps_scope_token
63126
+ IMPORTING
63076
63127
  body TYPE bodyapps_scope_token client_id TYPE str.`,
63077
- goodExample: `
63078
- METHODS apps_scope_token
63079
- IMPORTING
63080
- body TYPE bodyapps_scope_token
63128
+ goodExample: `
63129
+ METHODS apps_scope_token
63130
+ IMPORTING
63131
+ body TYPE bodyapps_scope_token
63081
63132
  client_id TYPE str.`,
63082
63133
  };
63083
63134
  }
@@ -63142,11 +63193,11 @@ class MaxOneStatement extends _abap_rule_1.ABAPRule {
63142
63193
  key: "max_one_statement",
63143
63194
  title: "Max one statement per line",
63144
63195
  shortDescription: `Checks that each line contains only a single statement.`,
63145
- extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
63146
-
63147
- Does not report anything for chained statements.
63148
-
63149
- 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
63150
63201
  https://docs.abapopenchecks.org/checks/11/`,
63151
63202
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
63152
63203
  badExample: `WRITE foo. WRITE bar.`,
@@ -63483,8 +63534,8 @@ class MethodLength {
63483
63534
  key: "method_length",
63484
63535
  title: "Method/Form Length",
63485
63536
  shortDescription: `Checks relating to method/form length.`,
63486
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
63487
-
63537
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
63538
+
63488
63539
  Abstract methods without statements are considered okay.`,
63489
63540
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
63490
63541
  };
@@ -63583,10 +63634,10 @@ class MethodOverwritesBuiltIn extends _abap_rule_1.ABAPRule {
63583
63634
  key: "method_overwrites_builtin",
63584
63635
  title: "Method name overwrites builtin function",
63585
63636
  shortDescription: `Checks Method names that overwrite builtin SAP functions`,
63586
- extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
63587
-
63588
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
63589
-
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
+
63590
63641
  Interface method names are ignored`,
63591
63642
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
63592
63643
  };
@@ -64156,7 +64207,7 @@ class Nesting extends _abap_rule_1.ABAPRule {
64156
64207
  key: "nesting",
64157
64208
  title: "Check nesting depth",
64158
64209
  shortDescription: `Checks for methods exceeding a maximum nesting depth`,
64159
- 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
64160
64211
  https://docs.abapopenchecks.org/checks/74/`,
64161
64212
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
64162
64213
  };
@@ -64399,7 +64450,7 @@ class NoChainedAssignment extends _abap_rule_1.ABAPRule {
64399
64450
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-chain-assignments`,
64400
64451
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
64401
64452
  badExample: `var1 = var2 = var3.`,
64402
- goodExample: `var2 = var3.
64453
+ goodExample: `var2 = var3.
64403
64454
  var1 = var2.`,
64404
64455
  };
64405
64456
  }
@@ -64458,8 +64509,8 @@ class NoExternalFormCalls extends _abap_rule_1.ABAPRule {
64458
64509
  key: "no_external_form_calls",
64459
64510
  title: "No external FORM calls",
64460
64511
  shortDescription: `Detect external form calls`,
64461
- badExample: `PERFORM foo IN PROGRAM bar.
64462
-
64512
+ badExample: `PERFORM foo IN PROGRAM bar.
64513
+
64463
64514
  PERFORM foo(bar).`,
64464
64515
  tags: [_irule_1.RuleTag.SingleFile],
64465
64516
  };
@@ -64520,17 +64571,17 @@ class NoInlineInOptionalBranches extends _abap_rule_1.ABAPRule {
64520
64571
  key: "no_inline_in_optional_branches",
64521
64572
  title: "Don't declare inline in optional branches",
64522
64573
  shortDescription: `Don't declare inline in optional branches`,
64523
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
64524
-
64525
- Considered optional branches:
64526
- * inside IF/ELSEIF/ELSE
64527
- * inside LOOP
64528
- * inside WHILE
64529
- * inside CASE/WHEN, CASE TYPE OF
64530
- * inside DO
64531
- * inside SELECT loops
64532
-
64533
- 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:
64534
64585
  * TRY/CATCH/CLEANUP`,
64535
64586
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
64536
64587
  };
@@ -64629,12 +64680,12 @@ class NoPrefixes extends _abap_rule_1.ABAPRule {
64629
64680
  key: "no_prefixes",
64630
64681
  title: "No Prefixes",
64631
64682
  shortDescription: `Dont use hungarian notation`,
64632
- extendedInformation: `
64633
- Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
64634
- allowing all types to become voided, abaplint will then provide less precise syntax errors.
64635
-
64636
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
64637
-
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
+
64638
64689
  https://github.com/SAP/styleguides/blob/main/clean-abap/sub-sections/AvoidEncodings.md`,
64639
64690
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
64640
64691
  badExample: `DATA lv_foo TYPE i.`,
@@ -64807,7 +64858,7 @@ class NoPublicAttributes extends _abap_rule_1.ABAPRule {
64807
64858
  return {
64808
64859
  key: "no_public_attributes",
64809
64860
  title: "No public attributes",
64810
- 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.
64811
64862
  Exceptions are excluded from this rule.`,
64812
64863
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#members-private-by-default-protected-only-if-needed`,
64813
64864
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
@@ -64908,13 +64959,13 @@ class NoYodaConditions extends _abap_rule_1.ABAPRule {
64908
64959
  key: "no_yoda_conditions",
64909
64960
  title: "No Yoda conditions",
64910
64961
  shortDescription: `Finds Yoda conditions and reports issues`,
64911
- extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
64912
-
64962
+ extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
64963
+
64913
64964
  Conditions with operators CP, NP, CS, NS, CA, NA, CO, CN are ignored`,
64914
64965
  tags: [_irule_1.RuleTag.SingleFile],
64915
- badExample: `IF 0 <> sy-subrc.
64966
+ badExample: `IF 0 <> sy-subrc.
64916
64967
  ENDIF.`,
64917
- goodExample: `IF sy-subrc <> 0.
64968
+ goodExample: `IF sy-subrc <> 0.
64918
64969
  ENDIF.`,
64919
64970
  };
64920
64971
  }
@@ -65015,8 +65066,8 @@ class NROBConsistency {
65015
65066
  key: "nrob_consistency",
65016
65067
  title: "Number range consistency",
65017
65068
  shortDescription: `Consistency checks for number ranges`,
65018
- extendedInformation: `Issue reported if percentage warning is over 50%
65019
-
65069
+ extendedInformation: `Issue reported if percentage warning is over 50%
65070
+
65020
65071
  Issue reported if the referenced domain is not found(taking error namespace into account)`,
65021
65072
  tags: [_irule_1.RuleTag.SingleFile],
65022
65073
  };
@@ -65293,58 +65344,58 @@ class ObsoleteStatement extends _abap_rule_1.ABAPRule {
65293
65344
  title: "Obsolete statements",
65294
65345
  shortDescription: `Checks for usages of certain obsolete statements`,
65295
65346
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
65296
- extendedInformation: `
65297
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
65298
-
65299
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
65300
-
65301
- SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
65302
-
65303
- IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
65304
-
65305
- WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
65306
-
65307
- FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
65308
-
65309
- TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
65310
-
65311
- LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
65312
-
65313
- COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
65314
-
65315
- OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
65316
-
65317
- PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
65318
-
65319
- RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
65320
-
65321
- PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
65322
-
65323
- MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
65324
-
65325
- SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
65326
- SELECT COUNT(*) is considered okay
65327
-
65328
- FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
65329
-
65330
- SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
65331
-
65332
- CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
65333
-
65334
- POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
65335
-
65336
- OCCURENCES: check for OCCURENCES vs OCCURRENCES
65337
-
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
+
65338
65389
  CLIENT SPECIFIED, from 754: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abapselect_client_obsolete.htm`,
65339
- badExample: `REFRESH itab.
65340
-
65341
- COMPUTE foo = 2 + 2.
65342
-
65343
- MULTIPLY lv_foo BY 2.
65344
-
65345
- INTERFACE intf LOAD.
65346
-
65347
- 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.
65348
65399
  ENDIF.`,
65349
65400
  };
65350
65401
  }
@@ -65684,9 +65735,9 @@ class OmitParameterName {
65684
65735
  key: "omit_parameter_name",
65685
65736
  title: "Omit parameter name",
65686
65737
  shortDescription: `Omit the parameter name in single parameter calls`,
65687
- extendedInformation: `
65688
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
65689
-
65738
+ extendedInformation: `
65739
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
65740
+
65690
65741
  EXPORTING must already be omitted for this rule to take effect, https://rules.abaplint.org/exporting/`,
65691
65742
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
65692
65743
  badExample: `method( param = 2 ).`,
@@ -65892,20 +65943,20 @@ class OmitReceiving extends _abap_rule_1.ABAPRule {
65892
65943
  shortDescription: `Omit RECEIVING`,
65893
65944
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-receiving`,
65894
65945
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
65895
- badExample: `
65896
- upload_pack(
65897
- EXPORTING
65898
- io_client = lo_client
65899
- iv_url = iv_url
65900
- iv_deepen_level = iv_deepen_level
65901
- it_hashes = lt_hashes
65902
- 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
65903
65954
  rt_objects = et_objects ).`,
65904
- goodExample: `
65905
- et_objects = upload_pack(
65906
- io_client = lo_client
65907
- iv_url = iv_url
65908
- 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
65909
65960
  it_hashes = lt_hashes ).`,
65910
65961
  };
65911
65962
  }
@@ -65969,8 +66020,8 @@ class Parser702Chaining extends _abap_rule_1.ABAPRule {
65969
66020
  return {
65970
66021
  key: "parser_702_chaining",
65971
66022
  title: "Parser Error, bad chanining on 702",
65972
- shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
65973
- 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.
65974
66025
  Only active on target version 702 and below.`,
65975
66026
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
65976
66027
  };
@@ -66050,8 +66101,8 @@ class ParserError {
66050
66101
  return {
66051
66102
  key: "parser_error",
66052
66103
  title: "Parser error",
66053
- shortDescription: `Checks for syntax not recognized by abaplint.
66054
-
66104
+ shortDescription: `Checks for syntax not recognized by abaplint.
66105
+
66055
66106
  See recognized syntax at https://syntax.abaplint.org`,
66056
66107
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
66057
66108
  };
@@ -66136,7 +66187,7 @@ class ParserMissingSpace extends _abap_rule_1.ABAPRule {
66136
66187
  return {
66137
66188
  key: "parser_missing_space",
66138
66189
  title: "Parser Error, missing space",
66139
- 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.
66140
66191
  This rule makes sure the spaces are consistently required across the language.`,
66141
66192
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
66142
66193
  badExample: `IF ( foo = 'bar').`,
@@ -66548,25 +66599,25 @@ class PreferInline {
66548
66599
  key: "prefer_inline",
66549
66600
  title: "Prefer Inline Declarations",
66550
66601
  shortDescription: `Prefer inline to up-front declarations.`,
66551
- extendedInformation: `EXPERIMENTAL
66552
-
66553
- Activates if language version is v740sp02 or above.
66554
-
66555
- Variables must be local(METHOD or FORM).
66556
-
66557
- No generic or void typed variables. No syntax errors.
66558
-
66559
- First position used must be a full/pure write.
66560
-
66561
- Move statment is not a cast(?=)
66562
-
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
+
66563
66614
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-inline-to-up-front-declarations`,
66564
66615
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Experimental, _irule_1.RuleTag.Quickfix],
66565
- badExample: `DATA foo TYPE i.
66566
- foo = 2.
66567
- DATA percentage TYPE decfloat34.
66616
+ badExample: `DATA foo TYPE i.
66617
+ foo = 2.
66618
+ DATA percentage TYPE decfloat34.
66568
66619
  percentage = ( comment_number / abs_statement_number ) * 100.`,
66569
- goodExample: `DATA(foo) = 2.
66620
+ goodExample: `DATA(foo) = 2.
66570
66621
  DATA(percentage) = CONV decfloat34( comment_number / abs_statement_number ) * 100.`,
66571
66622
  };
66572
66623
  }
@@ -66780,18 +66831,18 @@ class PreferIsNot extends _abap_rule_1.ABAPRule {
66780
66831
  key: "prefer_is_not",
66781
66832
  title: "Prefer IS NOT to NOT IS",
66782
66833
  shortDescription: `Prefer IS NOT to NOT IS`,
66783
- extendedInformation: `
66784
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
66785
-
66834
+ extendedInformation: `
66835
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
66836
+
66786
66837
  "if not is_valid( )." examples are skipped`,
66787
66838
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
66788
- goodExample: `IF variable IS NOT INITIAL.
66789
- IF variable NP 'TODO*'.
66790
- IF variable <> 42.
66839
+ goodExample: `IF variable IS NOT INITIAL.
66840
+ IF variable NP 'TODO*'.
66841
+ IF variable <> 42.
66791
66842
  IF variable CO 'hello'.`,
66792
- badExample: `IF NOT variable IS INITIAL.
66793
- IF NOT variable CP 'TODO*'.
66794
- IF NOT variable = 42.
66843
+ badExample: `IF NOT variable IS INITIAL.
66844
+ IF NOT variable CP 'TODO*'.
66845
+ IF NOT variable = 42.
66795
66846
  IF NOT variable CA 'hello'.`,
66796
66847
  };
66797
66848
  }
@@ -66979,14 +67030,14 @@ class PreferRaiseExceptionNew extends _abap_rule_1.ABAPRule {
66979
67030
  key: "prefer_raise_exception_new",
66980
67031
  title: "Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE",
66981
67032
  shortDescription: `Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE`,
66982
- extendedInformation: `
66983
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
66984
-
67033
+ extendedInformation: `
67034
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
67035
+
66985
67036
  From 752 and up`,
66986
67037
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
66987
67038
  goodExample: `RAISE EXCEPTION NEW cx_generation_error( previous = exception ).`,
66988
- badExample: `RAISE EXCEPTION TYPE cx_generation_error
66989
- EXPORTING
67039
+ badExample: `RAISE EXCEPTION TYPE cx_generation_error
67040
+ EXPORTING
66990
67041
  previous = exception.`,
66991
67042
  };
66992
67043
  }
@@ -67064,7 +67115,7 @@ class PreferReturningToExporting extends _abap_rule_1.ABAPRule {
67064
67115
  key: "prefer_returning_to_exporting",
67065
67116
  title: "Prefer RETURNING to EXPORTING",
67066
67117
  shortDescription: `Prefer RETURNING to EXPORTING. Generic types cannot be RETURNING.`,
67067
- 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
67068
67119
  https://docs.abapopenchecks.org/checks/44/`,
67069
67120
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
67070
67121
  };
@@ -67161,8 +67212,8 @@ class PreferXsdbool extends _abap_rule_1.ABAPRule {
67161
67212
  key: "prefer_xsdbool",
67162
67213
  title: "Prefer xsdbool over boolc",
67163
67214
  shortDescription: `Prefer xsdbool over boolc`,
67164
- extendedInformation: `Activates if language version is v740sp08 or above.
67165
-
67215
+ extendedInformation: `Activates if language version is v740sp08 or above.
67216
+
67166
67217
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
67167
67218
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
67168
67219
  badExample: `DATA(sdf) = boolc( 1 = 2 ).`,
@@ -67456,26 +67507,26 @@ class ReduceProceduralCode extends _abap_rule_1.ABAPRule {
67456
67507
  key: "reduce_procedural_code",
67457
67508
  title: "Reduce procedural code",
67458
67509
  shortDescription: `Checks FORM and FUNCTION-MODULE have few statements`,
67459
- extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
67460
-
67461
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
67462
-
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
+
67463
67514
  Comments are not counted as statements.`,
67464
67515
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
67465
- badExample: `FORM foo.
67466
- DATA lv_bar TYPE i.
67467
- lv_bar = 2 + 2.
67468
- IF lv_bar = 4.
67469
- WRITE 'hello world'.
67470
- ENDIF.
67471
- DATA lv_bar TYPE i.
67472
- lv_bar = 2 + 2.
67473
- IF lv_bar = 4.
67474
- WRITE 'hello world'.
67475
- 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.
67476
67527
  ENDFORM.`,
67477
- goodExample: `FORM foo.
67478
- NEW zcl_global_class( )->run_logic( ).
67528
+ goodExample: `FORM foo.
67529
+ NEW zcl_global_class( )->run_logic( ).
67479
67530
  ENDFORM.`,
67480
67531
  };
67481
67532
  }
@@ -67719,10 +67770,10 @@ class RemoveDescriptions {
67719
67770
  return {
67720
67771
  key: "remove_descriptions",
67721
67772
  title: "Remove descriptions",
67722
- shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
67723
-
67724
- Class descriptions are required, see rule description_empty.
67725
-
67773
+ shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
67774
+
67775
+ Class descriptions are required, see rule description_empty.
67776
+
67726
67777
  Consider using ABAP Doc for documentation.`,
67727
67778
  tags: [],
67728
67779
  };
@@ -67847,16 +67898,16 @@ class RFCErrorHandling extends _abap_rule_1.ABAPRule {
67847
67898
  tags: [_irule_1.RuleTag.SingleFile],
67848
67899
  shortDescription: `Checks that exceptions 'system_failure' and 'communication_failure' are handled in RFC calls`,
67849
67900
  extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenrfc_exception.htm`,
67850
- badExample: `
67851
- CALL FUNCTION 'ZRFC'
67901
+ badExample: `
67902
+ CALL FUNCTION 'ZRFC'
67852
67903
  DESTINATION lv_rfc.`,
67853
- goodExample: `
67854
- CALL FUNCTION 'ZRFC'
67855
- DESTINATION lv_rfc
67856
- EXCEPTIONS
67857
- system_failure = 1 MESSAGE msg
67858
- communication_failure = 2 MESSAGE msg
67859
- 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
67860
67911
  OTHERS = 4.`,
67861
67912
  };
67862
67913
  }
@@ -67940,11 +67991,11 @@ class SelectAddOrderBy {
67940
67991
  key: "select_add_order_by",
67941
67992
  title: "SELECT add ORDER BY",
67942
67993
  shortDescription: `SELECTs add ORDER BY clause`,
67943
- extendedInformation: `
67944
- This will make sure that the SELECT statement returns results in the same sequence on different databases
67945
-
67946
- add ORDER BY PRIMARY KEY if in doubt
67947
-
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
+
67948
67999
  If the target is a sorted/hashed table, no issue is reported`,
67949
68000
  tags: [_irule_1.RuleTag.SingleFile],
67950
68001
  };
@@ -68073,14 +68124,14 @@ class SelectPerformance {
68073
68124
  key: "select_performance",
68074
68125
  title: "SELECT performance",
68075
68126
  shortDescription: `Various checks regarding SELECT performance.`,
68076
- extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
68077
-
68127
+ extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
68128
+
68078
68129
  SELECT *: not reported if using INTO/APPENDING CORRESPONDING FIELDS OF`,
68079
68130
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Performance],
68080
- badExample: `SELECT field1, field2 FROM table
68081
- 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.
68082
68133
  ENDSELECT.`,
68083
- goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
68134
+ goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
68084
68135
  INTO TABLE @DATA(table) ORDER BY field3 DESCENDING`,
68085
68136
  };
68086
68137
  }
@@ -68192,8 +68243,8 @@ class SelectSingleFullKey {
68192
68243
  key: "select_single_full_key",
68193
68244
  title: "Detect SELECT SINGLE which are possibily not unique",
68194
68245
  shortDescription: `Detect SELECT SINGLE which are possibily not unique`,
68195
- extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
68196
-
68246
+ extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
68247
+
68197
68248
  If the statement contains a JOIN it is not checked`,
68198
68249
  pseudoComment: "EC CI_NOORDER",
68199
68250
  tags: [],
@@ -68610,8 +68661,8 @@ class SICFConsistency {
68610
68661
  key: "sicf_consistency",
68611
68662
  title: "SICF consistency",
68612
68663
  shortDescription: `Checks the validity of ICF services`,
68613
- extendedInformation: `* Class defined in handler must exist
68614
- * Class must not have any syntax errors
68664
+ extendedInformation: `* Class defined in handler must exist
68665
+ * Class must not have any syntax errors
68615
68666
  * Class must implement interface IF_HTTP_EXTENSION`,
68616
68667
  };
68617
68668
  }
@@ -68978,8 +69029,8 @@ class SpaceBeforeDot extends _abap_rule_1.ABAPRule {
68978
69029
  key: "space_before_dot",
68979
69030
  title: "Space before dot",
68980
69031
  shortDescription: `Checks for extra spaces before dots at the ends of statements`,
68981
- extendedInformation: `
68982
- 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
68983
69034
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#condense-your-code`,
68984
69035
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
68985
69036
  badExample: `WRITE bar .`,
@@ -69165,12 +69216,12 @@ class SQLValueConversion {
69165
69216
  key: "sql_value_conversion",
69166
69217
  title: "Implicit SQL Value Conversion",
69167
69218
  shortDescription: `Ensure types match when selecting from database`,
69168
- extendedInformation: `
69169
- * Integer to CHAR conversion
69170
- * Integer to NUMC conversion
69171
- * NUMC to Integer conversion
69172
- * CHAR to Integer conversion
69173
- * 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
69174
69225
  * Source field longer than database field, NUMC -> NUMC`,
69175
69226
  tags: [],
69176
69227
  };
@@ -69242,7 +69293,7 @@ class StartAtTab extends _abap_rule_1.ABAPRule {
69242
69293
  key: "start_at_tab",
69243
69294
  title: "Start at tab",
69244
69295
  shortDescription: `Checks that statements start at tabstops.`,
69245
- extendedInformation: `Reports max 100 issues per file
69296
+ extendedInformation: `Reports max 100 issues per file
69246
69297
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
69247
69298
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
69248
69299
  badExample: ` WRITE a.`,
@@ -69419,12 +69470,12 @@ class StrictSQL extends _abap_rule_1.ABAPRule {
69419
69470
  key: "strict_sql",
69420
69471
  title: "Strict SQL",
69421
69472
  shortDescription: `Strict SQL`,
69422
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
69423
-
69424
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
69425
-
69426
- Also see separate rule sql_escape_host_variables
69427
-
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
+
69428
69479
  Activates from v750 and up`,
69429
69480
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix],
69430
69481
  };
@@ -69676,11 +69727,11 @@ class SyModification extends _abap_rule_1.ABAPRule {
69676
69727
  key: "sy_modification",
69677
69728
  title: "Modification of SY fields",
69678
69729
  shortDescription: `Finds modification of sy fields`,
69679
- extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
69680
-
69730
+ extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
69731
+
69681
69732
  Changes to SY-TVAR* fields are not reported`,
69682
69733
  tags: [_irule_1.RuleTag.SingleFile],
69683
- badExample: `sy-uname = 2.
69734
+ badExample: `sy-uname = 2.
69684
69735
  sy = sy.`,
69685
69736
  };
69686
69737
  }
@@ -69742,8 +69793,8 @@ class TABLEnhancementCategory {
69742
69793
  key: "tabl_enhancement_category",
69743
69794
  title: "TABL enhancement category must be set",
69744
69795
  shortDescription: `Checks that tables do not have the enhancement category 'not classified'.`,
69745
- extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
69746
-
69796
+ extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
69797
+
69747
69798
  You may use standard report RS_DDIC_CLASSIFICATION_FINAL for adjustment.`,
69748
69799
  tags: [],
69749
69800
  };
@@ -69871,9 +69922,9 @@ class TypeFormParameters extends _abap_rule_1.ABAPRule {
69871
69922
  title: "Type FORM parameters",
69872
69923
  shortDescription: `Checks for untyped FORM parameters`,
69873
69924
  tags: [_irule_1.RuleTag.SingleFile],
69874
- badExample: `FORM foo USING bar.
69925
+ badExample: `FORM foo USING bar.
69875
69926
  ENDFORM.`,
69876
- goodExample: `FORM foo USING bar TYPE string.
69927
+ goodExample: `FORM foo USING bar TYPE string.
69877
69928
  ENDFORM.`,
69878
69929
  };
69879
69930
  }
@@ -70357,7 +70408,8 @@ class UnknownTypes {
70357
70408
  }
70358
70409
  }
70359
70410
  }
70360
- for (const v of nodeData.idefs) {
70411
+ for (const name in nodeData.idefs) {
70412
+ const v = nodeData.idefs[name];
70361
70413
  const found = this.checkParameters(v);
70362
70414
  if (found) {
70363
70415
  const message = "Contains unknown, " + found.found;
@@ -70538,38 +70590,38 @@ class UnnecessaryPragma extends _abap_rule_1.ABAPRule {
70538
70590
  key: "unnecessary_pragma",
70539
70591
  title: "Unnecessary Pragma",
70540
70592
  shortDescription: `Finds pragmas which can be removed`,
70541
- extendedInformation: `* NO_HANDLER with handler
70542
-
70543
- * NEEDED without definition
70544
-
70545
- * NO_TEXT without texts
70546
-
70547
- * SUBRC_OK where sy-subrc is checked
70548
-
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
+
70549
70601
  NO_HANDLER inside macros are not checked`,
70550
70602
  tags: [_irule_1.RuleTag.SingleFile],
70551
- badExample: `TRY.
70552
- ...
70553
- CATCH zcx_abapgit_exception ##NO_HANDLER.
70554
- RETURN. " it has a handler
70555
- ENDTRY.
70556
- MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
70557
- SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
70558
- 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.
70559
70611
  ENDIF.`,
70560
- goodExample: `TRY.
70561
- ...
70562
- CATCH zcx_abapgit_exception.
70563
- RETURN.
70564
- ENDTRY.
70565
- MESSAGE w125(zbar) WITH c_foo INTO message.
70566
- SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
70567
- IF sy-subrc <> 0.
70568
- ENDIF.
70569
-
70570
- DATA: BEGIN OF blah ##NEEDED,
70571
- test1 TYPE string,
70572
- 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,
70573
70625
  END OF blah.`,
70574
70626
  };
70575
70627
  }
@@ -70727,18 +70779,18 @@ class UnnecessaryReturn extends _abap_rule_1.ABAPRule {
70727
70779
  shortDescription: `Finds unnecessary RETURN statements`,
70728
70780
  extendedInformation: `Finds unnecessary RETURN statements`,
70729
70781
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
70730
- badExample: `FORM hello1.
70731
- WRITE 'world'.
70732
- RETURN.
70733
- ENDFORM.
70734
-
70735
- FORM foo.
70736
- IF 1 = 2.
70737
- RETURN.
70738
- ENDIF.
70782
+ badExample: `FORM hello1.
70783
+ WRITE 'world'.
70784
+ RETURN.
70785
+ ENDFORM.
70786
+
70787
+ FORM foo.
70788
+ IF 1 = 2.
70789
+ RETURN.
70790
+ ENDIF.
70739
70791
  ENDFORM.`,
70740
- goodExample: `FORM hello2.
70741
- WRITE 'world'.
70792
+ goodExample: `FORM hello2.
70793
+ WRITE 'world'.
70742
70794
  ENDFORM.`,
70743
70795
  };
70744
70796
  }
@@ -71105,17 +71157,17 @@ class UnusedMethods {
71105
71157
  key: "unused_methods",
71106
71158
  title: "Unused methods",
71107
71159
  shortDescription: `Checks for unused methods`,
71108
- extendedInformation: `Checks private and protected methods.
71109
-
71110
- Unused methods are not reported if the object contains parser or syntax errors.
71111
-
71112
- Skips:
71113
- * methods FOR TESTING
71114
- * methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
71115
- * class_constructor + constructor methods
71116
- * event handlers
71117
- * methods that are redefined
71118
- * 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
71119
71171
  `,
71120
71172
  tags: [],
71121
71173
  pragma: "##CALLED",
@@ -71505,23 +71557,23 @@ class UnusedVariables {
71505
71557
  key: "unused_variables",
71506
71558
  title: "Unused variables",
71507
71559
  shortDescription: `Checks for unused variables and constants`,
71508
- extendedInformation: `Skips event parameters.
71509
-
71510
- Note that this currently does not work if the source code uses macros.
71511
-
71512
- Unused variables are not reported if the object contains parser or syntax errors.
71513
-
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
+
71514
71566
  Errors found in INCLUDES are reported for the main program.`,
71515
71567
  tags: [_irule_1.RuleTag.Quickfix],
71516
71568
  pragma: "##NEEDED",
71517
71569
  pseudoComment: "EC NEEDED",
71518
- badExample: `DATA: BEGIN OF blah1,
71519
- test TYPE string,
71520
- test2 TYPE string,
71570
+ badExample: `DATA: BEGIN OF blah1,
71571
+ test TYPE string,
71572
+ test2 TYPE string,
71521
71573
  END OF blah1.`,
71522
- goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
71523
- test TYPE string,
71524
- test2 TYPE string,
71574
+ goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
71575
+ test TYPE string,
71576
+ test2 TYPE string,
71525
71577
  END OF blah2.`,
71526
71578
  };
71527
71579
  }
@@ -71740,15 +71792,15 @@ class UseBoolExpression extends _abap_rule_1.ABAPRule {
71740
71792
  shortDescription: `Use boolean expression, xsdbool from 740sp08 and up, boolc from 702 and up`,
71741
71793
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
71742
71794
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
71743
- badExample: `IF line IS INITIAL.
71744
- has_entries = abap_false.
71745
- ELSE.
71746
- has_entries = abap_true.
71747
- ENDIF.
71748
-
71795
+ badExample: `IF line IS INITIAL.
71796
+ has_entries = abap_false.
71797
+ ELSE.
71798
+ has_entries = abap_true.
71799
+ ENDIF.
71800
+
71749
71801
  DATA(fsdf) = COND #( WHEN foo <> bar THEN abap_true ELSE abap_false ).`,
71750
- goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
71751
-
71802
+ goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
71803
+
71752
71804
  DATA(fsdf) = xsdbool( foo <> bar ).`,
71753
71805
  };
71754
71806
  }
@@ -71924,15 +71976,15 @@ class UseLineExists extends _abap_rule_1.ABAPRule {
71924
71976
  key: "use_line_exists",
71925
71977
  title: "Use line_exists",
71926
71978
  shortDescription: `Use line_exists, from 740sp02 and up`,
71927
- extendedInformation: `
71928
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
71929
-
71979
+ extendedInformation: `
71980
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
71981
+
71930
71982
  Not reported if the READ TABLE statement contains BINARY SEARCH.`,
71931
71983
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
71932
- badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
71933
- IF sy-subrc = 0.
71984
+ badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
71985
+ IF sy-subrc = 0.
71934
71986
  ENDIF.`,
71935
- goodExample: `IF line_exists( my_table[ key = 'A' ] ).
71987
+ goodExample: `IF line_exists( my_table[ key = 'A' ] ).
71936
71988
  ENDIF.`,
71937
71989
  };
71938
71990
  }
@@ -72042,10 +72094,10 @@ class UseNew extends _abap_rule_1.ABAPRule {
72042
72094
  key: "use_new",
72043
72095
  title: "Use NEW",
72044
72096
  shortDescription: `Checks for deprecated CREATE OBJECT statements.`,
72045
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
72046
-
72047
- If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
72048
-
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
+
72049
72101
  Applicable from v740sp02 and up`,
72050
72102
  badExample: `CREATE OBJECT ref.`,
72051
72103
  goodExample: `ref = NEW #( ).`,
@@ -72143,13 +72195,13 @@ class WhenOthersLast extends _abap_rule_1.ABAPRule {
72143
72195
  title: "WHEN OTHERS last",
72144
72196
  shortDescription: `Checks that WHEN OTHERS is placed the last within a CASE statement.`,
72145
72197
  tags: [_irule_1.RuleTag.SingleFile],
72146
- badExample: `CASE bar.
72147
- WHEN OTHERS.
72148
- WHEN 2.
72198
+ badExample: `CASE bar.
72199
+ WHEN OTHERS.
72200
+ WHEN 2.
72149
72201
  ENDCASE.`,
72150
- goodExample: `CASE bar.
72151
- WHEN 2.
72152
- WHEN OTHERS.
72202
+ goodExample: `CASE bar.
72203
+ WHEN 2.
72204
+ WHEN OTHERS.
72153
72205
  ENDCASE.`,
72154
72206
  };
72155
72207
  }