@abaplint/cli 2.112.17 → 2.112.18

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 +918 -877
  4. package/package.json +63 -63
package/build/cli.js CHANGED
@@ -5840,6 +5840,7 @@ __exportStar(__webpack_require__(/*! ./kernel_id */ "./node_modules/@abaplint/co
5840
5840
  __exportStar(__webpack_require__(/*! ./language */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/language.js"), exports);
5841
5841
  __exportStar(__webpack_require__(/*! ./length */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/length.js"), exports);
5842
5842
  __exportStar(__webpack_require__(/*! ./let */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/let.js"), exports);
5843
+ __exportStar(__webpack_require__(/*! ./lob_handle */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/lob_handle.js"), exports);
5843
5844
  __exportStar(__webpack_require__(/*! ./loop_group_by_component */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/loop_group_by_component.js"), exports);
5844
5845
  __exportStar(__webpack_require__(/*! ./loop_group_by_target */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/loop_group_by_target.js"), exports);
5845
5846
  __exportStar(__webpack_require__(/*! ./loop_group_by */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/loop_group_by.js"), exports);
@@ -5933,16 +5934,15 @@ __exportStar(__webpack_require__(/*! ./sql_into_table */ "./node_modules/@abapli
5933
5934
  __exportStar(__webpack_require__(/*! ./sql_join */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_join.js"), exports);
5934
5935
  __exportStar(__webpack_require__(/*! ./sql_order_by */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_order_by.js"), exports);
5935
5936
  __exportStar(__webpack_require__(/*! ./sql_path */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_path.js"), exports);
5937
+ __exportStar(__webpack_require__(/*! ./sql_source_no_space */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_source_no_space.js"), exports);
5936
5938
  __exportStar(__webpack_require__(/*! ./sql_source_simple */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_source_simple.js"), exports);
5937
5939
  __exportStar(__webpack_require__(/*! ./sql_source */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_source.js"), exports);
5938
- __exportStar(__webpack_require__(/*! ./sql_source_no_space */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_source_no_space.js"), exports);
5939
5940
  __exportStar(__webpack_require__(/*! ./sql_target */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_target.js"), exports);
5940
5941
  __exportStar(__webpack_require__(/*! ./sql_up_to */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_up_to.js"), exports);
5941
5942
  __exportStar(__webpack_require__(/*! ./string_template_formatting */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/string_template_formatting.js"), exports);
5942
5943
  __exportStar(__webpack_require__(/*! ./string_template_source */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/string_template_source.js"), exports);
5943
5944
  __exportStar(__webpack_require__(/*! ./string_template */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/string_template.js"), exports);
5944
5945
  __exportStar(__webpack_require__(/*! ./super_class_name */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/super_class_name.js"), exports);
5945
- __exportStar(__webpack_require__(/*! ./type_structure */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type_structure.js"), exports);
5946
5946
  __exportStar(__webpack_require__(/*! ./switch_body */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/switch_body.js"), exports);
5947
5947
  __exportStar(__webpack_require__(/*! ./table_body */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/table_body.js"), exports);
5948
5948
  __exportStar(__webpack_require__(/*! ./table_expression */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/table_expression.js"), exports);
@@ -5958,6 +5958,7 @@ __exportStar(__webpack_require__(/*! ./transporting_fields */ "./node_modules/@a
5958
5958
  __exportStar(__webpack_require__(/*! ./type_name_or_infer */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type_name_or_infer.js"), exports);
5959
5959
  __exportStar(__webpack_require__(/*! ./type_name */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type_name.js"), exports);
5960
5960
  __exportStar(__webpack_require__(/*! ./type_param */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type_param.js"), exports);
5961
+ __exportStar(__webpack_require__(/*! ./type_structure */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type_structure.js"), exports);
5961
5962
  __exportStar(__webpack_require__(/*! ./type_table_key */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type_table_key.js"), exports);
5962
5963
  __exportStar(__webpack_require__(/*! ./type_table */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type_table.js"), exports);
5963
5964
  __exportStar(__webpack_require__(/*! ./type */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type.js"), exports);
@@ -6226,6 +6227,28 @@ exports.Let = Let;
6226
6227
 
6227
6228
  /***/ }),
6228
6229
 
6230
+ /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/lob_handle.js":
6231
+ /*!*******************************************************************************************!*\
6232
+ !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/lob_handle.js ***!
6233
+ \*******************************************************************************************/
6234
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6235
+
6236
+ "use strict";
6237
+
6238
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
6239
+ exports.LOBHandle = void 0;
6240
+ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
6241
+ const Expressions = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
6242
+ class LOBHandle extends combi_1.Expression {
6243
+ getRunnable() {
6244
+ return (0, combi_1.seq)("WRITER FOR COLUMNS", Expressions.Field);
6245
+ }
6246
+ }
6247
+ exports.LOBHandle = LOBHandle;
6248
+ //# sourceMappingURL=lob_handle.js.map
6249
+
6250
+ /***/ }),
6251
+
6229
6252
  /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/loop_group_by.js":
6230
6253
  /*!**********************************************************************************************!*\
6231
6254
  !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/loop_group_by.js ***!
@@ -9148,7 +9171,7 @@ class Type extends combi_1.Expression {
9148
9171
  getRunnable() {
9149
9172
  const typeType = (0, combi_1.seq)(_1.TypeName, (0, combi_1.optPrio)(_1.Default));
9150
9173
  const like = (0, combi_1.altPrio)((0, combi_1.seq)("LINE OF", _1.FieldChain), (0, combi_1.seq)("REF TO", _1.FieldChain), _1.FieldChain);
9151
- const type = (0, combi_1.altPrio)((0, combi_1.seq)("LINE OF", typeType), (0, combi_1.seq)("REF TO", typeType), typeType);
9174
+ const type = (0, combi_1.altPrio)((0, combi_1.seq)("LINE OF", typeType), (0, combi_1.seq)("REF TO", typeType), (0, combi_1.seq)(typeType, (0, combi_1.optPrio)(_1.LOBHandle)));
9152
9175
  const ret = (0, combi_1.altPrio)((0, combi_1.seq)("LIKE", like), (0, combi_1.seq)("TYPE", type));
9153
9176
  return ret;
9154
9177
  }
@@ -35009,7 +35032,13 @@ exports.ArtifactsABAP = ArtifactsABAP;
35009
35032
  "use strict";
35010
35033
 
35011
35034
  Object.defineProperty(exports, "__esModule", ({ value: true }));
35012
- exports.FlowGraph = void 0;
35035
+ exports.FlowGraph = exports.FLOW_EDGE_TYPE = void 0;
35036
+ var FLOW_EDGE_TYPE;
35037
+ (function (FLOW_EDGE_TYPE) {
35038
+ FLOW_EDGE_TYPE["true"] = "true";
35039
+ FLOW_EDGE_TYPE["false"] = "false";
35040
+ FLOW_EDGE_TYPE["undefined"] = "undefined";
35041
+ })(FLOW_EDGE_TYPE || (exports.FLOW_EDGE_TYPE = FLOW_EDGE_TYPE = {}));
35013
35042
  class FlowGraph {
35014
35043
  constructor(counter) {
35015
35044
  this.edges = {};
@@ -35026,11 +35055,11 @@ class FlowGraph {
35026
35055
  getEnd() {
35027
35056
  return this.endNode;
35028
35057
  }
35029
- addEdge(from, to) {
35058
+ addEdge(from, to, type) {
35030
35059
  if (this.edges[from] === undefined) {
35031
35060
  this.edges[from] = {};
35032
35061
  }
35033
- this.edges[from][to] = true;
35062
+ this.edges[from][to] = type;
35034
35063
  }
35035
35064
  removeEdge(from, to) {
35036
35065
  if (this.edges[from] === undefined) {
@@ -35045,7 +35074,7 @@ class FlowGraph {
35045
35074
  const list = [];
35046
35075
  for (const from of Object.keys(this.edges)) {
35047
35076
  for (const to of Object.keys(this.edges[from])) {
35048
- list.push({ from, to });
35077
+ list.push({ from, to, type: this.edges[from][to] });
35049
35078
  }
35050
35079
  }
35051
35080
  return list;
@@ -35074,12 +35103,12 @@ class FlowGraph {
35074
35103
  return Object.keys(this.edges).length > 0;
35075
35104
  }
35076
35105
  /** return value: end node of to graph */
35077
- addGraph(from, to) {
35106
+ addGraph(from, to, type) {
35078
35107
  if (to.hasEdges() === false) {
35079
35108
  return from;
35080
35109
  }
35081
- this.addEdge(from, to.getStart());
35082
- to.listEdges().forEach(e => this.addEdge(e.from, e.to));
35110
+ this.addEdge(from, to.getStart(), type);
35111
+ to.listEdges().forEach(e => this.addEdge(e.from, e.to, e.type));
35083
35112
  return to.getEnd();
35084
35113
  }
35085
35114
  toJSON() {
@@ -35088,7 +35117,8 @@ class FlowGraph {
35088
35117
  toTextEdges() {
35089
35118
  let graph = "";
35090
35119
  for (const l of this.listEdges()) {
35091
- graph += `"${l.from}" -> "${l.to}";\n`;
35120
+ const label = l.type === FLOW_EDGE_TYPE.undefined ? "" : ` [label="${l.type}"]`;
35121
+ graph += `"${l.from}" -> "${l.to}"${label};\n`;
35092
35122
  }
35093
35123
  return graph.trim();
35094
35124
  }
@@ -35096,32 +35126,32 @@ class FlowGraph {
35096
35126
  this.label = label;
35097
35127
  }
35098
35128
  toDigraph() {
35099
- return `digraph G {
35100
- labelloc="t";
35101
- label="${this.label}";
35102
- graph [fontname = "helvetica"];
35103
- node [fontname = "helvetica", shape="box"];
35104
- edge [fontname = "helvetica"];
35105
- ${this.toTextEdges()}
35129
+ return `digraph G {
35130
+ labelloc="t";
35131
+ label="${this.label}";
35132
+ graph [fontname = "helvetica"];
35133
+ node [fontname = "helvetica", shape="box"];
35134
+ edge [fontname = "helvetica"];
35135
+ ${this.toTextEdges()}
35106
35136
  }`;
35107
35137
  }
35108
35138
  listSources(node) {
35109
- const set = new Set();
35139
+ const set = [];
35110
35140
  for (const l of this.listEdges()) {
35111
35141
  if (node === l.to) {
35112
- set.add(l.from);
35142
+ set.push({ name: l.from, type: l.type });
35113
35143
  }
35114
35144
  }
35115
- return Array.from(set.values());
35145
+ return set;
35116
35146
  }
35117
35147
  listTargets(node) {
35118
- const set = new Set();
35148
+ const set = [];
35119
35149
  for (const l of this.listEdges()) {
35120
35150
  if (node === l.from) {
35121
- set.add(l.to);
35151
+ set.push({ name: l.to, type: l.type });
35122
35152
  }
35123
35153
  }
35124
- return Array.from(set.values());
35154
+ return set;
35125
35155
  }
35126
35156
  /** removes all nodes containing "#" that have one in-going and one out-going edge */
35127
35157
  reduce() {
@@ -35134,20 +35164,30 @@ ${this.toTextEdges()}
35134
35164
  if (sources.length > 0 && targets.length > 0) {
35135
35165
  // hash node in the middle of the graph
35136
35166
  for (const s of sources) {
35137
- this.removeEdge(s, node);
35167
+ this.removeEdge(s.name, node);
35138
35168
  }
35139
35169
  for (const t of targets) {
35140
- this.removeEdge(node, t);
35170
+ this.removeEdge(node, t.name);
35141
35171
  }
35142
35172
  for (const s of sources) {
35143
35173
  for (const t of targets) {
35144
- this.addEdge(s, t);
35174
+ let type = FLOW_EDGE_TYPE.undefined;
35175
+ if (s.type !== FLOW_EDGE_TYPE.undefined) {
35176
+ type = s.type;
35177
+ }
35178
+ if (t.type !== FLOW_EDGE_TYPE.undefined) {
35179
+ if (type !== FLOW_EDGE_TYPE.undefined) {
35180
+ throw new Error("reduce: cannot merge, different edge types");
35181
+ }
35182
+ type = t.type;
35183
+ }
35184
+ this.addEdge(s.name, t.name, type);
35145
35185
  }
35146
35186
  }
35147
35187
  }
35148
35188
  if (node.startsWith("end#") && sources.length === 0) {
35149
35189
  for (const t of targets) {
35150
- this.removeEdge(node, t);
35190
+ this.removeEdge(node, t.name);
35151
35191
  }
35152
35192
  }
35153
35193
  }
@@ -35232,7 +35272,7 @@ class StatementFlow {
35232
35272
  traverseBody(children, context) {
35233
35273
  const graph = new flow_graph_1.FlowGraph(this.counter++);
35234
35274
  if (children.length === 0) {
35235
- graph.addEdge(graph.getStart(), graph.getEnd());
35275
+ graph.addEdge(graph.getStart(), graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.undefined);
35236
35276
  return graph;
35237
35277
  }
35238
35278
  let current = graph.getStart();
@@ -35241,44 +35281,44 @@ class StatementFlow {
35241
35281
  const firstChild = c.getFirstChild(); // "Normal" only has one child
35242
35282
  if (firstChild instanceof nodes_1.StatementNode) {
35243
35283
  const name = this.buildName(firstChild);
35244
- graph.addEdge(current, name);
35284
+ graph.addEdge(current, name, flow_graph_1.FLOW_EDGE_TYPE.undefined);
35245
35285
  current = name;
35246
35286
  if (firstChild.get() instanceof Statements.Check) {
35247
35287
  if (context.loopStart) {
35248
- graph.addEdge(name, context.loopStart);
35288
+ graph.addEdge(name, context.loopStart, flow_graph_1.FLOW_EDGE_TYPE.false);
35249
35289
  }
35250
35290
  else {
35251
- graph.addEdge(name, context.procedureEnd);
35291
+ graph.addEdge(name, context.procedureEnd, flow_graph_1.FLOW_EDGE_TYPE.false);
35252
35292
  }
35253
35293
  }
35254
35294
  else if (firstChild.get() instanceof Statements.Assert) {
35255
- graph.addEdge(name, context.procedureEnd);
35295
+ graph.addEdge(name, context.procedureEnd, flow_graph_1.FLOW_EDGE_TYPE.false);
35256
35296
  }
35257
35297
  else if (firstChild.get() instanceof Statements.Continue && context.loopStart) {
35258
- graph.addEdge(name, context.loopStart);
35298
+ graph.addEdge(name, context.loopStart, flow_graph_1.FLOW_EDGE_TYPE.undefined);
35259
35299
  return graph;
35260
35300
  }
35261
35301
  else if (firstChild.get() instanceof Statements.Exit) {
35262
35302
  if (context.loopEnd) {
35263
- graph.addEdge(name, context.loopEnd);
35303
+ graph.addEdge(name, context.loopEnd, flow_graph_1.FLOW_EDGE_TYPE.undefined);
35264
35304
  }
35265
35305
  else {
35266
- graph.addEdge(name, context.procedureEnd);
35306
+ graph.addEdge(name, context.procedureEnd, flow_graph_1.FLOW_EDGE_TYPE.undefined);
35267
35307
  }
35268
35308
  return graph;
35269
35309
  }
35270
35310
  else if (firstChild.get() instanceof Statements.Return) {
35271
- graph.addEdge(name, context.procedureEnd);
35311
+ graph.addEdge(name, context.procedureEnd, flow_graph_1.FLOW_EDGE_TYPE.undefined);
35272
35312
  return graph;
35273
35313
  }
35274
35314
  }
35275
35315
  else if (firstChild instanceof nodes_1.StructureNode) {
35276
35316
  const sub = this.traverseStructure(firstChild, context);
35277
- current = graph.addGraph(current, sub);
35317
+ current = graph.addGraph(current, sub, flow_graph_1.FLOW_EDGE_TYPE.undefined);
35278
35318
  }
35279
35319
  }
35280
35320
  }
35281
- graph.addEdge(current, graph.getEnd());
35321
+ graph.addEdge(current, graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.undefined);
35282
35322
  return graph;
35283
35323
  }
35284
35324
  traverseStructure(n, context) {
@@ -35291,9 +35331,9 @@ class StatementFlow {
35291
35331
  if (type instanceof Structures.If) {
35292
35332
  const ifName = this.buildName(n.findDirectStatement(Statements.If));
35293
35333
  const sub = this.traverseBody(this.findBody(n), context);
35294
- graph.addEdge(current, ifName);
35295
- graph.addGraph(ifName, sub);
35296
- graph.addEdge(sub.getEnd(), graph.getEnd());
35334
+ graph.addEdge(current, ifName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
35335
+ graph.addGraph(ifName, sub, flow_graph_1.FLOW_EDGE_TYPE.true);
35336
+ graph.addEdge(sub.getEnd(), graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.undefined);
35297
35337
  current = ifName;
35298
35338
  for (const e of n.findDirectStructures(Structures.ElseIf)) {
35299
35339
  const elseifst = e.findDirectStatement(Statements.ElseIf);
@@ -35302,9 +35342,9 @@ class StatementFlow {
35302
35342
  }
35303
35343
  const elseIfName = this.buildName(elseifst);
35304
35344
  const sub = this.traverseBody(this.findBody(e), context);
35305
- graph.addEdge(current, elseIfName);
35306
- graph.addGraph(elseIfName, sub);
35307
- graph.addEdge(sub.getEnd(), graph.getEnd());
35345
+ graph.addEdge(current, elseIfName, flow_graph_1.FLOW_EDGE_TYPE.false);
35346
+ graph.addGraph(elseIfName, sub, flow_graph_1.FLOW_EDGE_TYPE.true);
35347
+ graph.addEdge(sub.getEnd(), graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.undefined);
35308
35348
  current = elseIfName;
35309
35349
  }
35310
35350
  const els = n.findDirectStructure(Structures.Else);
@@ -35312,12 +35352,12 @@ class StatementFlow {
35312
35352
  if (els && elsest) {
35313
35353
  const elseName = this.buildName(elsest);
35314
35354
  const sub = this.traverseBody(this.findBody(els), context);
35315
- graph.addEdge(current, elseName);
35316
- graph.addGraph(elseName, sub);
35317
- graph.addEdge(sub.getEnd(), graph.getEnd());
35355
+ graph.addEdge(current, elseName, flow_graph_1.FLOW_EDGE_TYPE.false);
35356
+ graph.addGraph(elseName, sub, flow_graph_1.FLOW_EDGE_TYPE.undefined);
35357
+ graph.addEdge(sub.getEnd(), graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.undefined);
35318
35358
  }
35319
35359
  else {
35320
- graph.addEdge(ifName, graph.getEnd());
35360
+ graph.addEdge(ifName, graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.false);
35321
35361
  }
35322
35362
  }
35323
35363
  else if (type instanceof Structures.Loop
@@ -35329,18 +35369,18 @@ class StatementFlow {
35329
35369
  || type instanceof Structures.Do) {
35330
35370
  const loopName = this.buildName(n.getFirstStatement());
35331
35371
  const sub = this.traverseBody(this.findBody(n), Object.assign(Object.assign({}, context), { loopStart: loopName, loopEnd: graph.getEnd() }));
35332
- graph.addEdge(current, loopName);
35333
- graph.addGraph(loopName, sub);
35334
- graph.addEdge(sub.getEnd(), loopName);
35335
- graph.addEdge(loopName, graph.getEnd());
35372
+ graph.addEdge(current, loopName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
35373
+ graph.addGraph(loopName, sub, flow_graph_1.FLOW_EDGE_TYPE.true);
35374
+ graph.addEdge(sub.getEnd(), loopName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
35375
+ graph.addEdge(loopName, graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.false);
35336
35376
  }
35337
35377
  else if (type instanceof Structures.Data
35338
35378
  || type instanceof Structures.Types) {
35339
35379
  // these doesnt affect control flow, so just take the first statement
35340
35380
  const statement = n.getFirstStatement();
35341
35381
  const name = this.buildName(statement);
35342
- graph.addEdge(current, name);
35343
- graph.addEdge(name, graph.getEnd());
35382
+ graph.addEdge(current, name, flow_graph_1.FLOW_EDGE_TYPE.undefined);
35383
+ graph.addEdge(name, graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.undefined);
35344
35384
  }
35345
35385
  else if (type instanceof Structures.AtFirst
35346
35386
  || type instanceof Structures.AtLast
@@ -35348,30 +35388,30 @@ class StatementFlow {
35348
35388
  || type instanceof Structures.OnChange) {
35349
35389
  const name = this.buildName(n.getFirstStatement());
35350
35390
  const body = this.traverseBody(this.findBody(n), context);
35351
- graph.addEdge(current, name);
35352
- graph.addGraph(name, body);
35353
- graph.addEdge(body.getEnd(), graph.getEnd());
35354
- graph.addEdge(current, graph.getEnd());
35391
+ graph.addEdge(current, name, flow_graph_1.FLOW_EDGE_TYPE.undefined);
35392
+ graph.addGraph(name, body, flow_graph_1.FLOW_EDGE_TYPE.undefined);
35393
+ graph.addEdge(body.getEnd(), graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.undefined);
35394
+ graph.addEdge(current, graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.undefined);
35355
35395
  }
35356
35396
  else if (type instanceof Structures.Try) {
35357
35397
  const tryName = this.buildName(n.getFirstStatement());
35358
35398
  const body = this.traverseBody(this.findBody(n), context);
35359
- graph.addEdge(current, tryName);
35360
- graph.addGraph(tryName, body);
35361
- graph.addEdge(body.getEnd(), graph.getEnd());
35399
+ graph.addEdge(current, tryName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
35400
+ graph.addGraph(tryName, body, flow_graph_1.FLOW_EDGE_TYPE.undefined);
35401
+ graph.addEdge(body.getEnd(), graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.undefined);
35362
35402
  for (const c of n.findDirectStructures(Structures.Catch)) {
35363
35403
  const catchName = this.buildName(c.getFirstStatement());
35364
35404
  const catchBody = this.traverseBody(this.findBody(c), context);
35365
35405
  // TODO: this does not take exceptions into account
35366
- graph.addEdge(body.getEnd(), catchName);
35367
- graph.addGraph(catchName, catchBody);
35368
- graph.addEdge(catchBody.getEnd(), graph.getEnd());
35406
+ graph.addEdge(body.getEnd(), catchName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
35407
+ graph.addGraph(catchName, catchBody, flow_graph_1.FLOW_EDGE_TYPE.undefined);
35408
+ graph.addEdge(catchBody.getEnd(), graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.undefined);
35369
35409
  }
35370
35410
  // TODO, handle CLEANUP
35371
35411
  }
35372
35412
  else if (type instanceof Structures.Case) {
35373
35413
  const caseName = this.buildName(n.getFirstStatement());
35374
- graph.addEdge(current, caseName);
35414
+ graph.addEdge(current, caseName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
35375
35415
  let othersFound = false;
35376
35416
  for (const w of n.findDirectStructures(Structures.When)) {
35377
35417
  const first = w.getFirstStatement();
@@ -35383,17 +35423,17 @@ class StatementFlow {
35383
35423
  }
35384
35424
  const firstName = this.buildName(first);
35385
35425
  const sub = this.traverseBody(this.findBody(w), context);
35386
- graph.addEdge(caseName, firstName);
35387
- graph.addGraph(firstName, sub);
35388
- graph.addEdge(sub.getEnd(), graph.getEnd());
35426
+ graph.addEdge(caseName, firstName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
35427
+ graph.addGraph(firstName, sub, flow_graph_1.FLOW_EDGE_TYPE.undefined);
35428
+ graph.addEdge(sub.getEnd(), graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.undefined);
35389
35429
  }
35390
35430
  if (othersFound === false) {
35391
- graph.addEdge(caseName, graph.getEnd());
35431
+ graph.addEdge(caseName, graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.undefined);
35392
35432
  }
35393
35433
  }
35394
35434
  else if (type instanceof Structures.CaseType) {
35395
35435
  const caseName = this.buildName(n.getFirstStatement());
35396
- graph.addEdge(current, caseName);
35436
+ graph.addEdge(current, caseName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
35397
35437
  let othersFound = false;
35398
35438
  for (const w of n.findDirectStructures(Structures.WhenType)) {
35399
35439
  const first = w.getFirstStatement();
@@ -35405,12 +35445,12 @@ class StatementFlow {
35405
35445
  }
35406
35446
  const firstName = this.buildName(first);
35407
35447
  const sub = this.traverseBody(this.findBody(w), context);
35408
- graph.addEdge(caseName, firstName);
35409
- graph.addGraph(firstName, sub);
35410
- graph.addEdge(sub.getEnd(), graph.getEnd());
35448
+ graph.addEdge(caseName, firstName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
35449
+ graph.addGraph(firstName, sub, flow_graph_1.FLOW_EDGE_TYPE.undefined);
35450
+ graph.addEdge(sub.getEnd(), graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.undefined);
35411
35451
  }
35412
35452
  if (othersFound === false) {
35413
- graph.addEdge(caseName, graph.getEnd());
35453
+ graph.addEdge(caseName, graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.undefined);
35414
35454
  }
35415
35455
  }
35416
35456
  else {
@@ -41997,8 +42037,8 @@ exports.MemoryFile = MemoryFile;
41997
42037
  "use strict";
41998
42038
 
41999
42039
  Object.defineProperty(exports, "__esModule", ({ value: true }));
42000
- exports.CurrentScope = exports.ABAPFile = exports.RulesRunner = exports.SpaghettiScope = exports.SyntaxLogic = exports.ABAPObject = exports.Tokens = exports.ExpressionsCDS = exports.CDSParser = exports.LanguageServerTypes = exports.DDLParser = exports.FlowGraph = exports.StatementFlow = exports.NativeSQL = exports.MacroContent = exports.MacroCall = exports.applyEditList = exports.applyEditSingle = exports.SpaghettiScopeNode = exports.AbstractFile = exports.Token = exports.ScopeType = exports.BasicTypes = exports.TypedIdentifier = exports.AbstractType = exports.VirtualPosition = exports.Comment = exports.Unknown = exports.Empty = exports.Identifier = exports.Nodes = exports.Types = exports.Expressions = exports.Statements = exports.Structures = exports.SkipLogic = exports.Objects = exports.ArtifactsRules = exports.ArtifactsObjects = exports.ArtifactsABAP = exports.BuiltIn = exports.MethodLengthStats = exports.LanguageServer = exports.Registry = exports.CyclomaticComplexityStats = exports.ReferenceType = exports.Version = exports.Config = exports.Issue = exports.MemoryFile = void 0;
42001
- exports.LSPEdit = exports.RuleTag = exports.Severity = exports.Visibility = exports.Info = exports.Diagnostics = exports.Rename = exports.PrettyPrinter = exports.Position = void 0;
42040
+ exports.ABAPFile = exports.RulesRunner = exports.SpaghettiScope = exports.SyntaxLogic = exports.ABAPObject = exports.Tokens = exports.ExpressionsCDS = exports.CDSParser = exports.LanguageServerTypes = exports.DDLParser = exports.FLOW_EDGE_TYPE = exports.FlowGraph = exports.StatementFlow = exports.NativeSQL = exports.MacroContent = exports.MacroCall = exports.applyEditList = exports.applyEditSingle = exports.SpaghettiScopeNode = exports.AbstractFile = exports.Token = exports.ScopeType = exports.BasicTypes = exports.TypedIdentifier = exports.AbstractType = exports.VirtualPosition = exports.Comment = exports.Unknown = exports.Empty = exports.Identifier = exports.Nodes = exports.Types = exports.Expressions = exports.Statements = exports.Structures = exports.SkipLogic = exports.Objects = exports.ArtifactsRules = exports.ArtifactsObjects = exports.ArtifactsABAP = exports.BuiltIn = exports.MethodLengthStats = exports.LanguageServer = exports.Registry = exports.CyclomaticComplexityStats = exports.ReferenceType = exports.Version = exports.Config = exports.Issue = exports.MemoryFile = void 0;
42041
+ exports.LSPEdit = exports.RuleTag = exports.Severity = exports.Visibility = exports.Info = exports.Diagnostics = exports.Rename = exports.PrettyPrinter = exports.Position = exports.CurrentScope = void 0;
42002
42042
  const issue_1 = __webpack_require__(/*! ./issue */ "./node_modules/@abaplint/core/build/src/issue.js");
42003
42043
  Object.defineProperty(exports, "Issue", ({ enumerable: true, get: function () { return issue_1.Issue; } }));
42004
42044
  const config_1 = __webpack_require__(/*! ./config */ "./node_modules/@abaplint/core/build/src/config.js");
@@ -42110,6 +42150,7 @@ const statement_flow_1 = __webpack_require__(/*! ./abap/flow/statement_flow */ "
42110
42150
  Object.defineProperty(exports, "StatementFlow", ({ enumerable: true, get: function () { return statement_flow_1.StatementFlow; } }));
42111
42151
  const flow_graph_1 = __webpack_require__(/*! ./abap/flow/flow_graph */ "./node_modules/@abaplint/core/build/src/abap/flow/flow_graph.js");
42112
42152
  Object.defineProperty(exports, "FlowGraph", ({ enumerable: true, get: function () { return flow_graph_1.FlowGraph; } }));
42153
+ Object.defineProperty(exports, "FLOW_EDGE_TYPE", ({ enumerable: true, get: function () { return flow_graph_1.FLOW_EDGE_TYPE; } }));
42113
42154
  //# sourceMappingURL=index.js.map
42114
42155
 
42115
42156
  /***/ }),
@@ -43237,13 +43278,13 @@ class Help {
43237
43278
  /////////////////////////////////////////////////
43238
43279
  static dumpABAP(file, reg, textDocument, position) {
43239
43280
  let content = "";
43240
- content = `
43241
- <a href="#_tokens" rel="no-refresh">Tokens</a> |
43242
- <a href="#_statements" rel="no-refresh">Statements</a> |
43243
- <a href="#_structure" rel="no-refresh">Structure</a> |
43244
- <a href="#_files" rel="no-refresh">Files</a> |
43245
- <a href="#_info" rel="no-refresh">Info Dump</a>
43246
- <hr>
43281
+ content = `
43282
+ <a href="#_tokens" rel="no-refresh">Tokens</a> |
43283
+ <a href="#_statements" rel="no-refresh">Statements</a> |
43284
+ <a href="#_structure" rel="no-refresh">Structure</a> |
43285
+ <a href="#_files" rel="no-refresh">Files</a> |
43286
+ <a href="#_info" rel="no-refresh">Info Dump</a>
43287
+ <hr>
43247
43288
  ` +
43248
43289
  "<tt>" + textDocument.uri + " (" +
43249
43290
  (position.line + 1) + ", " +
@@ -52513,7 +52554,7 @@ class Registry {
52513
52554
  }
52514
52555
  static abaplintVersion() {
52515
52556
  // magic, see build script "version.sh"
52516
- return "2.112.17";
52557
+ return "2.112.18";
52517
52558
  }
52518
52559
  getDDICReferences() {
52519
52560
  return this.ddicReferences;
@@ -52832,10 +52873,10 @@ class SevenBitAscii {
52832
52873
  key: "7bit_ascii",
52833
52874
  title: "Check for 7bit ascii",
52834
52875
  shortDescription: `Only allow characters from the 7bit ASCII set.`,
52835
- extendedInformation: `https://docs.abapopenchecks.org/checks/05/
52836
-
52837
- https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
52838
-
52876
+ extendedInformation: `https://docs.abapopenchecks.org/checks/05/
52877
+
52878
+ https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
52879
+
52839
52880
  Checkes files with extensions ".abap" and ".asddls"`,
52840
52881
  tags: [_irule_1.RuleTag.SingleFile],
52841
52882
  badExample: `WRITE '뽑'.`,
@@ -53041,10 +53082,10 @@ class Abapdoc extends _abap_rule_1.ABAPRule {
53041
53082
  key: "abapdoc",
53042
53083
  title: "Check abapdoc",
53043
53084
  shortDescription: `Various checks regarding abapdoc.`,
53044
- extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
53045
-
53046
- Plus class and interface definitions.
53047
-
53085
+ extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
53086
+
53087
+ Plus class and interface definitions.
53088
+
53048
53089
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#abap-doc-only-for-public-apis`,
53049
53090
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
53050
53091
  };
@@ -53182,49 +53223,49 @@ class AlignParameters extends _abap_rule_1.ABAPRule {
53182
53223
  key: "align_parameters",
53183
53224
  title: "Align Parameters",
53184
53225
  shortDescription: `Checks for vertially aligned parameters`,
53185
- extendedInformation: `Checks:
53186
- * function module calls
53187
- * method calls
53188
- * VALUE constructors
53189
- * NEW constructors
53190
- * RAISE EXCEPTION statements
53191
- * CREATE OBJECT statements
53192
- * RAISE EVENT statements
53193
-
53194
- https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
53195
-
53196
- Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
53197
-
53198
- If parameters are on the same row, no issues are reported, see
53226
+ extendedInformation: `Checks:
53227
+ * function module calls
53228
+ * method calls
53229
+ * VALUE constructors
53230
+ * NEW constructors
53231
+ * RAISE EXCEPTION statements
53232
+ * CREATE OBJECT statements
53233
+ * RAISE EVENT statements
53234
+
53235
+ https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
53236
+
53237
+ Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
53238
+
53239
+ If parameters are on the same row, no issues are reported, see
53199
53240
  https://rules.abaplint.org/max_one_method_parameter_per_line/ for splitting parameters to lines`,
53200
53241
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
53201
- badExample: `CALL FUNCTION 'FOOBAR'
53202
- EXPORTING
53203
- foo = 2
53204
- parameter = 3.
53205
-
53206
- foobar( moo = 1
53207
- param = 1 ).
53208
-
53209
- foo = VALUE #(
53210
- foo = bar
53242
+ badExample: `CALL FUNCTION 'FOOBAR'
53243
+ EXPORTING
53244
+ foo = 2
53245
+ parameter = 3.
53246
+
53247
+ foobar( moo = 1
53248
+ param = 1 ).
53249
+
53250
+ foo = VALUE #(
53251
+ foo = bar
53211
53252
  moo = 2 ).`,
53212
- goodExample: `CALL FUNCTION 'FOOBAR'
53213
- EXPORTING
53214
- foo = 2
53215
- parameter = 3.
53216
-
53217
- foobar( moo = 1
53218
- param = 1 ).
53219
-
53220
- foo = VALUE #(
53221
- foo = bar
53222
- moo = 2 ).
53223
-
53224
- DATA(sdf) = VALUE type(
53225
- common_val = 2
53226
- another_common = 5
53227
- ( row_value = 4
53253
+ goodExample: `CALL FUNCTION 'FOOBAR'
53254
+ EXPORTING
53255
+ foo = 2
53256
+ parameter = 3.
53257
+
53258
+ foobar( moo = 1
53259
+ param = 1 ).
53260
+
53261
+ foo = VALUE #(
53262
+ foo = bar
53263
+ moo = 2 ).
53264
+
53265
+ DATA(sdf) = VALUE type(
53266
+ common_val = 2
53267
+ another_common = 5
53268
+ ( row_value = 4
53228
53269
  value_foo = 5 ) ).`,
53229
53270
  };
53230
53271
  }
@@ -53658,37 +53699,37 @@ class AlignTypeExpressions extends _abap_rule_1.ABAPRule {
53658
53699
  key: "align_type_expressions",
53659
53700
  title: "Align TYPE expressions",
53660
53701
  shortDescription: `Align TYPE expressions in statements`,
53661
- extendedInformation: `
53662
- Currently works for METHODS + BEGIN OF
53663
-
53664
- If BEGIN OF has an INCLUDE TYPE its ignored
53665
-
53666
- Also note that clean ABAP does not recommend aligning TYPE clauses:
53702
+ extendedInformation: `
53703
+ Currently works for METHODS + BEGIN OF
53704
+
53705
+ If BEGIN OF has an INCLUDE TYPE its ignored
53706
+
53707
+ Also note that clean ABAP does not recommend aligning TYPE clauses:
53667
53708
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-align-type-clauses`,
53668
53709
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix],
53669
- badExample: `
53670
- TYPES: BEGIN OF foo,
53671
- bar TYPE i,
53672
- foobar TYPE i,
53673
- END OF foo.
53674
-
53675
- INTERFACE lif.
53676
- METHODS bar
53677
- IMPORTING
53678
- foo TYPE i
53679
- foobar TYPE i.
53710
+ badExample: `
53711
+ TYPES: BEGIN OF foo,
53712
+ bar TYPE i,
53713
+ foobar TYPE i,
53714
+ END OF foo.
53715
+
53716
+ INTERFACE lif.
53717
+ METHODS bar
53718
+ IMPORTING
53719
+ foo TYPE i
53720
+ foobar TYPE i.
53680
53721
  ENDINTERFACE.`,
53681
- goodExample: `
53682
- TYPES: BEGIN OF foo,
53683
- bar TYPE i,
53684
- foobar TYPE i,
53685
- END OF foo.
53686
-
53687
- INTERFACE lif.
53688
- METHODS bar
53689
- IMPORTING
53690
- foo TYPE i
53691
- foobar TYPE i.
53722
+ goodExample: `
53723
+ TYPES: BEGIN OF foo,
53724
+ bar TYPE i,
53725
+ foobar TYPE i,
53726
+ END OF foo.
53727
+
53728
+ INTERFACE lif.
53729
+ METHODS bar
53730
+ IMPORTING
53731
+ foo TYPE i
53732
+ foobar TYPE i.
53692
53733
  ENDINTERFACE.`,
53693
53734
  };
53694
53735
  }
@@ -53967,15 +54008,15 @@ class AmbiguousStatement extends _abap_rule_1.ABAPRule {
53967
54008
  return {
53968
54009
  key: "ambiguous_statement",
53969
54010
  title: "Check for ambigious statements",
53970
- shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
53971
- Add "TABLE" keyword or "@" for escaping SQL variables
53972
-
54011
+ shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
54012
+ Add "TABLE" keyword or "@" for escaping SQL variables
54013
+
53973
54014
  Only works if the target version is 740sp05 or above`,
53974
54015
  tags: [_irule_1.RuleTag.SingleFile],
53975
- badExample: `DELETE foo FROM bar.
54016
+ badExample: `DELETE foo FROM bar.
53976
54017
  MODIFY foo FROM bar.`,
53977
- goodExample: `DELETE foo FROM @bar.
53978
- MODIFY TABLE foo FROM bar.
54018
+ goodExample: `DELETE foo FROM @bar.
54019
+ MODIFY TABLE foo FROM bar.
53979
54020
  MODIFY zfoo FROM @wa.`,
53980
54021
  };
53981
54022
  }
@@ -54080,16 +54121,16 @@ class AvoidUse extends _abap_rule_1.ABAPRule {
54080
54121
  key: "avoid_use",
54081
54122
  title: "Avoid use of certain statements",
54082
54123
  shortDescription: `Detects usage of certain statements.`,
54083
- extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
54084
-
54085
- Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
54086
-
54087
- STATICS: use CLASS-DATA instead
54088
-
54089
- DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
54090
-
54091
- TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
54092
-
54124
+ extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
54125
+
54126
+ Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
54127
+
54128
+ STATICS: use CLASS-DATA instead
54129
+
54130
+ DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
54131
+
54132
+ TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
54133
+
54093
54134
  BREAK points`,
54094
54135
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
54095
54136
  };
@@ -54221,11 +54262,11 @@ class BeginEndNames extends _abap_rule_1.ABAPRule {
54221
54262
  title: "Check BEGIN END names",
54222
54263
  shortDescription: `Check BEGIN OF and END OF names match, plus there must be statements between BEGIN and END`,
54223
54264
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
54224
- badExample: `DATA: BEGIN OF stru,
54225
- field TYPE i,
54265
+ badExample: `DATA: BEGIN OF stru,
54266
+ field TYPE i,
54226
54267
  END OF structure_not_the_same.`,
54227
- goodExample: `DATA: BEGIN OF stru,
54228
- field TYPE i,
54268
+ goodExample: `DATA: BEGIN OF stru,
54269
+ field TYPE i,
54229
54270
  END OF stru.`,
54230
54271
  };
54231
54272
  }
@@ -54322,20 +54363,20 @@ class BeginSingleInclude extends _abap_rule_1.ABAPRule {
54322
54363
  title: "BEGIN contains single INCLUDE",
54323
54364
  shortDescription: `Finds TYPE BEGIN with just one INCLUDE TYPE, and DATA with single INCLUDE STRUCTURE`,
54324
54365
  tags: [_irule_1.RuleTag.SingleFile],
54325
- badExample: `TYPES: BEGIN OF dummy1.
54326
- INCLUDE TYPE dselc.
54327
- TYPES: END OF dummy1.
54328
-
54329
- DATA BEGIN OF foo.
54330
- INCLUDE STRUCTURE syst.
54331
- DATA END OF foo.
54332
-
54333
- STATICS BEGIN OF bar.
54334
- INCLUDE STRUCTURE syst.
54366
+ badExample: `TYPES: BEGIN OF dummy1.
54367
+ INCLUDE TYPE dselc.
54368
+ TYPES: END OF dummy1.
54369
+
54370
+ DATA BEGIN OF foo.
54371
+ INCLUDE STRUCTURE syst.
54372
+ DATA END OF foo.
54373
+
54374
+ STATICS BEGIN OF bar.
54375
+ INCLUDE STRUCTURE syst.
54335
54376
  STATICS END OF bar.`,
54336
- goodExample: `DATA BEGIN OF foo.
54337
- DATA field TYPE i.
54338
- INCLUDE STRUCTURE dselc.
54377
+ goodExample: `DATA BEGIN OF foo.
54378
+ DATA field TYPE i.
54379
+ INCLUDE STRUCTURE dselc.
54339
54380
  DATA END OF foo.`,
54340
54381
  };
54341
54382
  }
@@ -54425,9 +54466,9 @@ class CallTransactionAuthorityCheck extends _abap_rule_1.ABAPRule {
54425
54466
  extendedInformation: `https://docs.abapopenchecks.org/checks/54/`,
54426
54467
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
54427
54468
  badExample: `CALL TRANSACTION 'FOO'.`,
54428
- goodExample: `TRY.
54429
- CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
54430
- CATCH cx_sy_authorization_error.
54469
+ goodExample: `TRY.
54470
+ CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
54471
+ CATCH cx_sy_authorization_error.
54431
54472
  ENDTRY.`,
54432
54473
  };
54433
54474
  }
@@ -54492,10 +54533,10 @@ class CDSCommentStyle {
54492
54533
  key: "cds_comment_style",
54493
54534
  title: "CDS Comment Style",
54494
54535
  shortDescription: `Check for obsolete comment style`,
54495
- extendedInformation: `Check for obsolete comment style
54496
-
54497
- Comments starting with "--" are considered obsolete
54498
-
54536
+ extendedInformation: `Check for obsolete comment style
54537
+
54538
+ Comments starting with "--" are considered obsolete
54539
+
54499
54540
  https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abencds_general_syntax_rules.htm`,
54500
54541
  tags: [_irule_1.RuleTag.SingleFile],
54501
54542
  badExample: "-- this is a comment",
@@ -54561,10 +54602,10 @@ class CDSLegacyView {
54561
54602
  key: "cds_legacy_view",
54562
54603
  title: "CDS Legacy View",
54563
54604
  shortDescription: `Identify CDS Legacy Views`,
54564
- extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
54565
-
54566
- https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
54567
-
54605
+ extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
54606
+
54607
+ https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
54608
+
54568
54609
  v755 and up`,
54569
54610
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Upport],
54570
54611
  };
@@ -54719,10 +54760,10 @@ class ChainMainlyDeclarations extends _abap_rule_1.ABAPRule {
54719
54760
  key: "chain_mainly_declarations",
54720
54761
  title: "Chain mainly declarations",
54721
54762
  shortDescription: `Chain mainly declarations, allows chaining for the configured statements, reports errors for other statements.`,
54722
- extendedInformation: `
54723
- https://docs.abapopenchecks.org/checks/23/
54724
-
54725
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
54763
+ extendedInformation: `
54764
+ https://docs.abapopenchecks.org/checks/23/
54765
+
54766
+ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
54726
54767
  `,
54727
54768
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
54728
54769
  badExample: `CALL METHOD: bar.`,
@@ -54898,17 +54939,17 @@ class ChangeIfToCase extends _abap_rule_1.ABAPRule {
54898
54939
  title: "Change IF to CASE",
54899
54940
  shortDescription: `Finds IF constructs that can be changed to CASE`,
54900
54941
  // eslint-disable-next-line max-len
54901
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
54902
-
54942
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
54943
+
54903
54944
  If the first comparison is a boolean compare, no issue is reported.`,
54904
54945
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
54905
- badExample: `IF l_fcat-fieldname EQ 'FOO'.
54906
- ELSEIF l_fcat-fieldname = 'BAR'
54907
- OR l_fcat-fieldname = 'MOO'.
54946
+ badExample: `IF l_fcat-fieldname EQ 'FOO'.
54947
+ ELSEIF l_fcat-fieldname = 'BAR'
54948
+ OR l_fcat-fieldname = 'MOO'.
54908
54949
  ENDIF.`,
54909
- goodExample: `CASE l_fcat-fieldname.
54910
- WHEN 'FOO'.
54911
- WHEN 'BAR' OR 'MOO'.
54950
+ goodExample: `CASE l_fcat-fieldname.
54951
+ WHEN 'FOO'.
54952
+ WHEN 'BAR' OR 'MOO'.
54912
54953
  ENDCASE.`,
54913
54954
  };
54914
54955
  }
@@ -55045,8 +55086,8 @@ class CheckAbstract extends _abap_rule_1.ABAPRule {
55045
55086
  return {
55046
55087
  key: "check_abstract",
55047
55088
  title: "Check abstract methods and classes",
55048
- shortDescription: `Checks abstract methods and classes:
55049
- - class defined as abstract and final,
55089
+ shortDescription: `Checks abstract methods and classes:
55090
+ - class defined as abstract and final,
55050
55091
  - non-abstract class contains abstract methods`,
55051
55092
  extendedInformation: `If a class defines only constants, use an interface instead`,
55052
55093
  tags: [_irule_1.RuleTag.SingleFile],
@@ -55127,11 +55168,11 @@ class CheckComments extends _abap_rule_1.ABAPRule {
55127
55168
  return {
55128
55169
  key: "check_comments",
55129
55170
  title: "Check Comments",
55130
- shortDescription: `
55171
+ shortDescription: `
55131
55172
  Various checks for comment usage.`,
55132
- extendedInformation: `
55133
- Detects end of line comments. Comments starting with "#EC" or "##" are ignored
55134
-
55173
+ extendedInformation: `
55174
+ Detects end of line comments. Comments starting with "#EC" or "##" are ignored
55175
+
55135
55176
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#put-comments-before-the-statement-they-relate-to`,
55136
55177
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
55137
55178
  badExample: `WRITE 2. " descriptive comment`,
@@ -55293,9 +55334,9 @@ class CheckInclude {
55293
55334
  key: "check_include",
55294
55335
  title: "Check INCLUDEs",
55295
55336
  shortDescription: `Checks INCLUDE statements`,
55296
- extendedInformation: `
55297
- * Reports unused includes
55298
- * Errors if the includes are not found
55337
+ extendedInformation: `
55338
+ * Reports unused includes
55339
+ * Errors if the includes are not found
55299
55340
  * Error if including a main program`,
55300
55341
  tags: [_irule_1.RuleTag.Syntax],
55301
55342
  };
@@ -55371,14 +55412,14 @@ class CheckSubrc extends _abap_rule_1.ABAPRule {
55371
55412
  key: "check_subrc",
55372
55413
  title: "Check sy-subrc",
55373
55414
  shortDescription: `Check sy-subrc`,
55374
- extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
55375
-
55376
- If sy-dbcnt is checked after database statements, it is considered okay.
55377
-
55378
- "SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
55379
-
55380
- If IS ASSIGNED is checked after assigning, it is considered okay.
55381
-
55415
+ extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
55416
+
55417
+ If sy-dbcnt is checked after database statements, it is considered okay.
55418
+
55419
+ "SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
55420
+
55421
+ If IS ASSIGNED is checked after assigning, it is considered okay.
55422
+
55382
55423
  FIND statement with MATCH COUNT is considered okay if subrc is not checked`,
55383
55424
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
55384
55425
  pseudoComment: "EC CI_SUBRC",
@@ -55948,17 +55989,17 @@ class ClassicExceptionsOverlap extends _abap_rule_1.ABAPRule {
55948
55989
  shortDescription: `Find overlapping classic exceptions`,
55949
55990
  extendedInformation: `When debugging its typically good to know exactly which exception is caught`,
55950
55991
  tags: [_irule_1.RuleTag.SingleFile],
55951
- badExample: `CALL FUNCTION 'SOMETHING'
55952
- EXCEPTIONS
55953
- system_failure = 1 MESSAGE lv_message
55954
- communication_failure = 1 MESSAGE lv_message
55955
- resource_failure = 1
55992
+ badExample: `CALL FUNCTION 'SOMETHING'
55993
+ EXCEPTIONS
55994
+ system_failure = 1 MESSAGE lv_message
55995
+ communication_failure = 1 MESSAGE lv_message
55996
+ resource_failure = 1
55956
55997
  OTHERS = 1.`,
55957
- goodExample: `CALL FUNCTION 'SOMETHING'
55958
- EXCEPTIONS
55959
- system_failure = 1 MESSAGE lv_message
55960
- communication_failure = 2 MESSAGE lv_message
55961
- resource_failure = 3
55998
+ goodExample: `CALL FUNCTION 'SOMETHING'
55999
+ EXCEPTIONS
56000
+ system_failure = 1 MESSAGE lv_message
56001
+ communication_failure = 2 MESSAGE lv_message
56002
+ resource_failure = 3
55962
56003
  OTHERS = 4.`,
55963
56004
  };
55964
56005
  }
@@ -56204,7 +56245,7 @@ class CommentedCode extends _abap_rule_1.ABAPRule {
56204
56245
  key: "commented_code",
56205
56246
  title: "Find commented code",
56206
56247
  shortDescription: `Detects usage of commented out code.`,
56207
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it
56248
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it
56208
56249
  https://docs.abapopenchecks.org/checks/14/`,
56209
56250
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
56210
56251
  badExample: `* WRITE 'hello world'.`,
@@ -56437,10 +56478,10 @@ class ConstructorVisibilityPublic {
56437
56478
  key: "constructor_visibility_public",
56438
56479
  title: "Check constructor visibility is public",
56439
56480
  shortDescription: `Constructor must be placed in the public section, even if the class is not CREATE PUBLIC.`,
56440
- extendedInformation: `
56441
- This only applies to global classes.
56442
-
56443
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
56481
+ extendedInformation: `
56482
+ This only applies to global classes.
56483
+
56484
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
56444
56485
  https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abeninstance_constructor_guidl.htm`,
56445
56486
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
56446
56487
  };
@@ -56515,8 +56556,8 @@ class ContainsTab extends _abap_rule_1.ABAPRule {
56515
56556
  key: "contains_tab",
56516
56557
  title: "Code contains tab",
56517
56558
  shortDescription: `Checks for usage of tabs (enable to enforce spaces)`,
56518
- extendedInformation: `
56519
- https://docs.abapopenchecks.org/checks/09/
56559
+ extendedInformation: `
56560
+ https://docs.abapopenchecks.org/checks/09/
56520
56561
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
56521
56562
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
56522
56563
  badExample: `\tWRITE 'hello world'.`,
@@ -56603,10 +56644,10 @@ class CyclicOO {
56603
56644
  key: "cyclic_oo",
56604
56645
  title: "Cyclic OO",
56605
56646
  shortDescription: `Finds cyclic/circular OO references`,
56606
- extendedInformation: `Runs for global INTF + CLAS objects
56607
-
56608
- Objects must be without syntax errors for this rule to take effect
56609
-
56647
+ extendedInformation: `Runs for global INTF + CLAS objects
56648
+
56649
+ Objects must be without syntax errors for this rule to take effect
56650
+
56610
56651
  References in testclass includes are ignored`,
56611
56652
  };
56612
56653
  }
@@ -56848,7 +56889,7 @@ class DangerousStatement extends _abap_rule_1.ABAPRule {
56848
56889
  key: "dangerous_statement",
56849
56890
  title: "Dangerous statement",
56850
56891
  shortDescription: `Detects potentially dangerous statements`,
56851
- extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
56892
+ extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
56852
56893
  dynamic SQL can potentially create SQL injection problems`,
56853
56894
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
56854
56895
  };
@@ -57052,13 +57093,13 @@ class DefinitionsTop extends _abap_rule_1.ABAPRule {
57052
57093
  shortDescription: `Checks that definitions are placed at the beginning of METHODs, FORMs and FUNCTIONs.`,
57053
57094
  extendedInformation: `https://docs.abapopenchecks.org/checks/17/`,
57054
57095
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
57055
- badExample: `FROM foo.
57056
- WRITE 'hello'.
57057
- DATA int TYPE i.
57096
+ badExample: `FROM foo.
57097
+ WRITE 'hello'.
57098
+ DATA int TYPE i.
57058
57099
  ENDFORM.`,
57059
- goodExample: `FROM foo.
57060
- DATA int TYPE i.
57061
- WRITE 'hello'.
57100
+ goodExample: `FROM foo.
57101
+ DATA int TYPE i.
57102
+ WRITE 'hello'.
57062
57103
  ENDFORM.`,
57063
57104
  };
57064
57105
  }
@@ -57597,39 +57638,39 @@ class Downport {
57597
57638
  key: "downport",
57598
57639
  title: "Downport statement",
57599
57640
  shortDescription: `Downport functionality`,
57600
- extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with
57601
- a higher level language version. If successful, various rules are applied to downport the statement.
57602
- Target downport version is always v702, thus rule is only enabled if target version is v702.
57603
-
57604
- Current rules:
57605
- * NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/
57606
- * DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/
57607
- * FIELD-SYMBOL() definitions are outlined
57608
- * CONV is outlined
57609
- * COND is outlined
57610
- * REDUCE is outlined
57611
- * SWITCH is outlined
57612
- * FILTER is outlined
57613
- * APPEND expression is outlined
57614
- * INSERT expression is outlined
57615
- * EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/
57616
- * CAST changed to ?=
57617
- * LOOP AT method_call( ) is outlined
57618
- * VALUE # with structure fields
57619
- * VALUE # with internal table lines
57620
- * Table Expressions are outlined
57621
- * SELECT INTO @DATA definitions are outlined
57622
- * Some occurrences of string template formatting option ALPHA changed to function module call
57623
- * SELECT/INSERT/MODIFY/DELETE/UPDATE "," in field list removed, "@" in source/targets removed
57624
- * PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods
57625
- * RAISE EXCEPTION ... MESSAGE
57626
- * Moving with +=, -=, /=, *=, &&= is expanded
57627
- * line_exists and line_index is downported to READ TABLE
57628
- * ENUMs, but does not nessesarily give the correct type and value
57629
- * MESSAGE with non simple source
57630
-
57631
- Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.
57632
-
57641
+ extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with
57642
+ a higher level language version. If successful, various rules are applied to downport the statement.
57643
+ Target downport version is always v702, thus rule is only enabled if target version is v702.
57644
+
57645
+ Current rules:
57646
+ * NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/
57647
+ * DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/
57648
+ * FIELD-SYMBOL() definitions are outlined
57649
+ * CONV is outlined
57650
+ * COND is outlined
57651
+ * REDUCE is outlined
57652
+ * SWITCH is outlined
57653
+ * FILTER is outlined
57654
+ * APPEND expression is outlined
57655
+ * INSERT expression is outlined
57656
+ * EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/
57657
+ * CAST changed to ?=
57658
+ * LOOP AT method_call( ) is outlined
57659
+ * VALUE # with structure fields
57660
+ * VALUE # with internal table lines
57661
+ * Table Expressions are outlined
57662
+ * SELECT INTO @DATA definitions are outlined
57663
+ * Some occurrences of string template formatting option ALPHA changed to function module call
57664
+ * SELECT/INSERT/MODIFY/DELETE/UPDATE "," in field list removed, "@" in source/targets removed
57665
+ * PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods
57666
+ * RAISE EXCEPTION ... MESSAGE
57667
+ * Moving with +=, -=, /=, *=, &&= is expanded
57668
+ * line_exists and line_index is downported to READ TABLE
57669
+ * ENUMs, but does not nessesarily give the correct type and value
57670
+ * MESSAGE with non simple source
57671
+
57672
+ Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.
57673
+
57633
57674
  Make sure to test the downported code, it might not always be completely correct.`,
57634
57675
  tags: [_irule_1.RuleTag.Downport, _irule_1.RuleTag.Quickfix],
57635
57676
  };
@@ -58207,10 +58248,10 @@ Make sure to test the downported code, it might not always be completely correct
58207
58248
  const fieldName = f.concatTokens();
58208
58249
  fieldDefinition += indentation + " " + fieldName + " TYPE " + tableName + "-" + fieldName + ",\n";
58209
58250
  }
58210
- fieldDefinition = `DATA: BEGIN OF ${name},
58251
+ fieldDefinition = `DATA: BEGIN OF ${name},
58211
58252
  ${fieldDefinition}${indentation} END OF ${name}.`;
58212
58253
  }
58213
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
58254
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
58214
58255
  ${indentation}`);
58215
58256
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
58216
58257
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -58254,12 +58295,12 @@ ${indentation}`);
58254
58295
  }
58255
58296
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58256
58297
  const name = ((_c = inlineData.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || "error";
58257
- let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
58258
- ${fieldDefinitions}${indentation} END OF ${uniqueName}.
58259
- ${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.
58298
+ let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
58299
+ ${fieldDefinitions}${indentation} END OF ${uniqueName}.
58300
+ ${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.
58260
58301
  ${indentation}`);
58261
58302
  if (fieldDefinitions === "") {
58262
- fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.
58303
+ fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.
58263
58304
  ${indentation}`);
58264
58305
  }
58265
58306
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
@@ -58327,7 +58368,7 @@ ${indentation}`);
58327
58368
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58328
58369
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
58329
58370
  const firstToken = high.getFirstToken();
58330
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
58371
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
58331
58372
  ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
58332
58373
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
58333
58374
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -58381,7 +58422,7 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
58381
58422
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58382
58423
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
58383
58424
  const firstToken = high.getFirstToken();
58384
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
58425
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
58385
58426
  ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
58386
58427
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
58387
58428
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -58423,14 +58464,14 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
58423
58464
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
58424
58465
  const firstToken = high.getFirstToken();
58425
58466
  // note that the tabix restore should be done before throwing the exception
58426
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.
58427
- ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
58428
- ${indentation}${tabixBackup} = sy-tabix.
58429
- ${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.
58430
- ${indentation}sy-tabix = ${tabixBackup}.
58431
- ${indentation}IF sy-subrc <> 0.
58432
- ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
58433
- ${indentation}ENDIF.
58467
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.
58468
+ ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
58469
+ ${indentation}${tabixBackup} = sy-tabix.
58470
+ ${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.
58471
+ ${indentation}sy-tabix = ${tabixBackup}.
58472
+ ${indentation}IF sy-subrc <> 0.
58473
+ ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
58474
+ ${indentation}ENDIF.
58434
58475
  ${indentation}`);
58435
58476
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, startToken.getStart(), tableExpression.getLastToken().getEnd(), uniqueName);
58436
58477
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -58487,7 +58528,7 @@ ${indentation}`);
58487
58528
  const className = classNames[0].concatTokens();
58488
58529
  const targetName = (_b = target.findFirstExpression(Expressions.TargetField)) === null || _b === void 0 ? void 0 : _b.concatTokens();
58489
58530
  const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
58490
- const code = ` DATA ${targetName} TYPE REF TO ${className}.
58531
+ const code = ` DATA ${targetName} TYPE REF TO ${className}.
58491
58532
  ${indentation}CATCH ${className} INTO ${targetName}.`;
58492
58533
  const fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getStart(), node.getEnd(), code);
58493
58534
  return issue_1.Issue.atToken(lowFile, node.getFirstToken(), "Outline DATA", this.getMetadata().key, this.conf.severity, fix);
@@ -58649,16 +58690,16 @@ ${indentation}CATCH ${className} INTO ${targetName}.`;
58649
58690
  const uniqueName1 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58650
58691
  const uniqueName2 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58651
58692
  const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
58652
- let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
58653
- ${indentation}${uniqueName1}-msgid = ${id}.
58693
+ let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
58694
+ ${indentation}${uniqueName1}-msgid = ${id}.
58654
58695
  ${indentation}${uniqueName1}-msgno = ${number}.\n`;
58655
58696
  if (withs.length > 0) {
58656
- abap += `${indentation}${uniqueName1}-attr1 = 'IF_T100_DYN_MSG~MSGV1'.
58657
- ${indentation}${uniqueName1}-attr2 = 'IF_T100_DYN_MSG~MSGV2'.
58658
- ${indentation}${uniqueName1}-attr3 = 'IF_T100_DYN_MSG~MSGV3'.
58697
+ abap += `${indentation}${uniqueName1}-attr1 = 'IF_T100_DYN_MSG~MSGV1'.
58698
+ ${indentation}${uniqueName1}-attr2 = 'IF_T100_DYN_MSG~MSGV2'.
58699
+ ${indentation}${uniqueName1}-attr3 = 'IF_T100_DYN_MSG~MSGV3'.
58659
58700
  ${indentation}${uniqueName1}-attr4 = 'IF_T100_DYN_MSG~MSGV4'.\n`;
58660
58701
  }
58661
- abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
58702
+ abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
58662
58703
  ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`;
58663
58704
  if (withs.length > 0) {
58664
58705
  abap += `${indentation}${uniqueName2}->if_t100_dyn_msg~msgty = 'E'.\n`;
@@ -58770,10 +58811,10 @@ ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`
58770
58811
  let code = "";
58771
58812
  if (sourceRef.findFirstExpression(Expressions.TableExpression)) {
58772
58813
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58773
- code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).
58774
- IF sy-subrc <> 0.
58775
- RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
58776
- ENDIF.
58814
+ code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).
58815
+ IF sy-subrc <> 0.
58816
+ RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
58817
+ ENDIF.
58777
58818
  GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
58778
58819
  }
58779
58820
  else {
@@ -58862,20 +58903,20 @@ GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
58862
58903
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58863
58904
  const uniqueFS = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58864
58905
  const uniqueNameIndex = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58865
- code += ` items LIKE ${loopSourceName},
58866
- END OF ${groupTargetName}type.
58867
- DATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.
58868
- DATA ${uniqueName} LIKE LINE OF ${groupTargetName}tab.
58906
+ code += ` items LIKE ${loopSourceName},
58907
+ END OF ${groupTargetName}type.
58908
+ DATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.
58909
+ DATA ${uniqueName} LIKE LINE OF ${groupTargetName}tab.
58869
58910
  LOOP AT ${loopSourceName} ${(_l = high.findFirstExpression(Expressions.LoopTarget)) === null || _l === void 0 ? void 0 : _l.concatTokens()}.\n`;
58870
58911
  if (groupIndexName !== undefined) {
58871
58912
  code += `DATA(${uniqueNameIndex}) = sy-tabix.\n`;
58872
58913
  }
58873
- code += `READ TABLE ${groupTargetName}tab ASSIGNING FIELD-SYMBOL(<${uniqueFS}>) WITH KEY ${condition}.
58914
+ code += `READ TABLE ${groupTargetName}tab ASSIGNING FIELD-SYMBOL(<${uniqueFS}>) WITH KEY ${condition}.
58874
58915
  IF sy-subrc = 0.\n`;
58875
58916
  if (groupCountName !== undefined) {
58876
58917
  code += ` <${uniqueFS}>-${groupCountName} = <${uniqueFS}>-${groupCountName} + 1.\n`;
58877
58918
  }
58878
- code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
58919
+ code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
58879
58920
  ELSE.\n`;
58880
58921
  code += ` CLEAR ${uniqueName}.\n`;
58881
58922
  for (const c of group.findAllExpressions(Expressions.LoopGroupByComponent)) {
@@ -58896,8 +58937,8 @@ ELSE.\n`;
58896
58937
  }
58897
58938
  code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE ${uniqueName}-items.\n`;
58898
58939
  code += ` INSERT ${uniqueName} INTO TABLE ${groupTargetName}tab.\n`;
58899
- code += `ENDIF.
58900
- ENDLOOP.
58940
+ code += `ENDIF.
58941
+ ENDLOOP.
58901
58942
  LOOP AT ${groupTargetName}tab ${groupTarget}.`;
58902
58943
  let fix = edit_helper_1.EditHelper.replaceRange(lowFile, high.getFirstToken().getStart(), high.getLastToken().getEnd(), code);
58903
58944
  for (const l of ((_m = highFile.getStructure()) === null || _m === void 0 ? void 0 : _m.findAllStructures(Structures.Loop)) || []) {
@@ -59069,7 +59110,7 @@ LOOP AT ${groupTargetName}tab ${groupTarget}.`;
59069
59110
  const enumName = (_b = high.findExpressionAfterToken("ENUM")) === null || _b === void 0 ? void 0 : _b.concatTokens();
59070
59111
  const structureName = (_c = high.findExpressionAfterToken("STRUCTURE")) === null || _c === void 0 ? void 0 : _c.concatTokens();
59071
59112
  // all ENUMS are char like?
59072
- let code = `TYPES ${enumName} TYPE string.
59113
+ let code = `TYPES ${enumName} TYPE string.
59073
59114
  CONSTANTS: BEGIN OF ${structureName},\n`;
59074
59115
  let count = 1;
59075
59116
  for (const e of enumStructure.findDirectStatements(Statements.TypeEnum).concat(enumStructure.findDirectStatements(Statements.Type))) {
@@ -59113,14 +59154,14 @@ CONSTANTS: BEGIN OF ${structureName},\n`;
59113
59154
  const tabixBackup = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59114
59155
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
59115
59156
  // restore tabix before exeption
59116
- const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.
59117
- ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
59118
- ${indentation}${tabixBackup} = sy-tabix.
59119
- ${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.
59120
- ${indentation}sy-tabix = ${tabixBackup}.
59121
- ${indentation}IF sy-subrc <> 0.
59122
- ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59123
- ${indentation}ENDIF.
59157
+ const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.
59158
+ ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
59159
+ ${indentation}${tabixBackup} = sy-tabix.
59160
+ ${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.
59161
+ ${indentation}sy-tabix = ${tabixBackup}.
59162
+ ${indentation}IF sy-subrc <> 0.
59163
+ ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59164
+ ${indentation}ENDIF.
59124
59165
  ${indentation}${uniqueName}`;
59125
59166
  const start = target.getFirstToken().getStart();
59126
59167
  const end = (_a = tableExpression.findDirectTokenByText("]")) === null || _a === void 0 ? void 0 : _a.getEnd();
@@ -59204,11 +59245,11 @@ ${indentation}${uniqueName}`;
59204
59245
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
59205
59246
  const source = (_b = templateSource === null || templateSource === void 0 ? void 0 : templateSource.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens();
59206
59247
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59207
- const code = `DATA ${uniqueName} TYPE string.
59208
- ${indentation}CALL FUNCTION '${functionName}'
59209
- ${indentation} EXPORTING
59210
- ${indentation} input = ${source}
59211
- ${indentation} IMPORTING
59248
+ const code = `DATA ${uniqueName} TYPE string.
59249
+ ${indentation}CALL FUNCTION '${functionName}'
59250
+ ${indentation} EXPORTING
59251
+ ${indentation} input = ${source}
59252
+ ${indentation} IMPORTING
59212
59253
  ${indentation} output = ${uniqueName}.\n`;
59213
59254
  const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), code);
59214
59255
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, child.getFirstToken().getStart(), child.getLastToken().getEnd(), uniqueName);
@@ -60520,12 +60561,12 @@ class EasyToFindMessages {
60520
60561
  key: "easy_to_find_messages",
60521
60562
  title: "Easy to find messages",
60522
60563
  shortDescription: `Make messages easy to find`,
60523
- extendedInformation: `All messages must be statically referenced exactly once
60524
-
60525
- Only MESSAGE and RAISE statments are counted as static references
60526
-
60527
- Also see rule "message_exists"
60528
-
60564
+ extendedInformation: `All messages must be statically referenced exactly once
60565
+
60566
+ Only MESSAGE and RAISE statments are counted as static references
60567
+
60568
+ Also see rule "message_exists"
60569
+
60529
60570
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#make-messages-easy-to-find`,
60530
60571
  tags: [_irule_1.RuleTag.Styleguide],
60531
60572
  };
@@ -60610,8 +60651,8 @@ class EmptyLineinStatement extends _abap_rule_1.ABAPRule {
60610
60651
  key: "empty_line_in_statement",
60611
60652
  title: "Find empty lines in statements",
60612
60653
  shortDescription: `Checks that statements do not contain empty lines.`,
60613
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
60614
-
60654
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
60655
+
60615
60656
  https://docs.abapopenchecks.org/checks/41/`,
60616
60657
  tags: [_irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
60617
60658
  badExample: `WRITE\n\nhello.`,
@@ -60787,13 +60828,13 @@ class EmptyStructure extends _abap_rule_1.ABAPRule {
60787
60828
  shortDescription: `Checks that the code does not contain empty blocks.`,
60788
60829
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-empty-if-branches`,
60789
60830
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
60790
- badExample: `IF foo = bar.
60791
- ENDIF.
60792
-
60793
- DO 2 TIMES.
60831
+ badExample: `IF foo = bar.
60832
+ ENDIF.
60833
+
60834
+ DO 2 TIMES.
60794
60835
  ENDDO.`,
60795
- goodExample: `LOOP AT itab WHERE qty = 0 OR date > sy-datum.
60796
- ENDLOOP.
60836
+ goodExample: `LOOP AT itab WHERE qty = 0 OR date > sy-datum.
60837
+ ENDLOOP.
60797
60838
  result = xsdbool( sy-subrc = 0 ).`,
60798
60839
  };
60799
60840
  }
@@ -60935,10 +60976,10 @@ class ExitOrCheck extends _abap_rule_1.ABAPRule {
60935
60976
  return {
60936
60977
  key: "exit_or_check",
60937
60978
  title: "Find EXIT or CHECK outside loops",
60938
- shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
60979
+ shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
60939
60980
  Use RETURN to leave procesing blocks instead.`,
60940
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
60941
- https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
60981
+ extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
60982
+ https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
60942
60983
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#check-vs-return`,
60943
60984
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
60944
60985
  };
@@ -61021,12 +61062,12 @@ class ExpandMacros extends _abap_rule_1.ABAPRule {
61021
61062
  key: "expand_macros",
61022
61063
  title: "Expand Macros",
61023
61064
  shortDescription: `Allows expanding macro calls with quick fixes`,
61024
- extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
61025
-
61065
+ extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
61066
+
61026
61067
  Note that macros/DEFINE cannot be used in the ABAP Cloud programming model`,
61027
- badExample: `DEFINE _hello.
61028
- WRITE 'hello'.
61029
- END-OF-DEFINITION.
61068
+ badExample: `DEFINE _hello.
61069
+ WRITE 'hello'.
61070
+ END-OF-DEFINITION.
61030
61071
  _hello.`,
61031
61072
  goodExample: `WRITE 'hello'.`,
61032
61073
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
@@ -61113,7 +61154,7 @@ class Exporting extends _abap_rule_1.ABAPRule {
61113
61154
  shortDescription: `Detects EXPORTING statements which can be omitted.`,
61114
61155
  badExample: `call_method( EXPORTING foo = bar ).`,
61115
61156
  goodExample: `call_method( foo = bar ).`,
61116
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-optional-keyword-exporting
61157
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-optional-keyword-exporting
61117
61158
  https://docs.abapopenchecks.org/checks/30/`,
61118
61159
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
61119
61160
  };
@@ -61211,7 +61252,7 @@ class ForbiddenIdentifier extends _abap_rule_1.ABAPRule {
61211
61252
  key: "forbidden_identifier",
61212
61253
  title: "Forbidden Identifier",
61213
61254
  shortDescription: `Forbid use of specified identifiers, list of regex.`,
61214
- extendedInformation: `Used in the transpiler to find javascript keywords in ABAP identifiers,
61255
+ extendedInformation: `Used in the transpiler to find javascript keywords in ABAP identifiers,
61215
61256
  https://github.com/abaplint/transpiler/blob/bda94b8b56e2b7f2f87be2168f12361aa530220e/packages/transpiler/src/validation.ts#L44`,
61216
61257
  tags: [_irule_1.RuleTag.SingleFile],
61217
61258
  };
@@ -61453,8 +61494,8 @@ class ForbiddenVoidType {
61453
61494
  key: "forbidden_void_type",
61454
61495
  title: "Forbidden Void Types",
61455
61496
  shortDescription: `Avoid usage of specified void types.`,
61456
- extendedInformation: `Inspiration:
61457
- BOOLEAN, BOOLE_D, CHAR01, CHAR1, CHAR10, CHAR12, CHAR128, CHAR2, CHAR20, CHAR4, CHAR70,
61497
+ extendedInformation: `Inspiration:
61498
+ BOOLEAN, BOOLE_D, CHAR01, CHAR1, CHAR10, CHAR12, CHAR128, CHAR2, CHAR20, CHAR4, CHAR70,
61458
61499
  DATS, TIMS, DATUM, FLAG, INT4, NUMC3, NUMC4, SAP_BOOL, TEXT25, TEXT80, X255, XFELD`,
61459
61500
  };
61460
61501
  }
@@ -61697,7 +61738,7 @@ class FullyTypeITabs extends _abap_rule_1.ABAPRule {
61697
61738
  key: "fully_type_itabs",
61698
61739
  title: "Fully type internal tables",
61699
61740
  shortDescription: `No implict table types or table keys`,
61700
- badExample: `DATA lt_foo TYPE TABLE OF ty.
61741
+ badExample: `DATA lt_foo TYPE TABLE OF ty.
61701
61742
  DATA lt_bar TYPE STANDARD TABLE OF ty.`,
61702
61743
  goodExample: `DATA lt_foo TYPE STANDARD TABLE OF ty WITH EMPTY KEY.`,
61703
61744
  tags: [_irule_1.RuleTag.SingleFile],
@@ -61882,26 +61923,26 @@ class FunctionalWriting extends _abap_rule_1.ABAPRule {
61882
61923
  key: "functional_writing",
61883
61924
  title: "Use functional writing",
61884
61925
  shortDescription: `Detects usage of call method when functional style calls can be used.`,
61885
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-calls
61926
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-calls
61886
61927
  https://docs.abapopenchecks.org/checks/07/`,
61887
61928
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
61888
- badExample: `CALL METHOD zcl_class=>method( ).
61889
- CALL METHOD cl_abap_typedescr=>describe_by_name
61890
- EXPORTING
61891
- p_name = 'NAME'
61892
- RECEIVING
61893
- p_descr_ref = lr_typedescr
61894
- EXCEPTIONS
61895
- type_not_found = 1
61929
+ badExample: `CALL METHOD zcl_class=>method( ).
61930
+ CALL METHOD cl_abap_typedescr=>describe_by_name
61931
+ EXPORTING
61932
+ p_name = 'NAME'
61933
+ RECEIVING
61934
+ p_descr_ref = lr_typedescr
61935
+ EXCEPTIONS
61936
+ type_not_found = 1
61896
61937
  OTHERS = 2.`,
61897
- goodExample: `zcl_class=>method( ).
61898
- cl_abap_typedescr=>describe_by_name(
61899
- EXPORTING
61900
- p_name = 'NAME'
61901
- RECEIVING
61902
- p_descr_ref = lr_typedescr
61903
- EXCEPTIONS
61904
- type_not_found = 1
61938
+ goodExample: `zcl_class=>method( ).
61939
+ cl_abap_typedescr=>describe_by_name(
61940
+ EXPORTING
61941
+ p_name = 'NAME'
61942
+ RECEIVING
61943
+ p_descr_ref = lr_typedescr
61944
+ EXCEPTIONS
61945
+ type_not_found = 1
61905
61946
  OTHERS = 2 ).`,
61906
61947
  };
61907
61948
  }
@@ -62012,14 +62053,14 @@ class GlobalClass extends _abap_rule_1.ABAPRule {
62012
62053
  key: "global_class",
62013
62054
  title: "Global class checks",
62014
62055
  shortDescription: `Checks related to global classes`,
62015
- extendedInformation: `* global classes must be in own files
62016
-
62017
- * file names must match class name
62018
-
62019
- * file names must match interface name
62020
-
62021
- * global classes must be global definitions
62022
-
62056
+ extendedInformation: `* global classes must be in own files
62057
+
62058
+ * file names must match class name
62059
+
62060
+ * file names must match interface name
62061
+
62062
+ * global classes must be global definitions
62063
+
62023
62064
  * global interfaces must be global definitions`,
62024
62065
  tags: [_irule_1.RuleTag.Syntax],
62025
62066
  };
@@ -62118,21 +62159,21 @@ class IdenticalConditions extends _abap_rule_1.ABAPRule {
62118
62159
  return {
62119
62160
  key: "identical_conditions",
62120
62161
  title: "Identical conditions",
62121
- shortDescription: `Find identical conditions in IF + CASE + WHILE etc
62122
-
62162
+ shortDescription: `Find identical conditions in IF + CASE + WHILE etc
62163
+
62123
62164
  Prerequsites: code is pretty printed with identical cAsE`,
62124
62165
  tags: [_irule_1.RuleTag.SingleFile],
62125
- badExample: `IF foo = bar OR 1 = a OR foo = bar.
62126
- ENDIF.
62127
- CASE bar.
62128
- WHEN '1'.
62129
- WHEN 'A' OR '1'.
62166
+ badExample: `IF foo = bar OR 1 = a OR foo = bar.
62167
+ ENDIF.
62168
+ CASE bar.
62169
+ WHEN '1'.
62170
+ WHEN 'A' OR '1'.
62130
62171
  ENDCASE.`,
62131
- goodExample: `IF foo = bar OR 1 = a.
62132
- ENDIF.
62133
- CASE bar.
62134
- WHEN '1'.
62135
- WHEN 'A'.
62172
+ goodExample: `IF foo = bar OR 1 = a.
62173
+ ENDIF.
62174
+ CASE bar.
62175
+ WHEN '1'.
62176
+ WHEN 'A'.
62136
62177
  ENDCASE.`,
62137
62178
  };
62138
62179
  }
@@ -62266,23 +62307,23 @@ class IdenticalContents extends _abap_rule_1.ABAPRule {
62266
62307
  key: "identical_contents",
62267
62308
  title: "Identical contents",
62268
62309
  shortDescription: `Find identical contents in blocks inside IFs, both in the beginning and in the end.`,
62269
- extendedInformation: `
62270
- Prerequsites: code is pretty printed with identical cAsE
62271
-
62310
+ extendedInformation: `
62311
+ Prerequsites: code is pretty printed with identical cAsE
62312
+
62272
62313
  Chained statments are ignored`,
62273
62314
  tags: [_irule_1.RuleTag.SingleFile],
62274
- badExample: `IF foo = bar.
62275
- WRITE 'bar'.
62276
- WRITE 'world'.
62277
- ELSE.
62278
- WRITE 'foo'.
62279
- WRITE 'world'.
62315
+ badExample: `IF foo = bar.
62316
+ WRITE 'bar'.
62317
+ WRITE 'world'.
62318
+ ELSE.
62319
+ WRITE 'foo'.
62320
+ WRITE 'world'.
62280
62321
  ENDIF.`,
62281
- goodExample: `IF foo = bar.
62282
- WRITE 'bar'.
62283
- ELSE.
62284
- WRITE 'foo'.
62285
- ENDIF.
62322
+ goodExample: `IF foo = bar.
62323
+ WRITE 'bar'.
62324
+ ELSE.
62325
+ WRITE 'foo'.
62326
+ ENDIF.
62286
62327
  WRITE 'world'.`,
62287
62328
  };
62288
62329
  }
@@ -62390,12 +62431,12 @@ class IdenticalDescriptions {
62390
62431
  key: "identical_descriptions",
62391
62432
  title: "Identical descriptions",
62392
62433
  shortDescription: `Searches for objects with the same type and same description`,
62393
- extendedInformation: `Case insensitive
62394
-
62395
- Only checks the master language descriptions
62396
-
62397
- Dependencies are skipped
62398
-
62434
+ extendedInformation: `Case insensitive
62435
+
62436
+ Only checks the master language descriptions
62437
+
62438
+ Dependencies are skipped
62439
+
62399
62440
  Works for: INTF, CLAS, DOMA, DTEL, FUNC in same FUGR`,
62400
62441
  tags: [],
62401
62442
  };
@@ -62569,43 +62610,43 @@ class IfInIf extends _abap_rule_1.ABAPRule {
62569
62610
  key: "if_in_if",
62570
62611
  title: "IF in IF",
62571
62612
  shortDescription: `Detects nested ifs which can be refactored.`,
62572
- extendedInformation: `
62573
- Directly nested IFs without ELSE can be refactored to a single condition using AND.
62574
-
62575
- ELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.
62576
-
62577
- https://docs.abapopenchecks.org/checks/01/
62613
+ extendedInformation: `
62614
+ Directly nested IFs without ELSE can be refactored to a single condition using AND.
62615
+
62616
+ ELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.
62617
+
62618
+ https://docs.abapopenchecks.org/checks/01/
62578
62619
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low`,
62579
- badExample: `IF condition1.
62580
- IF condition2.
62581
- ...
62582
- ENDIF.
62583
- ENDIF.
62584
-
62585
- IF condition1.
62586
- ...
62587
- ELSE.
62588
- IF condition2.
62589
- ...
62590
- ENDIF.
62620
+ badExample: `IF condition1.
62621
+ IF condition2.
62622
+ ...
62623
+ ENDIF.
62624
+ ENDIF.
62625
+
62626
+ IF condition1.
62627
+ ...
62628
+ ELSE.
62629
+ IF condition2.
62630
+ ...
62631
+ ENDIF.
62591
62632
  ENDIF.`,
62592
- goodExample: `IF ( condition1 ) AND ( condition2 ).
62593
- ...
62594
- ENDIF.
62595
-
62596
- IF condition1.
62597
- ...
62598
- ELSEIF condition2.
62599
- ...
62600
- ENDIF.
62601
-
62602
- CASE variable.
62603
- WHEN value1.
62604
- ...
62605
- WHEN value2.
62606
- IF condition2.
62607
- ...
62608
- ENDIF.
62633
+ goodExample: `IF ( condition1 ) AND ( condition2 ).
62634
+ ...
62635
+ ENDIF.
62636
+
62637
+ IF condition1.
62638
+ ...
62639
+ ELSEIF condition2.
62640
+ ...
62641
+ ENDIF.
62642
+
62643
+ CASE variable.
62644
+ WHEN value1.
62645
+ ...
62646
+ WHEN value2.
62647
+ IF condition2.
62648
+ ...
62649
+ ENDIF.
62609
62650
  ENDCASE.`,
62610
62651
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
62611
62652
  };
@@ -62790,9 +62831,9 @@ class ImplementMethods extends _abap_rule_1.ABAPRule {
62790
62831
  for (const i of ((_a = file.getStructure()) === null || _a === void 0 ? void 0 : _a.findAllStatements(Statements.ClassImplementation)) || []) {
62791
62832
  const name = (_b = i.findFirstExpression(Expressions.ClassName)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr().toUpperCase();
62792
62833
  if (name === impl.identifier.getName().toUpperCase()) {
62793
- return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
62794
- METHOD ${methodName.toLowerCase()}.
62795
- RETURN. " todo, implement method
62834
+ return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
62835
+ METHOD ${methodName.toLowerCase()}.
62836
+ RETURN. " todo, implement method
62796
62837
  ENDMETHOD.`);
62797
62838
  }
62798
62839
  }
@@ -62980,19 +63021,19 @@ class InStatementIndentation extends _abap_rule_1.ABAPRule {
62980
63021
  key: "in_statement_indentation",
62981
63022
  title: "In-statement indentation",
62982
63023
  shortDescription: "Checks alignment within statements which span multiple lines.",
62983
- extendedInformation: `Lines following the first line should be indented once (2 spaces).
62984
-
62985
- For block declaration statements, lines after the first should be indented an additional time (default: +2 spaces)
63024
+ extendedInformation: `Lines following the first line should be indented once (2 spaces).
63025
+
63026
+ For block declaration statements, lines after the first should be indented an additional time (default: +2 spaces)
62986
63027
  to distinguish them better from code within the block.`,
62987
- badExample: `IF 1 = 1
62988
- AND 2 = 2.
62989
- WRITE 'hello' &&
62990
- 'world'.
63028
+ badExample: `IF 1 = 1
63029
+ AND 2 = 2.
63030
+ WRITE 'hello' &&
63031
+ 'world'.
62991
63032
  ENDIF.`,
62992
- goodExample: `IF 1 = 1
62993
- AND 2 = 2.
62994
- WRITE 'hello' &&
62995
- 'world'.
63033
+ goodExample: `IF 1 = 1
63034
+ AND 2 = 2.
63035
+ WRITE 'hello' &&
63036
+ 'world'.
62996
63037
  ENDIF.`,
62997
63038
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
62998
63039
  };
@@ -63115,23 +63156,23 @@ class Indentation extends _abap_rule_1.ABAPRule {
63115
63156
  title: "Indentation",
63116
63157
  shortDescription: `Checks indentation`,
63117
63158
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
63118
- badExample: `CLASS lcl DEFINITION.
63119
- PRIVATE SECTION.
63120
- METHODS constructor.
63121
- ENDCLASS.
63122
-
63123
- CLASS lcl IMPLEMENTATION.
63124
- METHOD constructor.
63125
- ENDMETHOD.
63159
+ badExample: `CLASS lcl DEFINITION.
63160
+ PRIVATE SECTION.
63161
+ METHODS constructor.
63162
+ ENDCLASS.
63163
+
63164
+ CLASS lcl IMPLEMENTATION.
63165
+ METHOD constructor.
63166
+ ENDMETHOD.
63126
63167
  ENDCLASS.`,
63127
- goodExample: `CLASS lcl DEFINITION.
63128
- PRIVATE SECTION.
63129
- METHODS constructor.
63130
- ENDCLASS.
63131
-
63132
- CLASS lcl IMPLEMENTATION.
63133
- METHOD constructor.
63134
- ENDMETHOD.
63168
+ goodExample: `CLASS lcl DEFINITION.
63169
+ PRIVATE SECTION.
63170
+ METHODS constructor.
63171
+ ENDCLASS.
63172
+
63173
+ CLASS lcl IMPLEMENTATION.
63174
+ METHOD constructor.
63175
+ ENDMETHOD.
63135
63176
  ENDCLASS.`,
63136
63177
  };
63137
63178
  }
@@ -63521,9 +63562,9 @@ class IntfReferencingClas {
63521
63562
  key: "intf_referencing_clas",
63522
63563
  title: "INTF referencing CLAS",
63523
63564
  shortDescription: `Interface contains references to class`,
63524
- extendedInformation: `Only global interfaces are checked.
63525
- Only first level references are checked.
63526
- Exception class references are ignored.
63565
+ extendedInformation: `Only global interfaces are checked.
63566
+ Only first level references are checked.
63567
+ Exception class references are ignored.
63527
63568
  Void references are ignored.`,
63528
63569
  };
63529
63570
  }
@@ -63608,9 +63649,9 @@ class InvalidTableIndex extends _abap_rule_1.ABAPRule {
63608
63649
  title: "Invalid Table Index",
63609
63650
  shortDescription: `Issues error for constant table index zero, as ABAP starts from 1`,
63610
63651
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
63611
- badExample: `DATA(first) = table[ 0 ].
63652
+ badExample: `DATA(first) = table[ 0 ].
63612
63653
  READ TABLE gt_stack ASSIGNING <ls_stack> INDEX 0.`,
63613
- goodExample: `DATA(first) = table[ 1 ].
63654
+ goodExample: `DATA(first) = table[ 1 ].
63614
63655
  READ TABLE gt_stack ASSIGNING <ls_stack> INDEX 1.`,
63615
63656
  };
63616
63657
  }
@@ -64211,8 +64252,8 @@ class LineBreakStyle {
64211
64252
  return {
64212
64253
  key: "line_break_style",
64213
64254
  title: "Makes sure line breaks are consistent in the ABAP code",
64214
- shortDescription: `Enforces LF as newlines in ABAP files
64215
-
64255
+ shortDescription: `Enforces LF as newlines in ABAP files
64256
+
64216
64257
  abapGit does not work with CRLF`,
64217
64258
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
64218
64259
  };
@@ -64281,7 +64322,7 @@ class LineLength extends _abap_rule_1.ABAPRule {
64281
64322
  key: "line_length",
64282
64323
  title: "Line length",
64283
64324
  shortDescription: `Detects lines exceeding the provided maximum length.`,
64284
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length
64325
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length
64285
64326
  https://docs.abapopenchecks.org/checks/04/`,
64286
64327
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
64287
64328
  };
@@ -64352,7 +64393,7 @@ class LineOnlyPunc extends _abap_rule_1.ABAPRule {
64352
64393
  key: "line_only_punc",
64353
64394
  title: "Line containing only punctuation",
64354
64395
  shortDescription: `Detects lines containing only punctuation.`,
64355
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#close-brackets-at-line-end
64396
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#close-brackets-at-line-end
64356
64397
  https://docs.abapopenchecks.org/checks/16/`,
64357
64398
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
64358
64399
  badExample: "zcl_class=>method(\n).",
@@ -64612,15 +64653,15 @@ class LocalVariableNames extends _abap_rule_1.ABAPRule {
64612
64653
  return {
64613
64654
  key: "local_variable_names",
64614
64655
  title: "Local variable naming conventions",
64615
- shortDescription: `
64616
- Allows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols.
64656
+ shortDescription: `
64657
+ Allows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols.
64617
64658
  Regexes are case-insensitive.`,
64618
64659
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
64619
- badExample: `FORM bar.
64620
- DATA foo.
64660
+ badExample: `FORM bar.
64661
+ DATA foo.
64621
64662
  ENDFORM.`,
64622
- goodExample: `FORM bar.
64623
- DATA lv_foo.
64663
+ goodExample: `FORM bar.
64664
+ DATA lv_foo.
64624
64665
  ENDFORM.`,
64625
64666
  };
64626
64667
  }
@@ -64772,9 +64813,9 @@ class MacroNaming extends _abap_rule_1.ABAPRule {
64772
64813
  shortDescription: `Allows you to enforce a pattern for macro definitions`,
64773
64814
  extendedInformation: `Use rule "avoid_use" to avoid macros altogether.`,
64774
64815
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
64775
- badExample: `DEFINE something.
64816
+ badExample: `DEFINE something.
64776
64817
  END-OF-DEFINITION.`,
64777
- goodExample: `DEFINE _something.
64818
+ goodExample: `DEFINE _something.
64778
64819
  END-OF-DEFINITION.`,
64779
64820
  };
64780
64821
  }
@@ -64847,10 +64888,10 @@ class MainFileContents {
64847
64888
  key: "main_file_contents",
64848
64889
  title: "Main file contents",
64849
64890
  shortDescription: `Checks related to report declarations.`,
64850
- extendedInformation: `Does not run if the target version is Cloud
64851
-
64852
- * PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
64853
- * TYPEs must begin with "TYPE-POOL <name>."
64891
+ extendedInformation: `Does not run if the target version is Cloud
64892
+
64893
+ * PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
64894
+ * TYPEs must begin with "TYPE-POOL <name>."
64854
64895
  `,
64855
64896
  };
64856
64897
  }
@@ -64966,17 +65007,17 @@ class ManyParentheses extends _abap_rule_1.ABAPRule {
64966
65007
  title: "Too many parentheses",
64967
65008
  shortDescription: `Searches for expressions where extra parentheses can safely be removed`,
64968
65009
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
64969
- badExample: `
64970
- IF ( destination IS INITIAL ).
64971
- ENDIF.
64972
- IF foo = boo AND ( bar = lar AND moo = loo ).
64973
- ENDIF.
65010
+ badExample: `
65011
+ IF ( destination IS INITIAL ).
65012
+ ENDIF.
65013
+ IF foo = boo AND ( bar = lar AND moo = loo ).
65014
+ ENDIF.
64974
65015
  `,
64975
- goodExample: `
64976
- IF destination IS INITIAL.
64977
- ENDIF.
64978
- IF foo = boo AND bar = lar AND moo = loo.
64979
- ENDIF.
65016
+ goodExample: `
65017
+ IF destination IS INITIAL.
65018
+ ENDIF.
65019
+ IF foo = boo AND bar = lar AND moo = loo.
65020
+ ENDIF.
64980
65021
  `,
64981
65022
  };
64982
65023
  }
@@ -65150,14 +65191,14 @@ class MaxOneMethodParameterPerLine extends _abap_rule_1.ABAPRule {
65150
65191
  title: "Max one method parameter definition per line",
65151
65192
  shortDescription: `Keep max one method parameter description per line`,
65152
65193
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace],
65153
- badExample: `
65154
- METHODS apps_scope_token
65155
- IMPORTING
65194
+ badExample: `
65195
+ METHODS apps_scope_token
65196
+ IMPORTING
65156
65197
  body TYPE bodyapps_scope_token client_id TYPE str.`,
65157
- goodExample: `
65158
- METHODS apps_scope_token
65159
- IMPORTING
65160
- body TYPE bodyapps_scope_token
65198
+ goodExample: `
65199
+ METHODS apps_scope_token
65200
+ IMPORTING
65201
+ body TYPE bodyapps_scope_token
65161
65202
  client_id TYPE str.`,
65162
65203
  };
65163
65204
  }
@@ -65222,11 +65263,11 @@ class MaxOneStatement extends _abap_rule_1.ABAPRule {
65222
65263
  key: "max_one_statement",
65223
65264
  title: "Max one statement per line",
65224
65265
  shortDescription: `Checks that each line contains only a single statement.`,
65225
- extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
65226
-
65227
- Does not report anything for chained statements.
65228
-
65229
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line
65266
+ extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
65267
+
65268
+ Does not report anything for chained statements.
65269
+
65270
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line
65230
65271
  https://docs.abapopenchecks.org/checks/11/`,
65231
65272
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
65232
65273
  badExample: `WRITE foo. WRITE bar.`,
@@ -65564,8 +65605,8 @@ class MethodLength {
65564
65605
  key: "method_length",
65565
65606
  title: "Method/Form Length",
65566
65607
  shortDescription: `Checks relating to method/form length.`,
65567
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
65568
-
65608
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
65609
+
65569
65610
  Abstract methods without statements are considered okay.`,
65570
65611
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
65571
65612
  };
@@ -65670,20 +65711,20 @@ class MethodOverwritesBuiltIn extends _abap_rule_1.ABAPRule {
65670
65711
  key: "method_overwrites_builtin",
65671
65712
  title: "Method name overwrites builtin function",
65672
65713
  shortDescription: `Checks Method names that overwrite builtin SAP functions`,
65673
- extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
65674
-
65675
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
65676
-
65714
+ extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
65715
+
65716
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
65717
+
65677
65718
  Interface method names are ignored`,
65678
65719
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
65679
- badExample: `CLASS lcl DEFINITION.
65680
- PUBLIC SECTION.
65681
- METHODS matches.
65682
- ENDCLASS.
65683
-
65684
- CLASS lcl IMPLEMENTATION.
65685
- METHOD matches.
65686
- ENDMETHOD.
65720
+ badExample: `CLASS lcl DEFINITION.
65721
+ PUBLIC SECTION.
65722
+ METHODS matches.
65723
+ ENDCLASS.
65724
+
65725
+ CLASS lcl IMPLEMENTATION.
65726
+ METHOD matches.
65727
+ ENDMETHOD.
65687
65728
  ENDCLASS.`,
65688
65729
  };
65689
65730
  }
@@ -65874,12 +65915,12 @@ class MixReturning extends _abap_rule_1.ABAPRule {
65874
65915
  // eslint-disable-next-line max-len
65875
65916
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-either-returning-or-exporting-or-changing-but-not-a-combination`,
65876
65917
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
65877
- badExample: `CLASS lcl DEFINITION.
65878
- PUBLIC SECTION.
65879
- METHODS
65880
- foobar
65881
- EXPORTING foo TYPE i
65882
- RETURNING VALUE(rv_string) TYPE string.
65918
+ badExample: `CLASS lcl DEFINITION.
65919
+ PUBLIC SECTION.
65920
+ METHODS
65921
+ foobar
65922
+ EXPORTING foo TYPE i
65923
+ RETURNING VALUE(rv_string) TYPE string.
65883
65924
  ENDCLASS.`,
65884
65925
  };
65885
65926
  }
@@ -66259,7 +66300,7 @@ class Nesting extends _abap_rule_1.ABAPRule {
66259
66300
  key: "nesting",
66260
66301
  title: "Check nesting depth",
66261
66302
  shortDescription: `Checks for methods exceeding a maximum nesting depth`,
66262
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low
66303
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low
66263
66304
  https://docs.abapopenchecks.org/checks/74/`,
66264
66305
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
66265
66306
  };
@@ -66502,7 +66543,7 @@ class NoChainedAssignment extends _abap_rule_1.ABAPRule {
66502
66543
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-chain-assignments`,
66503
66544
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
66504
66545
  badExample: `var1 = var2 = var3.`,
66505
- goodExample: `var2 = var3.
66546
+ goodExample: `var2 = var3.
66506
66547
  var1 = var2.`,
66507
66548
  };
66508
66549
  }
@@ -66561,8 +66602,8 @@ class NoExternalFormCalls extends _abap_rule_1.ABAPRule {
66561
66602
  key: "no_external_form_calls",
66562
66603
  title: "No external FORM calls",
66563
66604
  shortDescription: `Detect external form calls`,
66564
- badExample: `PERFORM foo IN PROGRAM bar.
66565
-
66605
+ badExample: `PERFORM foo IN PROGRAM bar.
66606
+
66566
66607
  PERFORM foo(bar).`,
66567
66608
  tags: [_irule_1.RuleTag.SingleFile],
66568
66609
  };
@@ -66623,17 +66664,17 @@ class NoInlineInOptionalBranches extends _abap_rule_1.ABAPRule {
66623
66664
  key: "no_inline_in_optional_branches",
66624
66665
  title: "Don't declare inline in optional branches",
66625
66666
  shortDescription: `Don't declare inline in optional branches`,
66626
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
66627
-
66628
- Considered optional branches:
66629
- * inside IF/ELSEIF/ELSE
66630
- * inside LOOP
66631
- * inside WHILE
66632
- * inside CASE/WHEN, CASE TYPE OF
66633
- * inside DO
66634
- * inside SELECT loops
66635
-
66636
- Not considered optional branches:
66667
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
66668
+
66669
+ Considered optional branches:
66670
+ * inside IF/ELSEIF/ELSE
66671
+ * inside LOOP
66672
+ * inside WHILE
66673
+ * inside CASE/WHEN, CASE TYPE OF
66674
+ * inside DO
66675
+ * inside SELECT loops
66676
+
66677
+ Not considered optional branches:
66637
66678
  * TRY/CATCH/CLEANUP`,
66638
66679
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
66639
66680
  };
@@ -66733,12 +66774,12 @@ class NoPrefixes extends _abap_rule_1.ABAPRule {
66733
66774
  key: "no_prefixes",
66734
66775
  title: "No Prefixes",
66735
66776
  shortDescription: `Dont use hungarian notation`,
66736
- extendedInformation: `
66737
- Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
66738
- allowing all types to become voided, abaplint will then provide less precise syntax errors.
66739
-
66740
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
66741
-
66777
+ extendedInformation: `
66778
+ Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
66779
+ allowing all types to become voided, abaplint will then provide less precise syntax errors.
66780
+
66781
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
66782
+
66742
66783
  https://github.com/SAP/styleguides/blob/main/clean-abap/sub-sections/AvoidEncodings.md`,
66743
66784
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
66744
66785
  badExample: `DATA lv_foo TYPE i.`,
@@ -66917,7 +66958,7 @@ class NoPublicAttributes extends _abap_rule_1.ABAPRule {
66917
66958
  return {
66918
66959
  key: "no_public_attributes",
66919
66960
  title: "No public attributes",
66920
- shortDescription: `Checks that classes and interfaces don't contain any public attributes.
66961
+ shortDescription: `Checks that classes and interfaces don't contain any public attributes.
66921
66962
  Exceptions are excluded from this rule.`,
66922
66963
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#members-private-by-default-protected-only-if-needed`,
66923
66964
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
@@ -67018,13 +67059,13 @@ class NoYodaConditions extends _abap_rule_1.ABAPRule {
67018
67059
  key: "no_yoda_conditions",
67019
67060
  title: "No Yoda conditions",
67020
67061
  shortDescription: `Finds Yoda conditions and reports issues`,
67021
- extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
67022
-
67062
+ extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
67063
+
67023
67064
  Conditions with operators CP, NP, CS, NS, CA, NA, CO, CN are ignored`,
67024
67065
  tags: [_irule_1.RuleTag.SingleFile],
67025
- badExample: `IF 0 <> sy-subrc.
67066
+ badExample: `IF 0 <> sy-subrc.
67026
67067
  ENDIF.`,
67027
- goodExample: `IF sy-subrc <> 0.
67068
+ goodExample: `IF sy-subrc <> 0.
67028
67069
  ENDIF.`,
67029
67070
  };
67030
67071
  }
@@ -67125,8 +67166,8 @@ class NROBConsistency {
67125
67166
  key: "nrob_consistency",
67126
67167
  title: "Number range consistency",
67127
67168
  shortDescription: `Consistency checks for number ranges`,
67128
- extendedInformation: `Issue reported if percentage warning is over 50%
67129
-
67169
+ extendedInformation: `Issue reported if percentage warning is over 50%
67170
+
67130
67171
  Issue reported if the referenced domain is not found(taking error namespace into account)`,
67131
67172
  tags: [_irule_1.RuleTag.SingleFile],
67132
67173
  };
@@ -67403,58 +67444,58 @@ class ObsoleteStatement extends _abap_rule_1.ABAPRule {
67403
67444
  title: "Obsolete statements",
67404
67445
  shortDescription: `Checks for usages of certain obsolete statements`,
67405
67446
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
67406
- extendedInformation: `
67407
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
67408
-
67409
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
67410
-
67411
- SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
67412
-
67413
- IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
67414
-
67415
- WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
67416
-
67417
- FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
67418
-
67419
- TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
67420
-
67421
- LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
67422
-
67423
- COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
67424
-
67425
- OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
67426
-
67427
- PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
67428
-
67429
- RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
67430
-
67431
- PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
67432
-
67433
- MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
67434
-
67435
- SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
67436
- SELECT COUNT(*) is considered okay
67437
-
67438
- FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
67439
-
67440
- SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
67441
-
67442
- CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
67443
-
67444
- POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
67445
-
67446
- OCCURENCES: check for OCCURENCES vs OCCURRENCES
67447
-
67447
+ extendedInformation: `
67448
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
67449
+
67450
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
67451
+
67452
+ SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
67453
+
67454
+ IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
67455
+
67456
+ WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
67457
+
67458
+ FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
67459
+
67460
+ TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
67461
+
67462
+ LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
67463
+
67464
+ COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
67465
+
67466
+ OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
67467
+
67468
+ PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
67469
+
67470
+ RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
67471
+
67472
+ PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
67473
+
67474
+ MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
67475
+
67476
+ SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
67477
+ SELECT COUNT(*) is considered okay
67478
+
67479
+ FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
67480
+
67481
+ SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
67482
+
67483
+ CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
67484
+
67485
+ POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
67486
+
67487
+ OCCURENCES: check for OCCURENCES vs OCCURRENCES
67488
+
67448
67489
  CLIENT SPECIFIED, from 754: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abapselect_client_obsolete.htm`,
67449
- badExample: `REFRESH itab.
67450
-
67451
- COMPUTE foo = 2 + 2.
67452
-
67453
- MULTIPLY lv_foo BY 2.
67454
-
67455
- INTERFACE intf LOAD.
67456
-
67457
- IF foo IS SUPPLIED.
67490
+ badExample: `REFRESH itab.
67491
+
67492
+ COMPUTE foo = 2 + 2.
67493
+
67494
+ MULTIPLY lv_foo BY 2.
67495
+
67496
+ INTERFACE intf LOAD.
67497
+
67498
+ IF foo IS SUPPLIED.
67458
67499
  ENDIF.`,
67459
67500
  };
67460
67501
  }
@@ -67794,9 +67835,9 @@ class OmitParameterName {
67794
67835
  key: "omit_parameter_name",
67795
67836
  title: "Omit parameter name",
67796
67837
  shortDescription: `Omit the parameter name in single parameter calls`,
67797
- extendedInformation: `
67798
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
67799
-
67838
+ extendedInformation: `
67839
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
67840
+
67800
67841
  EXPORTING must already be omitted for this rule to take effect, https://rules.abaplint.org/exporting/`,
67801
67842
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
67802
67843
  badExample: `method( param = 2 ).`,
@@ -68002,20 +68043,20 @@ class OmitReceiving extends _abap_rule_1.ABAPRule {
68002
68043
  shortDescription: `Omit RECEIVING`,
68003
68044
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-receiving`,
68004
68045
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
68005
- badExample: `
68006
- upload_pack(
68007
- EXPORTING
68008
- io_client = lo_client
68009
- iv_url = iv_url
68010
- iv_deepen_level = iv_deepen_level
68011
- it_hashes = lt_hashes
68012
- RECEIVING
68046
+ badExample: `
68047
+ upload_pack(
68048
+ EXPORTING
68049
+ io_client = lo_client
68050
+ iv_url = iv_url
68051
+ iv_deepen_level = iv_deepen_level
68052
+ it_hashes = lt_hashes
68053
+ RECEIVING
68013
68054
  rt_objects = et_objects ).`,
68014
- goodExample: `
68015
- et_objects = upload_pack(
68016
- io_client = lo_client
68017
- iv_url = iv_url
68018
- iv_deepen_level = iv_deepen_level
68055
+ goodExample: `
68056
+ et_objects = upload_pack(
68057
+ io_client = lo_client
68058
+ iv_url = iv_url
68059
+ iv_deepen_level = iv_deepen_level
68019
68060
  it_hashes = lt_hashes ).`,
68020
68061
  };
68021
68062
  }
@@ -68079,8 +68120,8 @@ class Parser702Chaining extends _abap_rule_1.ABAPRule {
68079
68120
  return {
68080
68121
  key: "parser_702_chaining",
68081
68122
  title: "Parser Error, bad chanining on 702",
68082
- shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
68083
- this rule finds these and reports errors.
68123
+ shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
68124
+ this rule finds these and reports errors.
68084
68125
  Only active on target version 702 and below.`,
68085
68126
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
68086
68127
  };
@@ -68160,8 +68201,8 @@ class ParserError {
68160
68201
  return {
68161
68202
  key: "parser_error",
68162
68203
  title: "Parser error",
68163
- shortDescription: `Checks for syntax not recognized by abaplint.
68164
-
68204
+ shortDescription: `Checks for syntax not recognized by abaplint.
68205
+
68165
68206
  See recognized syntax at https://syntax.abaplint.org`,
68166
68207
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
68167
68208
  };
@@ -68246,7 +68287,7 @@ class ParserMissingSpace extends _abap_rule_1.ABAPRule {
68246
68287
  return {
68247
68288
  key: "parser_missing_space",
68248
68289
  title: "Parser Error, missing space",
68249
- shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.
68290
+ shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.
68250
68291
  This rule makes sure the spaces are consistently required across the language.`,
68251
68292
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
68252
68293
  badExample: `IF ( foo = 'bar').`,
@@ -68658,25 +68699,25 @@ class PreferInline {
68658
68699
  key: "prefer_inline",
68659
68700
  title: "Prefer Inline Declarations",
68660
68701
  shortDescription: `Prefer inline to up-front declarations.`,
68661
- extendedInformation: `EXPERIMENTAL
68662
-
68663
- Activates if language version is v740sp02 or above.
68664
-
68665
- Variables must be local(METHOD or FORM).
68666
-
68667
- No generic or void typed variables. No syntax errors.
68668
-
68669
- First position used must be a full/pure write.
68670
-
68671
- Move statment is not a cast(?=)
68672
-
68702
+ extendedInformation: `EXPERIMENTAL
68703
+
68704
+ Activates if language version is v740sp02 or above.
68705
+
68706
+ Variables must be local(METHOD or FORM).
68707
+
68708
+ No generic or void typed variables. No syntax errors.
68709
+
68710
+ First position used must be a full/pure write.
68711
+
68712
+ Move statment is not a cast(?=)
68713
+
68673
68714
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-inline-to-up-front-declarations`,
68674
68715
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Experimental, _irule_1.RuleTag.Quickfix],
68675
- badExample: `DATA foo TYPE i.
68676
- foo = 2.
68677
- DATA percentage TYPE decfloat34.
68716
+ badExample: `DATA foo TYPE i.
68717
+ foo = 2.
68718
+ DATA percentage TYPE decfloat34.
68678
68719
  percentage = ( comment_number / abs_statement_number ) * 100.`,
68679
- goodExample: `DATA(foo) = 2.
68720
+ goodExample: `DATA(foo) = 2.
68680
68721
  DATA(percentage) = CONV decfloat34( comment_number / abs_statement_number ) * 100.`,
68681
68722
  };
68682
68723
  }
@@ -68890,18 +68931,18 @@ class PreferIsNot extends _abap_rule_1.ABAPRule {
68890
68931
  key: "prefer_is_not",
68891
68932
  title: "Prefer IS NOT to NOT IS",
68892
68933
  shortDescription: `Prefer IS NOT to NOT IS`,
68893
- extendedInformation: `
68894
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
68895
-
68934
+ extendedInformation: `
68935
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
68936
+
68896
68937
  "if not is_valid( )." examples are skipped`,
68897
68938
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
68898
- goodExample: `IF variable IS NOT INITIAL.
68899
- IF variable NP 'TODO*'.
68900
- IF variable <> 42.
68939
+ goodExample: `IF variable IS NOT INITIAL.
68940
+ IF variable NP 'TODO*'.
68941
+ IF variable <> 42.
68901
68942
  IF variable CO 'hello'.`,
68902
- badExample: `IF NOT variable IS INITIAL.
68903
- IF NOT variable CP 'TODO*'.
68904
- IF NOT variable = 42.
68943
+ badExample: `IF NOT variable IS INITIAL.
68944
+ IF NOT variable CP 'TODO*'.
68945
+ IF NOT variable = 42.
68905
68946
  IF NOT variable CA 'hello'.`,
68906
68947
  };
68907
68948
  }
@@ -69089,14 +69130,14 @@ class PreferRaiseExceptionNew extends _abap_rule_1.ABAPRule {
69089
69130
  key: "prefer_raise_exception_new",
69090
69131
  title: "Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE",
69091
69132
  shortDescription: `Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE`,
69092
- extendedInformation: `
69093
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
69094
-
69133
+ extendedInformation: `
69134
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
69135
+
69095
69136
  From 752 and up`,
69096
69137
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
69097
69138
  goodExample: `RAISE EXCEPTION NEW cx_generation_error( previous = exception ).`,
69098
- badExample: `RAISE EXCEPTION TYPE cx_generation_error
69099
- EXPORTING
69139
+ badExample: `RAISE EXCEPTION TYPE cx_generation_error
69140
+ EXPORTING
69100
69141
  previous = exception.`,
69101
69142
  };
69102
69143
  }
@@ -69174,12 +69215,12 @@ class PreferReturningToExporting extends _abap_rule_1.ABAPRule {
69174
69215
  key: "prefer_returning_to_exporting",
69175
69216
  title: "Prefer RETURNING to EXPORTING",
69176
69217
  shortDescription: `Prefer RETURNING to EXPORTING. Generic types cannot be RETURNING.`,
69177
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting
69218
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting
69178
69219
  https://docs.abapopenchecks.org/checks/44/`,
69179
69220
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
69180
- badExample: `CLASS lcl DEFINITION.
69181
- PUBLIC SECTION.
69182
- METHODS test EXPORTING ev_foo TYPE i.
69221
+ badExample: `CLASS lcl DEFINITION.
69222
+ PUBLIC SECTION.
69223
+ METHODS test EXPORTING ev_foo TYPE i.
69183
69224
  ENDCLASS.`,
69184
69225
  };
69185
69226
  }
@@ -69275,8 +69316,8 @@ class PreferXsdbool extends _abap_rule_1.ABAPRule {
69275
69316
  key: "prefer_xsdbool",
69276
69317
  title: "Prefer xsdbool over boolc",
69277
69318
  shortDescription: `Prefer xsdbool over boolc`,
69278
- extendedInformation: `Activates if language version is v740sp08 or above.
69279
-
69319
+ extendedInformation: `Activates if language version is v740sp08 or above.
69320
+
69280
69321
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
69281
69322
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
69282
69323
  badExample: `DATA(sdf) = boolc( 1 = 2 ).`,
@@ -69348,9 +69389,9 @@ class PreferredCompareOperator extends _abap_rule_1.ABAPRule {
69348
69389
  title: "Preferred compare operator",
69349
69390
  shortDescription: `Configure undesired operator variants`,
69350
69391
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
69351
- badExample: `IF foo EQ bar.
69392
+ badExample: `IF foo EQ bar.
69352
69393
  ENDIF.`,
69353
- goodExample: `IF foo = bar.
69394
+ goodExample: `IF foo = bar.
69354
69395
  ENDIF.`,
69355
69396
  };
69356
69397
  }
@@ -69574,26 +69615,26 @@ class ReduceProceduralCode extends _abap_rule_1.ABAPRule {
69574
69615
  key: "reduce_procedural_code",
69575
69616
  title: "Reduce procedural code",
69576
69617
  shortDescription: `Checks FORM and FUNCTION-MODULE have few statements`,
69577
- extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
69578
-
69579
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
69580
-
69618
+ extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
69619
+
69620
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
69621
+
69581
69622
  Comments are not counted as statements.`,
69582
69623
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
69583
- badExample: `FORM foo.
69584
- DATA lv_bar TYPE i.
69585
- lv_bar = 2 + 2.
69586
- IF lv_bar = 4.
69587
- WRITE 'hello world'.
69588
- ENDIF.
69589
- DATA lv_bar TYPE i.
69590
- lv_bar = 2 + 2.
69591
- IF lv_bar = 4.
69592
- WRITE 'hello world'.
69593
- ENDIF.
69624
+ badExample: `FORM foo.
69625
+ DATA lv_bar TYPE i.
69626
+ lv_bar = 2 + 2.
69627
+ IF lv_bar = 4.
69628
+ WRITE 'hello world'.
69629
+ ENDIF.
69630
+ DATA lv_bar TYPE i.
69631
+ lv_bar = 2 + 2.
69632
+ IF lv_bar = 4.
69633
+ WRITE 'hello world'.
69634
+ ENDIF.
69594
69635
  ENDFORM.`,
69595
- goodExample: `FORM foo.
69596
- NEW zcl_global_class( )->run_logic( ).
69636
+ goodExample: `FORM foo.
69637
+ NEW zcl_global_class( )->run_logic( ).
69597
69638
  ENDFORM.`,
69598
69639
  };
69599
69640
  }
@@ -69837,10 +69878,10 @@ class RemoveDescriptions {
69837
69878
  return {
69838
69879
  key: "remove_descriptions",
69839
69880
  title: "Remove descriptions",
69840
- shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
69841
-
69842
- Class descriptions are required, see rule description_empty.
69843
-
69881
+ shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
69882
+
69883
+ Class descriptions are required, see rule description_empty.
69884
+
69844
69885
  Consider using ABAP Doc for documentation.`,
69845
69886
  tags: [],
69846
69887
  };
@@ -69965,14 +70006,14 @@ class RFCErrorHandling extends _abap_rule_1.ABAPRule {
69965
70006
  tags: [_irule_1.RuleTag.SingleFile],
69966
70007
  shortDescription: `Checks that exceptions 'system_failure' and 'communication_failure' are handled in RFC calls`,
69967
70008
  extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenrfc_exception.htm`,
69968
- badExample: `CALL FUNCTION 'ZRFC'
70009
+ badExample: `CALL FUNCTION 'ZRFC'
69969
70010
  DESTINATION lv_rfc.`,
69970
- goodExample: `CALL FUNCTION 'ZRFC'
69971
- DESTINATION lv_rfc
69972
- EXCEPTIONS
69973
- system_failure = 1 MESSAGE msg
69974
- communication_failure = 2 MESSAGE msg
69975
- resource_failure = 3
70011
+ goodExample: `CALL FUNCTION 'ZRFC'
70012
+ DESTINATION lv_rfc
70013
+ EXCEPTIONS
70014
+ system_failure = 1 MESSAGE msg
70015
+ communication_failure = 2 MESSAGE msg
70016
+ resource_failure = 3
69976
70017
  OTHERS = 4.`,
69977
70018
  };
69978
70019
  }
@@ -70056,11 +70097,11 @@ class SelectAddOrderBy {
70056
70097
  key: "select_add_order_by",
70057
70098
  title: "SELECT add ORDER BY",
70058
70099
  shortDescription: `SELECTs add ORDER BY clause`,
70059
- extendedInformation: `
70060
- This will make sure that the SELECT statement returns results in the same sequence on different databases
70061
-
70062
- add ORDER BY PRIMARY KEY if in doubt
70063
-
70100
+ extendedInformation: `
70101
+ This will make sure that the SELECT statement returns results in the same sequence on different databases
70102
+
70103
+ add ORDER BY PRIMARY KEY if in doubt
70104
+
70064
70105
  If the target is a sorted/hashed table, no issue is reported`,
70065
70106
  tags: [_irule_1.RuleTag.SingleFile],
70066
70107
  badExample: `SELECT * FROM db INTO TABLE @DATA(tab).`,
@@ -70191,14 +70232,14 @@ class SelectPerformance {
70191
70232
  key: "select_performance",
70192
70233
  title: "SELECT performance",
70193
70234
  shortDescription: `Various checks regarding SELECT performance.`,
70194
- extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
70195
-
70235
+ extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
70236
+
70196
70237
  SELECT *: not reported if using INTO/APPENDING CORRESPONDING FIELDS OF`,
70197
70238
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Performance],
70198
- badExample: `SELECT field1, field2 FROM table
70199
- INTO @DATA(structure) UP TO 1 ROWS ORDER BY field3 DESCENDING.
70239
+ badExample: `SELECT field1, field2 FROM table
70240
+ INTO @DATA(structure) UP TO 1 ROWS ORDER BY field3 DESCENDING.
70200
70241
  ENDSELECT.`,
70201
- goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
70242
+ goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
70202
70243
  INTO TABLE @DATA(table) ORDER BY field3 DESCENDING`,
70203
70244
  };
70204
70245
  }
@@ -70312,8 +70353,8 @@ class SelectSingleFullKey {
70312
70353
  key: "select_single_full_key",
70313
70354
  title: "Detect SELECT SINGLE which are possibily not unique",
70314
70355
  shortDescription: `Detect SELECT SINGLE which are possibily not unique`,
70315
- extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
70316
-
70356
+ extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
70357
+
70317
70358
  If the statement contains a JOIN it is not checked`,
70318
70359
  pseudoComment: "EC CI_NOORDER",
70319
70360
  tags: [_irule_1.RuleTag.Quickfix],
@@ -70737,8 +70778,8 @@ class SICFConsistency {
70737
70778
  key: "sicf_consistency",
70738
70779
  title: "SICF consistency",
70739
70780
  shortDescription: `Checks the validity of ICF services`,
70740
- extendedInformation: `* Class defined in handler must exist
70741
- * Class must not have any syntax errors
70781
+ extendedInformation: `* Class defined in handler must exist
70782
+ * Class must not have any syntax errors
70742
70783
  * Class must implement interface IF_HTTP_EXTENSION`,
70743
70784
  };
70744
70785
  }
@@ -70850,23 +70891,23 @@ class SlowParameterPassing {
70850
70891
  shortDescription: `Detects slow pass by value passing for methods where parameter is not changed`,
70851
70892
  extendedInformation: `Method parameters defined in interfaces is not checked`,
70852
70893
  tags: [_irule_1.RuleTag.Performance],
70853
- badExample: `CLASS lcl DEFINITION.
70854
- PUBLIC SECTION.
70855
- METHODS bar IMPORTING VALUE(sdf) TYPE string.
70856
- ENDCLASS.
70857
- CLASS lcl IMPLEMENTATION.
70858
- METHOD bar.
70859
- WRITE sdf.
70860
- ENDMETHOD.
70894
+ badExample: `CLASS lcl DEFINITION.
70895
+ PUBLIC SECTION.
70896
+ METHODS bar IMPORTING VALUE(sdf) TYPE string.
70897
+ ENDCLASS.
70898
+ CLASS lcl IMPLEMENTATION.
70899
+ METHOD bar.
70900
+ WRITE sdf.
70901
+ ENDMETHOD.
70861
70902
  ENDCLASS.`,
70862
- goodExample: `CLASS lcl DEFINITION.
70863
- PUBLIC SECTION.
70864
- METHODS bar IMPORTING sdf TYPE string.
70865
- ENDCLASS.
70866
- CLASS lcl IMPLEMENTATION.
70867
- METHOD bar.
70868
- WRITE sdf.
70869
- ENDMETHOD.
70903
+ goodExample: `CLASS lcl DEFINITION.
70904
+ PUBLIC SECTION.
70905
+ METHODS bar IMPORTING sdf TYPE string.
70906
+ ENDCLASS.
70907
+ CLASS lcl IMPLEMENTATION.
70908
+ METHOD bar.
70909
+ WRITE sdf.
70910
+ ENDMETHOD.
70870
70911
  ENDCLASS.`,
70871
70912
  };
70872
70913
  }
@@ -71123,8 +71164,8 @@ class SpaceBeforeDot extends _abap_rule_1.ABAPRule {
71123
71164
  key: "space_before_dot",
71124
71165
  title: "Space before dot",
71125
71166
  shortDescription: `Checks for extra spaces before dots at the ends of statements`,
71126
- extendedInformation: `
71127
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
71167
+ extendedInformation: `
71168
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
71128
71169
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#condense-your-code`,
71129
71170
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
71130
71171
  badExample: `WRITE bar .`,
@@ -71310,12 +71351,12 @@ class SQLValueConversion {
71310
71351
  key: "sql_value_conversion",
71311
71352
  title: "Implicit SQL Value Conversion",
71312
71353
  shortDescription: `Ensure types match when selecting from database`,
71313
- extendedInformation: `
71314
- * Integer to CHAR conversion
71315
- * Integer to NUMC conversion
71316
- * NUMC to Integer conversion
71317
- * CHAR to Integer conversion
71318
- * Source field longer than database field, CHAR -> CHAR
71354
+ extendedInformation: `
71355
+ * Integer to CHAR conversion
71356
+ * Integer to NUMC conversion
71357
+ * NUMC to Integer conversion
71358
+ * CHAR to Integer conversion
71359
+ * Source field longer than database field, CHAR -> CHAR
71319
71360
  * Source field longer than database field, NUMC -> NUMC`,
71320
71361
  tags: [],
71321
71362
  };
@@ -71387,7 +71428,7 @@ class StartAtTab extends _abap_rule_1.ABAPRule {
71387
71428
  key: "start_at_tab",
71388
71429
  title: "Start at tab",
71389
71430
  shortDescription: `Checks that statements start at tabstops.`,
71390
- extendedInformation: `Reports max 100 issues per file
71431
+ extendedInformation: `Reports max 100 issues per file
71391
71432
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
71392
71433
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
71393
71434
  badExample: ` WRITE a.`,
@@ -71564,12 +71605,12 @@ class StrictSQL extends _abap_rule_1.ABAPRule {
71564
71605
  key: "strict_sql",
71565
71606
  title: "Strict SQL",
71566
71607
  shortDescription: `Strict SQL`,
71567
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
71568
-
71569
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
71570
-
71571
- Also see separate rule sql_escape_host_variables
71572
-
71608
+ extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
71609
+
71610
+ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
71611
+
71612
+ Also see separate rule sql_escape_host_variables
71613
+
71573
71614
  Activates from v750 and up`,
71574
71615
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix],
71575
71616
  badExample: `SELECT * FROM ztabl INTO TABLE @rt_content WHERE type = @iv_type ORDER BY PRIMARY KEY.`,
@@ -71823,11 +71864,11 @@ class SyModification extends _abap_rule_1.ABAPRule {
71823
71864
  key: "sy_modification",
71824
71865
  title: "Modification of SY fields",
71825
71866
  shortDescription: `Finds modification of sy fields`,
71826
- extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
71827
-
71867
+ extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
71868
+
71828
71869
  Changes to SY-TVAR* fields are not reported`,
71829
71870
  tags: [_irule_1.RuleTag.SingleFile],
71830
- badExample: `sy-uname = 2.
71871
+ badExample: `sy-uname = 2.
71831
71872
  sy = sy.`,
71832
71873
  };
71833
71874
  }
@@ -71889,8 +71930,8 @@ class TABLEnhancementCategory {
71889
71930
  key: "tabl_enhancement_category",
71890
71931
  title: "TABL enhancement category must be set",
71891
71932
  shortDescription: `Checks that tables do not have the enhancement category 'not classified'.`,
71892
- extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
71893
-
71933
+ extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
71934
+
71894
71935
  You may use standard report RS_DDIC_CLASSIFICATION_FINAL for adjustment.`,
71895
71936
  tags: [],
71896
71937
  };
@@ -71955,8 +71996,8 @@ class TablesDeclaredLocally extends _abap_rule_1.ABAPRule {
71955
71996
  shortDescription: `TABLES are always global, so declare them globally`,
71956
71997
  extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abaptables.htm`,
71957
71998
  tags: [_irule_1.RuleTag.SingleFile],
71958
- badExample: `FORM foo.
71959
- TABLES t100.
71999
+ badExample: `FORM foo.
72000
+ TABLES t100.
71960
72001
  ENDFORM.`,
71961
72002
  goodExample: `TABLES t000.`,
71962
72003
  };
@@ -72084,9 +72125,9 @@ class TypeFormParameters extends _abap_rule_1.ABAPRule {
72084
72125
  title: "Type FORM parameters",
72085
72126
  shortDescription: `Checks for untyped FORM parameters`,
72086
72127
  tags: [_irule_1.RuleTag.SingleFile],
72087
- badExample: `FORM foo USING bar.
72128
+ badExample: `FORM foo USING bar.
72088
72129
  ENDFORM.`,
72089
- goodExample: `FORM foo USING bar TYPE string.
72130
+ goodExample: `FORM foo USING bar TYPE string.
72090
72131
  ENDFORM.`,
72091
72132
  };
72092
72133
  }
@@ -72759,38 +72800,38 @@ class UnnecessaryPragma extends _abap_rule_1.ABAPRule {
72759
72800
  key: "unnecessary_pragma",
72760
72801
  title: "Unnecessary Pragma",
72761
72802
  shortDescription: `Finds pragmas which can be removed`,
72762
- extendedInformation: `* NO_HANDLER with handler
72763
-
72764
- * NEEDED without definition
72765
-
72766
- * NO_TEXT without texts
72767
-
72768
- * SUBRC_OK where sy-subrc is checked
72769
-
72803
+ extendedInformation: `* NO_HANDLER with handler
72804
+
72805
+ * NEEDED without definition
72806
+
72807
+ * NO_TEXT without texts
72808
+
72809
+ * SUBRC_OK where sy-subrc is checked
72810
+
72770
72811
  NO_HANDLER inside macros are not checked`,
72771
72812
  tags: [_irule_1.RuleTag.SingleFile],
72772
- badExample: `TRY.
72773
- ...
72774
- CATCH zcx_abapgit_exception ##NO_HANDLER.
72775
- RETURN. " it has a handler
72776
- ENDTRY.
72777
- MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
72778
- SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
72779
- IF sy-subrc <> 0.
72813
+ badExample: `TRY.
72814
+ ...
72815
+ CATCH zcx_abapgit_exception ##NO_HANDLER.
72816
+ RETURN. " it has a handler
72817
+ ENDTRY.
72818
+ MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
72819
+ SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
72820
+ IF sy-subrc <> 0.
72780
72821
  ENDIF.`,
72781
- goodExample: `TRY.
72782
- ...
72783
- CATCH zcx_abapgit_exception.
72784
- RETURN.
72785
- ENDTRY.
72786
- MESSAGE w125(zbar) WITH c_foo INTO message.
72787
- SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
72788
- IF sy-subrc <> 0.
72789
- ENDIF.
72790
-
72791
- DATA: BEGIN OF blah ##NEEDED,
72792
- test1 TYPE string,
72793
- test2 TYPE string,
72822
+ goodExample: `TRY.
72823
+ ...
72824
+ CATCH zcx_abapgit_exception.
72825
+ RETURN.
72826
+ ENDTRY.
72827
+ MESSAGE w125(zbar) WITH c_foo INTO message.
72828
+ SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
72829
+ IF sy-subrc <> 0.
72830
+ ENDIF.
72831
+
72832
+ DATA: BEGIN OF blah ##NEEDED,
72833
+ test1 TYPE string,
72834
+ test2 TYPE string,
72794
72835
  END OF blah.`,
72795
72836
  };
72796
72837
  }
@@ -72957,18 +72998,18 @@ class UnnecessaryReturn extends _abap_rule_1.ABAPRule {
72957
72998
  shortDescription: `Finds unnecessary RETURN statements`,
72958
72999
  extendedInformation: `Finds unnecessary RETURN statements`,
72959
73000
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
72960
- badExample: `FORM hello1.
72961
- WRITE 'world'.
72962
- RETURN.
72963
- ENDFORM.
72964
-
72965
- FORM foo.
72966
- IF 1 = 2.
72967
- RETURN.
72968
- ENDIF.
73001
+ badExample: `FORM hello1.
73002
+ WRITE 'world'.
73003
+ RETURN.
73004
+ ENDFORM.
73005
+
73006
+ FORM foo.
73007
+ IF 1 = 2.
73008
+ RETURN.
73009
+ ENDIF.
72969
73010
  ENDFORM.`,
72970
- goodExample: `FORM hello2.
72971
- WRITE 'world'.
73011
+ goodExample: `FORM hello2.
73012
+ WRITE 'world'.
72972
73013
  ENDFORM.`,
72973
73014
  };
72974
73015
  }
@@ -73319,13 +73360,13 @@ class UnusedMacros {
73319
73360
  title: "Unused macros",
73320
73361
  shortDescription: `Checks for unused macro definitions definitions`,
73321
73362
  tags: [_irule_1.RuleTag.Quickfix],
73322
- badExample: `DEFINE foobar1.
73323
- WRITE 'hello'.
73363
+ badExample: `DEFINE foobar1.
73364
+ WRITE 'hello'.
73324
73365
  END-OF-DEFINITION.`,
73325
- goodExample: `DEFINE foobar2.
73326
- WRITE 'hello'.
73327
- END-OF-DEFINITION.
73328
-
73366
+ goodExample: `DEFINE foobar2.
73367
+ WRITE 'hello'.
73368
+ END-OF-DEFINITION.
73369
+
73329
73370
  foobar2.`,
73330
73371
  };
73331
73372
  }
@@ -73433,17 +73474,17 @@ class UnusedMethods {
73433
73474
  key: "unused_methods",
73434
73475
  title: "Unused methods",
73435
73476
  shortDescription: `Checks for unused methods`,
73436
- extendedInformation: `Checks private and protected methods.
73437
-
73438
- Unused methods are not reported if the object contains parser or syntax errors.
73439
-
73440
- Skips:
73441
- * methods FOR TESTING
73442
- * methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
73443
- * class_constructor + constructor methods
73444
- * event handlers
73445
- * methods that are redefined
73446
- * INCLUDEs
73477
+ extendedInformation: `Checks private and protected methods.
73478
+
73479
+ Unused methods are not reported if the object contains parser or syntax errors.
73480
+
73481
+ Skips:
73482
+ * methods FOR TESTING
73483
+ * methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
73484
+ * class_constructor + constructor methods
73485
+ * event handlers
73486
+ * methods that are redefined
73487
+ * INCLUDEs
73447
73488
  `,
73448
73489
  tags: [],
73449
73490
  pragma: "##CALLED",
@@ -73877,23 +73918,23 @@ class UnusedVariables {
73877
73918
  key: "unused_variables",
73878
73919
  title: "Unused variables",
73879
73920
  shortDescription: `Checks for unused variables and constants`,
73880
- extendedInformation: `Skips event parameters.
73881
-
73882
- Note that this currently does not work if the source code uses macros.
73883
-
73884
- Unused variables are not reported if the object contains parser or syntax errors.
73885
-
73921
+ extendedInformation: `Skips event parameters.
73922
+
73923
+ Note that this currently does not work if the source code uses macros.
73924
+
73925
+ Unused variables are not reported if the object contains parser or syntax errors.
73926
+
73886
73927
  Errors found in INCLUDES are reported for the main program.`,
73887
73928
  tags: [_irule_1.RuleTag.Quickfix],
73888
73929
  pragma: "##NEEDED",
73889
73930
  pseudoComment: "EC NEEDED",
73890
- badExample: `DATA: BEGIN OF blah1,
73891
- test TYPE string,
73892
- test2 TYPE string,
73931
+ badExample: `DATA: BEGIN OF blah1,
73932
+ test TYPE string,
73933
+ test2 TYPE string,
73893
73934
  END OF blah1.`,
73894
- goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
73895
- test TYPE string,
73896
- test2 TYPE string,
73935
+ goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
73936
+ test TYPE string,
73937
+ test2 TYPE string,
73897
73938
  END OF blah2.`,
73898
73939
  };
73899
73940
  }
@@ -74112,15 +74153,15 @@ class UseBoolExpression extends _abap_rule_1.ABAPRule {
74112
74153
  shortDescription: `Use boolean expression, xsdbool from 740sp08 and up, boolc from 702 and up`,
74113
74154
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
74114
74155
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
74115
- badExample: `IF line IS INITIAL.
74116
- has_entries = abap_false.
74117
- ELSE.
74118
- has_entries = abap_true.
74119
- ENDIF.
74120
-
74156
+ badExample: `IF line IS INITIAL.
74157
+ has_entries = abap_false.
74158
+ ELSE.
74159
+ has_entries = abap_true.
74160
+ ENDIF.
74161
+
74121
74162
  DATA(fsdf) = COND #( WHEN foo <> bar THEN abap_true ELSE abap_false ).`,
74122
- goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
74123
-
74163
+ goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
74164
+
74124
74165
  DATA(fsdf) = xsdbool( foo <> bar ).`,
74125
74166
  };
74126
74167
  }
@@ -74238,15 +74279,15 @@ class UseClassBasedExceptions extends _abap_rule_1.ABAPRule {
74238
74279
  shortDescription: `Use class based exceptions, checks interface and class definitions`,
74239
74280
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-class-based-exceptions`,
74240
74281
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
74241
- badExample: `INTERFACE lif.
74242
- METHODS load_data
74243
- EXCEPTIONS
74244
- invalid_parameter.
74282
+ badExample: `INTERFACE lif.
74283
+ METHODS load_data
74284
+ EXCEPTIONS
74285
+ invalid_parameter.
74245
74286
  ENDINTERFACE.`,
74246
- goodExample: `INTERFACE lif.
74247
- METHODS load_data
74248
- RAISING
74249
- cx_something.
74287
+ goodExample: `INTERFACE lif.
74288
+ METHODS load_data
74289
+ RAISING
74290
+ cx_something.
74250
74291
  ENDINTERFACE.`,
74251
74292
  };
74252
74293
  }
@@ -74306,15 +74347,15 @@ class UseLineExists extends _abap_rule_1.ABAPRule {
74306
74347
  key: "use_line_exists",
74307
74348
  title: "Use line_exists",
74308
74349
  shortDescription: `Use line_exists, from 740sp02 and up`,
74309
- extendedInformation: `
74310
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
74311
-
74350
+ extendedInformation: `
74351
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
74352
+
74312
74353
  Not reported if the READ TABLE statement contains BINARY SEARCH.`,
74313
74354
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
74314
- badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
74315
- IF sy-subrc = 0.
74355
+ badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
74356
+ IF sy-subrc = 0.
74316
74357
  ENDIF.`,
74317
- goodExample: `IF line_exists( my_table[ key = 'A' ] ).
74358
+ goodExample: `IF line_exists( my_table[ key = 'A' ] ).
74318
74359
  ENDIF.`,
74319
74360
  };
74320
74361
  }
@@ -74424,10 +74465,10 @@ class UseNew extends _abap_rule_1.ABAPRule {
74424
74465
  key: "use_new",
74425
74466
  title: "Use NEW",
74426
74467
  shortDescription: `Checks for deprecated CREATE OBJECT statements.`,
74427
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
74428
-
74429
- If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
74430
-
74468
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
74469
+
74470
+ If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
74471
+
74431
74472
  Applicable from v740sp02 and up`,
74432
74473
  badExample: `CREATE OBJECT ref.`,
74433
74474
  goodExample: `ref = NEW #( ).`,
@@ -74525,13 +74566,13 @@ class WhenOthersLast extends _abap_rule_1.ABAPRule {
74525
74566
  title: "WHEN OTHERS last",
74526
74567
  shortDescription: `Checks that WHEN OTHERS is placed the last within a CASE statement.`,
74527
74568
  tags: [_irule_1.RuleTag.SingleFile],
74528
- badExample: `CASE bar.
74529
- WHEN OTHERS.
74530
- WHEN 2.
74569
+ badExample: `CASE bar.
74570
+ WHEN OTHERS.
74571
+ WHEN 2.
74531
74572
  ENDCASE.`,
74532
- goodExample: `CASE bar.
74533
- WHEN 2.
74534
- WHEN OTHERS.
74573
+ goodExample: `CASE bar.
74574
+ WHEN 2.
74575
+ WHEN OTHERS.
74535
74576
  ENDCASE.`,
74536
74577
  };
74537
74578
  }