@abaplint/cli 2.119.24 → 2.119.26

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 +959 -896
  4. package/package.json +62 -62
package/build/cli.js CHANGED
@@ -6064,6 +6064,8 @@ __exportStar(__webpack_require__(/*! ./sql_into_structure */ "./node_modules/@ab
6064
6064
  __exportStar(__webpack_require__(/*! ./sql_into_table */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_into_table.js"), exports);
6065
6065
  __exportStar(__webpack_require__(/*! ./sql_join */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_join.js"), exports);
6066
6066
  __exportStar(__webpack_require__(/*! ./sql_order_by */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_order_by.js"), exports);
6067
+ __exportStar(__webpack_require__(/*! ./sql_over */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_over.js"), exports);
6068
+ __exportStar(__webpack_require__(/*! ./sql_over */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_over.js"), exports);
6067
6069
  __exportStar(__webpack_require__(/*! ./sql_path */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_path.js"), exports);
6068
6070
  __exportStar(__webpack_require__(/*! ./sql_source_no_space */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_source_no_space.js"), exports);
6069
6071
  __exportStar(__webpack_require__(/*! ./sql_source_simple */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_source_simple.js"), exports);
@@ -8042,19 +8044,31 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
8042
8044
  exports.SQLAggregation = void 0;
8043
8045
  const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
8044
8046
  const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
8045
- const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
8046
- const dynamic_1 = __webpack_require__(/*! ./dynamic */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/dynamic.js");
8047
- const sql_arithmetics_1 = __webpack_require__(/*! ./sql_arithmetics */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_arithmetics.js");
8047
+ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
8048
+ const sql_function_input_1 = __webpack_require__(/*! ./sql_function_input */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_function_input.js");
8049
+ const sql_field_name_1 = __webpack_require__(/*! ./sql_field_name */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_field_name.js");
8050
+ const sql_over_1 = __webpack_require__(/*! ./sql_over */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_over.js");
8051
+ const lparen = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenLeft), (0, combi_1.tok)(tokens_1.ParenLeftW));
8052
+ const rparen = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WParenRightW), (0, combi_1.tok)(tokens_1.WParenRight), (0, combi_1.tok)(tokens_1.ParenRightW));
8048
8053
  class SQLAggregation extends combi_1.Expression {
8049
8054
  getRunnable() {
8050
- const f = (0, combi_1.seq)((0, combi_1.optPrio)("DISTINCT"), (0, combi_1.altPrio)(_1.SQLCase, sql_arithmetics_1.SQLArithmetics, dynamic_1.Dynamic, _1.SQLFunction));
8051
- const fparen = (0, combi_1.seq)("(", _1.Field, ")");
8052
- const count = (0, combi_1.seq)("COUNT", (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenLeft), (0, combi_1.tok)(tokens_1.ParenLeftW)), (0, combi_1.optPrio)("DISTINCT"), (0, combi_1.altPrio)("*", _1.Field, fparen), ")");
8053
- const max = (0, combi_1.seq)("MAX", (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenLeft), (0, combi_1.tok)(tokens_1.ParenLeftW)), f, ")");
8054
- const min = (0, combi_1.seq)("MIN", (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenLeft), (0, combi_1.tok)(tokens_1.ParenLeftW)), f, ")");
8055
- const sum = (0, combi_1.seq)("SUM", (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenLeft), (0, combi_1.tok)(tokens_1.ParenLeftW)), f, ")");
8056
- const avg = (0, combi_1.seq)("AVG", (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenLeft), (0, combi_1.tok)(tokens_1.ParenLeftW)), f, ")");
8057
- return (0, combi_1.altPrio)(count, max, min, sum, avg);
8055
+ const arg = (0, combi_1.altPrio)((0, combi_1.ver)(version_1.Version.v740sp08, sql_function_input_1.SQLFunctionInput), sql_field_name_1.SQLFieldName);
8056
+ const avgRparen = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WParenRightW), (0, combi_1.tok)(tokens_1.WParenRight), (0, combi_1.tok)(tokens_1.ParenRightW));
8057
+ const lenDecimals = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, ",", sql_function_input_1.SQLFunctionInput, (0, combi_1.tok)(tokens_1.WParenRightW));
8058
+ const avgCastType = (0, combi_1.altPrio)((0, combi_1.seq)("DEC", lenDecimals), (0, combi_1.seq)("CURR", lenDecimals), (0, combi_1.seq)("QUAN", lenDecimals), "D16N", "D34N", "FLTP");
8059
+ const count = (0, combi_1.seq)("COUNT", lparen, (0, combi_1.optPrio)("DISTINCT"), (0, combi_1.altPrio)("*", arg), rparen, (0, combi_1.optPrio)(sql_over_1.SQLOver));
8060
+ const max = (0, combi_1.seq)("MAX", lparen, (0, combi_1.optPrio)("DISTINCT"), arg, rparen, (0, combi_1.optPrio)(sql_over_1.SQLOver));
8061
+ const min = (0, combi_1.seq)("MIN", lparen, (0, combi_1.optPrio)("DISTINCT"), arg, rparen, (0, combi_1.optPrio)(sql_over_1.SQLOver));
8062
+ const sum = (0, combi_1.seq)("SUM", lparen, (0, combi_1.optPrio)("DISTINCT"), arg, rparen, (0, combi_1.optPrio)(sql_over_1.SQLOver));
8063
+ const avg = (0, combi_1.seq)("AVG", (0, combi_1.tok)(tokens_1.ParenLeftW), (0, combi_1.optPrio)("DISTINCT"), arg, (0, combi_1.optPrio)((0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)("AS", avgCastType))), avgRparen, (0, combi_1.optPrio)(sql_over_1.SQLOver));
8064
+ const rank = (0, combi_1.ver)(version_1.Version.v757, (0, combi_1.seq)((0, combi_1.altPrio)("ROW_NUMBER", "RANK", "DENSE_RANK"), lparen, rparen, sql_over_1.SQLOver));
8065
+ const leadLag = (0, combi_1.ver)(version_1.Version.v757, (0, combi_1.seq)((0, combi_1.altPrio)("LEAD", "LAG"), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, (0, combi_1.optPrio)((0, combi_1.seq)(",", sql_function_input_1.SQLFunctionInput, (0, combi_1.optPrio)((0, combi_1.seq)(",", sql_function_input_1.SQLFunctionInput)))), rparen, sql_over_1.SQLOver));
8066
+ const firstLastValue = (0, combi_1.ver)(version_1.Version.v757, (0, combi_1.seq)((0, combi_1.altPrio)("FIRST_VALUE", "LAST_VALUE"), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, rparen, sql_over_1.SQLOver));
8067
+ const stringAgg = (0, combi_1.ver)(version_1.Version.v757, (0, combi_1.seq)("STRING_AGG", (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, (0, combi_1.optPrio)((0, combi_1.seq)(",", sql_function_input_1.SQLFunctionInput)), rparen, (0, combi_1.optPrio)(sql_over_1.SQLOver)));
8068
+ const ntile = (0, combi_1.ver)(version_1.Version.v757, (0, combi_1.seq)("NTILE", (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, rparen, sql_over_1.SQLOver));
8069
+ const corr = (0, combi_1.ver)(version_1.Version.v757, (0, combi_1.seq)((0, combi_1.altPrio)("CORR_SPEARMAN", "CORR"), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, ",", sql_function_input_1.SQLFunctionInput, rparen, (0, combi_1.optPrio)(sql_over_1.SQLOver)));
8070
+ const stat = (0, combi_1.ver)(version_1.Version.v757, (0, combi_1.seq)((0, combi_1.altPrio)("PRODUCT", "MEDIAN", "VAR", "STDDEV"), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, rparen, (0, combi_1.optPrio)(sql_over_1.SQLOver)));
8071
+ return (0, combi_1.altPrio)(rank, leadLag, firstLastValue, stringAgg, ntile, corr, stat, count, max, min, sum, avg);
8058
8072
  }
8059
8073
  }
8060
8074
  exports.SQLAggregation = SQLAggregation;
@@ -8265,7 +8279,7 @@ class SQLCompare extends combi_1.Expression {
8265
8279
  const arith = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.plusPrio)((0, combi_1.seq)((0, combi_1.altPrio)("+", "-", "*", "/"), _1.SQLFieldName)), version_1.Version.OpenABAP);
8266
8280
  const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeftW), _1.Source, (0, combi_1.tok)(tokens_1.WParenRightW));
8267
8281
  const at = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), (0, combi_1.altPrio)(_1.SimpleSource3, paren)), version_1.Version.OpenABAP);
8268
- const rett = (0, combi_1.seq)((0, combi_1.altPrio)(_1.SQLFunction, _1.ConstantString, (0, combi_1.seq)((0, combi_1.altPrio)(_1.SQLPath, _1.SQLFieldName), (0, combi_1.optPrio)(arith)), at), (0, combi_1.altPrio)((0, combi_1.seq)(_1.SQLCompareOperator, (0, combi_1.altPrio)(sub, source)), (0, combi_1.seq)((0, combi_1.optPrio)("NOT"), (0, combi_1.altPrio)(_1.SQLIn, like, between)), nul));
8282
+ const rett = (0, combi_1.seq)((0, combi_1.altPrio)(_1.SQLAggregation, _1.SQLFunction, _1.ConstantString, (0, combi_1.seq)((0, combi_1.altPrio)(_1.SQLPath, _1.SQLFieldName), (0, combi_1.optPrio)(arith)), at), (0, combi_1.altPrio)((0, combi_1.seq)(_1.SQLCompareOperator, (0, combi_1.altPrio)(sub, source)), (0, combi_1.seq)((0, combi_1.optPrio)("NOT"), (0, combi_1.altPrio)(_1.SQLIn, like, between)), nul));
8269
8283
  const exists = (0, combi_1.seq)("EXISTS", subSelect);
8270
8284
  return (0, combi_1.altPrio)(exists, _1.Dynamic, rett);
8271
8285
  }
@@ -8346,10 +8360,17 @@ class SQLField extends combi_1.Expression {
8346
8360
  const abap = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), (0, combi_1.altPrio)(_1.SimpleFieldChain2, atParen)), version_1.Version.OpenABAP);
8347
8361
  const as = (0, combi_1.seq)("AS", _1.SQLAsName);
8348
8362
  const parenFieldName = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), _1.SQLFieldName, (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WParenRightW), (0, combi_1.tok)(tokens_1.WParenRight)));
8349
- const field = (0, combi_1.altPrio)(_1.SQLAggregation, _1.SQLCase, sql_function_1.SQLFunction, sql_path_1.SQLPath, _1.SQLFieldName, abap, _1.Constant, parenFieldName);
8363
+ const fieldNoAgg = (0, combi_1.altPrio)(_1.SQLCase, sql_function_1.SQLFunction, sql_path_1.SQLPath, _1.SQLFieldName, abap, _1.Constant, parenFieldName);
8364
+ const field = (0, combi_1.altPrio)(_1.SQLAggregation, fieldNoAgg);
8350
8365
  const parenField = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), field, (0, combi_1.tok)(tokens_1.WParenRightW));
8351
- const sub = (0, combi_1.plusPrio)((0, combi_1.seq)((0, combi_1.altPrio)("+", "-", "*", "/", "&&"), (0, combi_1.altPrio)(parenField, field)));
8352
- const arith = (0, combi_1.ver)(version_1.Version.v740sp05, sub);
8366
+ const parenFieldNoAgg = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), fieldNoAgg, (0, combi_1.tok)(tokens_1.WParenRightW));
8367
+ // arithmetic without aggregates as operands: from v740sp05
8368
+ const subNoAgg = (0, combi_1.plusPrio)((0, combi_1.seq)((0, combi_1.altPrio)("+", "-", "*", "/", "&&"), (0, combi_1.altPrio)(parenFieldNoAgg, fieldNoAgg)));
8369
+ const arithNoAgg = (0, combi_1.ver)(version_1.Version.v740sp05, subNoAgg);
8370
+ // arithmetic with aggregates as operands: from v754
8371
+ const subWithAgg = (0, combi_1.plusPrio)((0, combi_1.seq)((0, combi_1.altPrio)("+", "-", "*", "/", "&&"), (0, combi_1.altPrio)(parenField, field)));
8372
+ const arithWithAgg = (0, combi_1.ver)(version_1.Version.v754, subWithAgg);
8373
+ const arith = (0, combi_1.altPrio)(arithWithAgg, arithNoAgg);
8353
8374
  const arithSequence = (0, combi_1.seq)(field, (0, combi_1.optPrio)(arith));
8354
8375
  const parenArithSequence = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), arithSequence, (0, combi_1.tok)(tokens_1.WParenRightW));
8355
8376
  return (0, combi_1.seq)((0, combi_1.altPrio)(parenArithSequence, arithSequence), (0, combi_1.optPrio)(as));
@@ -8648,7 +8669,8 @@ class SQLFunction extends combi_1.Expression {
8648
8669
  const rtrim = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)((0, combi_1.regex)(/^rtrim$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
8649
8670
  const right = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)((0, combi_1.regex)(/^right$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
8650
8671
  const left = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)((0, combi_1.regex)(/^left$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
8651
- return (0, combi_1.altPrio)(uuid, abs, ceil, floor, cast, div, mod, coalesce, concat, replace, length, lower, upper, round, concat_with_space, ltrim, rtrim, right, left, substring, dats_is_valid, dats_days_between, dats_add_days, dats_add_months);
8672
+ const division = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)((0, combi_1.regex)(/^division$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, commaParam, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
8673
+ return (0, combi_1.altPrio)(uuid, abs, ceil, floor, cast, div, mod, coalesce, concat, replace, length, lower, upper, round, concat_with_space, ltrim, rtrim, right, left, substring, dats_is_valid, dats_days_between, dats_add_days, dats_add_months, division);
8652
8674
  }
8653
8675
  }
8654
8676
  exports.SQLFunction = SQLFunction;
@@ -8676,11 +8698,13 @@ const simple_source3_1 = __webpack_require__(/*! ./simple_source3 */ "./node_mod
8676
8698
  const source_1 = __webpack_require__(/*! ./source */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/source.js");
8677
8699
  const sql_aggregation_1 = __webpack_require__(/*! ./sql_aggregation */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_aggregation.js");
8678
8700
  const sql_function_1 = __webpack_require__(/*! ./sql_function */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_function.js");
8701
+ const sql_case_1 = __webpack_require__(/*! ./sql_case */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_case.js");
8679
8702
  class SQLFunctionInput extends combi_1.Expression {
8680
8703
  getRunnable() {
8681
- const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeftW), source_1.Source, (0, combi_1.tok)(tokens_1.WParenRightW));
8682
- const at = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), (0, combi_1.altPrio)(simple_source3_1.SimpleSource3, paren)));
8683
- const param = (0, combi_1.altPrio)(sql_function_1.SQLFunction, sql_aggregation_1.SQLAggregation, sql_field_name_1.SQLFieldName, sql_alias_field_1.SQLAliasField, constant_1.Constant, at);
8704
+ const hostParen = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeftW), source_1.Source, (0, combi_1.tok)(tokens_1.WParenRightW));
8705
+ const at = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), (0, combi_1.altPrio)(simple_source3_1.SimpleSource3, hostParen)));
8706
+ const parenInput = (0, combi_1.seq)("(", SQLFunctionInput, ")");
8707
+ const param = (0, combi_1.altPrio)(parenInput, sql_case_1.SQLCase, sql_function_1.SQLFunction, sql_aggregation_1.SQLAggregation, sql_field_name_1.SQLFieldName, sql_alias_field_1.SQLAliasField, constant_1.Constant, at);
8684
8708
  const operator = (0, combi_1.altPrio)("+", "-", "*", "/", "&&");
8685
8709
  return (0, combi_1.seq)(param, (0, combi_1.starPrio)((0, combi_1.seq)(operator, param)));
8686
8710
  }
@@ -8921,6 +8945,41 @@ exports.SQLOrderBy = SQLOrderBy;
8921
8945
 
8922
8946
  /***/ },
8923
8947
 
8948
+ /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_over.js"
8949
+ /*!*****************************************************************************************!*\
8950
+ !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_over.js ***!
8951
+ \*****************************************************************************************/
8952
+ (__unused_webpack_module, exports, __webpack_require__) {
8953
+
8954
+ "use strict";
8955
+
8956
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
8957
+ exports.SQLOver = void 0;
8958
+ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
8959
+ const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
8960
+ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
8961
+ const sql_function_input_1 = __webpack_require__(/*! ./sql_function_input */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_function_input.js");
8962
+ const sql_source_1 = __webpack_require__(/*! ./sql_source */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_source.js");
8963
+ const sql_order_by_1 = __webpack_require__(/*! ./sql_order_by */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_order_by.js");
8964
+ const lparen = (0, combi_1.tok)(tokens_1.ParenLeftW);
8965
+ const rparen = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WParenRightW), (0, combi_1.tok)(tokens_1.WParenRight));
8966
+ class SQLOver extends combi_1.Expression {
8967
+ getRunnable() {
8968
+ const partitionBy = (0, combi_1.seq)("PARTITION", "BY", (0, combi_1.plus)((0, combi_1.seq)(sql_function_input_1.SQLFunctionInput, (0, combi_1.opt)(","))));
8969
+ const unboundedPreceding = (0, combi_1.seq)("UNBOUNDED", "PRECEDING");
8970
+ const unboundedFollowing = (0, combi_1.seq)("UNBOUNDED", "FOLLOWING");
8971
+ const currentRow = (0, combi_1.seq)("CURRENT", "ROW");
8972
+ const numBound = (0, combi_1.seq)(sql_source_1.SQLSource, (0, combi_1.altPrio)("PRECEDING", "FOLLOWING"));
8973
+ const bound = (0, combi_1.altPrio)(unboundedPreceding, unboundedFollowing, currentRow, numBound);
8974
+ const windowFrameSpec = (0, combi_1.ver)(version_1.Version.v757, (0, combi_1.seq)("ROWS", "BETWEEN", bound, "AND", bound));
8975
+ return (0, combi_1.ver)(version_1.Version.v757, (0, combi_1.seq)("OVER", lparen, (0, combi_1.optPrio)(partitionBy), (0, combi_1.optPrio)(sql_order_by_1.SQLOrderBy), (0, combi_1.optPrio)(windowFrameSpec), rparen));
8976
+ }
8977
+ }
8978
+ exports.SQLOver = SQLOver;
8979
+ //# sourceMappingURL=sql_over.js.map
8980
+
8981
+ /***/ },
8982
+
8924
8983
  /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_path.js"
8925
8984
  /*!*****************************************************************************************!*\
8926
8985
  !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_path.js ***!
@@ -27325,6 +27384,7 @@ const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules
27325
27384
  const source_1 = __webpack_require__(/*! ./source */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js");
27326
27385
  const _type_utils_1 = __webpack_require__(/*! ../_type_utils */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_type_utils.js");
27327
27386
  const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_syntax_input.js");
27387
+ const constant_1 = __webpack_require__(/*! ./constant */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/constant.js");
27328
27388
  class MethodCallParam {
27329
27389
  static runSyntax(node, input, method) {
27330
27390
  if (!(node.get() instanceof Expressions.MethodCallParam)) {
@@ -27382,10 +27442,13 @@ class MethodCallParam {
27382
27442
  else {
27383
27443
  targetType = method;
27384
27444
  }
27385
- let sourceType = basic_1.StringType.get();
27445
+ let sourceType = undefined;
27386
27446
  if (child.get() instanceof Expressions.Source) {
27387
27447
  sourceType = source_1.Source.runSyntax(child, input, targetType);
27388
27448
  }
27449
+ else if (child.get() instanceof Expressions.ConstantString) {
27450
+ sourceType = constant_1.Constant.runSyntax(child);
27451
+ }
27389
27452
  if (sourceType === undefined) {
27390
27453
  const message = "No source type determined, method source";
27391
27454
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
@@ -28998,7 +29061,7 @@ class Source {
28998
29061
  if (context instanceof basic_1.FloatType && found instanceof basic_1.IntegerType) {
28999
29062
  return context;
29000
29063
  }
29001
- else if (context instanceof basic_1.IntegerType && (found === null || found === void 0 ? void 0 : found.isGeneric())) {
29064
+ else if ((context instanceof basic_1.IntegerType || context instanceof basic_1.FloatType) && (found === null || found === void 0 ? void 0 : found.isGeneric())) {
29002
29065
  return context;
29003
29066
  }
29004
29067
  else {
@@ -45988,13 +46051,13 @@ class Help {
45988
46051
  }
45989
46052
  static dumpABAP(file, reg, textDocument, position) {
45990
46053
  let content = "";
45991
- content = `
45992
- <a href="#_tokens" rel="no-refresh">Tokens</a> |
45993
- <a href="#_statements" rel="no-refresh">Statements</a> |
45994
- <a href="#_structure" rel="no-refresh">Structure</a> |
45995
- <a href="#_files" rel="no-refresh">Files</a> |
45996
- <a href="#_info" rel="no-refresh">Info Dump</a>
45997
- <hr>
46054
+ content = `
46055
+ <a href="#_tokens" rel="no-refresh">Tokens</a> |
46056
+ <a href="#_statements" rel="no-refresh">Statements</a> |
46057
+ <a href="#_structure" rel="no-refresh">Structure</a> |
46058
+ <a href="#_files" rel="no-refresh">Files</a> |
46059
+ <a href="#_info" rel="no-refresh">Info Dump</a>
46060
+ <hr>
45998
46061
  ` +
45999
46062
  "<tt>" + textDocument.uri + " (" +
46000
46063
  (position.line + 1) + ", " +
@@ -46149,9 +46212,9 @@ class Help {
46149
46212
  return ret + "</ul>";
46150
46213
  }
46151
46214
  static tokens(file) {
46152
- let inner = `<table><tr><td><b>String</b></td><td><b>Type</b></td>
46153
- <td><b>Row</b></td><td><b>Column</b></td>
46154
- <td><b>vRow</b></td><td><b>vColumn</b></td>
46215
+ let inner = `<table><tr><td><b>String</b></td><td><b>Type</b></td>
46216
+ <td><b>Row</b></td><td><b>Column</b></td>
46217
+ <td><b>vRow</b></td><td><b>vColumn</b></td>
46155
46218
  </tr>`;
46156
46219
  for (const token of file.getTokens()) {
46157
46220
  const tStart = token.getStart();
@@ -56461,7 +56524,7 @@ class Registry {
56461
56524
  }
56462
56525
  static abaplintVersion() {
56463
56526
  // magic, see build script "version.sh"
56464
- return "2.119.24";
56527
+ return "2.119.26";
56465
56528
  }
56466
56529
  getDDICReferences() {
56467
56530
  return this.ddicReferences;
@@ -56801,10 +56864,10 @@ class SevenBitAscii {
56801
56864
  key: "7bit_ascii",
56802
56865
  title: "Check for 7bit ascii",
56803
56866
  shortDescription: `Only allow characters from the 7bit ASCII set.`,
56804
- extendedInformation: `https://docs.abapopenchecks.org/checks/05/
56805
-
56806
- https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
56807
-
56867
+ extendedInformation: `https://docs.abapopenchecks.org/checks/05/
56868
+
56869
+ https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
56870
+
56808
56871
  Checkes files with extensions ".abap" and ".asddls"`,
56809
56872
  tags: [_irule_1.RuleTag.SingleFile],
56810
56873
  badExample: `WRITE '뽑'.`,
@@ -57010,10 +57073,10 @@ class Abapdoc extends _abap_rule_1.ABAPRule {
57010
57073
  key: "abapdoc",
57011
57074
  title: "Check abapdoc",
57012
57075
  shortDescription: `Various checks regarding abapdoc.`,
57013
- extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
57014
-
57015
- Plus class and interface definitions.
57016
-
57076
+ extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
57077
+
57078
+ Plus class and interface definitions.
57079
+
57017
57080
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#abap-doc-only-for-public-apis`,
57018
57081
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
57019
57082
  };
@@ -57150,27 +57213,27 @@ class AddTestAttributes extends _abap_rule_1.ABAPRule {
57150
57213
  title: "Add test attributes for tests classes with test methods",
57151
57214
  shortDescription: `Add test attributes DURATION and RISK LEVEL for tests classes with test methods`,
57152
57215
  tags: [_irule_1.RuleTag.SingleFile],
57153
- badExample: `CLASS ltcl_test1 DEFINITION FINAL FOR TESTING.
57154
- PUBLIC SECTION.
57155
- PROTECTED SECTION.
57156
- PRIVATE SECTION.
57157
- METHODS test FOR TESTING RAISING cx_static_check.
57158
- ENDCLASS.
57159
-
57160
- CLASS ltcl_test1 IMPLEMENTATION.
57161
- METHOD test.
57162
- ENDMETHOD.
57216
+ badExample: `CLASS ltcl_test1 DEFINITION FINAL FOR TESTING.
57217
+ PUBLIC SECTION.
57218
+ PROTECTED SECTION.
57219
+ PRIVATE SECTION.
57220
+ METHODS test FOR TESTING RAISING cx_static_check.
57221
+ ENDCLASS.
57222
+
57223
+ CLASS ltcl_test1 IMPLEMENTATION.
57224
+ METHOD test.
57225
+ ENDMETHOD.
57163
57226
  ENDCLASS.`,
57164
- goodExample: `CLASS ltcl_test2 DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
57165
- PUBLIC SECTION.
57166
- PROTECTED SECTION.
57167
- PRIVATE SECTION.
57168
- METHODS test FOR TESTING RAISING cx_static_check.
57169
- ENDCLASS.
57170
-
57171
- CLASS ltcl_test2 IMPLEMENTATION.
57172
- METHOD test.
57173
- ENDMETHOD.
57227
+ goodExample: `CLASS ltcl_test2 DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
57228
+ PUBLIC SECTION.
57229
+ PROTECTED SECTION.
57230
+ PRIVATE SECTION.
57231
+ METHODS test FOR TESTING RAISING cx_static_check.
57232
+ ENDCLASS.
57233
+
57234
+ CLASS ltcl_test2 IMPLEMENTATION.
57235
+ METHOD test.
57236
+ ENDMETHOD.
57174
57237
  ENDCLASS.`,
57175
57238
  };
57176
57239
  }
@@ -57323,49 +57386,49 @@ class AlignParameters extends _abap_rule_1.ABAPRule {
57323
57386
  key: "align_parameters",
57324
57387
  title: "Align Parameters",
57325
57388
  shortDescription: `Checks for vertially aligned parameters`,
57326
- extendedInformation: `Checks:
57327
- * function module calls
57328
- * method calls
57329
- * VALUE constructors
57330
- * NEW constructors
57331
- * RAISE EXCEPTION statements
57332
- * CREATE OBJECT statements
57333
- * RAISE EVENT statements
57334
-
57335
- https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
57336
-
57337
- Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
57338
-
57339
- If parameters are on the same row, no issues are reported, see
57389
+ extendedInformation: `Checks:
57390
+ * function module calls
57391
+ * method calls
57392
+ * VALUE constructors
57393
+ * NEW constructors
57394
+ * RAISE EXCEPTION statements
57395
+ * CREATE OBJECT statements
57396
+ * RAISE EVENT statements
57397
+
57398
+ https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
57399
+
57400
+ Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
57401
+
57402
+ If parameters are on the same row, no issues are reported, see
57340
57403
  https://rules.abaplint.org/max_one_method_parameter_per_line/ for splitting parameters to lines`,
57341
57404
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
57342
- badExample: `CALL FUNCTION 'FOOBAR'
57343
- EXPORTING
57344
- foo = 2
57345
- parameter = 3.
57346
-
57347
- foobar( moo = 1
57348
- param = 1 ).
57349
-
57350
- foo = VALUE #(
57351
- foo = bar
57405
+ badExample: `CALL FUNCTION 'FOOBAR'
57406
+ EXPORTING
57407
+ foo = 2
57408
+ parameter = 3.
57409
+
57410
+ foobar( moo = 1
57411
+ param = 1 ).
57412
+
57413
+ foo = VALUE #(
57414
+ foo = bar
57352
57415
  moo = 2 ).`,
57353
- goodExample: `CALL FUNCTION 'FOOBAR'
57354
- EXPORTING
57355
- foo = 2
57356
- parameter = 3.
57357
-
57358
- foobar( moo = 1
57359
- param = 1 ).
57360
-
57361
- foo = VALUE #(
57362
- foo = bar
57363
- moo = 2 ).
57364
-
57365
- DATA(sdf) = VALUE type(
57366
- common_val = 2
57367
- another_common = 5
57368
- ( row_value = 4
57416
+ goodExample: `CALL FUNCTION 'FOOBAR'
57417
+ EXPORTING
57418
+ foo = 2
57419
+ parameter = 3.
57420
+
57421
+ foobar( moo = 1
57422
+ param = 1 ).
57423
+
57424
+ foo = VALUE #(
57425
+ foo = bar
57426
+ moo = 2 ).
57427
+
57428
+ DATA(sdf) = VALUE type(
57429
+ common_val = 2
57430
+ another_common = 5
57431
+ ( row_value = 4
57369
57432
  value_foo = 5 ) ).`,
57370
57433
  };
57371
57434
  }
@@ -57799,37 +57862,37 @@ class AlignTypeExpressions extends _abap_rule_1.ABAPRule {
57799
57862
  key: "align_type_expressions",
57800
57863
  title: "Align TYPE expressions",
57801
57864
  shortDescription: `Align TYPE expressions in statements`,
57802
- extendedInformation: `
57803
- Currently works for METHODS + BEGIN OF
57804
-
57805
- If BEGIN OF has an INCLUDE TYPE its ignored
57806
-
57807
- Also note that clean ABAP does not recommend aligning TYPE clauses:
57865
+ extendedInformation: `
57866
+ Currently works for METHODS + BEGIN OF
57867
+
57868
+ If BEGIN OF has an INCLUDE TYPE its ignored
57869
+
57870
+ Also note that clean ABAP does not recommend aligning TYPE clauses:
57808
57871
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-align-type-clauses`,
57809
57872
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix],
57810
- badExample: `
57811
- TYPES: BEGIN OF foo,
57812
- bar TYPE i,
57813
- foobar TYPE i,
57814
- END OF foo.
57815
-
57816
- INTERFACE lif.
57817
- METHODS bar
57818
- IMPORTING
57819
- foo TYPE i
57820
- foobar TYPE i.
57873
+ badExample: `
57874
+ TYPES: BEGIN OF foo,
57875
+ bar TYPE i,
57876
+ foobar TYPE i,
57877
+ END OF foo.
57878
+
57879
+ INTERFACE lif.
57880
+ METHODS bar
57881
+ IMPORTING
57882
+ foo TYPE i
57883
+ foobar TYPE i.
57821
57884
  ENDINTERFACE.`,
57822
- goodExample: `
57823
- TYPES: BEGIN OF foo,
57824
- bar TYPE i,
57825
- foobar TYPE i,
57826
- END OF foo.
57827
-
57828
- INTERFACE lif.
57829
- METHODS bar
57830
- IMPORTING
57831
- foo TYPE i
57832
- foobar TYPE i.
57885
+ goodExample: `
57886
+ TYPES: BEGIN OF foo,
57887
+ bar TYPE i,
57888
+ foobar TYPE i,
57889
+ END OF foo.
57890
+
57891
+ INTERFACE lif.
57892
+ METHODS bar
57893
+ IMPORTING
57894
+ foo TYPE i
57895
+ foobar TYPE i.
57833
57896
  ENDINTERFACE.`,
57834
57897
  };
57835
57898
  }
@@ -58129,16 +58192,16 @@ class AmbiguousStatement extends _abap_rule_1.ABAPRule {
58129
58192
  return {
58130
58193
  key: "ambiguous_statement",
58131
58194
  title: "Check for ambigious statements",
58132
- shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
58133
- Add "TABLE" keyword or "@" for escaping SQL variables
58134
-
58195
+ shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
58196
+ Add "TABLE" keyword or "@" for escaping SQL variables
58197
+
58135
58198
  Only works if the target version is 740sp05 or above`,
58136
58199
  tags: [_irule_1.RuleTag.SingleFile],
58137
- badExample: `DELETE foo FROM bar.
58200
+ badExample: `DELETE foo FROM bar.
58138
58201
  MODIFY foo FROM bar.`,
58139
- goodExample: `DELETE foo FROM @bar.
58140
- DELETE TABLE itab FROM 2.
58141
- MODIFY zfoo FROM @wa.
58202
+ goodExample: `DELETE foo FROM @bar.
58203
+ DELETE TABLE itab FROM 2.
58204
+ MODIFY zfoo FROM @wa.
58142
58205
  MODIFY TABLE foo FROM bar.`,
58143
58206
  };
58144
58207
  }
@@ -58254,16 +58317,16 @@ class AvoidUse extends _abap_rule_1.ABAPRule {
58254
58317
  key: "avoid_use",
58255
58318
  title: "Avoid use of certain statements",
58256
58319
  shortDescription: `Detects usage of certain statements.`,
58257
- extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
58258
-
58259
- Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
58260
-
58261
- STATICS: use CLASS-DATA instead
58262
-
58263
- DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
58264
-
58265
- TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
58266
-
58320
+ extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
58321
+
58322
+ Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
58323
+
58324
+ STATICS: use CLASS-DATA instead
58325
+
58326
+ DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
58327
+
58328
+ TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
58329
+
58267
58330
  BREAK points`,
58268
58331
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
58269
58332
  };
@@ -58395,11 +58458,11 @@ class BeginEndNames extends _abap_rule_1.ABAPRule {
58395
58458
  title: "Check BEGIN END names",
58396
58459
  shortDescription: `Check BEGIN OF and END OF names match, plus there must be statements between BEGIN and END`,
58397
58460
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
58398
- badExample: `DATA: BEGIN OF stru,
58399
- field TYPE i,
58461
+ badExample: `DATA: BEGIN OF stru,
58462
+ field TYPE i,
58400
58463
  END OF structure_not_the_same.`,
58401
- goodExample: `DATA: BEGIN OF stru,
58402
- field TYPE i,
58464
+ goodExample: `DATA: BEGIN OF stru,
58465
+ field TYPE i,
58403
58466
  END OF stru.`,
58404
58467
  };
58405
58468
  }
@@ -58496,20 +58559,20 @@ class BeginSingleInclude extends _abap_rule_1.ABAPRule {
58496
58559
  title: "BEGIN contains single INCLUDE",
58497
58560
  shortDescription: `Finds TYPE BEGIN with just one INCLUDE TYPE, and DATA with single INCLUDE STRUCTURE`,
58498
58561
  tags: [_irule_1.RuleTag.SingleFile],
58499
- badExample: `TYPES: BEGIN OF dummy1.
58500
- INCLUDE TYPE dselc.
58501
- TYPES: END OF dummy1.
58502
-
58503
- DATA BEGIN OF foo.
58504
- INCLUDE STRUCTURE syst.
58505
- DATA END OF foo.
58506
-
58507
- STATICS BEGIN OF bar.
58508
- INCLUDE STRUCTURE syst.
58562
+ badExample: `TYPES: BEGIN OF dummy1.
58563
+ INCLUDE TYPE dselc.
58564
+ TYPES: END OF dummy1.
58565
+
58566
+ DATA BEGIN OF foo.
58567
+ INCLUDE STRUCTURE syst.
58568
+ DATA END OF foo.
58569
+
58570
+ STATICS BEGIN OF bar.
58571
+ INCLUDE STRUCTURE syst.
58509
58572
  STATICS END OF bar.`,
58510
- goodExample: `DATA BEGIN OF foo.
58511
- DATA field TYPE i.
58512
- INCLUDE STRUCTURE dselc.
58573
+ goodExample: `DATA BEGIN OF foo.
58574
+ DATA field TYPE i.
58575
+ INCLUDE STRUCTURE dselc.
58513
58576
  DATA END OF foo.`,
58514
58577
  };
58515
58578
  }
@@ -58603,9 +58666,9 @@ class CallTransactionAuthorityCheck extends _abap_rule_1.ABAPRule {
58603
58666
  extendedInformation: `https://docs.abapopenchecks.org/checks/54/`,
58604
58667
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
58605
58668
  badExample: `CALL TRANSACTION 'FOO'.`,
58606
- goodExample: `TRY.
58607
- CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
58608
- CATCH cx_sy_authorization_error.
58669
+ goodExample: `TRY.
58670
+ CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
58671
+ CATCH cx_sy_authorization_error.
58609
58672
  ENDTRY.`,
58610
58673
  };
58611
58674
  }
@@ -58761,15 +58824,15 @@ class CDSAssociationName {
58761
58824
  key: "cds_association_name",
58762
58825
  title: "CDS Association Name",
58763
58826
  shortDescription: `CDS association names should start with an underscore`,
58764
- extendedInformation: `By convention, CDS association names must start with an underscore character.
58765
-
58827
+ extendedInformation: `By convention, CDS association names must start with an underscore character.
58828
+
58766
58829
  https://help.sap.com/docs/abap-cloud/abap-data-models/cds-associations`,
58767
58830
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Naming],
58768
- badExample: `define view entity test as select from source
58769
- association [1..1] to target as Assoc on Assoc.id = source.id
58831
+ badExample: `define view entity test as select from source
58832
+ association [1..1] to target as Assoc on Assoc.id = source.id
58770
58833
  { key id }`,
58771
- goodExample: `define view entity test as select from source
58772
- association [1..1] to target as _Assoc on _Assoc.id = source.id
58834
+ goodExample: `define view entity test as select from source
58835
+ association [1..1] to target as _Assoc on _Assoc.id = source.id
58773
58836
  { key id }`,
58774
58837
  };
58775
58838
  }
@@ -58847,10 +58910,10 @@ class CDSCommentStyle {
58847
58910
  key: "cds_comment_style",
58848
58911
  title: "CDS Comment Style",
58849
58912
  shortDescription: `Check for obsolete comment style`,
58850
- extendedInformation: `Check for obsolete comment style
58851
-
58852
- Comments starting with "--" are considered obsolete
58853
-
58913
+ extendedInformation: `Check for obsolete comment style
58914
+
58915
+ Comments starting with "--" are considered obsolete
58916
+
58854
58917
  https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abencds_general_syntax_rules.htm`,
58855
58918
  tags: [_irule_1.RuleTag.SingleFile],
58856
58919
  badExample: "-- this is a comment",
@@ -58917,19 +58980,19 @@ class CDSFieldOrder {
58917
58980
  title: "CDS Field Order",
58918
58981
  shortDescription: `Checks that CDS key fields are listed first and associations last in the field list`,
58919
58982
  tags: [_irule_1.RuleTag.SingleFile],
58920
- badExample: `define view entity test as select from source
58921
- association [1..1] to target as _Assoc on _Assoc.id = source.id
58922
- {
58923
- field1,
58924
- key id,
58925
- _Assoc
58983
+ badExample: `define view entity test as select from source
58984
+ association [1..1] to target as _Assoc on _Assoc.id = source.id
58985
+ {
58986
+ field1,
58987
+ key id,
58988
+ _Assoc
58926
58989
  }`,
58927
- goodExample: `define view entity test as select from source
58928
- association [1..1] to target as _Assoc on _Assoc.id = source.id
58929
- {
58930
- key id,
58931
- field1,
58932
- _Assoc
58990
+ goodExample: `define view entity test as select from source
58991
+ association [1..1] to target as _Assoc on _Assoc.id = source.id
58992
+ {
58993
+ key id,
58994
+ field1,
58995
+ _Assoc
58933
58996
  }`,
58934
58997
  };
58935
58998
  }
@@ -59044,10 +59107,10 @@ class CDSLegacyView {
59044
59107
  key: "cds_legacy_view",
59045
59108
  title: "CDS Legacy View",
59046
59109
  shortDescription: `Identify CDS Legacy Views`,
59047
- extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
59048
-
59049
- https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
59050
-
59110
+ extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
59111
+
59112
+ https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
59113
+
59051
59114
  v755 and up`,
59052
59115
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Upport],
59053
59116
  };
@@ -59142,13 +59205,13 @@ class CDSNaming {
59142
59205
  key: "cds_naming",
59143
59206
  title: "CDS Naming",
59144
59207
  shortDescription: `Checks CDS naming conventions based on the VDM prefix rules`,
59145
- extendedInformation: `Validates that CDS entity names follow the expected prefix conventions:
59146
- I_ for interface views, C_ for consumption views, R_ for restricted reuse views,
59147
- P_ for private views, A_ for remote API views, X_ for view extends,
59148
- E_ for extension include views, F_ for derivation functions, D_ for abstract entities.
59149
-
59150
- Names must also start with Z after the prefix (custom namespace).
59151
-
59208
+ extendedInformation: `Validates that CDS entity names follow the expected prefix conventions:
59209
+ I_ for interface views, C_ for consumption views, R_ for restricted reuse views,
59210
+ P_ for private views, A_ for remote API views, X_ for view extends,
59211
+ E_ for extension include views, F_ for derivation functions, D_ for abstract entities.
59212
+
59213
+ Names must also start with Z after the prefix (custom namespace).
59214
+
59152
59215
  https://help.sap.com/docs/SAP_S4HANA_ON-PREMISE/ee6ff9b281d8448f96b4fe6c89f2bdc8/8a8cee943ef944fe8936f4cc60ba9bc1.html`,
59153
59216
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Naming],
59154
59217
  badExample: `define view entity ZMY_VIEW as select from source { key id }`,
@@ -59344,10 +59407,10 @@ class ChainMainlyDeclarations extends _abap_rule_1.ABAPRule {
59344
59407
  key: "chain_mainly_declarations",
59345
59408
  title: "Chain mainly declarations",
59346
59409
  shortDescription: `Chain mainly declarations, allows chaining for the configured statements, reports errors for other statements.`,
59347
- extendedInformation: `
59348
- https://docs.abapopenchecks.org/checks/23/
59349
-
59350
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
59410
+ extendedInformation: `
59411
+ https://docs.abapopenchecks.org/checks/23/
59412
+
59413
+ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
59351
59414
  `,
59352
59415
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
59353
59416
  badExample: `CALL METHOD: bar.`,
@@ -59523,17 +59586,17 @@ class ChangeIfToCase extends _abap_rule_1.ABAPRule {
59523
59586
  title: "Change IF to CASE",
59524
59587
  shortDescription: `Finds IF constructs that can be changed to CASE`,
59525
59588
  // eslint-disable-next-line max-len
59526
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
59527
-
59589
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
59590
+
59528
59591
  If the first comparison is a boolean compare, no issue is reported.`,
59529
59592
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
59530
- badExample: `IF l_fcat-fieldname EQ 'FOO'.
59531
- ELSEIF l_fcat-fieldname = 'BAR'
59532
- OR l_fcat-fieldname = 'MOO'.
59593
+ badExample: `IF l_fcat-fieldname EQ 'FOO'.
59594
+ ELSEIF l_fcat-fieldname = 'BAR'
59595
+ OR l_fcat-fieldname = 'MOO'.
59533
59596
  ENDIF.`,
59534
- goodExample: `CASE l_fcat-fieldname.
59535
- WHEN 'FOO'.
59536
- WHEN 'BAR' OR 'MOO'.
59597
+ goodExample: `CASE l_fcat-fieldname.
59598
+ WHEN 'FOO'.
59599
+ WHEN 'BAR' OR 'MOO'.
59537
59600
  ENDCASE.`,
59538
59601
  };
59539
59602
  }
@@ -59670,8 +59733,8 @@ class CheckAbstract extends _abap_rule_1.ABAPRule {
59670
59733
  return {
59671
59734
  key: "check_abstract",
59672
59735
  title: "Check abstract methods and classes",
59673
- shortDescription: `Checks abstract methods and classes:
59674
- - class defined as abstract and final,
59736
+ shortDescription: `Checks abstract methods and classes:
59737
+ - class defined as abstract and final,
59675
59738
  - non-abstract class contains abstract methods`,
59676
59739
  extendedInformation: `If a class defines only constants, use an interface instead`,
59677
59740
  tags: [_irule_1.RuleTag.SingleFile],
@@ -59753,11 +59816,11 @@ class CheckComments extends _abap_rule_1.ABAPRule {
59753
59816
  return {
59754
59817
  key: "check_comments",
59755
59818
  title: "Check Comments",
59756
- shortDescription: `
59819
+ shortDescription: `
59757
59820
  Various checks for comment usage.`,
59758
- extendedInformation: `
59759
- Detects end of line comments. Comments starting with "#EC" or "##" are ignored
59760
-
59821
+ extendedInformation: `
59822
+ Detects end of line comments. Comments starting with "#EC" or "##" are ignored
59823
+
59761
59824
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#put-comments-before-the-statement-they-relate-to`,
59762
59825
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
59763
59826
  badExample: `WRITE 2. " descriptive comment`,
@@ -59932,10 +59995,10 @@ class CheckInclude {
59932
59995
  key: "check_include",
59933
59996
  title: "Check INCLUDEs",
59934
59997
  shortDescription: `Checks INCLUDE statements`,
59935
- extendedInformation: `
59936
- * Reports unused includes
59937
- * Errors if the includes are not found
59938
- * Error if including a main program
59998
+ extendedInformation: `
59999
+ * Reports unused includes
60000
+ * Errors if the includes are not found
60001
+ * Error if including a main program
59939
60002
  * Skips ZX* includes`,
59940
60003
  tags: [_irule_1.RuleTag.Syntax],
59941
60004
  };
@@ -60015,14 +60078,14 @@ class CheckSubrc extends _abap_rule_1.ABAPRule {
60015
60078
  key: "check_subrc",
60016
60079
  title: "Check sy-subrc",
60017
60080
  shortDescription: `Check sy-subrc`,
60018
- extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
60019
-
60020
- If sy-dbcnt is checked after database statements, it is considered okay.
60021
-
60022
- "SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
60023
-
60024
- If IS ASSIGNED is checked after assigning, it is considered okay.
60025
-
60081
+ extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
60082
+
60083
+ If sy-dbcnt is checked after database statements, it is considered okay.
60084
+
60085
+ "SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
60086
+
60087
+ If IS ASSIGNED is checked after assigning, it is considered okay.
60088
+
60026
60089
  FIND statement with MATCH COUNT is considered okay if subrc is not checked`,
60027
60090
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
60028
60091
  pseudoComment: "EC CI_SUBRC",
@@ -60601,17 +60664,17 @@ class ClassicExceptionsOverlap extends _abap_rule_1.ABAPRule {
60601
60664
  shortDescription: `Find overlapping classic exceptions`,
60602
60665
  extendedInformation: `When debugging its typically good to know exactly which exception is caught`,
60603
60666
  tags: [_irule_1.RuleTag.SingleFile],
60604
- badExample: `CALL FUNCTION 'SOMETHING'
60605
- EXCEPTIONS
60606
- system_failure = 1 MESSAGE lv_message
60607
- communication_failure = 1 MESSAGE lv_message
60608
- resource_failure = 1
60667
+ badExample: `CALL FUNCTION 'SOMETHING'
60668
+ EXCEPTIONS
60669
+ system_failure = 1 MESSAGE lv_message
60670
+ communication_failure = 1 MESSAGE lv_message
60671
+ resource_failure = 1
60609
60672
  OTHERS = 1.`,
60610
- goodExample: `CALL FUNCTION 'SOMETHING'
60611
- EXCEPTIONS
60612
- system_failure = 1 MESSAGE lv_message
60613
- communication_failure = 2 MESSAGE lv_message
60614
- resource_failure = 3
60673
+ goodExample: `CALL FUNCTION 'SOMETHING'
60674
+ EXCEPTIONS
60675
+ system_failure = 1 MESSAGE lv_message
60676
+ communication_failure = 2 MESSAGE lv_message
60677
+ resource_failure = 3
60615
60678
  OTHERS = 4.`,
60616
60679
  };
60617
60680
  }
@@ -60876,7 +60939,7 @@ class CommentedCode extends _abap_rule_1.ABAPRule {
60876
60939
  key: "commented_code",
60877
60940
  title: "Find commented code",
60878
60941
  shortDescription: `Detects usage of commented out code.`,
60879
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it
60942
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it
60880
60943
  https://docs.abapopenchecks.org/checks/14/`,
60881
60944
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
60882
60945
  badExample: `* WRITE 'hello world'.`,
@@ -61110,10 +61173,10 @@ class ConstructorVisibilityPublic {
61110
61173
  key: "constructor_visibility_public",
61111
61174
  title: "Check constructor visibility is public",
61112
61175
  shortDescription: `Constructor must be placed in the public section, even if the class is not CREATE PUBLIC.`,
61113
- extendedInformation: `
61114
- This only applies to global classes.
61115
-
61116
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
61176
+ extendedInformation: `
61177
+ This only applies to global classes.
61178
+
61179
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
61117
61180
  https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abeninstance_constructor_guidl.htm`,
61118
61181
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
61119
61182
  };
@@ -61188,8 +61251,8 @@ class ContainsTab extends _abap_rule_1.ABAPRule {
61188
61251
  key: "contains_tab",
61189
61252
  title: "Code contains tab",
61190
61253
  shortDescription: `Checks for usage of tabs (enable to enforce spaces)`,
61191
- extendedInformation: `
61192
- https://docs.abapopenchecks.org/checks/09/
61254
+ extendedInformation: `
61255
+ https://docs.abapopenchecks.org/checks/09/
61193
61256
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
61194
61257
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
61195
61258
  badExample: `\tWRITE 'hello world'.`,
@@ -61276,10 +61339,10 @@ class CyclicOO {
61276
61339
  key: "cyclic_oo",
61277
61340
  title: "Cyclic OO",
61278
61341
  shortDescription: `Finds cyclic/circular OO references`,
61279
- extendedInformation: `Runs for global INTF + CLAS objects
61280
-
61281
- Objects must be without syntax errors for this rule to take effect
61282
-
61342
+ extendedInformation: `Runs for global INTF + CLAS objects
61343
+
61344
+ Objects must be without syntax errors for this rule to take effect
61345
+
61283
61346
  References in testclass includes are ignored`,
61284
61347
  };
61285
61348
  }
@@ -61522,7 +61585,7 @@ class DangerousStatement extends _abap_rule_1.ABAPRule {
61522
61585
  key: "dangerous_statement",
61523
61586
  title: "Dangerous statement",
61524
61587
  shortDescription: `Detects potentially dangerous statements`,
61525
- extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
61588
+ extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
61526
61589
  dynamic SQL can potentially create SQL injection problems`,
61527
61590
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
61528
61591
  };
@@ -61729,13 +61792,13 @@ class DefinitionsTop extends _abap_rule_1.ABAPRule {
61729
61792
  shortDescription: `Checks that definitions are placed at the beginning of METHODs, FORMs and FUNCTIONs.`,
61730
61793
  extendedInformation: `https://docs.abapopenchecks.org/checks/17/`,
61731
61794
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
61732
- badExample: `FORM foo.
61733
- WRITE 'hello'.
61734
- DATA int TYPE i.
61795
+ badExample: `FORM foo.
61796
+ WRITE 'hello'.
61797
+ DATA int TYPE i.
61735
61798
  ENDFORM.`,
61736
- goodExample: `FORM foo.
61737
- DATA int TYPE i.
61738
- WRITE 'hello'.
61799
+ goodExample: `FORM foo.
61800
+ DATA int TYPE i.
61801
+ WRITE 'hello'.
61739
61802
  ENDFORM.`,
61740
61803
  };
61741
61804
  }
@@ -62284,39 +62347,39 @@ class Downport {
62284
62347
  key: "downport",
62285
62348
  title: "Downport statement",
62286
62349
  shortDescription: `Downport functionality`,
62287
- extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with
62288
- a higher level language version. If successful, various rules are applied to downport the statement.
62289
- Target downport version is always v702, thus rule is only enabled if target version is v702.
62290
-
62291
- Current rules:
62292
- * NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/
62293
- * DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/
62294
- * FIELD-SYMBOL() definitions are outlined
62295
- * CONV is outlined
62296
- * COND is outlined
62297
- * REDUCE is outlined
62298
- * SWITCH is outlined
62299
- * FILTER is outlined
62300
- * APPEND expression is outlined
62301
- * INSERT expression is outlined
62302
- * EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/
62303
- * CAST changed to ?=
62304
- * LOOP AT method_call( ) is outlined
62305
- * VALUE # with structure fields
62306
- * VALUE # with internal table lines
62307
- * Table Expressions are outlined
62308
- * SELECT INTO @DATA definitions are outlined
62309
- * Some occurrences of string template formatting option ALPHA changed to function module call
62310
- * SELECT/INSERT/MODIFY/DELETE/UPDATE "," in field list removed, "@" in source/targets removed
62311
- * PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods
62312
- * RAISE EXCEPTION ... MESSAGE
62313
- * Moving with +=, -=, /=, *=, &&= is expanded
62314
- * line_exists and line_index is downported to READ TABLE
62315
- * ENUMs, but does not nessesarily give the correct type and value
62316
- * MESSAGE with non simple source
62317
-
62318
- Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.
62319
-
62350
+ extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with
62351
+ a higher level language version. If successful, various rules are applied to downport the statement.
62352
+ Target downport version is always v702, thus rule is only enabled if target version is v702.
62353
+
62354
+ Current rules:
62355
+ * NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/
62356
+ * DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/
62357
+ * FIELD-SYMBOL() definitions are outlined
62358
+ * CONV is outlined
62359
+ * COND is outlined
62360
+ * REDUCE is outlined
62361
+ * SWITCH is outlined
62362
+ * FILTER is outlined
62363
+ * APPEND expression is outlined
62364
+ * INSERT expression is outlined
62365
+ * EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/
62366
+ * CAST changed to ?=
62367
+ * LOOP AT method_call( ) is outlined
62368
+ * VALUE # with structure fields
62369
+ * VALUE # with internal table lines
62370
+ * Table Expressions are outlined
62371
+ * SELECT INTO @DATA definitions are outlined
62372
+ * Some occurrences of string template formatting option ALPHA changed to function module call
62373
+ * SELECT/INSERT/MODIFY/DELETE/UPDATE "," in field list removed, "@" in source/targets removed
62374
+ * PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods
62375
+ * RAISE EXCEPTION ... MESSAGE
62376
+ * Moving with +=, -=, /=, *=, &&= is expanded
62377
+ * line_exists and line_index is downported to READ TABLE
62378
+ * ENUMs, but does not nessesarily give the correct type and value
62379
+ * MESSAGE with non simple source
62380
+
62381
+ Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.
62382
+
62320
62383
  Make sure to test the downported code, it might not always be completely correct.`,
62321
62384
  tags: [_irule_1.RuleTag.Downport, _irule_1.RuleTag.Quickfix],
62322
62385
  };
@@ -62931,10 +62994,10 @@ Make sure to test the downported code, it might not always be completely correct
62931
62994
  const fieldName = f.concatTokens();
62932
62995
  fieldDefinition += indentation + " " + fieldName + " TYPE " + tableName + "-" + fieldName + ",\n";
62933
62996
  }
62934
- fieldDefinition = `DATA: BEGIN OF ${name},
62997
+ fieldDefinition = `DATA: BEGIN OF ${name},
62935
62998
  ${fieldDefinition}${indentation} END OF ${name}.`;
62936
62999
  }
62937
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
63000
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
62938
63001
  ${indentation}`);
62939
63002
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
62940
63003
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -62993,12 +63056,12 @@ ${indentation}`);
62993
63056
  }
62994
63057
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
62995
63058
  const name = ((_g = inlineData.findFirstExpression(Expressions.TargetField)) === null || _g === void 0 ? void 0 : _g.concatTokens()) || "error";
62996
- let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
62997
- ${fieldDefinitions}${indentation} END OF ${uniqueName}.
62998
- ${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.
63059
+ let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
63060
+ ${fieldDefinitions}${indentation} END OF ${uniqueName}.
63061
+ ${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.
62999
63062
  ${indentation}`);
63000
63063
  if (fieldDefinitions === "") {
63001
- fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.
63064
+ fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.
63002
63065
  ${indentation}`);
63003
63066
  }
63004
63067
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
@@ -63066,7 +63129,7 @@ ${indentation}`);
63066
63129
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
63067
63130
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
63068
63131
  const firstToken = high.getFirstToken();
63069
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
63132
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
63070
63133
  ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
63071
63134
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
63072
63135
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -63122,7 +63185,7 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
63122
63185
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
63123
63186
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
63124
63187
  const firstToken = high.getFirstToken();
63125
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
63188
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
63126
63189
  ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
63127
63190
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
63128
63191
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -63164,14 +63227,14 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
63164
63227
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
63165
63228
  const firstToken = high.getFirstToken();
63166
63229
  // note that the tabix restore should be done before throwing the exception
63167
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.
63168
- ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
63169
- ${indentation}${tabixBackup} = sy-tabix.
63170
- ${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.
63171
- ${indentation}sy-tabix = ${tabixBackup}.
63172
- ${indentation}IF sy-subrc <> 0.
63173
- ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
63174
- ${indentation}ENDIF.
63230
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.
63231
+ ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
63232
+ ${indentation}${tabixBackup} = sy-tabix.
63233
+ ${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.
63234
+ ${indentation}sy-tabix = ${tabixBackup}.
63235
+ ${indentation}IF sy-subrc <> 0.
63236
+ ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
63237
+ ${indentation}ENDIF.
63175
63238
  ${indentation}`);
63176
63239
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, startToken.getStart(), tableExpression.getLastToken().getEnd(), uniqueName);
63177
63240
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -63231,7 +63294,7 @@ ${indentation}`);
63231
63294
  const className = classNames[0].concatTokens();
63232
63295
  const targetName = (_b = target.findFirstExpression(Expressions.TargetField)) === null || _b === void 0 ? void 0 : _b.concatTokens();
63233
63296
  const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
63234
- const code = ` DATA ${targetName} TYPE REF TO ${className}.
63297
+ const code = ` DATA ${targetName} TYPE REF TO ${className}.
63235
63298
  ${indentation}CATCH ${className} INTO ${targetName}.`;
63236
63299
  const fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getStart(), node.getEnd(), code);
63237
63300
  return issue_1.Issue.atToken(lowFile, node.getFirstToken(), "Outline DATA", this.getMetadata().key, this.conf.severity, fix);
@@ -63399,17 +63462,17 @@ ${indentation}CATCH ${className} INTO ${targetName}.`;
63399
63462
  const uniqueName1 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
63400
63463
  const uniqueName2 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
63401
63464
  const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
63402
- let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
63403
- ${indentation}${uniqueName1}-msgid = ${id}.
63465
+ let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
63466
+ ${indentation}${uniqueName1}-msgid = ${id}.
63404
63467
  ${indentation}${uniqueName1}-msgno = ${number}.\n`;
63405
63468
  if (withs.length > 0) {
63406
- abap += `${indentation}${uniqueName1}-attr1 = 'IF_T100_DYN_MSG~MSGV1'.
63407
- ${indentation}${uniqueName1}-attr2 = 'IF_T100_DYN_MSG~MSGV2'.
63408
- ${indentation}${uniqueName1}-attr3 = 'IF_T100_DYN_MSG~MSGV3'.
63469
+ abap += `${indentation}${uniqueName1}-attr1 = 'IF_T100_DYN_MSG~MSGV1'.
63470
+ ${indentation}${uniqueName1}-attr2 = 'IF_T100_DYN_MSG~MSGV2'.
63471
+ ${indentation}${uniqueName1}-attr3 = 'IF_T100_DYN_MSG~MSGV3'.
63409
63472
  ${indentation}${uniqueName1}-attr4 = 'IF_T100_DYN_MSG~MSGV4'.\n`;
63410
63473
  }
63411
- abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
63412
- ${indentation}CREATE OBJECT ${uniqueName2}.
63474
+ abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
63475
+ ${indentation}CREATE OBJECT ${uniqueName2}.
63413
63476
  ${indentation}${uniqueName2}->if_t100_message~t100key = ${uniqueName1}.\n`;
63414
63477
  if (withs.length > 0) {
63415
63478
  abap += `${indentation}${uniqueName2}->if_t100_dyn_msg~msgty = 'E'.\n`;
@@ -63522,10 +63585,10 @@ ${indentation}${uniqueName2}->if_t100_message~t100key = ${uniqueName1}.\n`;
63522
63585
  let code = "";
63523
63586
  if (sourceRef.findFirstExpression(Expressions.TableExpression)) {
63524
63587
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
63525
- code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).
63526
- IF sy-subrc <> 0.
63527
- RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
63528
- ENDIF.
63588
+ code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).
63589
+ IF sy-subrc <> 0.
63590
+ RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
63591
+ ENDIF.
63529
63592
  GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
63530
63593
  }
63531
63594
  else {
@@ -63614,20 +63677,20 @@ GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
63614
63677
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
63615
63678
  const uniqueFS = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
63616
63679
  const uniqueNameIndex = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
63617
- code += ` items LIKE ${loopSourceName},
63618
- END OF ${groupTargetName}type.
63619
- DATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.
63620
- DATA ${uniqueName} LIKE LINE OF ${groupTargetName}tab.
63680
+ code += ` items LIKE ${loopSourceName},
63681
+ END OF ${groupTargetName}type.
63682
+ DATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.
63683
+ DATA ${uniqueName} LIKE LINE OF ${groupTargetName}tab.
63621
63684
  LOOP AT ${loopSourceName} ${(_l = high.findFirstExpression(Expressions.LoopTarget)) === null || _l === void 0 ? void 0 : _l.concatTokens()}.\n`;
63622
63685
  if (groupIndexName !== undefined) {
63623
63686
  code += `DATA(${uniqueNameIndex}) = sy-tabix.\n`;
63624
63687
  }
63625
- code += `READ TABLE ${groupTargetName}tab ASSIGNING FIELD-SYMBOL(<${uniqueFS}>) WITH KEY ${condition}.
63688
+ code += `READ TABLE ${groupTargetName}tab ASSIGNING FIELD-SYMBOL(<${uniqueFS}>) WITH KEY ${condition}.
63626
63689
  IF sy-subrc = 0.\n`;
63627
63690
  if (groupCountName !== undefined) {
63628
63691
  code += ` <${uniqueFS}>-${groupCountName} = <${uniqueFS}>-${groupCountName} + 1.\n`;
63629
63692
  }
63630
- code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
63693
+ code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
63631
63694
  ELSE.\n`;
63632
63695
  code += ` CLEAR ${uniqueName}.\n`;
63633
63696
  for (const c of group.findAllExpressions(Expressions.LoopGroupByComponent)) {
@@ -63648,8 +63711,8 @@ ELSE.\n`;
63648
63711
  }
63649
63712
  code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE ${uniqueName}-items.\n`;
63650
63713
  code += ` INSERT ${uniqueName} INTO TABLE ${groupTargetName}tab.\n`;
63651
- code += `ENDIF.
63652
- ENDLOOP.
63714
+ code += `ENDIF.
63715
+ ENDLOOP.
63653
63716
  LOOP AT ${groupTargetName}tab ${groupTarget}.`;
63654
63717
  let fix = edit_helper_1.EditHelper.replaceRange(lowFile, high.getFirstToken().getStart(), high.getLastToken().getEnd(), code);
63655
63718
  for (const l of ((_m = highFile.getStructure()) === null || _m === void 0 ? void 0 : _m.findAllStructures(Structures.Loop)) || []) {
@@ -63821,7 +63884,7 @@ LOOP AT ${groupTargetName}tab ${groupTarget}.`;
63821
63884
  const enumName = (_b = high.findExpressionAfterToken("ENUM")) === null || _b === void 0 ? void 0 : _b.concatTokens();
63822
63885
  const structureName = (_c = high.findExpressionAfterToken("STRUCTURE")) === null || _c === void 0 ? void 0 : _c.concatTokens();
63823
63886
  // all ENUMS are char like?
63824
- let code = `TYPES ${enumName} TYPE string.
63887
+ let code = `TYPES ${enumName} TYPE string.
63825
63888
  CONSTANTS: BEGIN OF ${structureName},\n`;
63826
63889
  let count = 1;
63827
63890
  for (const e of enumStructure.findDirectStatements(Statements.TypeEnum).concat(enumStructure.findDirectStatements(Statements.Type))) {
@@ -63865,14 +63928,14 @@ CONSTANTS: BEGIN OF ${structureName},\n`;
63865
63928
  const tabixBackup = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
63866
63929
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
63867
63930
  // restore tabix before exeption
63868
- const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.
63869
- ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
63870
- ${indentation}${tabixBackup} = sy-tabix.
63871
- ${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.
63872
- ${indentation}sy-tabix = ${tabixBackup}.
63873
- ${indentation}IF sy-subrc <> 0.
63874
- ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
63875
- ${indentation}ENDIF.
63931
+ const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.
63932
+ ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
63933
+ ${indentation}${tabixBackup} = sy-tabix.
63934
+ ${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.
63935
+ ${indentation}sy-tabix = ${tabixBackup}.
63936
+ ${indentation}IF sy-subrc <> 0.
63937
+ ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
63938
+ ${indentation}ENDIF.
63876
63939
  ${indentation}${uniqueName}`;
63877
63940
  const start = target.getFirstToken().getStart();
63878
63941
  const end = (_a = tableExpression.findDirectTokenByText("]")) === null || _a === void 0 ? void 0 : _a.getEnd();
@@ -63952,11 +64015,11 @@ ${indentation}${uniqueName}`;
63952
64015
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
63953
64016
  const source = (_b = child.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens();
63954
64017
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
63955
- const code = `DATA ${uniqueName} TYPE string.
63956
- ${indentation}CALL FUNCTION '${functionName}'
63957
- ${indentation} EXPORTING
63958
- ${indentation} input = ${source}
63959
- ${indentation} IMPORTING
64018
+ const code = `DATA ${uniqueName} TYPE string.
64019
+ ${indentation}CALL FUNCTION '${functionName}'
64020
+ ${indentation} EXPORTING
64021
+ ${indentation} input = ${source}
64022
+ ${indentation} IMPORTING
63960
64023
  ${indentation} output = ${uniqueName}.\n`;
63961
64024
  const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), code);
63962
64025
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, child.getFirstToken().getStart(), child.getLastToken().getEnd(), uniqueName);
@@ -65343,12 +65406,12 @@ class EasyToFindMessages {
65343
65406
  key: "easy_to_find_messages",
65344
65407
  title: "Easy to find messages",
65345
65408
  shortDescription: `Make messages easy to find`,
65346
- extendedInformation: `All messages must be statically referenced exactly once
65347
-
65348
- Only MESSAGE and RAISE statments are counted as static references
65349
-
65350
- Also see rule "message_exists"
65351
-
65409
+ extendedInformation: `All messages must be statically referenced exactly once
65410
+
65411
+ Only MESSAGE and RAISE statments are counted as static references
65412
+
65413
+ Also see rule "message_exists"
65414
+
65352
65415
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#make-messages-easy-to-find`,
65353
65416
  tags: [_irule_1.RuleTag.Styleguide],
65354
65417
  };
@@ -65429,13 +65492,13 @@ class EmptyEvent extends _abap_rule_1.ABAPRule {
65429
65492
  shortDescription: `Empty selection screen or list processing event block`,
65430
65493
  extendedInformation: ``,
65431
65494
  tags: [_irule_1.RuleTag.SingleFile],
65432
- badExample: `
65433
- INITIALIZATION.
65434
- WRITE 'hello'.
65495
+ badExample: `
65496
+ INITIALIZATION.
65497
+ WRITE 'hello'.
65435
65498
  END-OF-SELECTION.`,
65436
- goodExample: `
65437
- START-OF-SELECTION.
65438
- PERFORM sdf.
65499
+ goodExample: `
65500
+ START-OF-SELECTION.
65501
+ PERFORM sdf.
65439
65502
  COMMIT WORK.`,
65440
65503
  };
65441
65504
  }
@@ -65527,8 +65590,8 @@ class EmptyLineinStatement extends _abap_rule_1.ABAPRule {
65527
65590
  key: "empty_line_in_statement",
65528
65591
  title: "Find empty lines in statements",
65529
65592
  shortDescription: `Checks that statements do not contain empty lines.`,
65530
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
65531
-
65593
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
65594
+
65532
65595
  https://docs.abapopenchecks.org/checks/41/`,
65533
65596
  tags: [_irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
65534
65597
  badExample: `WRITE\n\nhello.`,
@@ -65704,13 +65767,13 @@ class EmptyStructure extends _abap_rule_1.ABAPRule {
65704
65767
  shortDescription: `Checks that the code does not contain empty blocks.`,
65705
65768
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-empty-if-branches`,
65706
65769
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
65707
- badExample: `IF foo = bar.
65708
- ENDIF.
65709
-
65710
- DO 2 TIMES.
65770
+ badExample: `IF foo = bar.
65771
+ ENDIF.
65772
+
65773
+ DO 2 TIMES.
65711
65774
  ENDDO.`,
65712
- goodExample: `LOOP AT itab WHERE qty = 0 OR date > sy-datum.
65713
- ENDLOOP.
65775
+ goodExample: `LOOP AT itab WHERE qty = 0 OR date > sy-datum.
65776
+ ENDLOOP.
65714
65777
  result = xsdbool( sy-subrc = 0 ).`,
65715
65778
  };
65716
65779
  }
@@ -65852,10 +65915,10 @@ class ExitOrCheck extends _abap_rule_1.ABAPRule {
65852
65915
  return {
65853
65916
  key: "exit_or_check",
65854
65917
  title: "Find EXIT or CHECK outside loops",
65855
- shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
65918
+ shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
65856
65919
  Use RETURN to leave procesing blocks instead.`,
65857
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
65858
- https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
65920
+ extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
65921
+ https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
65859
65922
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#check-vs-return`,
65860
65923
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
65861
65924
  };
@@ -65939,12 +66002,12 @@ class ExpandMacros extends _abap_rule_1.ABAPRule {
65939
66002
  key: "expand_macros",
65940
66003
  title: "Expand Macros",
65941
66004
  shortDescription: `Allows expanding macro calls with quick fixes`,
65942
- extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
65943
-
66005
+ extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
66006
+
65944
66007
  Note that macros/DEFINE cannot be used in the ABAP Cloud programming model`,
65945
- badExample: `DEFINE _hello.
65946
- WRITE 'hello'.
65947
- END-OF-DEFINITION.
66008
+ badExample: `DEFINE _hello.
66009
+ WRITE 'hello'.
66010
+ END-OF-DEFINITION.
65948
66011
  _hello.`,
65949
66012
  goodExample: `WRITE 'hello'.`,
65950
66013
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
@@ -66031,7 +66094,7 @@ class Exporting extends _abap_rule_1.ABAPRule {
66031
66094
  shortDescription: `Detects EXPORTING statements which can be omitted.`,
66032
66095
  badExample: `call_method( EXPORTING foo = bar ).`,
66033
66096
  goodExample: `call_method( foo = bar ).`,
66034
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-optional-keyword-exporting
66097
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-optional-keyword-exporting
66035
66098
  https://docs.abapopenchecks.org/checks/30/`,
66036
66099
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
66037
66100
  };
@@ -66191,7 +66254,7 @@ class ForbiddenIdentifier extends _abap_rule_1.ABAPRule {
66191
66254
  key: "forbidden_identifier",
66192
66255
  title: "Forbidden Identifier",
66193
66256
  shortDescription: `Forbid use of specified identifiers, list of regex.`,
66194
- extendedInformation: `Used in the transpiler to find javascript keywords in ABAP identifiers,
66257
+ extendedInformation: `Used in the transpiler to find javascript keywords in ABAP identifiers,
66195
66258
  https://github.com/abaplint/transpiler/blob/bda94b8b56e2b7f2f87be2168f12361aa530220e/packages/transpiler/src/validation.ts#L44`,
66196
66259
  tags: [_irule_1.RuleTag.SingleFile],
66197
66260
  };
@@ -66433,8 +66496,8 @@ class ForbiddenVoidType {
66433
66496
  key: "forbidden_void_type",
66434
66497
  title: "Forbidden Void Types",
66435
66498
  shortDescription: `Avoid usage of specified void types.`,
66436
- extendedInformation: `Inspiration:
66437
- BOOLEAN, BOOLE_D, CHAR01, CHAR1, CHAR10, CHAR12, CHAR128, CHAR2, CHAR20, CHAR4, CHAR70,
66499
+ extendedInformation: `Inspiration:
66500
+ BOOLEAN, BOOLE_D, CHAR01, CHAR1, CHAR10, CHAR12, CHAR128, CHAR2, CHAR20, CHAR4, CHAR70,
66438
66501
  DATS, TIMS, DATUM, FLAG, INT4, NUMC3, NUMC4, SAP_BOOL, TEXT25, TEXT80, X255, XFELD`,
66439
66502
  };
66440
66503
  }
@@ -66677,9 +66740,9 @@ class FullyTypeITabs extends _abap_rule_1.ABAPRule {
66677
66740
  key: "fully_type_itabs",
66678
66741
  title: "Fully type internal tables",
66679
66742
  shortDescription: `No implict table types or table keys`,
66680
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-the-right-table-type
66743
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-the-right-table-type
66681
66744
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key`,
66682
- badExample: `DATA lt_foo TYPE TABLE OF ty.
66745
+ badExample: `DATA lt_foo TYPE TABLE OF ty.
66683
66746
  DATA lt_bar TYPE STANDARD TABLE OF ty.`,
66684
66747
  goodExample: `DATA lt_foo TYPE STANDARD TABLE OF ty WITH EMPTY KEY.`,
66685
66748
  tags: [_irule_1.RuleTag.SingleFile],
@@ -66906,26 +66969,26 @@ class FunctionalWriting extends _abap_rule_1.ABAPRule {
66906
66969
  key: "functional_writing",
66907
66970
  title: "Use functional writing",
66908
66971
  shortDescription: `Detects usage of call method when functional style calls can be used.`,
66909
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-calls
66972
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-calls
66910
66973
  https://docs.abapopenchecks.org/checks/07/`,
66911
66974
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
66912
- badExample: `CALL METHOD zcl_class=>method( ).
66913
- CALL METHOD cl_abap_typedescr=>describe_by_name
66914
- EXPORTING
66915
- p_name = 'NAME'
66916
- RECEIVING
66917
- p_descr_ref = lr_typedescr
66918
- EXCEPTIONS
66919
- type_not_found = 1
66975
+ badExample: `CALL METHOD zcl_class=>method( ).
66976
+ CALL METHOD cl_abap_typedescr=>describe_by_name
66977
+ EXPORTING
66978
+ p_name = 'NAME'
66979
+ RECEIVING
66980
+ p_descr_ref = lr_typedescr
66981
+ EXCEPTIONS
66982
+ type_not_found = 1
66920
66983
  OTHERS = 2.`,
66921
- goodExample: `zcl_class=>method( ).
66922
- cl_abap_typedescr=>describe_by_name(
66923
- EXPORTING
66924
- p_name = 'NAME'
66925
- RECEIVING
66926
- p_descr_ref = lr_typedescr
66927
- EXCEPTIONS
66928
- type_not_found = 1
66984
+ goodExample: `zcl_class=>method( ).
66985
+ cl_abap_typedescr=>describe_by_name(
66986
+ EXPORTING
66987
+ p_name = 'NAME'
66988
+ RECEIVING
66989
+ p_descr_ref = lr_typedescr
66990
+ EXCEPTIONS
66991
+ type_not_found = 1
66929
66992
  OTHERS = 2 ).`,
66930
66993
  };
66931
66994
  }
@@ -67037,16 +67100,16 @@ class GlobalClass extends _abap_rule_1.ABAPRule {
67037
67100
  key: "global_class",
67038
67101
  title: "Global class checks",
67039
67102
  shortDescription: `Checks related to global classes`,
67040
- extendedInformation: `* global classes must be in own files
67041
-
67042
- * file names must match class name
67043
-
67044
- * file names must match interface name
67045
-
67046
- * global classes must be global definitions
67047
-
67048
- * global interfaces must be global definitions
67049
-
67103
+ extendedInformation: `* global classes must be in own files
67104
+
67105
+ * file names must match class name
67106
+
67107
+ * file names must match interface name
67108
+
67109
+ * global classes must be global definitions
67110
+
67111
+ * global interfaces must be global definitions
67112
+
67050
67113
  * global FOR TESTING, must have CATEGORY = 05 in the XML`,
67051
67114
  tags: [_irule_1.RuleTag.Syntax],
67052
67115
  };
@@ -67157,21 +67220,21 @@ class IdenticalConditions extends _abap_rule_1.ABAPRule {
67157
67220
  return {
67158
67221
  key: "identical_conditions",
67159
67222
  title: "Identical conditions",
67160
- shortDescription: `Find identical conditions in IF + CASE + WHILE etc
67161
-
67223
+ shortDescription: `Find identical conditions in IF + CASE + WHILE etc
67224
+
67162
67225
  Prerequsites: code is pretty printed with identical cAsE`,
67163
67226
  tags: [_irule_1.RuleTag.SingleFile],
67164
- badExample: `IF foo = bar OR 1 = a OR foo = bar.
67165
- ENDIF.
67166
- CASE bar.
67167
- WHEN '1'.
67168
- WHEN 'A' OR '1'.
67227
+ badExample: `IF foo = bar OR 1 = a OR foo = bar.
67228
+ ENDIF.
67229
+ CASE bar.
67230
+ WHEN '1'.
67231
+ WHEN 'A' OR '1'.
67169
67232
  ENDCASE.`,
67170
- goodExample: `IF foo = bar OR 1 = a.
67171
- ENDIF.
67172
- CASE bar.
67173
- WHEN '1'.
67174
- WHEN 'A'.
67233
+ goodExample: `IF foo = bar OR 1 = a.
67234
+ ENDIF.
67235
+ CASE bar.
67236
+ WHEN '1'.
67237
+ WHEN 'A'.
67175
67238
  ENDCASE.`,
67176
67239
  };
67177
67240
  }
@@ -67305,23 +67368,23 @@ class IdenticalContents extends _abap_rule_1.ABAPRule {
67305
67368
  key: "identical_contents",
67306
67369
  title: "Identical contents",
67307
67370
  shortDescription: `Find identical contents in blocks inside IFs, both in the beginning and in the end.`,
67308
- extendedInformation: `
67309
- Prerequsites: code is pretty printed with identical cAsE
67310
-
67371
+ extendedInformation: `
67372
+ Prerequsites: code is pretty printed with identical cAsE
67373
+
67311
67374
  Chained statments are ignored`,
67312
67375
  tags: [_irule_1.RuleTag.SingleFile],
67313
- badExample: `IF foo = bar.
67314
- WRITE 'bar'.
67315
- WRITE 'world'.
67316
- ELSE.
67317
- WRITE 'foo'.
67318
- WRITE 'world'.
67376
+ badExample: `IF foo = bar.
67377
+ WRITE 'bar'.
67378
+ WRITE 'world'.
67379
+ ELSE.
67380
+ WRITE 'foo'.
67381
+ WRITE 'world'.
67319
67382
  ENDIF.`,
67320
- goodExample: `IF foo = bar.
67321
- WRITE 'bar'.
67322
- ELSE.
67323
- WRITE 'foo'.
67324
- ENDIF.
67383
+ goodExample: `IF foo = bar.
67384
+ WRITE 'bar'.
67385
+ ELSE.
67386
+ WRITE 'foo'.
67387
+ ENDIF.
67325
67388
  WRITE 'world'.`,
67326
67389
  };
67327
67390
  }
@@ -67458,12 +67521,12 @@ class IdenticalDescriptions {
67458
67521
  key: "identical_descriptions",
67459
67522
  title: "Identical descriptions",
67460
67523
  shortDescription: `Searches for objects with the same type and same description`,
67461
- extendedInformation: `Case insensitive
67462
-
67463
- Only checks the master language descriptions
67464
-
67465
- Dependencies are skipped
67466
-
67524
+ extendedInformation: `Case insensitive
67525
+
67526
+ Only checks the master language descriptions
67527
+
67528
+ Dependencies are skipped
67529
+
67467
67530
  Works for: INTF, CLAS, DOMA, DTEL, FUNC in same FUGR`,
67468
67531
  tags: [],
67469
67532
  };
@@ -67637,9 +67700,9 @@ class IdenticalMove extends _abap_rule_1.ABAPRule {
67637
67700
  title: "Identical move",
67638
67701
  shortDescription: `Moving the same value from left to right or right to left is redundant.`,
67639
67702
  tags: [_irule_1.RuleTag.SingleFile],
67640
- badExample: `DATA lv_value TYPE i.
67703
+ badExample: `DATA lv_value TYPE i.
67641
67704
  lv_value = lv_value.`,
67642
- goodExample: `DATA lv_value TYPE i.
67705
+ goodExample: `DATA lv_value TYPE i.
67643
67706
  lv_value = 5.`,
67644
67707
  };
67645
67708
  }
@@ -67701,43 +67764,43 @@ class IfInIf extends _abap_rule_1.ABAPRule {
67701
67764
  key: "if_in_if",
67702
67765
  title: "IF in IF",
67703
67766
  shortDescription: `Detects nested ifs which can be refactored.`,
67704
- extendedInformation: `
67705
- Directly nested IFs without ELSE can be refactored to a single condition using AND.
67706
-
67707
- ELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.
67708
-
67709
- https://docs.abapopenchecks.org/checks/01/
67767
+ extendedInformation: `
67768
+ Directly nested IFs without ELSE can be refactored to a single condition using AND.
67769
+
67770
+ ELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.
67771
+
67772
+ https://docs.abapopenchecks.org/checks/01/
67710
67773
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low`,
67711
- badExample: `IF condition1.
67712
- IF condition2.
67713
- ...
67714
- ENDIF.
67715
- ENDIF.
67716
-
67717
- IF condition1.
67718
- ...
67719
- ELSE.
67720
- IF condition2.
67721
- ...
67722
- ENDIF.
67774
+ badExample: `IF condition1.
67775
+ IF condition2.
67776
+ ...
67777
+ ENDIF.
67778
+ ENDIF.
67779
+
67780
+ IF condition1.
67781
+ ...
67782
+ ELSE.
67783
+ IF condition2.
67784
+ ...
67785
+ ENDIF.
67723
67786
  ENDIF.`,
67724
- goodExample: `IF ( condition1 ) AND ( condition2 ).
67725
- ...
67726
- ENDIF.
67727
-
67728
- IF condition1.
67729
- ...
67730
- ELSEIF condition2.
67731
- ...
67732
- ENDIF.
67733
-
67734
- CASE variable.
67735
- WHEN value1.
67736
- ...
67737
- WHEN value2.
67738
- IF condition2.
67739
- ...
67740
- ENDIF.
67787
+ goodExample: `IF ( condition1 ) AND ( condition2 ).
67788
+ ...
67789
+ ENDIF.
67790
+
67791
+ IF condition1.
67792
+ ...
67793
+ ELSEIF condition2.
67794
+ ...
67795
+ ENDIF.
67796
+
67797
+ CASE variable.
67798
+ WHEN value1.
67799
+ ...
67800
+ WHEN value2.
67801
+ IF condition2.
67802
+ ...
67803
+ ENDIF.
67741
67804
  ENDCASE.`,
67742
67805
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
67743
67806
  };
@@ -67930,9 +67993,9 @@ class ImplementMethods extends _abap_rule_1.ABAPRule {
67930
67993
  for (const i of ((_a = file.getStructure()) === null || _a === void 0 ? void 0 : _a.findAllStatements(Statements.ClassImplementation)) || []) {
67931
67994
  const name = (_b = i.findFirstExpression(Expressions.ClassName)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr().toUpperCase();
67932
67995
  if (name === impl.identifier.getName().toUpperCase()) {
67933
- return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
67934
- METHOD ${methodName.toLowerCase()}.
67935
- RETURN. " todo, implement method
67996
+ return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
67997
+ METHOD ${methodName.toLowerCase()}.
67998
+ RETURN. " todo, implement method
67936
67999
  ENDMETHOD.`);
67937
68000
  }
67938
68001
  }
@@ -68139,13 +68202,13 @@ class ImplicitStartOfSelection extends _abap_rule_1.ABAPRule {
68139
68202
  key: "implicit_start_of_selection",
68140
68203
  title: "Implicit START-OF-SELECTION",
68141
68204
  shortDescription: `Add explicit selection screen event handling`,
68142
- extendedInformation: `Only runs for executable programs
68143
-
68205
+ extendedInformation: `Only runs for executable programs
68206
+
68144
68207
  https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapstart-of-selection.htm`,
68145
68208
  tags: [_irule_1.RuleTag.SingleFile],
68146
- badExample: `REPORT zfoo.
68209
+ badExample: `REPORT zfoo.
68147
68210
  WRITE 'hello'.`,
68148
- goodExample: `START-OF-SELECTION.
68211
+ goodExample: `START-OF-SELECTION.
68149
68212
  WRITE 'hello'.`,
68150
68213
  };
68151
68214
  }
@@ -68250,19 +68313,19 @@ class InStatementIndentation extends _abap_rule_1.ABAPRule {
68250
68313
  key: "in_statement_indentation",
68251
68314
  title: "In-statement indentation",
68252
68315
  shortDescription: "Checks alignment within statements which span multiple lines.",
68253
- extendedInformation: `Lines following the first line should be indented once (2 spaces).
68254
-
68255
- For block declaration statements, lines after the first should be indented an additional time (default: +2 spaces)
68316
+ extendedInformation: `Lines following the first line should be indented once (2 spaces).
68317
+
68318
+ For block declaration statements, lines after the first should be indented an additional time (default: +2 spaces)
68256
68319
  to distinguish them better from code within the block.`,
68257
- badExample: `IF 1 = 1
68258
- AND 2 = 2.
68259
- WRITE 'hello' &&
68260
- 'world'.
68320
+ badExample: `IF 1 = 1
68321
+ AND 2 = 2.
68322
+ WRITE 'hello' &&
68323
+ 'world'.
68261
68324
  ENDIF.`,
68262
- goodExample: `IF 1 = 1
68263
- AND 2 = 2.
68264
- WRITE 'hello' &&
68265
- 'world'.
68325
+ goodExample: `IF 1 = 1
68326
+ AND 2 = 2.
68327
+ WRITE 'hello' &&
68328
+ 'world'.
68266
68329
  ENDIF.`,
68267
68330
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
68268
68331
  };
@@ -68389,23 +68452,23 @@ class Indentation extends _abap_rule_1.ABAPRule {
68389
68452
  title: "Indentation",
68390
68453
  shortDescription: `Checks indentation`,
68391
68454
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
68392
- badExample: `CLASS lcl DEFINITION.
68393
- PRIVATE SECTION.
68394
- METHODS constructor.
68395
- ENDCLASS.
68396
-
68397
- CLASS lcl IMPLEMENTATION.
68398
- METHOD constructor.
68399
- ENDMETHOD.
68455
+ badExample: `CLASS lcl DEFINITION.
68456
+ PRIVATE SECTION.
68457
+ METHODS constructor.
68458
+ ENDCLASS.
68459
+
68460
+ CLASS lcl IMPLEMENTATION.
68461
+ METHOD constructor.
68462
+ ENDMETHOD.
68400
68463
  ENDCLASS.`,
68401
- goodExample: `CLASS lcl DEFINITION.
68402
- PRIVATE SECTION.
68403
- METHODS constructor.
68404
- ENDCLASS.
68405
-
68406
- CLASS lcl IMPLEMENTATION.
68407
- METHOD constructor.
68408
- ENDMETHOD.
68464
+ goodExample: `CLASS lcl DEFINITION.
68465
+ PRIVATE SECTION.
68466
+ METHODS constructor.
68467
+ ENDCLASS.
68468
+
68469
+ CLASS lcl IMPLEMENTATION.
68470
+ METHOD constructor.
68471
+ ENDMETHOD.
68409
68472
  ENDCLASS.`,
68410
68473
  };
68411
68474
  }
@@ -68903,9 +68966,9 @@ class IntfReferencingClas {
68903
68966
  key: "intf_referencing_clas",
68904
68967
  title: "INTF referencing CLAS",
68905
68968
  shortDescription: `Interface contains references to class`,
68906
- extendedInformation: `Only global interfaces are checked.
68907
- Only first level references are checked.
68908
- Exception class references are ignored.
68969
+ extendedInformation: `Only global interfaces are checked.
68970
+ Only first level references are checked.
68971
+ Exception class references are ignored.
68909
68972
  Void references are ignored.`,
68910
68973
  };
68911
68974
  }
@@ -68990,9 +69053,9 @@ class InvalidTableIndex extends _abap_rule_1.ABAPRule {
68990
69053
  title: "Invalid Table Index",
68991
69054
  shortDescription: `Issues error for constant table index zero, as ABAP starts from 1`,
68992
69055
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
68993
- badExample: `DATA(first) = table[ 0 ].
69056
+ badExample: `DATA(first) = table[ 0 ].
68994
69057
  READ TABLE gt_stack ASSIGNING <ls_stack> INDEX 0.`,
68995
- goodExample: `DATA(first) = table[ 1 ].
69058
+ goodExample: `DATA(first) = table[ 1 ].
68996
69059
  READ TABLE gt_stack ASSIGNING <ls_stack> INDEX 1.`,
68997
69060
  };
68998
69061
  }
@@ -69604,8 +69667,8 @@ class LineBreakStyle {
69604
69667
  return {
69605
69668
  key: "line_break_style",
69606
69669
  title: "Makes sure line breaks are consistent in the ABAP code",
69607
- shortDescription: `Enforces LF as newlines in ABAP files
69608
-
69670
+ shortDescription: `Enforces LF as newlines in ABAP files
69671
+
69609
69672
  abapGit does not work with CRLF`,
69610
69673
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
69611
69674
  };
@@ -69675,7 +69738,7 @@ class LineLength extends _abap_rule_1.ABAPRule {
69675
69738
  key: "line_length",
69676
69739
  title: "Line length",
69677
69740
  shortDescription: `Detects lines exceeding the provided maximum length.`,
69678
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length
69741
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length
69679
69742
  https://docs.abapopenchecks.org/checks/04/`,
69680
69743
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
69681
69744
  };
@@ -69753,7 +69816,7 @@ class LineOnlyPunc extends _abap_rule_1.ABAPRule {
69753
69816
  key: "line_only_punc",
69754
69817
  title: "Line containing only punctuation",
69755
69818
  shortDescription: `Detects lines containing only punctuation.`,
69756
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#close-brackets-at-line-end
69819
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#close-brackets-at-line-end
69757
69820
  https://docs.abapopenchecks.org/checks/16/`,
69758
69821
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
69759
69822
  badExample: "zcl_class=>method(\n).",
@@ -70027,15 +70090,15 @@ class LocalVariableNames extends _abap_rule_1.ABAPRule {
70027
70090
  return {
70028
70091
  key: "local_variable_names",
70029
70092
  title: "Local variable naming conventions",
70030
- shortDescription: `
70031
- Allows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols.
70093
+ shortDescription: `
70094
+ Allows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols.
70032
70095
  Regexes are case-insensitive.`,
70033
70096
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
70034
- badExample: `FORM bar.
70035
- DATA foo.
70097
+ badExample: `FORM bar.
70098
+ DATA foo.
70036
70099
  ENDFORM.`,
70037
- goodExample: `FORM bar.
70038
- DATA lv_foo.
70100
+ goodExample: `FORM bar.
70101
+ DATA lv_foo.
70039
70102
  ENDFORM.`,
70040
70103
  };
70041
70104
  }
@@ -70187,9 +70250,9 @@ class MacroNaming extends _abap_rule_1.ABAPRule {
70187
70250
  shortDescription: `Allows you to enforce a pattern for macro definitions`,
70188
70251
  extendedInformation: `Use rule "avoid_use" to avoid macros altogether.`,
70189
70252
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
70190
- badExample: `DEFINE something.
70253
+ badExample: `DEFINE something.
70191
70254
  END-OF-DEFINITION.`,
70192
- goodExample: `DEFINE _something.
70255
+ goodExample: `DEFINE _something.
70193
70256
  END-OF-DEFINITION.`,
70194
70257
  };
70195
70258
  }
@@ -70264,10 +70327,10 @@ class MainFileContents {
70264
70327
  title: "Main file contents",
70265
70328
  shortDescription: `Checks related to report declarations.`,
70266
70329
  tags: [_irule_1.RuleTag.Syntax],
70267
- extendedInformation: `Does not run if the target version is Cloud
70268
-
70269
- * PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
70270
- * TYPEs must begin with "TYPE-POOL <name>."
70330
+ extendedInformation: `Does not run if the target version is Cloud
70331
+
70332
+ * PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
70333
+ * TYPEs must begin with "TYPE-POOL <name>."
70271
70334
  `,
70272
70335
  };
70273
70336
  }
@@ -70383,17 +70446,17 @@ class ManyParentheses extends _abap_rule_1.ABAPRule {
70383
70446
  title: "Too many parentheses",
70384
70447
  shortDescription: `Searches for expressions where extra parentheses can safely be removed`,
70385
70448
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
70386
- badExample: `
70387
- IF ( destination IS INITIAL ).
70388
- ENDIF.
70389
- IF foo = boo AND ( bar = lar AND moo = loo ).
70390
- ENDIF.
70449
+ badExample: `
70450
+ IF ( destination IS INITIAL ).
70451
+ ENDIF.
70452
+ IF foo = boo AND ( bar = lar AND moo = loo ).
70453
+ ENDIF.
70391
70454
  `,
70392
- goodExample: `
70393
- IF destination IS INITIAL.
70394
- ENDIF.
70395
- IF foo = boo AND bar = lar AND moo = loo.
70396
- ENDIF.
70455
+ goodExample: `
70456
+ IF destination IS INITIAL.
70457
+ ENDIF.
70458
+ IF foo = boo AND bar = lar AND moo = loo.
70459
+ ENDIF.
70397
70460
  `,
70398
70461
  };
70399
70462
  }
@@ -70581,14 +70644,14 @@ class MaxOneMethodParameterPerLine extends _abap_rule_1.ABAPRule {
70581
70644
  title: "Max one method parameter definition per line",
70582
70645
  shortDescription: `Keep max one method parameter description per line`,
70583
70646
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace],
70584
- badExample: `
70585
- METHODS apps_scope_token
70586
- IMPORTING
70647
+ badExample: `
70648
+ METHODS apps_scope_token
70649
+ IMPORTING
70587
70650
  body TYPE bodyapps_scope_token client_id TYPE str.`,
70588
- goodExample: `
70589
- METHODS apps_scope_token
70590
- IMPORTING
70591
- body TYPE bodyapps_scope_token
70651
+ goodExample: `
70652
+ METHODS apps_scope_token
70653
+ IMPORTING
70654
+ body TYPE bodyapps_scope_token
70592
70655
  client_id TYPE str.`,
70593
70656
  };
70594
70657
  }
@@ -70653,11 +70716,11 @@ class MaxOneStatement extends _abap_rule_1.ABAPRule {
70653
70716
  key: "max_one_statement",
70654
70717
  title: "Max one statement per line",
70655
70718
  shortDescription: `Checks that each line contains only a single statement.`,
70656
- extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
70657
-
70658
- Does not report anything for chained statements.
70659
-
70660
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line
70719
+ extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
70720
+
70721
+ Does not report anything for chained statements.
70722
+
70723
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line
70661
70724
  https://docs.abapopenchecks.org/checks/11/`,
70662
70725
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
70663
70726
  badExample: `WRITE foo. WRITE bar.`,
@@ -70995,8 +71058,8 @@ class MethodLength {
70995
71058
  key: "method_length",
70996
71059
  title: "Method/Form Length",
70997
71060
  shortDescription: `Checks relating to method/form length.`,
70998
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
70999
-
71061
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
71062
+
71000
71063
  Abstract methods without statements are considered okay.`,
71001
71064
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
71002
71065
  };
@@ -71101,20 +71164,20 @@ class MethodOverwritesBuiltIn extends _abap_rule_1.ABAPRule {
71101
71164
  key: "method_overwrites_builtin",
71102
71165
  title: "Method name overwrites builtin function",
71103
71166
  shortDescription: `Checks Method names that overwrite builtin SAP functions`,
71104
- extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
71105
-
71106
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
71107
-
71167
+ extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
71168
+
71169
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
71170
+
71108
71171
  Interface method names are ignored`,
71109
71172
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
71110
- badExample: `CLASS lcl DEFINITION.
71111
- PUBLIC SECTION.
71112
- METHODS matches.
71113
- ENDCLASS.
71114
-
71115
- CLASS lcl IMPLEMENTATION.
71116
- METHOD matches.
71117
- ENDMETHOD.
71173
+ badExample: `CLASS lcl DEFINITION.
71174
+ PUBLIC SECTION.
71175
+ METHODS matches.
71176
+ ENDCLASS.
71177
+
71178
+ CLASS lcl IMPLEMENTATION.
71179
+ METHOD matches.
71180
+ ENDMETHOD.
71118
71181
  ENDCLASS.`,
71119
71182
  };
71120
71183
  }
@@ -71302,16 +71365,16 @@ class MixReturning extends _abap_rule_1.ABAPRule {
71302
71365
  key: "mix_returning",
71303
71366
  title: "Mix of returning and exporting",
71304
71367
  shortDescription: `Checks that methods don't have a mixture of returning and exporting/changing parameters`,
71305
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-either-returning-or-exporting-or-changing-but-not-a-combination
71306
-
71368
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-either-returning-or-exporting-or-changing-but-not-a-combination
71369
+
71307
71370
  This syntax is not allowed on versions earlier than 740sp02, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abennews-740-abap_objects.htm#!ABAP_MODIFICATION_1@1@`,
71308
71371
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Syntax],
71309
- badExample: `CLASS lcl DEFINITION.
71310
- PUBLIC SECTION.
71311
- METHODS
71312
- foobar
71313
- EXPORTING foo TYPE i
71314
- RETURNING VALUE(rv_string) TYPE string.
71372
+ badExample: `CLASS lcl DEFINITION.
71373
+ PUBLIC SECTION.
71374
+ METHODS
71375
+ foobar
71376
+ EXPORTING foo TYPE i
71377
+ RETURNING VALUE(rv_string) TYPE string.
71315
71378
  ENDCLASS.`,
71316
71379
  };
71317
71380
  }
@@ -71713,7 +71776,7 @@ class Nesting extends _abap_rule_1.ABAPRule {
71713
71776
  key: "nesting",
71714
71777
  title: "Check nesting depth",
71715
71778
  shortDescription: `Checks for methods exceeding a maximum nesting depth`,
71716
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low
71779
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low
71717
71780
  https://docs.abapopenchecks.org/checks/74/`,
71718
71781
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
71719
71782
  };
@@ -71967,7 +72030,7 @@ class NoChainedAssignment extends _abap_rule_1.ABAPRule {
71967
72030
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-chain-assignments`,
71968
72031
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
71969
72032
  badExample: `var1 = var2 = var3.`,
71970
- goodExample: `var2 = var3.
72033
+ goodExample: `var2 = var3.
71971
72034
  var1 = var2.`,
71972
72035
  };
71973
72036
  }
@@ -72174,8 +72237,8 @@ class NoExternalFormCalls extends _abap_rule_1.ABAPRule {
72174
72237
  key: "no_external_form_calls",
72175
72238
  title: "No external FORM calls",
72176
72239
  shortDescription: `Detect external form calls`,
72177
- badExample: `PERFORM foo IN PROGRAM bar.
72178
-
72240
+ badExample: `PERFORM foo IN PROGRAM bar.
72241
+
72179
72242
  PERFORM foo(bar).`,
72180
72243
  tags: [_irule_1.RuleTag.SingleFile],
72181
72244
  };
@@ -72236,17 +72299,17 @@ class NoInlineInOptionalBranches extends _abap_rule_1.ABAPRule {
72236
72299
  key: "no_inline_in_optional_branches",
72237
72300
  title: "Don't declare inline in optional branches",
72238
72301
  shortDescription: `Don't declare inline in optional branches`,
72239
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
72240
-
72241
- Considered optional branches:
72242
- * inside IF/ELSEIF/ELSE
72243
- * inside LOOP
72244
- * inside WHILE
72245
- * inside CASE/WHEN, CASE TYPE OF
72246
- * inside DO
72247
- * inside SELECT loops
72248
-
72249
- Not considered optional branches:
72302
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
72303
+
72304
+ Considered optional branches:
72305
+ * inside IF/ELSEIF/ELSE
72306
+ * inside LOOP
72307
+ * inside WHILE
72308
+ * inside CASE/WHEN, CASE TYPE OF
72309
+ * inside DO
72310
+ * inside SELECT loops
72311
+
72312
+ Not considered optional branches:
72250
72313
  * TRY/CATCH/CLEANUP`,
72251
72314
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
72252
72315
  };
@@ -72347,12 +72410,12 @@ class NoPrefixes extends _abap_rule_1.ABAPRule {
72347
72410
  key: "no_prefixes",
72348
72411
  title: "No Prefixes",
72349
72412
  shortDescription: `Dont use hungarian notation`,
72350
- extendedInformation: `
72351
- Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
72352
- allowing all types to become voided, abaplint will then provide less precise syntax errors.
72353
-
72354
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
72355
-
72413
+ extendedInformation: `
72414
+ Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
72415
+ allowing all types to become voided, abaplint will then provide less precise syntax errors.
72416
+
72417
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
72418
+
72356
72419
  https://github.com/SAP/styleguides/blob/main/clean-abap/sub-sections/AvoidEncodings.md`,
72357
72420
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
72358
72421
  badExample: `DATA lv_foo TYPE i.`,
@@ -72550,7 +72613,7 @@ class NoPublicAttributes extends _abap_rule_1.ABAPRule {
72550
72613
  return {
72551
72614
  key: "no_public_attributes",
72552
72615
  title: "No public attributes",
72553
- shortDescription: `Checks that classes and interfaces don't contain any public attributes.
72616
+ shortDescription: `Checks that classes and interfaces don't contain any public attributes.
72554
72617
  Exceptions are excluded from this rule.`,
72555
72618
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#members-private-by-default-protected-only-if-needed`,
72556
72619
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
@@ -72651,13 +72714,13 @@ class NoYodaConditions extends _abap_rule_1.ABAPRule {
72651
72714
  key: "no_yoda_conditions",
72652
72715
  title: "No Yoda conditions",
72653
72716
  shortDescription: `Finds Yoda conditions and reports issues`,
72654
- extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
72655
-
72717
+ extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
72718
+
72656
72719
  Conditions with operators CP, NP, CS, NS, CA, NA, CO, CN are ignored`,
72657
72720
  tags: [_irule_1.RuleTag.SingleFile],
72658
- badExample: `IF 0 <> sy-subrc.
72721
+ badExample: `IF 0 <> sy-subrc.
72659
72722
  ENDIF.`,
72660
- goodExample: `IF sy-subrc <> 0.
72723
+ goodExample: `IF sy-subrc <> 0.
72661
72724
  ENDIF.`,
72662
72725
  };
72663
72726
  }
@@ -72758,8 +72821,8 @@ class NROBConsistency {
72758
72821
  key: "nrob_consistency",
72759
72822
  title: "Number range consistency",
72760
72823
  shortDescription: `Consistency checks for number ranges`,
72761
- extendedInformation: `Issue reported if percentage warning is over 50%
72762
-
72824
+ extendedInformation: `Issue reported if percentage warning is over 50%
72825
+
72763
72826
  Issue reported if the referenced domain is not found(taking error namespace into account)`,
72764
72827
  tags: [_irule_1.RuleTag.SingleFile],
72765
72828
  };
@@ -73044,58 +73107,58 @@ class ObsoleteStatement extends _abap_rule_1.ABAPRule {
73044
73107
  title: "Obsolete statements",
73045
73108
  shortDescription: `Checks for usages of certain obsolete statements`,
73046
73109
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
73047
- extendedInformation: `
73048
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
73049
-
73050
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
73051
-
73052
- SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
73053
-
73054
- IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
73055
-
73056
- WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
73057
-
73058
- FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
73059
-
73060
- TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
73061
-
73062
- LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
73063
-
73064
- COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
73065
-
73066
- OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
73067
-
73068
- PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
73069
-
73070
- RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
73071
-
73072
- PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
73073
-
73074
- MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
73075
-
73076
- SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
73077
- SELECT COUNT(*) is considered okay
73078
-
73079
- FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
73080
-
73081
- SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
73082
-
73083
- CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
73084
-
73085
- POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
73086
-
73087
- OCCURENCES: check for OCCURENCES vs OCCURRENCES
73088
-
73110
+ extendedInformation: `
73111
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
73112
+
73113
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
73114
+
73115
+ SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
73116
+
73117
+ IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
73118
+
73119
+ WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
73120
+
73121
+ FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
73122
+
73123
+ TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
73124
+
73125
+ LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
73126
+
73127
+ COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
73128
+
73129
+ OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
73130
+
73131
+ PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
73132
+
73133
+ RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
73134
+
73135
+ PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
73136
+
73137
+ MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
73138
+
73139
+ SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
73140
+ SELECT COUNT(*) is considered okay
73141
+
73142
+ FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
73143
+
73144
+ SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
73145
+
73146
+ CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
73147
+
73148
+ POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
73149
+
73150
+ OCCURENCES: check for OCCURENCES vs OCCURRENCES
73151
+
73089
73152
  CLIENT SPECIFIED, from 754: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abapselect_client_obsolete.htm`,
73090
- badExample: `REFRESH itab.
73091
-
73092
- COMPUTE foo = 2 + 2.
73093
-
73094
- MULTIPLY lv_foo BY 2.
73095
-
73096
- INTERFACE intf LOAD.
73097
-
73098
- IF foo IS SUPPLIED.
73153
+ badExample: `REFRESH itab.
73154
+
73155
+ COMPUTE foo = 2 + 2.
73156
+
73157
+ MULTIPLY lv_foo BY 2.
73158
+
73159
+ INTERFACE intf LOAD.
73160
+
73161
+ IF foo IS SUPPLIED.
73099
73162
  ENDIF.`,
73100
73163
  };
73101
73164
  }
@@ -73455,9 +73518,9 @@ class OmitParameterName {
73455
73518
  key: "omit_parameter_name",
73456
73519
  title: "Omit parameter name",
73457
73520
  shortDescription: `Omit the parameter name in single parameter calls`,
73458
- extendedInformation: `
73459
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
73460
-
73521
+ extendedInformation: `
73522
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
73523
+
73461
73524
  EXPORTING must already be omitted for this rule to take effect, https://rules.abaplint.org/exporting/`,
73462
73525
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
73463
73526
  badExample: `method( param = 2 ).`,
@@ -73663,20 +73726,20 @@ class OmitReceiving extends _abap_rule_1.ABAPRule {
73663
73726
  shortDescription: `Omit RECEIVING`,
73664
73727
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-receiving`,
73665
73728
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
73666
- badExample: `
73667
- upload_pack(
73668
- EXPORTING
73669
- io_client = lo_client
73670
- iv_url = iv_url
73671
- iv_deepen_level = iv_deepen_level
73672
- it_hashes = lt_hashes
73673
- RECEIVING
73729
+ badExample: `
73730
+ upload_pack(
73731
+ EXPORTING
73732
+ io_client = lo_client
73733
+ iv_url = iv_url
73734
+ iv_deepen_level = iv_deepen_level
73735
+ it_hashes = lt_hashes
73736
+ RECEIVING
73674
73737
  rt_objects = et_objects ).`,
73675
- goodExample: `
73676
- et_objects = upload_pack(
73677
- io_client = lo_client
73678
- iv_url = iv_url
73679
- iv_deepen_level = iv_deepen_level
73738
+ goodExample: `
73739
+ et_objects = upload_pack(
73740
+ io_client = lo_client
73741
+ iv_url = iv_url
73742
+ iv_deepen_level = iv_deepen_level
73680
73743
  it_hashes = lt_hashes ).`,
73681
73744
  };
73682
73745
  }
@@ -73741,8 +73804,8 @@ class Parser702Chaining extends _abap_rule_1.ABAPRule {
73741
73804
  return {
73742
73805
  key: "parser_702_chaining",
73743
73806
  title: "Parser Error, bad chaining on 702",
73744
- shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
73745
- this rule finds these and reports errors.
73807
+ shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
73808
+ this rule finds these and reports errors.
73746
73809
  Only active on target version 702 and below.`,
73747
73810
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
73748
73811
  };
@@ -73937,8 +74000,8 @@ class ParserError {
73937
74000
  return {
73938
74001
  key: "parser_error",
73939
74002
  title: "Parser error",
73940
- shortDescription: `Checks for syntax not recognized by abaplint.
73941
-
74003
+ shortDescription: `Checks for syntax not recognized by abaplint.
74004
+
73942
74005
  See recognized syntax at https://syntax.abaplint.org`,
73943
74006
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
73944
74007
  };
@@ -74023,7 +74086,7 @@ class ParserMissingSpace extends _abap_rule_1.ABAPRule {
74023
74086
  return {
74024
74087
  key: "parser_missing_space",
74025
74088
  title: "Parser Error, missing space",
74026
- shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.
74089
+ shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.
74027
74090
  This rule makes sure the spaces are consistently required across the language.`,
74028
74091
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
74029
74092
  badExample: `IF ( foo = 'bar').`,
@@ -74477,25 +74540,25 @@ class PreferInline {
74477
74540
  key: "prefer_inline",
74478
74541
  title: "Prefer Inline Declarations",
74479
74542
  shortDescription: `Prefer inline to up-front declarations.`,
74480
- extendedInformation: `EXPERIMENTAL
74481
-
74482
- Activates if language version is v740sp02 or above.
74483
-
74484
- Variables must be local(METHOD or FORM).
74485
-
74486
- No generic or void typed variables. No syntax errors.
74487
-
74488
- First position used must be a full/pure write.
74489
-
74490
- Move statment is not a cast(?=)
74491
-
74543
+ extendedInformation: `EXPERIMENTAL
74544
+
74545
+ Activates if language version is v740sp02 or above.
74546
+
74547
+ Variables must be local(METHOD or FORM).
74548
+
74549
+ No generic or void typed variables. No syntax errors.
74550
+
74551
+ First position used must be a full/pure write.
74552
+
74553
+ Move statment is not a cast(?=)
74554
+
74492
74555
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-inline-to-up-front-declarations`,
74493
74556
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Experimental, _irule_1.RuleTag.Quickfix],
74494
- badExample: `DATA foo TYPE i.
74495
- foo = 2.
74496
- DATA percentage TYPE decfloat34.
74557
+ badExample: `DATA foo TYPE i.
74558
+ foo = 2.
74559
+ DATA percentage TYPE decfloat34.
74497
74560
  percentage = ( comment_number / abs_statement_number ) * 100.`,
74498
- goodExample: `DATA(foo) = 2.
74561
+ goodExample: `DATA(foo) = 2.
74499
74562
  DATA(percentage) = CONV decfloat34( comment_number / abs_statement_number ) * 100.`,
74500
74563
  };
74501
74564
  }
@@ -74709,18 +74772,18 @@ class PreferIsNot extends _abap_rule_1.ABAPRule {
74709
74772
  key: "prefer_is_not",
74710
74773
  title: "Prefer IS NOT to NOT IS",
74711
74774
  shortDescription: `Prefer IS NOT to NOT IS`,
74712
- extendedInformation: `
74713
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
74714
-
74775
+ extendedInformation: `
74776
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
74777
+
74715
74778
  "if not is_valid( )." examples are skipped`,
74716
74779
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
74717
- goodExample: `IF variable IS NOT INITIAL.
74718
- IF variable NP 'TODO*'.
74719
- IF variable <> 42.
74780
+ goodExample: `IF variable IS NOT INITIAL.
74781
+ IF variable NP 'TODO*'.
74782
+ IF variable <> 42.
74720
74783
  IF variable CO 'hello'.`,
74721
- badExample: `IF NOT variable IS INITIAL.
74722
- IF NOT variable CP 'TODO*'.
74723
- IF NOT variable = 42.
74784
+ badExample: `IF NOT variable IS INITIAL.
74785
+ IF NOT variable CP 'TODO*'.
74786
+ IF NOT variable = 42.
74724
74787
  IF NOT variable CA 'hello'.`,
74725
74788
  };
74726
74789
  }
@@ -74909,14 +74972,14 @@ class PreferRaiseExceptionNew extends _abap_rule_1.ABAPRule {
74909
74972
  key: "prefer_raise_exception_new",
74910
74973
  title: "Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE",
74911
74974
  shortDescription: `Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE`,
74912
- extendedInformation: `
74913
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
74914
-
74975
+ extendedInformation: `
74976
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
74977
+
74915
74978
  From 752 and up`,
74916
74979
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
74917
74980
  goodExample: `RAISE EXCEPTION NEW cx_generation_error( previous = exception ).`,
74918
- badExample: `RAISE EXCEPTION TYPE cx_generation_error
74919
- EXPORTING
74981
+ badExample: `RAISE EXCEPTION TYPE cx_generation_error
74982
+ EXPORTING
74920
74983
  previous = exception.`,
74921
74984
  };
74922
74985
  }
@@ -74994,12 +75057,12 @@ class PreferReturningToExporting extends _abap_rule_1.ABAPRule {
74994
75057
  key: "prefer_returning_to_exporting",
74995
75058
  title: "Prefer RETURNING to EXPORTING",
74996
75059
  shortDescription: `Prefer RETURNING to EXPORTING. Generic types cannot be RETURNING.`,
74997
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting
75060
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting
74998
75061
  https://docs.abapopenchecks.org/checks/44/`,
74999
75062
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
75000
- badExample: `CLASS lcl DEFINITION.
75001
- PUBLIC SECTION.
75002
- METHODS test EXPORTING ev_foo TYPE i.
75063
+ badExample: `CLASS lcl DEFINITION.
75064
+ PUBLIC SECTION.
75065
+ METHODS test EXPORTING ev_foo TYPE i.
75003
75066
  ENDCLASS.`,
75004
75067
  };
75005
75068
  }
@@ -75095,8 +75158,8 @@ class PreferXsdbool extends _abap_rule_1.ABAPRule {
75095
75158
  key: "prefer_xsdbool",
75096
75159
  title: "Prefer xsdbool over boolc",
75097
75160
  shortDescription: `Prefer xsdbool over boolc`,
75098
- extendedInformation: `Activates if language version is v740sp08 or above.
75099
-
75161
+ extendedInformation: `Activates if language version is v740sp08 or above.
75162
+
75100
75163
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
75101
75164
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
75102
75165
  badExample: `DATA(sdf) = boolc( 1 = 2 ).`,
@@ -75168,9 +75231,9 @@ class PreferredCompareOperator extends _abap_rule_1.ABAPRule {
75168
75231
  title: "Preferred compare operator",
75169
75232
  shortDescription: `Configure undesired operator variants`,
75170
75233
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
75171
- badExample: `IF foo EQ bar.
75234
+ badExample: `IF foo EQ bar.
75172
75235
  ENDIF.`,
75173
- goodExample: `IF foo = bar.
75236
+ goodExample: `IF foo = bar.
75174
75237
  ENDIF.`,
75175
75238
  };
75176
75239
  }
@@ -75394,26 +75457,26 @@ class ReduceProceduralCode extends _abap_rule_1.ABAPRule {
75394
75457
  key: "reduce_procedural_code",
75395
75458
  title: "Reduce procedural code",
75396
75459
  shortDescription: `Checks FORM and FUNCTION-MODULE have few statements`,
75397
- extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
75398
-
75399
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
75400
-
75460
+ extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
75461
+
75462
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
75463
+
75401
75464
  Comments are not counted as statements.`,
75402
75465
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
75403
- badExample: `FORM foo.
75404
- DATA lv_bar TYPE i.
75405
- lv_bar = 2 + 2.
75406
- IF lv_bar = 4.
75407
- WRITE 'hello world'.
75408
- ENDIF.
75409
- DATA lv_bar TYPE i.
75410
- lv_bar = 2 + 2.
75411
- IF lv_bar = 4.
75412
- WRITE 'hello world'.
75413
- ENDIF.
75466
+ badExample: `FORM foo.
75467
+ DATA lv_bar TYPE i.
75468
+ lv_bar = 2 + 2.
75469
+ IF lv_bar = 4.
75470
+ WRITE 'hello world'.
75471
+ ENDIF.
75472
+ DATA lv_bar TYPE i.
75473
+ lv_bar = 2 + 2.
75474
+ IF lv_bar = 4.
75475
+ WRITE 'hello world'.
75476
+ ENDIF.
75414
75477
  ENDFORM.`,
75415
- goodExample: `FORM foo.
75416
- NEW zcl_global_class( )->run_logic( ).
75478
+ goodExample: `FORM foo.
75479
+ NEW zcl_global_class( )->run_logic( ).
75417
75480
  ENDFORM.`,
75418
75481
  };
75419
75482
  }
@@ -75657,10 +75720,10 @@ class RemoveDescriptions {
75657
75720
  return {
75658
75721
  key: "remove_descriptions",
75659
75722
  title: "Remove descriptions",
75660
- shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
75661
-
75662
- Class descriptions are required, see rule description_empty.
75663
-
75723
+ shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
75724
+
75725
+ Class descriptions are required, see rule description_empty.
75726
+
75664
75727
  Consider using ABAP Doc for documentation.`,
75665
75728
  tags: [],
75666
75729
  };
@@ -75785,14 +75848,14 @@ class RFCErrorHandling extends _abap_rule_1.ABAPRule {
75785
75848
  tags: [_irule_1.RuleTag.SingleFile],
75786
75849
  shortDescription: `Checks that exceptions 'system_failure' and 'communication_failure' are handled in RFC calls`,
75787
75850
  extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenrfc_exception.htm`,
75788
- badExample: `CALL FUNCTION 'ZRFC'
75851
+ badExample: `CALL FUNCTION 'ZRFC'
75789
75852
  DESTINATION lv_rfc.`,
75790
- goodExample: `CALL FUNCTION 'ZRFC'
75791
- DESTINATION lv_rfc
75792
- EXCEPTIONS
75793
- system_failure = 1 MESSAGE msg
75794
- communication_failure = 2 MESSAGE msg
75795
- resource_failure = 3
75853
+ goodExample: `CALL FUNCTION 'ZRFC'
75854
+ DESTINATION lv_rfc
75855
+ EXCEPTIONS
75856
+ system_failure = 1 MESSAGE msg
75857
+ communication_failure = 2 MESSAGE msg
75858
+ resource_failure = 3
75796
75859
  OTHERS = 4.`,
75797
75860
  };
75798
75861
  }
@@ -75876,11 +75939,11 @@ class SelectAddOrderBy {
75876
75939
  key: "select_add_order_by",
75877
75940
  title: "SELECT add ORDER BY",
75878
75941
  shortDescription: `SELECTs add ORDER BY clause`,
75879
- extendedInformation: `
75880
- This will make sure that the SELECT statement returns results in the same sequence on different databases
75881
-
75882
- add ORDER BY PRIMARY KEY if in doubt
75883
-
75942
+ extendedInformation: `
75943
+ This will make sure that the SELECT statement returns results in the same sequence on different databases
75944
+
75945
+ add ORDER BY PRIMARY KEY if in doubt
75946
+
75884
75947
  If the target is a sorted/hashed table, no issue is reported`,
75885
75948
  tags: [_irule_1.RuleTag.SingleFile],
75886
75949
  badExample: `SELECT * FROM db INTO TABLE @DATA(tab).`,
@@ -76011,14 +76074,14 @@ class SelectPerformance {
76011
76074
  key: "select_performance",
76012
76075
  title: "SELECT performance",
76013
76076
  shortDescription: `Various checks regarding SELECT performance.`,
76014
- extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
76015
-
76077
+ extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
76078
+
76016
76079
  SELECT *: not reported if using INTO/APPENDING CORRESPONDING FIELDS OF`,
76017
76080
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Performance],
76018
- badExample: `SELECT field1, field2 FROM table
76019
- INTO @DATA(structure) UP TO 1 ROWS ORDER BY field3 DESCENDING.
76081
+ badExample: `SELECT field1, field2 FROM table
76082
+ INTO @DATA(structure) UP TO 1 ROWS ORDER BY field3 DESCENDING.
76020
76083
  ENDSELECT.`,
76021
- goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
76084
+ goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
76022
76085
  INTO TABLE @DATA(table) ORDER BY field3 DESCENDING`,
76023
76086
  };
76024
76087
  }
@@ -76136,8 +76199,8 @@ class SelectSingleFullKey {
76136
76199
  key: "select_single_full_key",
76137
76200
  title: "Detect SELECT SINGLE which are possibily not unique",
76138
76201
  shortDescription: `Detect SELECT SINGLE which are possibily not unique`,
76139
- extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
76140
-
76202
+ extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
76203
+
76141
76204
  If the statement contains a JOIN it is not checked`,
76142
76205
  pseudoComment: "EC CI_NOORDER",
76143
76206
  tags: [_irule_1.RuleTag.Quickfix],
@@ -76654,8 +76717,8 @@ class SICFConsistency {
76654
76717
  key: "sicf_consistency",
76655
76718
  title: "SICF consistency",
76656
76719
  shortDescription: `Checks the validity of ICF services`,
76657
- extendedInformation: `* Class defined in handler must exist
76658
- * Class must not have any syntax errors
76720
+ extendedInformation: `* Class defined in handler must exist
76721
+ * Class must not have any syntax errors
76659
76722
  * Class must implement interface IF_HTTP_EXTENSION`,
76660
76723
  };
76661
76724
  }
@@ -76768,23 +76831,23 @@ class SlowParameterPassing {
76768
76831
  shortDescription: `Detects slow pass by value passing for methods where parameter is not changed`,
76769
76832
  extendedInformation: `Method parameters defined in interfaces is not checked`,
76770
76833
  tags: [_irule_1.RuleTag.Performance, _irule_1.RuleTag.Quickfix],
76771
- badExample: `CLASS lcl DEFINITION.
76772
- PUBLIC SECTION.
76773
- METHODS bar IMPORTING VALUE(sdf) TYPE string.
76774
- ENDCLASS.
76775
- CLASS lcl IMPLEMENTATION.
76776
- METHOD bar.
76777
- WRITE sdf.
76778
- ENDMETHOD.
76834
+ badExample: `CLASS lcl DEFINITION.
76835
+ PUBLIC SECTION.
76836
+ METHODS bar IMPORTING VALUE(sdf) TYPE string.
76837
+ ENDCLASS.
76838
+ CLASS lcl IMPLEMENTATION.
76839
+ METHOD bar.
76840
+ WRITE sdf.
76841
+ ENDMETHOD.
76779
76842
  ENDCLASS.`,
76780
- goodExample: `CLASS lcl DEFINITION.
76781
- PUBLIC SECTION.
76782
- METHODS bar IMPORTING sdf TYPE string.
76783
- ENDCLASS.
76784
- CLASS lcl IMPLEMENTATION.
76785
- METHOD bar.
76786
- WRITE sdf.
76787
- ENDMETHOD.
76843
+ goodExample: `CLASS lcl DEFINITION.
76844
+ PUBLIC SECTION.
76845
+ METHODS bar IMPORTING sdf TYPE string.
76846
+ ENDCLASS.
76847
+ CLASS lcl IMPLEMENTATION.
76848
+ METHOD bar.
76849
+ WRITE sdf.
76850
+ ENDMETHOD.
76788
76851
  ENDCLASS.`,
76789
76852
  };
76790
76853
  }
@@ -77073,8 +77136,8 @@ class SpaceBeforeDot extends _abap_rule_1.ABAPRule {
77073
77136
  key: "space_before_dot",
77074
77137
  title: "Space before dot",
77075
77138
  shortDescription: `Checks for extra spaces before dots at the ends of statements`,
77076
- extendedInformation: `
77077
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
77139
+ extendedInformation: `
77140
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
77078
77141
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#condense-your-code`,
77079
77142
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
77080
77143
  badExample: `WRITE bar .`,
@@ -77267,12 +77330,12 @@ class SQLValueConversion {
77267
77330
  key: "sql_value_conversion",
77268
77331
  title: "Implicit SQL Value Conversion",
77269
77332
  shortDescription: `Ensure types match when selecting from database`,
77270
- extendedInformation: `
77271
- * Integer to CHAR conversion
77272
- * Integer to NUMC conversion
77273
- * NUMC to Integer conversion
77274
- * CHAR to Integer conversion
77275
- * Source field longer than database field, CHAR -> CHAR
77333
+ extendedInformation: `
77334
+ * Integer to CHAR conversion
77335
+ * Integer to NUMC conversion
77336
+ * NUMC to Integer conversion
77337
+ * CHAR to Integer conversion
77338
+ * Source field longer than database field, CHAR -> CHAR
77276
77339
  * Source field longer than database field, NUMC -> NUMC`,
77277
77340
  tags: [],
77278
77341
  };
@@ -77344,7 +77407,7 @@ class StartAtTab extends _abap_rule_1.ABAPRule {
77344
77407
  key: "start_at_tab",
77345
77408
  title: "Start at tab",
77346
77409
  shortDescription: `Checks that statements start at tabstops.`,
77347
- extendedInformation: `Reports max 100 issues per file
77410
+ extendedInformation: `Reports max 100 issues per file
77348
77411
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
77349
77412
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
77350
77413
  badExample: ` WRITE a.`,
@@ -77521,12 +77584,12 @@ class StrictSQL extends _abap_rule_1.ABAPRule {
77521
77584
  key: "strict_sql",
77522
77585
  title: "Strict SQL",
77523
77586
  shortDescription: `Strict SQL`,
77524
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
77525
-
77526
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
77527
-
77528
- Also see separate rule sql_escape_host_variables
77529
-
77587
+ extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
77588
+
77589
+ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
77590
+
77591
+ Also see separate rule sql_escape_host_variables
77592
+
77530
77593
  Activates from v750 and up`,
77531
77594
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix],
77532
77595
  badExample: `SELECT * FROM ztabl INTO TABLE @rt_content WHERE type = @iv_type ORDER BY PRIMARY KEY.`,
@@ -77812,14 +77875,14 @@ class SyModification extends _abap_rule_1.ABAPRule {
77812
77875
  key: "sy_modification",
77813
77876
  title: "Modification of SY fields",
77814
77877
  shortDescription: `Finds modification of sy fields`,
77815
- extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
77816
-
77817
- Changes to SY-TVAR* fields are not reported
77818
-
77819
- Modification of SY fields is not allwed in ABAP Cloud language version,
77878
+ extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
77879
+
77880
+ Changes to SY-TVAR* fields are not reported
77881
+
77882
+ Modification of SY fields is not allwed in ABAP Cloud language version,
77820
77883
  https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/ABENSYSTEM_FIELDS.html`,
77821
77884
  tags: [_irule_1.RuleTag.SingleFile],
77822
- badExample: `sy-uname = 2.
77885
+ badExample: `sy-uname = 2.
77823
77886
  sy = sy.`,
77824
77887
  };
77825
77888
  }
@@ -77881,8 +77944,8 @@ class TABLEnhancementCategory {
77881
77944
  key: "tabl_enhancement_category",
77882
77945
  title: "TABL enhancement category must be set",
77883
77946
  shortDescription: `Checks that tables do not have the enhancement category 'not classified'.`,
77884
- extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
77885
-
77947
+ extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
77948
+
77886
77949
  You may use standard report RS_DDIC_CLASSIFICATION_FINAL for adjustment.`,
77887
77950
  tags: [],
77888
77951
  };
@@ -77947,8 +78010,8 @@ class TablesDeclaredLocally extends _abap_rule_1.ABAPRule {
77947
78010
  shortDescription: `TABLES are always global, so declare them globally`,
77948
78011
  extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abaptables.htm`,
77949
78012
  tags: [_irule_1.RuleTag.SingleFile],
77950
- badExample: `FORM foo.
77951
- TABLES t100.
78013
+ badExample: `FORM foo.
78014
+ TABLES t100.
77952
78015
  ENDFORM.`,
77953
78016
  goodExample: `TABLES t000.`,
77954
78017
  };
@@ -78076,9 +78139,9 @@ class TypeFormParameters extends _abap_rule_1.ABAPRule {
78076
78139
  title: "Type FORM parameters",
78077
78140
  shortDescription: `Checks for untyped FORM parameters`,
78078
78141
  tags: [_irule_1.RuleTag.SingleFile],
78079
- badExample: `FORM foo USING bar.
78142
+ badExample: `FORM foo USING bar.
78080
78143
  ENDFORM.`,
78081
- goodExample: `FORM foo USING bar TYPE string.
78144
+ goodExample: `FORM foo USING bar TYPE string.
78082
78145
  ENDFORM.`,
78083
78146
  };
78084
78147
  }
@@ -78796,38 +78859,38 @@ class UnnecessaryPragma extends _abap_rule_1.ABAPRule {
78796
78859
  key: "unnecessary_pragma",
78797
78860
  title: "Unnecessary Pragma",
78798
78861
  shortDescription: `Finds pragmas which can be removed`,
78799
- extendedInformation: `* NO_HANDLER with handler
78800
-
78801
- * NEEDED without definition
78802
-
78803
- * NO_TEXT without texts
78804
-
78805
- * SUBRC_OK where sy-subrc is checked
78806
-
78862
+ extendedInformation: `* NO_HANDLER with handler
78863
+
78864
+ * NEEDED without definition
78865
+
78866
+ * NO_TEXT without texts
78867
+
78868
+ * SUBRC_OK where sy-subrc is checked
78869
+
78807
78870
  NO_HANDLER inside macros are not checked`,
78808
78871
  tags: [_irule_1.RuleTag.SingleFile],
78809
- badExample: `TRY.
78810
- ...
78811
- CATCH zcx_abapgit_exception ##NO_HANDLER.
78812
- RETURN. " it has a handler
78813
- ENDTRY.
78814
- MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
78815
- SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
78816
- IF sy-subrc <> 0.
78872
+ badExample: `TRY.
78873
+ ...
78874
+ CATCH zcx_abapgit_exception ##NO_HANDLER.
78875
+ RETURN. " it has a handler
78876
+ ENDTRY.
78877
+ MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
78878
+ SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
78879
+ IF sy-subrc <> 0.
78817
78880
  ENDIF.`,
78818
- goodExample: `TRY.
78819
- ...
78820
- CATCH zcx_abapgit_exception.
78821
- RETURN.
78822
- ENDTRY.
78823
- MESSAGE w125(zbar) WITH c_foo INTO message.
78824
- SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
78825
- IF sy-subrc <> 0.
78826
- ENDIF.
78827
-
78828
- DATA: BEGIN OF blah ##NEEDED,
78829
- test1 TYPE string,
78830
- test2 TYPE string,
78881
+ goodExample: `TRY.
78882
+ ...
78883
+ CATCH zcx_abapgit_exception.
78884
+ RETURN.
78885
+ ENDTRY.
78886
+ MESSAGE w125(zbar) WITH c_foo INTO message.
78887
+ SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
78888
+ IF sy-subrc <> 0.
78889
+ ENDIF.
78890
+
78891
+ DATA: BEGIN OF blah ##NEEDED,
78892
+ test1 TYPE string,
78893
+ test2 TYPE string,
78831
78894
  END OF blah.`,
78832
78895
  };
78833
78896
  }
@@ -78994,18 +79057,18 @@ class UnnecessaryReturn extends _abap_rule_1.ABAPRule {
78994
79057
  shortDescription: `Finds unnecessary RETURN statements`,
78995
79058
  extendedInformation: `Finds unnecessary RETURN statements`,
78996
79059
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
78997
- badExample: `FORM hello1.
78998
- WRITE 'world'.
78999
- RETURN.
79000
- ENDFORM.
79001
-
79002
- FORM foo.
79003
- IF 1 = 2.
79004
- RETURN.
79005
- ENDIF.
79060
+ badExample: `FORM hello1.
79061
+ WRITE 'world'.
79062
+ RETURN.
79063
+ ENDFORM.
79064
+
79065
+ FORM foo.
79066
+ IF 1 = 2.
79067
+ RETURN.
79068
+ ENDIF.
79006
79069
  ENDFORM.`,
79007
- goodExample: `FORM hello2.
79008
- WRITE 'world'.
79070
+ goodExample: `FORM hello2.
79071
+ WRITE 'world'.
79009
79072
  ENDFORM.`,
79010
79073
  };
79011
79074
  }
@@ -79360,13 +79423,13 @@ class UnusedMacros {
79360
79423
  title: "Unused macros",
79361
79424
  shortDescription: `Checks for unused macro definitions definitions`,
79362
79425
  tags: [_irule_1.RuleTag.Quickfix],
79363
- badExample: `DEFINE foobar1.
79364
- WRITE 'hello'.
79426
+ badExample: `DEFINE foobar1.
79427
+ WRITE 'hello'.
79365
79428
  END-OF-DEFINITION.`,
79366
- goodExample: `DEFINE foobar2.
79367
- WRITE 'hello'.
79368
- END-OF-DEFINITION.
79369
-
79429
+ goodExample: `DEFINE foobar2.
79430
+ WRITE 'hello'.
79431
+ END-OF-DEFINITION.
79432
+
79370
79433
  foobar2.`,
79371
79434
  };
79372
79435
  }
@@ -79478,18 +79541,18 @@ class UnusedMethods {
79478
79541
  key: "unused_methods",
79479
79542
  title: "Unused methods",
79480
79543
  shortDescription: `Checks for unused methods`,
79481
- extendedInformation: `Checks private and protected methods.
79482
-
79483
- Unused methods are not reported if the object contains parser or syntax errors.
79484
- Quick fixes only appears for private methods or projected methods where the class doesnt have any subclasses.
79485
-
79486
- Skips:
79487
- * methods FOR TESTING
79488
- * methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
79489
- * class_constructor + constructor methods
79490
- * event handlers
79491
- * methods that are redefined
79492
- * INCLUDEs
79544
+ extendedInformation: `Checks private and protected methods.
79545
+
79546
+ Unused methods are not reported if the object contains parser or syntax errors.
79547
+ Quick fixes only appears for private methods or projected methods where the class doesnt have any subclasses.
79548
+
79549
+ Skips:
79550
+ * methods FOR TESTING
79551
+ * methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
79552
+ * class_constructor + constructor methods
79553
+ * event handlers
79554
+ * methods that are redefined
79555
+ * INCLUDEs
79493
79556
  `,
79494
79557
  tags: [_irule_1.RuleTag.Quickfix],
79495
79558
  pragma: "##CALLED",
@@ -79965,23 +80028,23 @@ class UnusedVariables {
79965
80028
  key: "unused_variables",
79966
80029
  title: "Unused variables",
79967
80030
  shortDescription: `Checks for unused variables and constants`,
79968
- extendedInformation: `Skips event parameters.
79969
-
79970
- Note that this currently does not work if the source code uses macros.
79971
-
79972
- Unused variables are not reported if the object contains parser or syntax errors.
79973
-
80031
+ extendedInformation: `Skips event parameters.
80032
+
80033
+ Note that this currently does not work if the source code uses macros.
80034
+
80035
+ Unused variables are not reported if the object contains parser or syntax errors.
80036
+
79974
80037
  Errors found in INCLUDES are reported for the main program.`,
79975
80038
  tags: [_irule_1.RuleTag.Quickfix],
79976
80039
  pragma: "##NEEDED",
79977
80040
  pseudoComment: "EC NEEDED",
79978
- badExample: `DATA: BEGIN OF blah1,
79979
- test TYPE string,
79980
- test2 TYPE string,
80041
+ badExample: `DATA: BEGIN OF blah1,
80042
+ test TYPE string,
80043
+ test2 TYPE string,
79981
80044
  END OF blah1.`,
79982
- goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
79983
- test TYPE string,
79984
- test2 TYPE string,
80045
+ goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
80046
+ test TYPE string,
80047
+ test2 TYPE string,
79985
80048
  END OF blah2.`,
79986
80049
  };
79987
80050
  }
@@ -80200,15 +80263,15 @@ class UseBoolExpression extends _abap_rule_1.ABAPRule {
80200
80263
  shortDescription: `Use boolean expression, xsdbool from 740sp08 and up, boolc from 702 and up`,
80201
80264
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
80202
80265
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
80203
- badExample: `IF line IS INITIAL.
80204
- has_entries = abap_false.
80205
- ELSE.
80206
- has_entries = abap_true.
80207
- ENDIF.
80208
-
80266
+ badExample: `IF line IS INITIAL.
80267
+ has_entries = abap_false.
80268
+ ELSE.
80269
+ has_entries = abap_true.
80270
+ ENDIF.
80271
+
80209
80272
  DATA(fsdf) = COND #( WHEN foo <> bar THEN abap_true ELSE abap_false ).`,
80210
- goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
80211
-
80273
+ goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
80274
+
80212
80275
  DATA(fsdf) = xsdbool( foo <> bar ).`,
80213
80276
  };
80214
80277
  }
@@ -80326,15 +80389,15 @@ class UseClassBasedExceptions extends _abap_rule_1.ABAPRule {
80326
80389
  shortDescription: `Use class based exceptions, checks interface and class definitions`,
80327
80390
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-class-based-exceptions`,
80328
80391
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
80329
- badExample: `INTERFACE lif.
80330
- METHODS load_data
80331
- EXCEPTIONS
80332
- invalid_parameter.
80392
+ badExample: `INTERFACE lif.
80393
+ METHODS load_data
80394
+ EXCEPTIONS
80395
+ invalid_parameter.
80333
80396
  ENDINTERFACE.`,
80334
- goodExample: `INTERFACE lif.
80335
- METHODS load_data
80336
- RAISING
80337
- cx_something.
80397
+ goodExample: `INTERFACE lif.
80398
+ METHODS load_data
80399
+ RAISING
80400
+ cx_something.
80338
80401
  ENDINTERFACE.`,
80339
80402
  };
80340
80403
  }
@@ -80395,15 +80458,15 @@ class UseLineExists extends _abap_rule_1.ABAPRule {
80395
80458
  key: "use_line_exists",
80396
80459
  title: "Use line_exists",
80397
80460
  shortDescription: `Use line_exists, from 740sp02 and up`,
80398
- extendedInformation: `
80399
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
80400
-
80461
+ extendedInformation: `
80462
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
80463
+
80401
80464
  Not reported if the READ TABLE statement contains BINARY SEARCH.`,
80402
80465
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
80403
- badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
80404
- IF sy-subrc = 0.
80466
+ badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
80467
+ IF sy-subrc = 0.
80405
80468
  ENDIF.`,
80406
- goodExample: `IF line_exists( my_table[ key = 'A' ] ).
80469
+ goodExample: `IF line_exists( my_table[ key = 'A' ] ).
80407
80470
  ENDIF.`,
80408
80471
  };
80409
80472
  }
@@ -80513,10 +80576,10 @@ class UseNew extends _abap_rule_1.ABAPRule {
80513
80576
  key: "use_new",
80514
80577
  title: "Use NEW",
80515
80578
  shortDescription: `Checks for deprecated CREATE OBJECT statements.`,
80516
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
80517
-
80518
- If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
80519
-
80579
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
80580
+
80581
+ If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
80582
+
80520
80583
  Applicable from v740sp02 and up`,
80521
80584
  badExample: `CREATE OBJECT ref.`,
80522
80585
  goodExample: `ref = NEW #( ).`,
@@ -80614,13 +80677,13 @@ class WhenOthersLast extends _abap_rule_1.ABAPRule {
80614
80677
  title: "WHEN OTHERS last",
80615
80678
  shortDescription: `Checks that WHEN OTHERS is placed the last within a CASE statement.`,
80616
80679
  tags: [_irule_1.RuleTag.SingleFile],
80617
- badExample: `CASE bar.
80618
- WHEN OTHERS.
80619
- WHEN 2.
80680
+ badExample: `CASE bar.
80681
+ WHEN OTHERS.
80682
+ WHEN 2.
80620
80683
  ENDCASE.`,
80621
- goodExample: `CASE bar.
80622
- WHEN 2.
80623
- WHEN OTHERS.
80684
+ goodExample: `CASE bar.
80685
+ WHEN 2.
80686
+ WHEN OTHERS.
80624
80687
  ENDCASE.`,
80625
80688
  };
80626
80689
  }
@@ -80767,9 +80830,9 @@ class XMLConsistency {
80767
80830
  key: "xml_consistency",
80768
80831
  title: "XML consistency",
80769
80832
  shortDescription: `Checks the consistency of main XML files`,
80770
- extendedInformation: `Checks:
80771
- * XML is well-formed and parseable
80772
- * Naming for CLAS and INTF objects
80833
+ extendedInformation: `Checks:
80834
+ * XML is well-formed and parseable
80835
+ * Naming for CLAS and INTF objects
80773
80836
  * Texts and translations do not exceed maximum allowed length.`,
80774
80837
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.Syntax],
80775
80838
  };