@abaplint/transpiler-cli 2.8.27 → 2.8.28
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.
- package/build/bundle.js +962 -861
- package/package.json +6 -6
package/build/bundle.js
CHANGED
|
@@ -1652,7 +1652,24 @@ exports.WStaticArrowW = WStaticArrowW;
|
|
|
1652
1652
|
"use strict";
|
|
1653
1653
|
|
|
1654
1654
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1655
|
-
exports.
|
|
1655
|
+
exports.Combi = exports.Expression = void 0;
|
|
1656
|
+
exports.str = str;
|
|
1657
|
+
exports.regex = regex;
|
|
1658
|
+
exports.tok = tok;
|
|
1659
|
+
exports.seq = seq;
|
|
1660
|
+
exports.alt = alt;
|
|
1661
|
+
exports.altPrio = altPrio;
|
|
1662
|
+
exports.opt = opt;
|
|
1663
|
+
exports.optPrio = optPrio;
|
|
1664
|
+
exports.per = per;
|
|
1665
|
+
exports.star = star;
|
|
1666
|
+
exports.starPrio = starPrio;
|
|
1667
|
+
exports.plus = plus;
|
|
1668
|
+
exports.plusPrio = plusPrio;
|
|
1669
|
+
exports.ver = ver;
|
|
1670
|
+
exports.verNot = verNot;
|
|
1671
|
+
exports.failCombinator = failCombinator;
|
|
1672
|
+
exports.failStar = failStar;
|
|
1656
1673
|
const Tokens = __webpack_require__(/*! ../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
|
|
1657
1674
|
const nodes_1 = __webpack_require__(/*! ../nodes */ "./node_modules/@abaplint/core/build/src/abap/nodes/index.js");
|
|
1658
1675
|
const version_1 = __webpack_require__(/*! ../../version */ "./node_modules/@abaplint/core/build/src/version.js");
|
|
@@ -2465,15 +2482,12 @@ function str(s) {
|
|
|
2465
2482
|
return new Word(s);
|
|
2466
2483
|
}
|
|
2467
2484
|
}
|
|
2468
|
-
exports.str = str;
|
|
2469
2485
|
function regex(r) {
|
|
2470
2486
|
return new Regex(r);
|
|
2471
2487
|
}
|
|
2472
|
-
exports.regex = regex;
|
|
2473
2488
|
function tok(t) {
|
|
2474
2489
|
return new Token(t.name);
|
|
2475
2490
|
}
|
|
2476
|
-
exports.tok = tok;
|
|
2477
2491
|
const expressionSingletons = {};
|
|
2478
2492
|
const stringSingletons = {};
|
|
2479
2493
|
function map(s) {
|
|
@@ -2502,65 +2516,51 @@ function seq(first, second, ...rest) {
|
|
|
2502
2516
|
list.push(...rest.map(map));
|
|
2503
2517
|
return new Sequence(list);
|
|
2504
2518
|
}
|
|
2505
|
-
exports.seq = seq;
|
|
2506
2519
|
function alt(first, second, ...rest) {
|
|
2507
2520
|
const list = [map(first), map(second)];
|
|
2508
2521
|
list.push(...rest.map(map));
|
|
2509
2522
|
return new Alternative(list);
|
|
2510
2523
|
}
|
|
2511
|
-
exports.alt = alt;
|
|
2512
2524
|
function altPrio(first, second, ...rest) {
|
|
2513
2525
|
const list = [map(first), map(second)];
|
|
2514
2526
|
list.push(...rest.map(map));
|
|
2515
2527
|
return new AlternativePriority(list);
|
|
2516
2528
|
}
|
|
2517
|
-
exports.altPrio = altPrio;
|
|
2518
2529
|
function opt(first) {
|
|
2519
2530
|
return new Optional(map(first));
|
|
2520
2531
|
}
|
|
2521
|
-
exports.opt = opt;
|
|
2522
2532
|
function optPrio(first) {
|
|
2523
2533
|
return new OptionalPriority(map(first));
|
|
2524
2534
|
}
|
|
2525
|
-
exports.optPrio = optPrio;
|
|
2526
2535
|
function per(first, second, ...rest) {
|
|
2527
2536
|
const list = [map(first), map(second)];
|
|
2528
2537
|
list.push(...rest.map(map));
|
|
2529
2538
|
return new Permutation(list);
|
|
2530
2539
|
}
|
|
2531
|
-
exports.per = per;
|
|
2532
2540
|
function star(first) {
|
|
2533
2541
|
return new Star(map(first));
|
|
2534
2542
|
}
|
|
2535
|
-
exports.star = star;
|
|
2536
2543
|
function starPrio(first) {
|
|
2537
2544
|
return new StarPriority(map(first));
|
|
2538
2545
|
}
|
|
2539
|
-
exports.starPrio = starPrio;
|
|
2540
2546
|
function plus(first) {
|
|
2541
2547
|
return new Plus(map(first));
|
|
2542
2548
|
}
|
|
2543
|
-
exports.plus = plus;
|
|
2544
2549
|
function plusPrio(first) {
|
|
2545
2550
|
return new PlusPriority(map(first));
|
|
2546
2551
|
}
|
|
2547
|
-
exports.plusPrio = plusPrio;
|
|
2548
2552
|
function ver(version, first, or) {
|
|
2549
2553
|
return new Vers(version, map(first), or);
|
|
2550
2554
|
}
|
|
2551
|
-
exports.ver = ver;
|
|
2552
2555
|
function verNot(version, first) {
|
|
2553
2556
|
return new VersNot(version, map(first));
|
|
2554
2557
|
}
|
|
2555
|
-
exports.verNot = verNot;
|
|
2556
2558
|
function failCombinator() {
|
|
2557
2559
|
return new FailCombinator();
|
|
2558
2560
|
}
|
|
2559
|
-
exports.failCombinator = failCombinator;
|
|
2560
2561
|
function failStar() {
|
|
2561
2562
|
return new FailStar();
|
|
2562
2563
|
}
|
|
2563
|
-
exports.failStar = failStar;
|
|
2564
2564
|
//# sourceMappingURL=combi.js.map
|
|
2565
2565
|
|
|
2566
2566
|
/***/ }),
|
|
@@ -2649,6 +2649,7 @@ class ExpandMacros {
|
|
|
2649
2649
|
else if (type instanceof Statements.Include) {
|
|
2650
2650
|
const includeName = (_b = statement.findDirectExpression(Expressions.IncludeName)) === null || _b === void 0 ? void 0 : _b.concatTokens();
|
|
2651
2651
|
// todo, this does not take function module includes into account
|
|
2652
|
+
// todo, workaround for cyclic includes?
|
|
2652
2653
|
const prog = (_c = this.reg) === null || _c === void 0 ? void 0 : _c.getObject("PROG", includeName);
|
|
2653
2654
|
if (prog) {
|
|
2654
2655
|
prog.parse(this.version, this.globalMacros, this.reg);
|
|
@@ -6861,9 +6862,10 @@ class SQLCase extends combi_1.Expression {
|
|
|
6861
6862
|
getRunnable() {
|
|
6862
6863
|
const field = (0, combi_1.altPrio)(_1.SQLAggregation, SQLCase, _1.SQLFunction, _1.SQLPath, sql_field_name_1.SQLFieldName, constant_1.Constant);
|
|
6863
6864
|
const sub = (0, combi_1.seq)((0, combi_1.altPrio)("+", "-", "*", "/", "&&"), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenLeftW)), field, (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
6864
|
-
const
|
|
6865
|
-
const
|
|
6866
|
-
|
|
6865
|
+
const sourc = (0, combi_1.altPrio)(SQLCase, _1.SQLAggregation, _1.SQLFunction, sql_source_1.SQLSource);
|
|
6866
|
+
const when = (0, combi_1.seq)("WHEN", (0, combi_1.altPrio)(sql_cond_1.SQLCond, constant_1.Constant), "THEN", sourc, (0, combi_1.starPrio)(sub));
|
|
6867
|
+
const els = (0, combi_1.seq)("ELSE", sourc);
|
|
6868
|
+
return (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("CASE", (0, combi_1.opt)(sql_field_name_1.SQLFieldName), (0, combi_1.plusPrio)(when), (0, combi_1.optPrio)(els), "END"));
|
|
6867
6869
|
}
|
|
6868
6870
|
}
|
|
6869
6871
|
exports.SQLCase = SQLCase;
|
|
@@ -7257,21 +7259,22 @@ const sql_aggregation_1 = __webpack_require__(/*! ./sql_aggregation */ "./node_m
|
|
|
7257
7259
|
class SQLFunction extends combi_1.Expression {
|
|
7258
7260
|
getRunnable() {
|
|
7259
7261
|
const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeftW), source_1.Source, (0, combi_1.tok)(tokens_1.WParenRightW));
|
|
7260
|
-
const at = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), (0, combi_1.
|
|
7261
|
-
const param = (0, combi_1.
|
|
7262
|
+
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)));
|
|
7263
|
+
const param = (0, combi_1.altPrio)(SQLFunction, sql_aggregation_1.SQLAggregation, sql_field_name_1.SQLFieldName, sql_alias_field_1.SQLAliasField, constant_1.Constant, at);
|
|
7262
7264
|
const castTypes = (0, combi_1.altPrio)((0, combi_1.seq)("CHAR", (0, combi_1.tok)(tokens_1.ParenLeftW), integer_1.Integer, (0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.seq)("DEC", (0, combi_1.tok)(tokens_1.ParenLeftW), integer_1.Integer, ",", integer_1.Integer, (0, combi_1.tok)(tokens_1.WParenRightW)), "FLTP", "NUMC", "INT8");
|
|
7265
|
+
const commaParam = (0, combi_1.seq)(",", param);
|
|
7263
7266
|
const abs = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("abs", (0, combi_1.tok)(tokens_1.ParenLeftW), param, (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
7264
7267
|
const cast = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("cast", (0, combi_1.tok)(tokens_1.ParenLeftW), param, "AS", castTypes, (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
7265
7268
|
const ceil = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("ceil", (0, combi_1.tok)(tokens_1.ParenLeftW), param, (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
7266
|
-
const coalesce = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("coalesce", (0, combi_1.tok)(tokens_1.ParenLeftW), param,
|
|
7267
|
-
const concat = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("concat", (0, combi_1.tok)(tokens_1.ParenLeftW), param,
|
|
7268
|
-
const div = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("div", (0, combi_1.tok)(tokens_1.ParenLeftW), param,
|
|
7269
|
+
const coalesce = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("coalesce", (0, combi_1.tok)(tokens_1.ParenLeftW), param, commaParam, (0, combi_1.optPrio)(commaParam), (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
7270
|
+
const concat = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("concat", (0, combi_1.tok)(tokens_1.ParenLeftW), param, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
7271
|
+
const div = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("div", (0, combi_1.tok)(tokens_1.ParenLeftW), param, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
7269
7272
|
const floor = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("floor", (0, combi_1.tok)(tokens_1.ParenLeftW), param, (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
7270
7273
|
const length = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("length", (0, combi_1.tok)(tokens_1.ParenLeftW), param, (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
7271
7274
|
const lower = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)("lower", (0, combi_1.tok)(tokens_1.ParenLeftW), param, (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
7272
|
-
const mod = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("mod", (0, combi_1.tok)(tokens_1.ParenLeftW), param,
|
|
7273
|
-
const replace = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("replace", (0, combi_1.tok)(tokens_1.ParenLeftW), param,
|
|
7274
|
-
const round = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("round", (0, combi_1.tok)(tokens_1.ParenLeftW), param,
|
|
7275
|
+
const mod = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("mod", (0, combi_1.tok)(tokens_1.ParenLeftW), param, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
7276
|
+
const replace = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("replace", (0, combi_1.tok)(tokens_1.ParenLeftW), param, commaParam, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
7277
|
+
const round = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("round", (0, combi_1.tok)(tokens_1.ParenLeftW), param, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
7275
7278
|
const upper = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)("upper", (0, combi_1.tok)(tokens_1.ParenLeftW), param, (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
7276
7279
|
const uuid = (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("uuid", (0, combi_1.tok)(tokens_1.ParenLeftW), (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
7277
7280
|
return (0, combi_1.altPrio)(uuid, abs, ceil, floor, cast, div, mod, coalesce, concat, replace, length, lower, upper, round);
|
|
@@ -16915,7 +16918,13 @@ StructureParser.singletons = {};
|
|
|
16915
16918
|
"use strict";
|
|
16916
16919
|
|
|
16917
16920
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
16918
|
-
exports.
|
|
16921
|
+
exports.seq = seq;
|
|
16922
|
+
exports.alt = alt;
|
|
16923
|
+
exports.beginEnd = beginEnd;
|
|
16924
|
+
exports.opt = opt;
|
|
16925
|
+
exports.star = star;
|
|
16926
|
+
exports.sta = sta;
|
|
16927
|
+
exports.sub = sub;
|
|
16919
16928
|
const nodes_1 = __webpack_require__(/*! ../../nodes */ "./node_modules/@abaplint/core/build/src/abap/nodes/index.js");
|
|
16920
16929
|
const _statement_1 = __webpack_require__(/*! ../../2_statements/statements/_statement */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js");
|
|
16921
16930
|
class Sequence {
|
|
@@ -17223,27 +17232,21 @@ class SubStatement {
|
|
|
17223
17232
|
function seq(first, ...rest) {
|
|
17224
17233
|
return new Sequence([first].concat(rest));
|
|
17225
17234
|
}
|
|
17226
|
-
exports.seq = seq;
|
|
17227
17235
|
function alt(first, ...rest) {
|
|
17228
17236
|
return new Alternative([first].concat(rest));
|
|
17229
17237
|
}
|
|
17230
|
-
exports.alt = alt;
|
|
17231
17238
|
function beginEnd(begin, body, end) {
|
|
17232
17239
|
return new Sequence([begin, body, end]);
|
|
17233
17240
|
}
|
|
17234
|
-
exports.beginEnd = beginEnd;
|
|
17235
17241
|
function opt(o) {
|
|
17236
17242
|
return new Optional(o);
|
|
17237
17243
|
}
|
|
17238
|
-
exports.opt = opt;
|
|
17239
17244
|
function star(s) {
|
|
17240
17245
|
return new Star(s);
|
|
17241
17246
|
}
|
|
17242
|
-
exports.star = star;
|
|
17243
17247
|
function sta(s) {
|
|
17244
17248
|
return new SubStatement(s);
|
|
17245
17249
|
}
|
|
17246
|
-
exports.sta = sta;
|
|
17247
17250
|
const singletons = {};
|
|
17248
17251
|
function sub(s) {
|
|
17249
17252
|
if (singletons[s.name] === undefined) {
|
|
@@ -17251,7 +17254,6 @@ function sub(s) {
|
|
|
17251
17254
|
}
|
|
17252
17255
|
return singletons[s.name];
|
|
17253
17256
|
}
|
|
17254
|
-
exports.sub = sub;
|
|
17255
17257
|
//# sourceMappingURL=_combi.js.map
|
|
17256
17258
|
|
|
17257
17259
|
/***/ }),
|
|
@@ -17502,10 +17504,9 @@ const _combi_1 = __webpack_require__(/*! ./_combi */ "./node_modules/@abaplint/c
|
|
|
17502
17504
|
const private_section_1 = __webpack_require__(/*! ./private_section */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/private_section.js");
|
|
17503
17505
|
const protected_section_1 = __webpack_require__(/*! ./protected_section */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/protected_section.js");
|
|
17504
17506
|
const public_section_1 = __webpack_require__(/*! ./public_section */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/public_section.js");
|
|
17505
|
-
const statements_1 = __webpack_require__(/*! ../../2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
|
|
17506
17507
|
class ClassDefinition {
|
|
17507
17508
|
getMatcher() {
|
|
17508
|
-
const body = (0, _combi_1.seq)((0, _combi_1.opt)((0, _combi_1.sta)(
|
|
17509
|
+
const body = (0, _combi_1.seq)((0, _combi_1.opt)((0, _combi_1.sta)(Statements.SetExtendedCheck)), (0, _combi_1.star)((0, _combi_1.sta)(Statements.TypePools)), (0, _combi_1.opt)((0, _combi_1.sub)(public_section_1.PublicSection)), (0, _combi_1.star)((0, _combi_1.sta)(Statements.Include)), (0, _combi_1.opt)((0, _combi_1.sub)(protected_section_1.ProtectedSection)), (0, _combi_1.opt)((0, _combi_1.sub)(private_section_1.PrivateSection)), (0, _combi_1.opt)((0, _combi_1.sta)(Statements.SetExtendedCheck)));
|
|
17509
17510
|
return (0, _combi_1.beginEnd)((0, _combi_1.sta)(Statements.ClassDefinition), body, (0, _combi_1.sta)(Statements.EndClass));
|
|
17510
17511
|
}
|
|
17511
17512
|
}
|
|
@@ -33408,13 +33409,13 @@ class FlowGraph {
|
|
|
33408
33409
|
this.label = label;
|
|
33409
33410
|
}
|
|
33410
33411
|
toDigraph() {
|
|
33411
|
-
return `digraph G {
|
|
33412
|
-
labelloc="t";
|
|
33413
|
-
label="${this.label}";
|
|
33414
|
-
graph [fontname = "helvetica"];
|
|
33415
|
-
node [fontname = "helvetica", shape="box"];
|
|
33416
|
-
edge [fontname = "helvetica"];
|
|
33417
|
-
${this.toTextEdges()}
|
|
33412
|
+
return `digraph G {
|
|
33413
|
+
labelloc="t";
|
|
33414
|
+
label="${this.label}";
|
|
33415
|
+
graph [fontname = "helvetica"];
|
|
33416
|
+
node [fontname = "helvetica", shape="box"];
|
|
33417
|
+
edge [fontname = "helvetica"];
|
|
33418
|
+
${this.toTextEdges()}
|
|
33418
33419
|
}`;
|
|
33419
33420
|
}
|
|
33420
33421
|
listSources(node) {
|
|
@@ -38784,7 +38785,10 @@ const cds_association_1 = __webpack_require__(/*! ./cds_association */ "./node_m
|
|
|
38784
38785
|
const cds_join_1 = __webpack_require__(/*! ./cds_join */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_join.js");
|
|
38785
38786
|
class CDSSelect extends combi_1.Expression {
|
|
38786
38787
|
getRunnable() {
|
|
38787
|
-
|
|
38788
|
+
const fields = (0, combi_1.opt)((0, combi_1.seq)((0, combi_1.star)((0, combi_1.seq)(_1.CDSElement, ",")), _1.CDSElement));
|
|
38789
|
+
const distinct = (0, combi_1.str)("DISTINCT");
|
|
38790
|
+
const elements = (0, combi_1.seq)((0, combi_1.str)("{"), (0, combi_1.plus)(_1.CDSElement), (0, combi_1.star)((0, combi_1.seq)(",", _1.CDSElement)), (0, combi_1.str)("}"));
|
|
38791
|
+
return (0, combi_1.seq)("SELECT", (0, combi_1.opt)(distinct), (0, combi_1.opt)(fields), "FROM", _1.CDSSource, (0, combi_1.opt)(_1.CDSParametersSelect), (0, combi_1.opt)(_1.CDSAs), (0, combi_1.star)(cds_join_1.CDSJoin), (0, combi_1.star)(_1.CDSComposition), (0, combi_1.star)(cds_association_1.CDSAssociation), (0, combi_1.star)(_1.CDSComposition), (0, combi_1.opt)(elements), (0, combi_1.opt)(_1.CDSGroupBy), (0, combi_1.opt)(_1.CDSWhere), (0, combi_1.opt)((0, combi_1.seq)("UNION", (0, combi_1.opt)("ALL"), CDSSelect)));
|
|
38788
38792
|
}
|
|
38789
38793
|
}
|
|
38790
38794
|
exports.CDSSelect = CDSSelect;
|
|
@@ -39941,7 +39945,9 @@ __exportStar(__webpack_require__(/*! ./ddl_type */ "./node_modules/@abaplint/cor
|
|
|
39941
39945
|
"use strict";
|
|
39942
39946
|
|
|
39943
39947
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
39944
|
-
exports.
|
|
39948
|
+
exports.EditHelper = exports.EditDraft = void 0;
|
|
39949
|
+
exports.applyEditSingle = applyEditSingle;
|
|
39950
|
+
exports.applyEditList = applyEditList;
|
|
39945
39951
|
const position_1 = __webpack_require__(/*! ./position */ "./node_modules/@abaplint/core/build/src/position.js");
|
|
39946
39952
|
const memory_file_1 = __webpack_require__(/*! ./files/memory_file */ "./node_modules/@abaplint/core/build/src/files/memory_file.js");
|
|
39947
39953
|
class EditDraft {
|
|
@@ -40159,7 +40165,6 @@ function applyEditSingle(reg, edit) {
|
|
|
40159
40165
|
reg.updateFile(result);
|
|
40160
40166
|
}
|
|
40161
40167
|
}
|
|
40162
|
-
exports.applyEditSingle = applyEditSingle;
|
|
40163
40168
|
/** returns list of filenames which were changed */
|
|
40164
40169
|
function applyEditList(reg, edits) {
|
|
40165
40170
|
const ret = [];
|
|
@@ -40189,7 +40194,6 @@ function applyEditList(reg, edits) {
|
|
|
40189
40194
|
}
|
|
40190
40195
|
return ret;
|
|
40191
40196
|
}
|
|
40192
|
-
exports.applyEditList = applyEditList;
|
|
40193
40197
|
//# sourceMappingURL=edit_helper.js.map
|
|
40194
40198
|
|
|
40195
40199
|
/***/ }),
|
|
@@ -40286,8 +40290,8 @@ exports.MemoryFile = MemoryFile;
|
|
|
40286
40290
|
"use strict";
|
|
40287
40291
|
|
|
40288
40292
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
40289
|
-
exports.
|
|
40290
|
-
exports.LSPEdit = exports.RuleTag = exports.Severity = exports.Visibility = void 0;
|
|
40293
|
+
exports.PrettyPrinter = exports.Position = exports.CurrentScope = exports.ABAPFile = exports.RulesRunner = exports.SpaghettiScope = exports.SyntaxLogic = exports.ABAPObject = exports.Tokens = exports.ExpressionsCDS = exports.CDSParser = exports.LanguageServerTypes = exports.DDLParser = exports.NativeSQL = exports.MacroContent = exports.MacroCall = exports.applyEditList = exports.applyEditSingle = exports.SpaghettiScopeNode = exports.AbstractFile = exports.Token = exports.ScopeType = exports.BasicTypes = exports.TypedIdentifier = exports.AbstractType = exports.VirtualPosition = exports.Comment = exports.Unknown = exports.Empty = exports.Identifier = exports.Nodes = exports.Types = exports.Expressions = exports.Statements = exports.Structures = exports.SkipLogic = exports.Objects = exports.ArtifactsRules = exports.ArtifactsObjects = exports.ArtifactsABAP = exports.BuiltIn = exports.MethodLengthStats = exports.LanguageServer = exports.Registry = exports.CyclomaticComplexityStats = exports.ReferenceType = exports.Version = exports.Config = exports.Issue = exports.MemoryFile = void 0;
|
|
40294
|
+
exports.LSPEdit = exports.RuleTag = exports.Severity = exports.Visibility = exports.Info = exports.Diagnostics = exports.Rename = void 0;
|
|
40291
40295
|
const issue_1 = __webpack_require__(/*! ./issue */ "./node_modules/@abaplint/core/build/src/issue.js");
|
|
40292
40296
|
Object.defineProperty(exports, "Issue", ({ enumerable: true, get: function () { return issue_1.Issue; } }));
|
|
40293
40297
|
const config_1 = __webpack_require__(/*! ./config */ "./node_modules/@abaplint/core/build/src/config.js");
|
|
@@ -40355,6 +40359,9 @@ const _statement_1 = __webpack_require__(/*! ./abap/2_statements/statements/_sta
|
|
|
40355
40359
|
Object.defineProperty(exports, "Empty", ({ enumerable: true, get: function () { return _statement_1.Empty; } }));
|
|
40356
40360
|
Object.defineProperty(exports, "Unknown", ({ enumerable: true, get: function () { return _statement_1.Unknown; } }));
|
|
40357
40361
|
Object.defineProperty(exports, "Comment", ({ enumerable: true, get: function () { return _statement_1.Comment; } }));
|
|
40362
|
+
Object.defineProperty(exports, "MacroCall", ({ enumerable: true, get: function () { return _statement_1.MacroCall; } }));
|
|
40363
|
+
Object.defineProperty(exports, "MacroContent", ({ enumerable: true, get: function () { return _statement_1.MacroContent; } }));
|
|
40364
|
+
Object.defineProperty(exports, "NativeSQL", ({ enumerable: true, get: function () { return _statement_1.NativeSQL; } }));
|
|
40358
40365
|
const edit_helper_1 = __webpack_require__(/*! ./edit_helper */ "./node_modules/@abaplint/core/build/src/edit_helper.js");
|
|
40359
40366
|
Object.defineProperty(exports, "applyEditSingle", ({ enumerable: true, get: function () { return edit_helper_1.applyEditSingle; } }));
|
|
40360
40367
|
Object.defineProperty(exports, "applyEditList", ({ enumerable: true, get: function () { return edit_helper_1.applyEditList; } }));
|
|
@@ -41507,13 +41514,13 @@ class Help {
|
|
|
41507
41514
|
/////////////////////////////////////////////////
|
|
41508
41515
|
static dumpABAP(file, reg, textDocument, position) {
|
|
41509
41516
|
let content = "";
|
|
41510
|
-
content = `
|
|
41511
|
-
<a href="#_tokens" rel="no-refresh">Tokens</a> |
|
|
41512
|
-
<a href="#_statements" rel="no-refresh">Statements</a> |
|
|
41513
|
-
<a href="#_structure" rel="no-refresh">Structure</a> |
|
|
41514
|
-
<a href="#_files" rel="no-refresh">Files</a> |
|
|
41515
|
-
<a href="#_info" rel="no-refresh">Info Dump</a>
|
|
41516
|
-
<hr>
|
|
41517
|
+
content = `
|
|
41518
|
+
<a href="#_tokens" rel="no-refresh">Tokens</a> |
|
|
41519
|
+
<a href="#_statements" rel="no-refresh">Statements</a> |
|
|
41520
|
+
<a href="#_structure" rel="no-refresh">Structure</a> |
|
|
41521
|
+
<a href="#_files" rel="no-refresh">Files</a> |
|
|
41522
|
+
<a href="#_info" rel="no-refresh">Info Dump</a>
|
|
41523
|
+
<hr>
|
|
41517
41524
|
` +
|
|
41518
41525
|
"<tt>" + textDocument.uri + " (" +
|
|
41519
41526
|
(position.line + 1) + ", " +
|
|
@@ -50715,7 +50722,7 @@ class Registry {
|
|
|
50715
50722
|
}
|
|
50716
50723
|
static abaplintVersion() {
|
|
50717
50724
|
// magic, see build script "version.sh"
|
|
50718
|
-
return "2.
|
|
50725
|
+
return "2.110.4";
|
|
50719
50726
|
}
|
|
50720
50727
|
getDDICReferences() {
|
|
50721
50728
|
return this.ddicReferences;
|
|
@@ -51034,10 +51041,10 @@ class SevenBitAscii {
|
|
|
51034
51041
|
key: "7bit_ascii",
|
|
51035
51042
|
title: "Check for 7bit ascii",
|
|
51036
51043
|
shortDescription: `Only allow characters from the 7bit ASCII set.`,
|
|
51037
|
-
extendedInformation: `https://docs.abapopenchecks.org/checks/05/
|
|
51038
|
-
|
|
51039
|
-
https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
|
|
51040
|
-
|
|
51044
|
+
extendedInformation: `https://docs.abapopenchecks.org/checks/05/
|
|
51045
|
+
|
|
51046
|
+
https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
|
|
51047
|
+
|
|
51041
51048
|
Checkes files with extensions ".abap" and ".asddls"`,
|
|
51042
51049
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
51043
51050
|
badExample: `WRITE '뽑'.`,
|
|
@@ -51243,10 +51250,10 @@ class Abapdoc extends _abap_rule_1.ABAPRule {
|
|
|
51243
51250
|
key: "abapdoc",
|
|
51244
51251
|
title: "Check abapdoc",
|
|
51245
51252
|
shortDescription: `Various checks regarding abapdoc.`,
|
|
51246
|
-
extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
|
|
51247
|
-
|
|
51248
|
-
Plus class and interface definitions.
|
|
51249
|
-
|
|
51253
|
+
extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
|
|
51254
|
+
|
|
51255
|
+
Plus class and interface definitions.
|
|
51256
|
+
|
|
51250
51257
|
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#abap-doc-only-for-public-apis`,
|
|
51251
51258
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
|
|
51252
51259
|
};
|
|
@@ -51384,49 +51391,49 @@ class AlignParameters extends _abap_rule_1.ABAPRule {
|
|
|
51384
51391
|
key: "align_parameters",
|
|
51385
51392
|
title: "Align Parameters",
|
|
51386
51393
|
shortDescription: `Checks for vertially aligned parameters`,
|
|
51387
|
-
extendedInformation: `Checks:
|
|
51388
|
-
* function module calls
|
|
51389
|
-
* method calls
|
|
51390
|
-
* VALUE constructors
|
|
51391
|
-
* NEW constructors
|
|
51392
|
-
* RAISE EXCEPTION statements
|
|
51393
|
-
* CREATE OBJECT statements
|
|
51394
|
-
* RAISE EVENT statements
|
|
51395
|
-
|
|
51396
|
-
https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
|
|
51397
|
-
|
|
51398
|
-
Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
|
|
51399
|
-
|
|
51400
|
-
If parameters are on the same row, no issues are reported, see
|
|
51394
|
+
extendedInformation: `Checks:
|
|
51395
|
+
* function module calls
|
|
51396
|
+
* method calls
|
|
51397
|
+
* VALUE constructors
|
|
51398
|
+
* NEW constructors
|
|
51399
|
+
* RAISE EXCEPTION statements
|
|
51400
|
+
* CREATE OBJECT statements
|
|
51401
|
+
* RAISE EVENT statements
|
|
51402
|
+
|
|
51403
|
+
https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
|
|
51404
|
+
|
|
51405
|
+
Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
|
|
51406
|
+
|
|
51407
|
+
If parameters are on the same row, no issues are reported, see
|
|
51401
51408
|
https://rules.abaplint.org/max_one_method_parameter_per_line/ for splitting parameters to lines`,
|
|
51402
51409
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
|
|
51403
|
-
badExample: `CALL FUNCTION 'FOOBAR'
|
|
51404
|
-
EXPORTING
|
|
51405
|
-
foo = 2
|
|
51406
|
-
parameter = 3.
|
|
51407
|
-
|
|
51408
|
-
foobar( moo = 1
|
|
51409
|
-
param = 1 ).
|
|
51410
|
-
|
|
51411
|
-
foo = VALUE #(
|
|
51412
|
-
foo = bar
|
|
51410
|
+
badExample: `CALL FUNCTION 'FOOBAR'
|
|
51411
|
+
EXPORTING
|
|
51412
|
+
foo = 2
|
|
51413
|
+
parameter = 3.
|
|
51414
|
+
|
|
51415
|
+
foobar( moo = 1
|
|
51416
|
+
param = 1 ).
|
|
51417
|
+
|
|
51418
|
+
foo = VALUE #(
|
|
51419
|
+
foo = bar
|
|
51413
51420
|
moo = 2 ).`,
|
|
51414
|
-
goodExample: `CALL FUNCTION 'FOOBAR'
|
|
51415
|
-
EXPORTING
|
|
51416
|
-
foo = 2
|
|
51417
|
-
parameter = 3.
|
|
51418
|
-
|
|
51419
|
-
foobar( moo = 1
|
|
51420
|
-
param = 1 ).
|
|
51421
|
-
|
|
51422
|
-
foo = VALUE #(
|
|
51423
|
-
foo = bar
|
|
51424
|
-
moo = 2 ).
|
|
51425
|
-
|
|
51426
|
-
DATA(sdf) = VALUE type(
|
|
51427
|
-
common_val = 2
|
|
51428
|
-
another_common = 5
|
|
51429
|
-
( row_value = 4
|
|
51421
|
+
goodExample: `CALL FUNCTION 'FOOBAR'
|
|
51422
|
+
EXPORTING
|
|
51423
|
+
foo = 2
|
|
51424
|
+
parameter = 3.
|
|
51425
|
+
|
|
51426
|
+
foobar( moo = 1
|
|
51427
|
+
param = 1 ).
|
|
51428
|
+
|
|
51429
|
+
foo = VALUE #(
|
|
51430
|
+
foo = bar
|
|
51431
|
+
moo = 2 ).
|
|
51432
|
+
|
|
51433
|
+
DATA(sdf) = VALUE type(
|
|
51434
|
+
common_val = 2
|
|
51435
|
+
another_common = 5
|
|
51436
|
+
( row_value = 4
|
|
51430
51437
|
value_foo = 5 ) ).`,
|
|
51431
51438
|
};
|
|
51432
51439
|
}
|
|
@@ -51860,37 +51867,37 @@ class AlignTypeExpressions extends _abap_rule_1.ABAPRule {
|
|
|
51860
51867
|
key: "align_type_expressions",
|
|
51861
51868
|
title: "Align TYPE expressions",
|
|
51862
51869
|
shortDescription: `Align TYPE expressions in statements`,
|
|
51863
|
-
extendedInformation: `
|
|
51864
|
-
Currently works for METHODS + BEGIN OF
|
|
51865
|
-
|
|
51866
|
-
If BEGIN OF has an INCLUDE TYPE its ignored
|
|
51867
|
-
|
|
51868
|
-
Also note that clean ABAP does not recommend aligning TYPE clauses:
|
|
51870
|
+
extendedInformation: `
|
|
51871
|
+
Currently works for METHODS + BEGIN OF
|
|
51872
|
+
|
|
51873
|
+
If BEGIN OF has an INCLUDE TYPE its ignored
|
|
51874
|
+
|
|
51875
|
+
Also note that clean ABAP does not recommend aligning TYPE clauses:
|
|
51869
51876
|
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-align-type-clauses`,
|
|
51870
51877
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix],
|
|
51871
|
-
badExample: `
|
|
51872
|
-
TYPES: BEGIN OF foo,
|
|
51873
|
-
bar TYPE i,
|
|
51874
|
-
foobar TYPE i,
|
|
51875
|
-
END OF foo.
|
|
51876
|
-
|
|
51877
|
-
INTERFACE lif.
|
|
51878
|
-
METHODS bar
|
|
51879
|
-
IMPORTING
|
|
51880
|
-
foo TYPE i
|
|
51881
|
-
foobar TYPE i.
|
|
51878
|
+
badExample: `
|
|
51879
|
+
TYPES: BEGIN OF foo,
|
|
51880
|
+
bar TYPE i,
|
|
51881
|
+
foobar TYPE i,
|
|
51882
|
+
END OF foo.
|
|
51883
|
+
|
|
51884
|
+
INTERFACE lif.
|
|
51885
|
+
METHODS bar
|
|
51886
|
+
IMPORTING
|
|
51887
|
+
foo TYPE i
|
|
51888
|
+
foobar TYPE i.
|
|
51882
51889
|
ENDINTERFACE.`,
|
|
51883
|
-
goodExample: `
|
|
51884
|
-
TYPES: BEGIN OF foo,
|
|
51885
|
-
bar TYPE i,
|
|
51886
|
-
foobar TYPE i,
|
|
51887
|
-
END OF foo.
|
|
51888
|
-
|
|
51889
|
-
INTERFACE lif.
|
|
51890
|
-
METHODS bar
|
|
51891
|
-
IMPORTING
|
|
51892
|
-
foo TYPE i
|
|
51893
|
-
foobar TYPE i.
|
|
51890
|
+
goodExample: `
|
|
51891
|
+
TYPES: BEGIN OF foo,
|
|
51892
|
+
bar TYPE i,
|
|
51893
|
+
foobar TYPE i,
|
|
51894
|
+
END OF foo.
|
|
51895
|
+
|
|
51896
|
+
INTERFACE lif.
|
|
51897
|
+
METHODS bar
|
|
51898
|
+
IMPORTING
|
|
51899
|
+
foo TYPE i
|
|
51900
|
+
foobar TYPE i.
|
|
51894
51901
|
ENDINTERFACE.`,
|
|
51895
51902
|
};
|
|
51896
51903
|
}
|
|
@@ -52169,15 +52176,15 @@ class AmbiguousStatement extends _abap_rule_1.ABAPRule {
|
|
|
52169
52176
|
return {
|
|
52170
52177
|
key: "ambiguous_statement",
|
|
52171
52178
|
title: "Check for ambigious statements",
|
|
52172
|
-
shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
|
|
52173
|
-
Add "TABLE" keyword or "@" for escaping SQL variables
|
|
52174
|
-
|
|
52179
|
+
shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
|
|
52180
|
+
Add "TABLE" keyword or "@" for escaping SQL variables
|
|
52181
|
+
|
|
52175
52182
|
Only works if the target version is 740sp05 or above`,
|
|
52176
52183
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
52177
|
-
badExample: `DELETE foo FROM bar.
|
|
52184
|
+
badExample: `DELETE foo FROM bar.
|
|
52178
52185
|
MODIFY foo FROM bar.`,
|
|
52179
|
-
goodExample: `DELETE foo FROM @bar.
|
|
52180
|
-
MODIFY TABLE foo FROM bar.
|
|
52186
|
+
goodExample: `DELETE foo FROM @bar.
|
|
52187
|
+
MODIFY TABLE foo FROM bar.
|
|
52181
52188
|
MODIFY zfoo FROM @wa.`,
|
|
52182
52189
|
};
|
|
52183
52190
|
}
|
|
@@ -52282,16 +52289,16 @@ class AvoidUse extends _abap_rule_1.ABAPRule {
|
|
|
52282
52289
|
key: "avoid_use",
|
|
52283
52290
|
title: "Avoid use of certain statements",
|
|
52284
52291
|
shortDescription: `Detects usage of certain statements.`,
|
|
52285
|
-
extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
|
|
52286
|
-
|
|
52287
|
-
Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
|
|
52288
|
-
|
|
52289
|
-
STATICS: use CLASS-DATA instead
|
|
52290
|
-
|
|
52291
|
-
DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
|
|
52292
|
-
|
|
52293
|
-
TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
|
|
52294
|
-
|
|
52292
|
+
extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
|
|
52293
|
+
|
|
52294
|
+
Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
|
|
52295
|
+
|
|
52296
|
+
STATICS: use CLASS-DATA instead
|
|
52297
|
+
|
|
52298
|
+
DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
|
|
52299
|
+
|
|
52300
|
+
TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
|
|
52301
|
+
|
|
52295
52302
|
BREAK points`,
|
|
52296
52303
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
52297
52304
|
};
|
|
@@ -52423,11 +52430,11 @@ class BeginEndNames extends _abap_rule_1.ABAPRule {
|
|
|
52423
52430
|
title: "Check BEGIN END names",
|
|
52424
52431
|
shortDescription: `Check BEGIN OF and END OF names match, plus there must be statements between BEGIN and END`,
|
|
52425
52432
|
tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
|
|
52426
|
-
badExample: `DATA: BEGIN OF stru,
|
|
52427
|
-
field TYPE i,
|
|
52433
|
+
badExample: `DATA: BEGIN OF stru,
|
|
52434
|
+
field TYPE i,
|
|
52428
52435
|
END OF structure_not_the_same.`,
|
|
52429
|
-
goodExample: `DATA: BEGIN OF stru,
|
|
52430
|
-
field TYPE i,
|
|
52436
|
+
goodExample: `DATA: BEGIN OF stru,
|
|
52437
|
+
field TYPE i,
|
|
52431
52438
|
END OF stru.`,
|
|
52432
52439
|
};
|
|
52433
52440
|
}
|
|
@@ -52524,20 +52531,20 @@ class BeginSingleInclude extends _abap_rule_1.ABAPRule {
|
|
|
52524
52531
|
title: "BEGIN contains single INCLUDE",
|
|
52525
52532
|
shortDescription: `Finds TYPE BEGIN with just one INCLUDE TYPE, and DATA with single INCLUDE STRUCTURE`,
|
|
52526
52533
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
52527
|
-
badExample: `TYPES: BEGIN OF dummy1.
|
|
52528
|
-
INCLUDE TYPE dselc.
|
|
52529
|
-
TYPES: END OF dummy1.
|
|
52530
|
-
|
|
52531
|
-
DATA BEGIN OF foo.
|
|
52532
|
-
INCLUDE STRUCTURE syst.
|
|
52533
|
-
DATA END OF foo.
|
|
52534
|
-
|
|
52535
|
-
STATICS BEGIN OF bar.
|
|
52536
|
-
INCLUDE STRUCTURE syst.
|
|
52534
|
+
badExample: `TYPES: BEGIN OF dummy1.
|
|
52535
|
+
INCLUDE TYPE dselc.
|
|
52536
|
+
TYPES: END OF dummy1.
|
|
52537
|
+
|
|
52538
|
+
DATA BEGIN OF foo.
|
|
52539
|
+
INCLUDE STRUCTURE syst.
|
|
52540
|
+
DATA END OF foo.
|
|
52541
|
+
|
|
52542
|
+
STATICS BEGIN OF bar.
|
|
52543
|
+
INCLUDE STRUCTURE syst.
|
|
52537
52544
|
STATICS END OF bar.`,
|
|
52538
|
-
goodExample: `DATA BEGIN OF foo.
|
|
52539
|
-
DATA field TYPE i.
|
|
52540
|
-
INCLUDE STRUCTURE dselc.
|
|
52545
|
+
goodExample: `DATA BEGIN OF foo.
|
|
52546
|
+
DATA field TYPE i.
|
|
52547
|
+
INCLUDE STRUCTURE dselc.
|
|
52541
52548
|
DATA END OF foo.`,
|
|
52542
52549
|
};
|
|
52543
52550
|
}
|
|
@@ -52627,9 +52634,9 @@ class CallTransactionAuthorityCheck extends _abap_rule_1.ABAPRule {
|
|
|
52627
52634
|
extendedInformation: `https://docs.abapopenchecks.org/checks/54/`,
|
|
52628
52635
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
|
|
52629
52636
|
badExample: `CALL TRANSACTION 'FOO'.`,
|
|
52630
|
-
goodExample: `TRY.
|
|
52631
|
-
CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
|
|
52632
|
-
CATCH cx_sy_authorization_error.
|
|
52637
|
+
goodExample: `TRY.
|
|
52638
|
+
CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
|
|
52639
|
+
CATCH cx_sy_authorization_error.
|
|
52633
52640
|
ENDTRY.`,
|
|
52634
52641
|
};
|
|
52635
52642
|
}
|
|
@@ -52694,10 +52701,10 @@ class CDSCommentStyle {
|
|
|
52694
52701
|
key: "cds_comment_style",
|
|
52695
52702
|
title: "CDS Comment Style",
|
|
52696
52703
|
shortDescription: `Check for obsolete comment style`,
|
|
52697
|
-
extendedInformation: `Check for obsolete comment style
|
|
52698
|
-
|
|
52699
|
-
Comments starting with "--" are considered obsolete
|
|
52700
|
-
|
|
52704
|
+
extendedInformation: `Check for obsolete comment style
|
|
52705
|
+
|
|
52706
|
+
Comments starting with "--" are considered obsolete
|
|
52707
|
+
|
|
52701
52708
|
https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abencds_general_syntax_rules.htm`,
|
|
52702
52709
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
52703
52710
|
badExample: "-- this is a comment",
|
|
@@ -52764,10 +52771,10 @@ class CDSLegacyView {
|
|
|
52764
52771
|
title: "CDS Legacy View",
|
|
52765
52772
|
shortDescription: `Identify CDS Legacy Views`,
|
|
52766
52773
|
// eslint-disable-next-line max-len
|
|
52767
|
-
extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
|
|
52768
|
-
|
|
52769
|
-
https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
|
|
52770
|
-
|
|
52774
|
+
extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
|
|
52775
|
+
|
|
52776
|
+
https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
|
|
52777
|
+
|
|
52771
52778
|
v755 and up`,
|
|
52772
52779
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Upport],
|
|
52773
52780
|
};
|
|
@@ -52922,10 +52929,10 @@ class ChainMainlyDeclarations extends _abap_rule_1.ABAPRule {
|
|
|
52922
52929
|
key: "chain_mainly_declarations",
|
|
52923
52930
|
title: "Chain mainly declarations",
|
|
52924
52931
|
shortDescription: `Chain mainly declarations, allows chaining for the configured statements, reports errors for other statements.`,
|
|
52925
|
-
extendedInformation: `
|
|
52926
|
-
https://docs.abapopenchecks.org/checks/23/
|
|
52927
|
-
|
|
52928
|
-
https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
|
|
52932
|
+
extendedInformation: `
|
|
52933
|
+
https://docs.abapopenchecks.org/checks/23/
|
|
52934
|
+
|
|
52935
|
+
https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
|
|
52929
52936
|
`,
|
|
52930
52937
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
|
|
52931
52938
|
badExample: `CALL METHOD: bar.`,
|
|
@@ -53101,17 +53108,17 @@ class ChangeIfToCase extends _abap_rule_1.ABAPRule {
|
|
|
53101
53108
|
title: "Change IF to CASE",
|
|
53102
53109
|
shortDescription: `Finds IF constructs that can be changed to CASE`,
|
|
53103
53110
|
// eslint-disable-next-line max-len
|
|
53104
|
-
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
|
|
53105
|
-
|
|
53111
|
+
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
|
|
53112
|
+
|
|
53106
53113
|
If the first comparison is a boolean compare, no issue is reported.`,
|
|
53107
53114
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
|
|
53108
|
-
badExample: `IF l_fcat-fieldname EQ 'FOO'.
|
|
53109
|
-
ELSEIF l_fcat-fieldname = 'BAR'
|
|
53110
|
-
OR l_fcat-fieldname = 'MOO'.
|
|
53115
|
+
badExample: `IF l_fcat-fieldname EQ 'FOO'.
|
|
53116
|
+
ELSEIF l_fcat-fieldname = 'BAR'
|
|
53117
|
+
OR l_fcat-fieldname = 'MOO'.
|
|
53111
53118
|
ENDIF.`,
|
|
53112
|
-
goodExample: `CASE l_fcat-fieldname.
|
|
53113
|
-
WHEN 'FOO'.
|
|
53114
|
-
WHEN 'BAR' OR 'MOO'.
|
|
53119
|
+
goodExample: `CASE l_fcat-fieldname.
|
|
53120
|
+
WHEN 'FOO'.
|
|
53121
|
+
WHEN 'BAR' OR 'MOO'.
|
|
53115
53122
|
ENDCASE.`,
|
|
53116
53123
|
};
|
|
53117
53124
|
}
|
|
@@ -53248,8 +53255,8 @@ class CheckAbstract extends _abap_rule_1.ABAPRule {
|
|
|
53248
53255
|
return {
|
|
53249
53256
|
key: "check_abstract",
|
|
53250
53257
|
title: "Check abstract methods and classes",
|
|
53251
|
-
shortDescription: `Checks abstract methods and classes:
|
|
53252
|
-
- class defined as abstract and final,
|
|
53258
|
+
shortDescription: `Checks abstract methods and classes:
|
|
53259
|
+
- class defined as abstract and final,
|
|
53253
53260
|
- non-abstract class contains abstract methods`,
|
|
53254
53261
|
extendedInformation: `If a class defines only constants, use an interface instead`,
|
|
53255
53262
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
@@ -53330,11 +53337,11 @@ class CheckComments extends _abap_rule_1.ABAPRule {
|
|
|
53330
53337
|
return {
|
|
53331
53338
|
key: "check_comments",
|
|
53332
53339
|
title: "Check Comments",
|
|
53333
|
-
shortDescription: `
|
|
53340
|
+
shortDescription: `
|
|
53334
53341
|
Various checks for comment usage.`,
|
|
53335
|
-
extendedInformation: `
|
|
53336
|
-
Detects end of line comments. Comments starting with "#EC" or "##" are ignored
|
|
53337
|
-
|
|
53342
|
+
extendedInformation: `
|
|
53343
|
+
Detects end of line comments. Comments starting with "#EC" or "##" are ignored
|
|
53344
|
+
|
|
53338
53345
|
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#put-comments-before-the-statement-they-relate-to`,
|
|
53339
53346
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
53340
53347
|
badExample: `WRITE 2. " descriptive comment`,
|
|
@@ -53496,9 +53503,9 @@ class CheckInclude {
|
|
|
53496
53503
|
key: "check_include",
|
|
53497
53504
|
title: "Check INCLUDEs",
|
|
53498
53505
|
shortDescription: `Checks INCLUDE statements`,
|
|
53499
|
-
extendedInformation: `
|
|
53500
|
-
* Reports unused includes
|
|
53501
|
-
* Errors if the includes are not found
|
|
53506
|
+
extendedInformation: `
|
|
53507
|
+
* Reports unused includes
|
|
53508
|
+
* Errors if the includes are not found
|
|
53502
53509
|
* Error if including a main program`,
|
|
53503
53510
|
tags: [_irule_1.RuleTag.Syntax],
|
|
53504
53511
|
};
|
|
@@ -53574,14 +53581,14 @@ class CheckSubrc extends _abap_rule_1.ABAPRule {
|
|
|
53574
53581
|
key: "check_subrc",
|
|
53575
53582
|
title: "Check sy-subrc",
|
|
53576
53583
|
shortDescription: `Check sy-subrc`,
|
|
53577
|
-
extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
|
|
53578
|
-
|
|
53579
|
-
If sy-dbcnt is checked after database statements, it is considered okay.
|
|
53580
|
-
|
|
53581
|
-
"SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
|
|
53582
|
-
|
|
53583
|
-
If IS ASSIGNED is checked after assigning, it is considered okay.
|
|
53584
|
-
|
|
53584
|
+
extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
|
|
53585
|
+
|
|
53586
|
+
If sy-dbcnt is checked after database statements, it is considered okay.
|
|
53587
|
+
|
|
53588
|
+
"SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
|
|
53589
|
+
|
|
53590
|
+
If IS ASSIGNED is checked after assigning, it is considered okay.
|
|
53591
|
+
|
|
53585
53592
|
FIND statement with MATCH COUNT is considered okay if subrc is not checked`,
|
|
53586
53593
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
|
|
53587
53594
|
pseudoComment: "EC CI_SUBRC",
|
|
@@ -54150,17 +54157,17 @@ class ClassicExceptionsOverlap extends _abap_rule_1.ABAPRule {
|
|
|
54150
54157
|
shortDescription: `Find overlapping classic exceptions`,
|
|
54151
54158
|
extendedInformation: `When debugging its typically good to know exactly which exception is caught`,
|
|
54152
54159
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
54153
|
-
badExample: `CALL FUNCTION 'SOMETHING'
|
|
54154
|
-
EXCEPTIONS
|
|
54155
|
-
system_failure = 1 MESSAGE lv_message
|
|
54156
|
-
communication_failure = 1 MESSAGE lv_message
|
|
54157
|
-
resource_failure = 1
|
|
54160
|
+
badExample: `CALL FUNCTION 'SOMETHING'
|
|
54161
|
+
EXCEPTIONS
|
|
54162
|
+
system_failure = 1 MESSAGE lv_message
|
|
54163
|
+
communication_failure = 1 MESSAGE lv_message
|
|
54164
|
+
resource_failure = 1
|
|
54158
54165
|
OTHERS = 1.`,
|
|
54159
|
-
goodExample: `CALL FUNCTION 'SOMETHING'
|
|
54160
|
-
EXCEPTIONS
|
|
54161
|
-
system_failure = 1 MESSAGE lv_message
|
|
54162
|
-
communication_failure = 2 MESSAGE lv_message
|
|
54163
|
-
resource_failure = 3
|
|
54166
|
+
goodExample: `CALL FUNCTION 'SOMETHING'
|
|
54167
|
+
EXCEPTIONS
|
|
54168
|
+
system_failure = 1 MESSAGE lv_message
|
|
54169
|
+
communication_failure = 2 MESSAGE lv_message
|
|
54170
|
+
resource_failure = 3
|
|
54164
54171
|
OTHERS = 4.`,
|
|
54165
54172
|
};
|
|
54166
54173
|
}
|
|
@@ -54406,7 +54413,7 @@ class CommentedCode extends _abap_rule_1.ABAPRule {
|
|
|
54406
54413
|
key: "commented_code",
|
|
54407
54414
|
title: "Find commented code",
|
|
54408
54415
|
shortDescription: `Detects usage of commented out code.`,
|
|
54409
|
-
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it
|
|
54416
|
+
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it
|
|
54410
54417
|
https://docs.abapopenchecks.org/checks/14/`,
|
|
54411
54418
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
|
|
54412
54419
|
badExample: `* WRITE 'hello world'.`,
|
|
@@ -54639,10 +54646,10 @@ class ConstructorVisibilityPublic {
|
|
|
54639
54646
|
key: "constructor_visibility_public",
|
|
54640
54647
|
title: "Check constructor visibility is public",
|
|
54641
54648
|
shortDescription: `Constructor must be placed in the public section, even if the class is not CREATE PUBLIC.`,
|
|
54642
|
-
extendedInformation: `
|
|
54643
|
-
This only applies to global classes.
|
|
54644
|
-
|
|
54645
|
-
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
|
|
54649
|
+
extendedInformation: `
|
|
54650
|
+
This only applies to global classes.
|
|
54651
|
+
|
|
54652
|
+
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
|
|
54646
54653
|
https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abeninstance_constructor_guidl.htm`,
|
|
54647
54654
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
54648
54655
|
};
|
|
@@ -54717,8 +54724,8 @@ class ContainsTab extends _abap_rule_1.ABAPRule {
|
|
|
54717
54724
|
key: "contains_tab",
|
|
54718
54725
|
title: "Code contains tab",
|
|
54719
54726
|
shortDescription: `Checks for usage of tabs (enable to enforce spaces)`,
|
|
54720
|
-
extendedInformation: `
|
|
54721
|
-
https://docs.abapopenchecks.org/checks/09/
|
|
54727
|
+
extendedInformation: `
|
|
54728
|
+
https://docs.abapopenchecks.org/checks/09/
|
|
54722
54729
|
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
|
|
54723
54730
|
tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
54724
54731
|
badExample: `\tWRITE 'hello world'.`,
|
|
@@ -54805,10 +54812,10 @@ class CyclicOO {
|
|
|
54805
54812
|
key: "cyclic_oo",
|
|
54806
54813
|
title: "Cyclic OO",
|
|
54807
54814
|
shortDescription: `Finds cyclic OO references`,
|
|
54808
|
-
extendedInformation: `Runs for global INTF + CLAS objects
|
|
54809
|
-
|
|
54810
|
-
Objects must be without syntax errors for this rule to take effect
|
|
54811
|
-
|
|
54815
|
+
extendedInformation: `Runs for global INTF + CLAS objects
|
|
54816
|
+
|
|
54817
|
+
Objects must be without syntax errors for this rule to take effect
|
|
54818
|
+
|
|
54812
54819
|
References in testclass includes are ignored`,
|
|
54813
54820
|
};
|
|
54814
54821
|
}
|
|
@@ -55050,7 +55057,7 @@ class DangerousStatement extends _abap_rule_1.ABAPRule {
|
|
|
55050
55057
|
key: "dangerous_statement",
|
|
55051
55058
|
title: "Dangerous statement",
|
|
55052
55059
|
shortDescription: `Detects potentially dangerous statements`,
|
|
55053
|
-
extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
|
|
55060
|
+
extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
|
|
55054
55061
|
dynamic SQL can potentially create SQL injection problems`,
|
|
55055
55062
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
|
|
55056
55063
|
};
|
|
@@ -55254,13 +55261,13 @@ class DefinitionsTop extends _abap_rule_1.ABAPRule {
|
|
|
55254
55261
|
shortDescription: `Checks that definitions are placed at the beginning of METHODs, FORMs and FUNCTIONs.`,
|
|
55255
55262
|
extendedInformation: `https://docs.abapopenchecks.org/checks/17/`,
|
|
55256
55263
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
|
|
55257
|
-
badExample: `FROM foo.
|
|
55258
|
-
WRITE 'hello'.
|
|
55259
|
-
DATA int TYPE i.
|
|
55264
|
+
badExample: `FROM foo.
|
|
55265
|
+
WRITE 'hello'.
|
|
55266
|
+
DATA int TYPE i.
|
|
55260
55267
|
ENDFORM.`,
|
|
55261
|
-
goodExample: `FROM foo.
|
|
55262
|
-
DATA int TYPE i.
|
|
55263
|
-
WRITE 'hello'.
|
|
55268
|
+
goodExample: `FROM foo.
|
|
55269
|
+
DATA int TYPE i.
|
|
55270
|
+
WRITE 'hello'.
|
|
55264
55271
|
ENDFORM.`,
|
|
55265
55272
|
};
|
|
55266
55273
|
}
|
|
@@ -55796,39 +55803,39 @@ class Downport {
|
|
|
55796
55803
|
key: "downport",
|
|
55797
55804
|
title: "Downport statement",
|
|
55798
55805
|
shortDescription: `Downport functionality`,
|
|
55799
|
-
extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with
|
|
55800
|
-
a higher level language version. If successful, various rules are applied to downport the statement.
|
|
55801
|
-
Target downport version is always v702, thus rule is only enabled if target version is v702.
|
|
55802
|
-
|
|
55803
|
-
Current rules:
|
|
55804
|
-
* NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/
|
|
55805
|
-
* DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/
|
|
55806
|
-
* FIELD-SYMBOL() definitions are outlined
|
|
55807
|
-
* CONV is outlined
|
|
55808
|
-
* COND is outlined
|
|
55809
|
-
* REDUCE is outlined
|
|
55810
|
-
* SWITCH is outlined
|
|
55811
|
-
* FILTER is outlined
|
|
55812
|
-
* APPEND expression is outlined
|
|
55813
|
-
* INSERT expression is outlined
|
|
55814
|
-
* EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/
|
|
55815
|
-
* CAST changed to ?=
|
|
55816
|
-
* LOOP AT method_call( ) is outlined
|
|
55817
|
-
* VALUE # with structure fields
|
|
55818
|
-
* VALUE # with internal table lines
|
|
55819
|
-
* Table Expressions are outlined
|
|
55820
|
-
* SELECT INTO @DATA definitions are outlined
|
|
55821
|
-
* Some occurrences of string template formatting option ALPHA changed to function module call
|
|
55822
|
-
* SELECT/INSERT/MODIFY/DELETE/UPDATE "," in field list removed, "@" in source/targets removed
|
|
55823
|
-
* PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods
|
|
55824
|
-
* RAISE EXCEPTION ... MESSAGE
|
|
55825
|
-
* Moving with +=, -=, /=, *=, &&= is expanded
|
|
55826
|
-
* line_exists and line_index is downported to READ TABLE
|
|
55827
|
-
* ENUMs, but does not nessesarily give the correct type and value
|
|
55828
|
-
* MESSAGE with non simple source
|
|
55829
|
-
|
|
55830
|
-
Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.
|
|
55831
|
-
|
|
55806
|
+
extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with
|
|
55807
|
+
a higher level language version. If successful, various rules are applied to downport the statement.
|
|
55808
|
+
Target downport version is always v702, thus rule is only enabled if target version is v702.
|
|
55809
|
+
|
|
55810
|
+
Current rules:
|
|
55811
|
+
* NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/
|
|
55812
|
+
* DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/
|
|
55813
|
+
* FIELD-SYMBOL() definitions are outlined
|
|
55814
|
+
* CONV is outlined
|
|
55815
|
+
* COND is outlined
|
|
55816
|
+
* REDUCE is outlined
|
|
55817
|
+
* SWITCH is outlined
|
|
55818
|
+
* FILTER is outlined
|
|
55819
|
+
* APPEND expression is outlined
|
|
55820
|
+
* INSERT expression is outlined
|
|
55821
|
+
* EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/
|
|
55822
|
+
* CAST changed to ?=
|
|
55823
|
+
* LOOP AT method_call( ) is outlined
|
|
55824
|
+
* VALUE # with structure fields
|
|
55825
|
+
* VALUE # with internal table lines
|
|
55826
|
+
* Table Expressions are outlined
|
|
55827
|
+
* SELECT INTO @DATA definitions are outlined
|
|
55828
|
+
* Some occurrences of string template formatting option ALPHA changed to function module call
|
|
55829
|
+
* SELECT/INSERT/MODIFY/DELETE/UPDATE "," in field list removed, "@" in source/targets removed
|
|
55830
|
+
* PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods
|
|
55831
|
+
* RAISE EXCEPTION ... MESSAGE
|
|
55832
|
+
* Moving with +=, -=, /=, *=, &&= is expanded
|
|
55833
|
+
* line_exists and line_index is downported to READ TABLE
|
|
55834
|
+
* ENUMs, but does not nessesarily give the correct type and value
|
|
55835
|
+
* MESSAGE with non simple source
|
|
55836
|
+
|
|
55837
|
+
Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.
|
|
55838
|
+
|
|
55832
55839
|
Make sure to test the downported code, it might not always be completely correct.`,
|
|
55833
55840
|
tags: [_irule_1.RuleTag.Downport, _irule_1.RuleTag.Quickfix],
|
|
55834
55841
|
};
|
|
@@ -56406,10 +56413,10 @@ Make sure to test the downported code, it might not always be completely correct
|
|
|
56406
56413
|
const fieldName = f.concatTokens();
|
|
56407
56414
|
fieldDefinition += indentation + " " + fieldName + " TYPE " + tableName + "-" + fieldName + ",\n";
|
|
56408
56415
|
}
|
|
56409
|
-
fieldDefinition = `DATA: BEGIN OF ${name},
|
|
56416
|
+
fieldDefinition = `DATA: BEGIN OF ${name},
|
|
56410
56417
|
${fieldDefinition}${indentation} END OF ${name}.`;
|
|
56411
56418
|
}
|
|
56412
|
-
const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
|
|
56419
|
+
const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
|
|
56413
56420
|
${indentation}`);
|
|
56414
56421
|
const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
|
|
56415
56422
|
const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
|
|
@@ -56453,12 +56460,12 @@ ${indentation}`);
|
|
|
56453
56460
|
}
|
|
56454
56461
|
const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
|
|
56455
56462
|
const name = ((_c = inlineData.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || "error";
|
|
56456
|
-
let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
|
|
56457
|
-
${fieldDefinitions}${indentation} END OF ${uniqueName}.
|
|
56458
|
-
${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.
|
|
56463
|
+
let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
|
|
56464
|
+
${fieldDefinitions}${indentation} END OF ${uniqueName}.
|
|
56465
|
+
${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.
|
|
56459
56466
|
${indentation}`);
|
|
56460
56467
|
if (fieldDefinitions === "") {
|
|
56461
|
-
fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.
|
|
56468
|
+
fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.
|
|
56462
56469
|
${indentation}`);
|
|
56463
56470
|
}
|
|
56464
56471
|
const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
|
|
@@ -56526,7 +56533,7 @@ ${indentation}`);
|
|
|
56526
56533
|
const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
|
|
56527
56534
|
const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
|
|
56528
56535
|
const firstToken = high.getFirstToken();
|
|
56529
|
-
const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
|
|
56536
|
+
const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
|
|
56530
56537
|
${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
|
|
56531
56538
|
const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
|
|
56532
56539
|
const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
|
|
@@ -56580,7 +56587,7 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
|
|
|
56580
56587
|
const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
|
|
56581
56588
|
const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
|
|
56582
56589
|
const firstToken = high.getFirstToken();
|
|
56583
|
-
const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
|
|
56590
|
+
const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
|
|
56584
56591
|
${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
|
|
56585
56592
|
const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
|
|
56586
56593
|
const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
|
|
@@ -56622,14 +56629,14 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
|
|
|
56622
56629
|
const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
|
|
56623
56630
|
const firstToken = high.getFirstToken();
|
|
56624
56631
|
// note that the tabix restore should be done before throwing the exception
|
|
56625
|
-
const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.
|
|
56626
|
-
${indentation}DATA ${tabixBackup} LIKE sy-tabix.
|
|
56627
|
-
${indentation}${tabixBackup} = sy-tabix.
|
|
56628
|
-
${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.
|
|
56629
|
-
${indentation}sy-tabix = ${tabixBackup}.
|
|
56630
|
-
${indentation}IF sy-subrc <> 0.
|
|
56631
|
-
${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
|
|
56632
|
-
${indentation}ENDIF.
|
|
56632
|
+
const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.
|
|
56633
|
+
${indentation}DATA ${tabixBackup} LIKE sy-tabix.
|
|
56634
|
+
${indentation}${tabixBackup} = sy-tabix.
|
|
56635
|
+
${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.
|
|
56636
|
+
${indentation}sy-tabix = ${tabixBackup}.
|
|
56637
|
+
${indentation}IF sy-subrc <> 0.
|
|
56638
|
+
${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
|
|
56639
|
+
${indentation}ENDIF.
|
|
56633
56640
|
${indentation}`);
|
|
56634
56641
|
const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, startToken.getStart(), tableExpression.getLastToken().getEnd(), uniqueName);
|
|
56635
56642
|
const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
|
|
@@ -56686,7 +56693,7 @@ ${indentation}`);
|
|
|
56686
56693
|
const className = classNames[0].concatTokens();
|
|
56687
56694
|
const targetName = (_b = target.findFirstExpression(Expressions.TargetField)) === null || _b === void 0 ? void 0 : _b.concatTokens();
|
|
56688
56695
|
const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
|
|
56689
|
-
const code = ` DATA ${targetName} TYPE REF TO ${className}.
|
|
56696
|
+
const code = ` DATA ${targetName} TYPE REF TO ${className}.
|
|
56690
56697
|
${indentation}CATCH ${className} INTO ${targetName}.`;
|
|
56691
56698
|
const fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getStart(), node.getEnd(), code);
|
|
56692
56699
|
return issue_1.Issue.atToken(lowFile, node.getFirstToken(), "Outline DATA", this.getMetadata().key, this.conf.severity, fix);
|
|
@@ -56848,16 +56855,16 @@ ${indentation}CATCH ${className} INTO ${targetName}.`;
|
|
|
56848
56855
|
const uniqueName1 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
|
|
56849
56856
|
const uniqueName2 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
|
|
56850
56857
|
const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
|
|
56851
|
-
let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
|
|
56852
|
-
${indentation}${uniqueName1}-msgid = ${id}.
|
|
56858
|
+
let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
|
|
56859
|
+
${indentation}${uniqueName1}-msgid = ${id}.
|
|
56853
56860
|
${indentation}${uniqueName1}-msgno = ${number}.\n`;
|
|
56854
56861
|
if (withs.length > 0) {
|
|
56855
|
-
abap += `${indentation}${uniqueName1}-attr1 = 'IF_T100_DYN_MSG~MSGV1'.
|
|
56856
|
-
${indentation}${uniqueName1}-attr2 = 'IF_T100_DYN_MSG~MSGV2'.
|
|
56857
|
-
${indentation}${uniqueName1}-attr3 = 'IF_T100_DYN_MSG~MSGV3'.
|
|
56862
|
+
abap += `${indentation}${uniqueName1}-attr1 = 'IF_T100_DYN_MSG~MSGV1'.
|
|
56863
|
+
${indentation}${uniqueName1}-attr2 = 'IF_T100_DYN_MSG~MSGV2'.
|
|
56864
|
+
${indentation}${uniqueName1}-attr3 = 'IF_T100_DYN_MSG~MSGV3'.
|
|
56858
56865
|
${indentation}${uniqueName1}-attr4 = 'IF_T100_DYN_MSG~MSGV4'.\n`;
|
|
56859
56866
|
}
|
|
56860
|
-
abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
|
|
56867
|
+
abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
|
|
56861
56868
|
${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`;
|
|
56862
56869
|
if (withs.length > 0) {
|
|
56863
56870
|
abap += `${indentation}${uniqueName2}->if_t100_dyn_msg~msgty = 'E'.\n`;
|
|
@@ -56969,10 +56976,10 @@ ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`
|
|
|
56969
56976
|
let code = "";
|
|
56970
56977
|
if (sourceRef.findFirstExpression(Expressions.TableExpression)) {
|
|
56971
56978
|
const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
|
|
56972
|
-
code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).
|
|
56973
|
-
IF sy-subrc <> 0.
|
|
56974
|
-
RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
|
|
56975
|
-
ENDIF.
|
|
56979
|
+
code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).
|
|
56980
|
+
IF sy-subrc <> 0.
|
|
56981
|
+
RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
|
|
56982
|
+
ENDIF.
|
|
56976
56983
|
GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
|
|
56977
56984
|
}
|
|
56978
56985
|
else {
|
|
@@ -57061,20 +57068,20 @@ GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
|
|
|
57061
57068
|
const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
|
|
57062
57069
|
const uniqueFS = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
|
|
57063
57070
|
const uniqueNameIndex = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
|
|
57064
|
-
code += ` items LIKE ${loopSourceName},
|
|
57065
|
-
END OF ${groupTargetName}type.
|
|
57066
|
-
DATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.
|
|
57067
|
-
DATA ${uniqueName} LIKE LINE OF ${groupTargetName}tab.
|
|
57071
|
+
code += ` items LIKE ${loopSourceName},
|
|
57072
|
+
END OF ${groupTargetName}type.
|
|
57073
|
+
DATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.
|
|
57074
|
+
DATA ${uniqueName} LIKE LINE OF ${groupTargetName}tab.
|
|
57068
57075
|
LOOP AT ${loopSourceName} ${(_l = high.findFirstExpression(Expressions.LoopTarget)) === null || _l === void 0 ? void 0 : _l.concatTokens()}.\n`;
|
|
57069
57076
|
if (groupIndexName !== undefined) {
|
|
57070
57077
|
code += `DATA(${uniqueNameIndex}) = sy-tabix.\n`;
|
|
57071
57078
|
}
|
|
57072
|
-
code += `READ TABLE ${groupTargetName}tab ASSIGNING FIELD-SYMBOL(<${uniqueFS}>) WITH KEY ${condition}.
|
|
57079
|
+
code += `READ TABLE ${groupTargetName}tab ASSIGNING FIELD-SYMBOL(<${uniqueFS}>) WITH KEY ${condition}.
|
|
57073
57080
|
IF sy-subrc = 0.\n`;
|
|
57074
57081
|
if (groupCountName !== undefined) {
|
|
57075
57082
|
code += ` <${uniqueFS}>-${groupCountName} = <${uniqueFS}>-${groupCountName} + 1.\n`;
|
|
57076
57083
|
}
|
|
57077
|
-
code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
|
|
57084
|
+
code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
|
|
57078
57085
|
ELSE.\n`;
|
|
57079
57086
|
code += ` CLEAR ${uniqueName}.\n`;
|
|
57080
57087
|
for (const c of group.findAllExpressions(Expressions.LoopGroupByComponent)) {
|
|
@@ -57095,8 +57102,8 @@ ELSE.\n`;
|
|
|
57095
57102
|
}
|
|
57096
57103
|
code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE ${uniqueName}-items.\n`;
|
|
57097
57104
|
code += ` INSERT ${uniqueName} INTO TABLE ${groupTargetName}tab.\n`;
|
|
57098
|
-
code += `ENDIF.
|
|
57099
|
-
ENDLOOP.
|
|
57105
|
+
code += `ENDIF.
|
|
57106
|
+
ENDLOOP.
|
|
57100
57107
|
LOOP AT ${groupTargetName}tab ${groupTarget}.`;
|
|
57101
57108
|
let fix = edit_helper_1.EditHelper.replaceRange(lowFile, high.getFirstToken().getStart(), high.getLastToken().getEnd(), code);
|
|
57102
57109
|
for (const l of ((_m = highFile.getStructure()) === null || _m === void 0 ? void 0 : _m.findAllStructures(Structures.Loop)) || []) {
|
|
@@ -57268,7 +57275,7 @@ LOOP AT ${groupTargetName}tab ${groupTarget}.`;
|
|
|
57268
57275
|
const enumName = (_b = high.findExpressionAfterToken("ENUM")) === null || _b === void 0 ? void 0 : _b.concatTokens();
|
|
57269
57276
|
const structureName = (_c = high.findExpressionAfterToken("STRUCTURE")) === null || _c === void 0 ? void 0 : _c.concatTokens();
|
|
57270
57277
|
// all ENUMS are char like?
|
|
57271
|
-
let code = `TYPES ${enumName} TYPE string.
|
|
57278
|
+
let code = `TYPES ${enumName} TYPE string.
|
|
57272
57279
|
CONSTANTS: BEGIN OF ${structureName},\n`;
|
|
57273
57280
|
let count = 1;
|
|
57274
57281
|
for (const e of enumStructure.findDirectStatements(Statements.TypeEnum).concat(enumStructure.findDirectStatements(Statements.Type))) {
|
|
@@ -57312,14 +57319,14 @@ CONSTANTS: BEGIN OF ${structureName},\n`;
|
|
|
57312
57319
|
const tabixBackup = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
|
|
57313
57320
|
const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
|
|
57314
57321
|
// restore tabix before exeption
|
|
57315
|
-
const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.
|
|
57316
|
-
${indentation}DATA ${tabixBackup} LIKE sy-tabix.
|
|
57317
|
-
${indentation}${tabixBackup} = sy-tabix.
|
|
57318
|
-
${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.
|
|
57319
|
-
${indentation}sy-tabix = ${tabixBackup}.
|
|
57320
|
-
${indentation}IF sy-subrc <> 0.
|
|
57321
|
-
${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
|
|
57322
|
-
${indentation}ENDIF.
|
|
57322
|
+
const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.
|
|
57323
|
+
${indentation}DATA ${tabixBackup} LIKE sy-tabix.
|
|
57324
|
+
${indentation}${tabixBackup} = sy-tabix.
|
|
57325
|
+
${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.
|
|
57326
|
+
${indentation}sy-tabix = ${tabixBackup}.
|
|
57327
|
+
${indentation}IF sy-subrc <> 0.
|
|
57328
|
+
${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
|
|
57329
|
+
${indentation}ENDIF.
|
|
57323
57330
|
${indentation}${uniqueName}`;
|
|
57324
57331
|
const start = target.getFirstToken().getStart();
|
|
57325
57332
|
const end = (_a = tableExpression.findDirectTokenByText("]")) === null || _a === void 0 ? void 0 : _a.getEnd();
|
|
@@ -57403,11 +57410,11 @@ ${indentation}${uniqueName}`;
|
|
|
57403
57410
|
const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
|
|
57404
57411
|
const source = (_b = templateSource === null || templateSource === void 0 ? void 0 : templateSource.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens();
|
|
57405
57412
|
const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
|
|
57406
|
-
const code = `DATA ${uniqueName} TYPE string.
|
|
57407
|
-
${indentation}CALL FUNCTION '${functionName}'
|
|
57408
|
-
${indentation} EXPORTING
|
|
57409
|
-
${indentation} input = ${source}
|
|
57410
|
-
${indentation} IMPORTING
|
|
57413
|
+
const code = `DATA ${uniqueName} TYPE string.
|
|
57414
|
+
${indentation}CALL FUNCTION '${functionName}'
|
|
57415
|
+
${indentation} EXPORTING
|
|
57416
|
+
${indentation} input = ${source}
|
|
57417
|
+
${indentation} IMPORTING
|
|
57411
57418
|
${indentation} output = ${uniqueName}.\n`;
|
|
57412
57419
|
const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), code);
|
|
57413
57420
|
const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, child.getFirstToken().getStart(), child.getLastToken().getEnd(), uniqueName);
|
|
@@ -58719,12 +58726,12 @@ class EasyToFindMessages {
|
|
|
58719
58726
|
key: "easy_to_find_messages",
|
|
58720
58727
|
title: "Easy to find messages",
|
|
58721
58728
|
shortDescription: `Make messages easy to find`,
|
|
58722
|
-
extendedInformation: `All messages must be statically referenced exactly once
|
|
58723
|
-
|
|
58724
|
-
Only MESSAGE and RAISE statments are counted as static references
|
|
58725
|
-
|
|
58726
|
-
Also see rule "message_exists"
|
|
58727
|
-
|
|
58729
|
+
extendedInformation: `All messages must be statically referenced exactly once
|
|
58730
|
+
|
|
58731
|
+
Only MESSAGE and RAISE statments are counted as static references
|
|
58732
|
+
|
|
58733
|
+
Also see rule "message_exists"
|
|
58734
|
+
|
|
58728
58735
|
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#make-messages-easy-to-find`,
|
|
58729
58736
|
tags: [_irule_1.RuleTag.Styleguide],
|
|
58730
58737
|
};
|
|
@@ -58809,8 +58816,8 @@ class EmptyLineinStatement extends _abap_rule_1.ABAPRule {
|
|
|
58809
58816
|
key: "empty_line_in_statement",
|
|
58810
58817
|
title: "Find empty lines in statements",
|
|
58811
58818
|
shortDescription: `Checks that statements do not contain empty lines.`,
|
|
58812
|
-
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
|
|
58813
|
-
|
|
58819
|
+
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
|
|
58820
|
+
|
|
58814
58821
|
https://docs.abapopenchecks.org/checks/41/`,
|
|
58815
58822
|
tags: [_irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
|
|
58816
58823
|
badExample: `WRITE\n\nhello.`,
|
|
@@ -58986,13 +58993,13 @@ class EmptyStructure extends _abap_rule_1.ABAPRule {
|
|
|
58986
58993
|
shortDescription: `Checks that the code does not contain empty blocks.`,
|
|
58987
58994
|
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-empty-if-branches`,
|
|
58988
58995
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
58989
|
-
badExample: `IF foo = bar.
|
|
58990
|
-
ENDIF.
|
|
58991
|
-
|
|
58992
|
-
DO 2 TIMES.
|
|
58996
|
+
badExample: `IF foo = bar.
|
|
58997
|
+
ENDIF.
|
|
58998
|
+
|
|
58999
|
+
DO 2 TIMES.
|
|
58993
59000
|
ENDDO.`,
|
|
58994
|
-
goodExample: `LOOP AT itab WHERE qty = 0 OR date > sy-datum.
|
|
58995
|
-
ENDLOOP.
|
|
59001
|
+
goodExample: `LOOP AT itab WHERE qty = 0 OR date > sy-datum.
|
|
59002
|
+
ENDLOOP.
|
|
58996
59003
|
result = xsdbool( sy-subrc = 0 ).`,
|
|
58997
59004
|
};
|
|
58998
59005
|
}
|
|
@@ -59134,10 +59141,10 @@ class ExitOrCheck extends _abap_rule_1.ABAPRule {
|
|
|
59134
59141
|
return {
|
|
59135
59142
|
key: "exit_or_check",
|
|
59136
59143
|
title: "Find EXIT or CHECK outside loops",
|
|
59137
|
-
shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
|
|
59144
|
+
shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
|
|
59138
59145
|
Use RETURN to leave procesing blocks instead.`,
|
|
59139
|
-
extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
|
|
59140
|
-
https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
|
|
59146
|
+
extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
|
|
59147
|
+
https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
|
|
59141
59148
|
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#check-vs-return`,
|
|
59142
59149
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
|
|
59143
59150
|
};
|
|
@@ -59220,12 +59227,12 @@ class ExpandMacros extends _abap_rule_1.ABAPRule {
|
|
|
59220
59227
|
key: "expand_macros",
|
|
59221
59228
|
title: "Expand Macros",
|
|
59222
59229
|
shortDescription: `Allows expanding macro calls with quick fixes`,
|
|
59223
|
-
extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
|
|
59224
|
-
|
|
59230
|
+
extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
|
|
59231
|
+
|
|
59225
59232
|
Note that macros/DEFINE cannot be used in the ABAP Cloud programming model`,
|
|
59226
|
-
badExample: `DEFINE _hello.
|
|
59227
|
-
WRITE 'hello'.
|
|
59228
|
-
END-OF-DEFINITION.
|
|
59233
|
+
badExample: `DEFINE _hello.
|
|
59234
|
+
WRITE 'hello'.
|
|
59235
|
+
END-OF-DEFINITION.
|
|
59229
59236
|
_hello.`,
|
|
59230
59237
|
goodExample: `WRITE 'hello'.`,
|
|
59231
59238
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
|
|
@@ -59312,7 +59319,7 @@ class Exporting extends _abap_rule_1.ABAPRule {
|
|
|
59312
59319
|
shortDescription: `Detects EXPORTING statements which can be omitted.`,
|
|
59313
59320
|
badExample: `call_method( EXPORTING foo = bar ).`,
|
|
59314
59321
|
goodExample: `call_method( foo = bar ).`,
|
|
59315
|
-
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-optional-keyword-exporting
|
|
59322
|
+
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-optional-keyword-exporting
|
|
59316
59323
|
https://docs.abapopenchecks.org/checks/30/`,
|
|
59317
59324
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
|
|
59318
59325
|
};
|
|
@@ -59410,7 +59417,7 @@ class ForbiddenIdentifier extends _abap_rule_1.ABAPRule {
|
|
|
59410
59417
|
key: "forbidden_identifier",
|
|
59411
59418
|
title: "Forbidden Identifier",
|
|
59412
59419
|
shortDescription: `Forbid use of specified identifiers, list of regex.`,
|
|
59413
|
-
extendedInformation: `Used in the transpiler to find javascript keywords in ABAP identifiers,
|
|
59420
|
+
extendedInformation: `Used in the transpiler to find javascript keywords in ABAP identifiers,
|
|
59414
59421
|
https://github.com/abaplint/transpiler/blob/bda94b8b56e2b7f2f87be2168f12361aa530220e/packages/transpiler/src/validation.ts#L44`,
|
|
59415
59422
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
59416
59423
|
};
|
|
@@ -59652,8 +59659,8 @@ class ForbiddenVoidType {
|
|
|
59652
59659
|
key: "forbidden_void_type",
|
|
59653
59660
|
title: "Forbidden Void Types",
|
|
59654
59661
|
shortDescription: `Avoid usage of specified void types.`,
|
|
59655
|
-
extendedInformation: `Inspiration:
|
|
59656
|
-
BOOLEAN, BOOLE_D, CHAR01, CHAR1, CHAR10, CHAR12, CHAR128, CHAR2, CHAR20, CHAR4, CHAR70,
|
|
59662
|
+
extendedInformation: `Inspiration:
|
|
59663
|
+
BOOLEAN, BOOLE_D, CHAR01, CHAR1, CHAR10, CHAR12, CHAR128, CHAR2, CHAR20, CHAR4, CHAR70,
|
|
59657
59664
|
DATS, TIMS, DATUM, FLAG, INT4, NUMC3, NUMC4, SAP_BOOL, TEXT25, TEXT80, X255, XFELD`,
|
|
59658
59665
|
};
|
|
59659
59666
|
}
|
|
@@ -59896,7 +59903,7 @@ class FullyTypeITabs extends _abap_rule_1.ABAPRule {
|
|
|
59896
59903
|
key: "fully_type_itabs",
|
|
59897
59904
|
title: "Fully type internal tables",
|
|
59898
59905
|
shortDescription: `No implict table types or table keys`,
|
|
59899
|
-
badExample: `DATA lt_foo TYPE TABLE OF ty.
|
|
59906
|
+
badExample: `DATA lt_foo TYPE TABLE OF ty.
|
|
59900
59907
|
DATA lt_bar TYPE STANDARD TABLE OF ty.`,
|
|
59901
59908
|
goodExample: `DATA lt_foo TYPE STANDARD TABLE OF ty WITH EMPTY KEY.`,
|
|
59902
59909
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
@@ -60081,26 +60088,26 @@ class FunctionalWriting extends _abap_rule_1.ABAPRule {
|
|
|
60081
60088
|
key: "functional_writing",
|
|
60082
60089
|
title: "Use functional writing",
|
|
60083
60090
|
shortDescription: `Detects usage of call method when functional style calls can be used.`,
|
|
60084
|
-
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-calls
|
|
60091
|
+
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-calls
|
|
60085
60092
|
https://docs.abapopenchecks.org/checks/07/`,
|
|
60086
60093
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
|
|
60087
|
-
badExample: `CALL METHOD zcl_class=>method( ).
|
|
60088
|
-
CALL METHOD cl_abap_typedescr=>describe_by_name
|
|
60089
|
-
EXPORTING
|
|
60090
|
-
p_name = 'NAME'
|
|
60091
|
-
RECEIVING
|
|
60092
|
-
p_descr_ref = lr_typedescr
|
|
60093
|
-
EXCEPTIONS
|
|
60094
|
-
type_not_found = 1
|
|
60094
|
+
badExample: `CALL METHOD zcl_class=>method( ).
|
|
60095
|
+
CALL METHOD cl_abap_typedescr=>describe_by_name
|
|
60096
|
+
EXPORTING
|
|
60097
|
+
p_name = 'NAME'
|
|
60098
|
+
RECEIVING
|
|
60099
|
+
p_descr_ref = lr_typedescr
|
|
60100
|
+
EXCEPTIONS
|
|
60101
|
+
type_not_found = 1
|
|
60095
60102
|
OTHERS = 2.`,
|
|
60096
|
-
goodExample: `zcl_class=>method( ).
|
|
60097
|
-
cl_abap_typedescr=>describe_by_name(
|
|
60098
|
-
EXPORTING
|
|
60099
|
-
p_name = 'NAME'
|
|
60100
|
-
RECEIVING
|
|
60101
|
-
p_descr_ref = lr_typedescr
|
|
60102
|
-
EXCEPTIONS
|
|
60103
|
-
type_not_found = 1
|
|
60103
|
+
goodExample: `zcl_class=>method( ).
|
|
60104
|
+
cl_abap_typedescr=>describe_by_name(
|
|
60105
|
+
EXPORTING
|
|
60106
|
+
p_name = 'NAME'
|
|
60107
|
+
RECEIVING
|
|
60108
|
+
p_descr_ref = lr_typedescr
|
|
60109
|
+
EXCEPTIONS
|
|
60110
|
+
type_not_found = 1
|
|
60104
60111
|
OTHERS = 2 ).`,
|
|
60105
60112
|
};
|
|
60106
60113
|
}
|
|
@@ -60211,14 +60218,14 @@ class GlobalClass extends _abap_rule_1.ABAPRule {
|
|
|
60211
60218
|
key: "global_class",
|
|
60212
60219
|
title: "Global class checks",
|
|
60213
60220
|
shortDescription: `Checks related to global classes`,
|
|
60214
|
-
extendedInformation: `* global classes must be in own files
|
|
60215
|
-
|
|
60216
|
-
* file names must match class name
|
|
60217
|
-
|
|
60218
|
-
* file names must match interface name
|
|
60219
|
-
|
|
60220
|
-
* global classes must be global definitions
|
|
60221
|
-
|
|
60221
|
+
extendedInformation: `* global classes must be in own files
|
|
60222
|
+
|
|
60223
|
+
* file names must match class name
|
|
60224
|
+
|
|
60225
|
+
* file names must match interface name
|
|
60226
|
+
|
|
60227
|
+
* global classes must be global definitions
|
|
60228
|
+
|
|
60222
60229
|
* global interfaces must be global definitions`,
|
|
60223
60230
|
tags: [_irule_1.RuleTag.Syntax],
|
|
60224
60231
|
};
|
|
@@ -60317,21 +60324,21 @@ class IdenticalConditions extends _abap_rule_1.ABAPRule {
|
|
|
60317
60324
|
return {
|
|
60318
60325
|
key: "identical_conditions",
|
|
60319
60326
|
title: "Identical conditions",
|
|
60320
|
-
shortDescription: `Find identical conditions in IF + CASE + WHILE etc
|
|
60321
|
-
|
|
60327
|
+
shortDescription: `Find identical conditions in IF + CASE + WHILE etc
|
|
60328
|
+
|
|
60322
60329
|
Prerequsites: code is pretty printed with identical cAsE`,
|
|
60323
60330
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
60324
|
-
badExample: `IF foo = bar OR 1 = a OR foo = bar.
|
|
60325
|
-
ENDIF.
|
|
60326
|
-
CASE bar.
|
|
60327
|
-
WHEN '1'.
|
|
60328
|
-
WHEN 'A' OR '1'.
|
|
60331
|
+
badExample: `IF foo = bar OR 1 = a OR foo = bar.
|
|
60332
|
+
ENDIF.
|
|
60333
|
+
CASE bar.
|
|
60334
|
+
WHEN '1'.
|
|
60335
|
+
WHEN 'A' OR '1'.
|
|
60329
60336
|
ENDCASE.`,
|
|
60330
|
-
goodExample: `IF foo = bar OR 1 = a.
|
|
60331
|
-
ENDIF.
|
|
60332
|
-
CASE bar.
|
|
60333
|
-
WHEN '1'.
|
|
60334
|
-
WHEN 'A'.
|
|
60337
|
+
goodExample: `IF foo = bar OR 1 = a.
|
|
60338
|
+
ENDIF.
|
|
60339
|
+
CASE bar.
|
|
60340
|
+
WHEN '1'.
|
|
60341
|
+
WHEN 'A'.
|
|
60335
60342
|
ENDCASE.`,
|
|
60336
60343
|
};
|
|
60337
60344
|
}
|
|
@@ -60465,23 +60472,23 @@ class IdenticalContents extends _abap_rule_1.ABAPRule {
|
|
|
60465
60472
|
key: "identical_contents",
|
|
60466
60473
|
title: "Identical contents",
|
|
60467
60474
|
shortDescription: `Find identical contents in blocks inside IFs, both in the beginning and in the end.`,
|
|
60468
|
-
extendedInformation: `
|
|
60469
|
-
Prerequsites: code is pretty printed with identical cAsE
|
|
60470
|
-
|
|
60475
|
+
extendedInformation: `
|
|
60476
|
+
Prerequsites: code is pretty printed with identical cAsE
|
|
60477
|
+
|
|
60471
60478
|
Chained statments are ignored`,
|
|
60472
60479
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
60473
|
-
badExample: `IF foo = bar.
|
|
60474
|
-
WRITE 'bar'.
|
|
60475
|
-
WRITE 'world'.
|
|
60476
|
-
ELSE.
|
|
60477
|
-
WRITE 'foo'.
|
|
60478
|
-
WRITE 'world'.
|
|
60480
|
+
badExample: `IF foo = bar.
|
|
60481
|
+
WRITE 'bar'.
|
|
60482
|
+
WRITE 'world'.
|
|
60483
|
+
ELSE.
|
|
60484
|
+
WRITE 'foo'.
|
|
60485
|
+
WRITE 'world'.
|
|
60479
60486
|
ENDIF.`,
|
|
60480
|
-
goodExample: `IF foo = bar.
|
|
60481
|
-
WRITE 'bar'.
|
|
60482
|
-
ELSE.
|
|
60483
|
-
WRITE 'foo'.
|
|
60484
|
-
ENDIF.
|
|
60487
|
+
goodExample: `IF foo = bar.
|
|
60488
|
+
WRITE 'bar'.
|
|
60489
|
+
ELSE.
|
|
60490
|
+
WRITE 'foo'.
|
|
60491
|
+
ENDIF.
|
|
60485
60492
|
WRITE 'world'.`,
|
|
60486
60493
|
};
|
|
60487
60494
|
}
|
|
@@ -60589,12 +60596,12 @@ class IdenticalDescriptions {
|
|
|
60589
60596
|
key: "identical_descriptions",
|
|
60590
60597
|
title: "Identical descriptions",
|
|
60591
60598
|
shortDescription: `Searches for objects with the same type and same description`,
|
|
60592
|
-
extendedInformation: `Case insensitive
|
|
60593
|
-
|
|
60594
|
-
Only checks the master language descriptions
|
|
60595
|
-
|
|
60596
|
-
Dependencies are skipped
|
|
60597
|
-
|
|
60599
|
+
extendedInformation: `Case insensitive
|
|
60600
|
+
|
|
60601
|
+
Only checks the master language descriptions
|
|
60602
|
+
|
|
60603
|
+
Dependencies are skipped
|
|
60604
|
+
|
|
60598
60605
|
Works for: INTF, CLAS, DOMA, DTEL, FUNC in same FUGR`,
|
|
60599
60606
|
tags: [],
|
|
60600
60607
|
};
|
|
@@ -60768,43 +60775,43 @@ class IfInIf extends _abap_rule_1.ABAPRule {
|
|
|
60768
60775
|
key: "if_in_if",
|
|
60769
60776
|
title: "IF in IF",
|
|
60770
60777
|
shortDescription: `Detects nested ifs which can be refactored.`,
|
|
60771
|
-
extendedInformation: `
|
|
60772
|
-
Directly nested IFs without ELSE can be refactored to a single condition using AND.
|
|
60773
|
-
|
|
60774
|
-
ELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.
|
|
60775
|
-
|
|
60776
|
-
https://docs.abapopenchecks.org/checks/01/
|
|
60778
|
+
extendedInformation: `
|
|
60779
|
+
Directly nested IFs without ELSE can be refactored to a single condition using AND.
|
|
60780
|
+
|
|
60781
|
+
ELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.
|
|
60782
|
+
|
|
60783
|
+
https://docs.abapopenchecks.org/checks/01/
|
|
60777
60784
|
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low`,
|
|
60778
|
-
badExample: `IF condition1.
|
|
60779
|
-
IF condition2.
|
|
60780
|
-
...
|
|
60781
|
-
ENDIF.
|
|
60782
|
-
ENDIF.
|
|
60783
|
-
|
|
60784
|
-
IF condition1.
|
|
60785
|
-
...
|
|
60786
|
-
ELSE.
|
|
60787
|
-
IF condition2.
|
|
60788
|
-
...
|
|
60789
|
-
ENDIF.
|
|
60785
|
+
badExample: `IF condition1.
|
|
60786
|
+
IF condition2.
|
|
60787
|
+
...
|
|
60788
|
+
ENDIF.
|
|
60789
|
+
ENDIF.
|
|
60790
|
+
|
|
60791
|
+
IF condition1.
|
|
60792
|
+
...
|
|
60793
|
+
ELSE.
|
|
60794
|
+
IF condition2.
|
|
60795
|
+
...
|
|
60796
|
+
ENDIF.
|
|
60790
60797
|
ENDIF.`,
|
|
60791
|
-
goodExample: `IF ( condition1 ) AND ( condition2 ).
|
|
60792
|
-
...
|
|
60793
|
-
ENDIF.
|
|
60794
|
-
|
|
60795
|
-
IF condition1.
|
|
60796
|
-
...
|
|
60797
|
-
ELSEIF condition2.
|
|
60798
|
-
...
|
|
60799
|
-
ENDIF.
|
|
60800
|
-
|
|
60801
|
-
CASE variable.
|
|
60802
|
-
WHEN value1.
|
|
60803
|
-
...
|
|
60804
|
-
WHEN value2.
|
|
60805
|
-
IF condition2.
|
|
60806
|
-
...
|
|
60807
|
-
ENDIF.
|
|
60798
|
+
goodExample: `IF ( condition1 ) AND ( condition2 ).
|
|
60799
|
+
...
|
|
60800
|
+
ENDIF.
|
|
60801
|
+
|
|
60802
|
+
IF condition1.
|
|
60803
|
+
...
|
|
60804
|
+
ELSEIF condition2.
|
|
60805
|
+
...
|
|
60806
|
+
ENDIF.
|
|
60807
|
+
|
|
60808
|
+
CASE variable.
|
|
60809
|
+
WHEN value1.
|
|
60810
|
+
...
|
|
60811
|
+
WHEN value2.
|
|
60812
|
+
IF condition2.
|
|
60813
|
+
...
|
|
60814
|
+
ENDIF.
|
|
60808
60815
|
ENDCASE.`,
|
|
60809
60816
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
|
|
60810
60817
|
};
|
|
@@ -60989,9 +60996,9 @@ class ImplementMethods extends _abap_rule_1.ABAPRule {
|
|
|
60989
60996
|
for (const i of ((_a = file.getStructure()) === null || _a === void 0 ? void 0 : _a.findAllStatements(Statements.ClassImplementation)) || []) {
|
|
60990
60997
|
const name = (_b = i.findFirstExpression(Expressions.ClassName)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr().toUpperCase();
|
|
60991
60998
|
if (name === impl.identifier.getName().toUpperCase()) {
|
|
60992
|
-
return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
|
|
60993
|
-
METHOD ${methodName.toLowerCase()}.
|
|
60994
|
-
RETURN. " todo, implement method
|
|
60999
|
+
return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
|
|
61000
|
+
METHOD ${methodName.toLowerCase()}.
|
|
61001
|
+
RETURN. " todo, implement method
|
|
60995
61002
|
ENDMETHOD.`);
|
|
60996
61003
|
}
|
|
60997
61004
|
}
|
|
@@ -61179,19 +61186,19 @@ class InStatementIndentation extends _abap_rule_1.ABAPRule {
|
|
|
61179
61186
|
key: "in_statement_indentation",
|
|
61180
61187
|
title: "In-statement indentation",
|
|
61181
61188
|
shortDescription: "Checks alignment within statements which span multiple lines.",
|
|
61182
|
-
extendedInformation: `Lines following the first line should be indented once (2 spaces).
|
|
61183
|
-
|
|
61184
|
-
For block declaration statements, lines after the first should be indented an additional time (default: +2 spaces)
|
|
61189
|
+
extendedInformation: `Lines following the first line should be indented once (2 spaces).
|
|
61190
|
+
|
|
61191
|
+
For block declaration statements, lines after the first should be indented an additional time (default: +2 spaces)
|
|
61185
61192
|
to distinguish them better from code within the block.`,
|
|
61186
|
-
badExample: `IF 1 = 1
|
|
61187
|
-
AND 2 = 2.
|
|
61188
|
-
WRITE 'hello' &&
|
|
61189
|
-
'world'.
|
|
61193
|
+
badExample: `IF 1 = 1
|
|
61194
|
+
AND 2 = 2.
|
|
61195
|
+
WRITE 'hello' &&
|
|
61196
|
+
'world'.
|
|
61190
61197
|
ENDIF.`,
|
|
61191
|
-
goodExample: `IF 1 = 1
|
|
61192
|
-
AND 2 = 2.
|
|
61193
|
-
WRITE 'hello' &&
|
|
61194
|
-
'world'.
|
|
61198
|
+
goodExample: `IF 1 = 1
|
|
61199
|
+
AND 2 = 2.
|
|
61200
|
+
WRITE 'hello' &&
|
|
61201
|
+
'world'.
|
|
61195
61202
|
ENDIF.`,
|
|
61196
61203
|
tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
|
|
61197
61204
|
};
|
|
@@ -61314,23 +61321,23 @@ class Indentation extends _abap_rule_1.ABAPRule {
|
|
|
61314
61321
|
title: "Indentation",
|
|
61315
61322
|
shortDescription: `Checks indentation`,
|
|
61316
61323
|
tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
|
|
61317
|
-
badExample: `CLASS lcl DEFINITION.
|
|
61318
|
-
PRIVATE SECTION.
|
|
61319
|
-
METHODS constructor.
|
|
61320
|
-
ENDCLASS.
|
|
61321
|
-
|
|
61322
|
-
CLASS lcl IMPLEMENTATION.
|
|
61323
|
-
METHOD constructor.
|
|
61324
|
-
ENDMETHOD.
|
|
61324
|
+
badExample: `CLASS lcl DEFINITION.
|
|
61325
|
+
PRIVATE SECTION.
|
|
61326
|
+
METHODS constructor.
|
|
61327
|
+
ENDCLASS.
|
|
61328
|
+
|
|
61329
|
+
CLASS lcl IMPLEMENTATION.
|
|
61330
|
+
METHOD constructor.
|
|
61331
|
+
ENDMETHOD.
|
|
61325
61332
|
ENDCLASS.`,
|
|
61326
|
-
goodExample: `CLASS lcl DEFINITION.
|
|
61327
|
-
PRIVATE SECTION.
|
|
61328
|
-
METHODS constructor.
|
|
61329
|
-
ENDCLASS.
|
|
61330
|
-
|
|
61331
|
-
CLASS lcl IMPLEMENTATION.
|
|
61332
|
-
METHOD constructor.
|
|
61333
|
-
ENDMETHOD.
|
|
61333
|
+
goodExample: `CLASS lcl DEFINITION.
|
|
61334
|
+
PRIVATE SECTION.
|
|
61335
|
+
METHODS constructor.
|
|
61336
|
+
ENDCLASS.
|
|
61337
|
+
|
|
61338
|
+
CLASS lcl IMPLEMENTATION.
|
|
61339
|
+
METHOD constructor.
|
|
61340
|
+
ENDMETHOD.
|
|
61334
61341
|
ENDCLASS.`,
|
|
61335
61342
|
};
|
|
61336
61343
|
}
|
|
@@ -61457,7 +61464,6 @@ __exportStar(__webpack_require__(/*! ./cds_legacy_view */ "./node_modules/@abapl
|
|
|
61457
61464
|
__exportStar(__webpack_require__(/*! ./cds_parser_error */ "./node_modules/@abaplint/core/build/src/rules/cds_parser_error.js"), exports);
|
|
61458
61465
|
__exportStar(__webpack_require__(/*! ./chain_mainly_declarations */ "./node_modules/@abaplint/core/build/src/rules/chain_mainly_declarations.js"), exports);
|
|
61459
61466
|
__exportStar(__webpack_require__(/*! ./change_if_to_case */ "./node_modules/@abaplint/core/build/src/rules/change_if_to_case.js"), exports);
|
|
61460
|
-
__exportStar(__webpack_require__(/*! ./unused_macros */ "./node_modules/@abaplint/core/build/src/rules/unused_macros.js"), exports);
|
|
61461
61467
|
__exportStar(__webpack_require__(/*! ./check_abstract */ "./node_modules/@abaplint/core/build/src/rules/check_abstract.js"), exports);
|
|
61462
61468
|
__exportStar(__webpack_require__(/*! ./check_comments */ "./node_modules/@abaplint/core/build/src/rules/check_comments.js"), exports);
|
|
61463
61469
|
__exportStar(__webpack_require__(/*! ./check_ddic */ "./node_modules/@abaplint/core/build/src/rules/check_ddic.js"), exports);
|
|
@@ -61519,6 +61525,7 @@ __exportStar(__webpack_require__(/*! ./line_only_punc */ "./node_modules/@abapli
|
|
|
61519
61525
|
__exportStar(__webpack_require__(/*! ./local_class_naming */ "./node_modules/@abaplint/core/build/src/rules/local_class_naming.js"), exports);
|
|
61520
61526
|
__exportStar(__webpack_require__(/*! ./local_testclass_consistency */ "./node_modules/@abaplint/core/build/src/rules/local_testclass_consistency.js"), exports);
|
|
61521
61527
|
__exportStar(__webpack_require__(/*! ./local_variable_names */ "./node_modules/@abaplint/core/build/src/rules/local_variable_names.js"), exports);
|
|
61528
|
+
__exportStar(__webpack_require__(/*! ./macro_naming */ "./node_modules/@abaplint/core/build/src/rules/macro_naming.js"), exports);
|
|
61522
61529
|
__exportStar(__webpack_require__(/*! ./main_file_contents */ "./node_modules/@abaplint/core/build/src/rules/main_file_contents.js"), exports);
|
|
61523
61530
|
__exportStar(__webpack_require__(/*! ./many_parentheses */ "./node_modules/@abaplint/core/build/src/rules/many_parentheses.js"), exports);
|
|
61524
61531
|
__exportStar(__webpack_require__(/*! ./max_one_method_parameter_per_line */ "./node_modules/@abaplint/core/build/src/rules/max_one_method_parameter_per_line.js"), exports);
|
|
@@ -61596,6 +61603,7 @@ __exportStar(__webpack_require__(/*! ./unnecessary_return */ "./node_modules/@ab
|
|
|
61596
61603
|
__exportStar(__webpack_require__(/*! ./unreachable_code */ "./node_modules/@abaplint/core/build/src/rules/unreachable_code.js"), exports);
|
|
61597
61604
|
__exportStar(__webpack_require__(/*! ./unsecure_fae */ "./node_modules/@abaplint/core/build/src/rules/unsecure_fae.js"), exports);
|
|
61598
61605
|
__exportStar(__webpack_require__(/*! ./unused_ddic */ "./node_modules/@abaplint/core/build/src/rules/unused_ddic.js"), exports);
|
|
61606
|
+
__exportStar(__webpack_require__(/*! ./unused_macros */ "./node_modules/@abaplint/core/build/src/rules/unused_macros.js"), exports);
|
|
61599
61607
|
__exportStar(__webpack_require__(/*! ./unused_methods */ "./node_modules/@abaplint/core/build/src/rules/unused_methods.js"), exports);
|
|
61600
61608
|
__exportStar(__webpack_require__(/*! ./unused_types */ "./node_modules/@abaplint/core/build/src/rules/unused_types.js"), exports);
|
|
61601
61609
|
__exportStar(__webpack_require__(/*! ./unused_variables */ "./node_modules/@abaplint/core/build/src/rules/unused_variables.js"), exports);
|
|
@@ -61718,9 +61726,9 @@ class IntfReferencingClas {
|
|
|
61718
61726
|
key: "intf_referencing_clas",
|
|
61719
61727
|
title: "INTF referencing CLAS",
|
|
61720
61728
|
shortDescription: `Interface contains references to class`,
|
|
61721
|
-
extendedInformation: `Only global interfaces are checked.
|
|
61722
|
-
Only first level references are checked.
|
|
61723
|
-
Exception class references are ignored.
|
|
61729
|
+
extendedInformation: `Only global interfaces are checked.
|
|
61730
|
+
Only first level references are checked.
|
|
61731
|
+
Exception class references are ignored.
|
|
61724
61732
|
Void references are ignored.`,
|
|
61725
61733
|
};
|
|
61726
61734
|
}
|
|
@@ -61805,9 +61813,9 @@ class InvalidTableIndex extends _abap_rule_1.ABAPRule {
|
|
|
61805
61813
|
title: "Invalid Table Index",
|
|
61806
61814
|
shortDescription: `Issues error for constant table index zero, as ABAP starts from 1`,
|
|
61807
61815
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
|
|
61808
|
-
badExample: `DATA(first) = table[ 0 ].
|
|
61816
|
+
badExample: `DATA(first) = table[ 0 ].
|
|
61809
61817
|
READ TABLE gt_stack ASSIGNING <ls_stack> INDEX 0.`,
|
|
61810
|
-
goodExample: `DATA(first) = table[ 1 ].
|
|
61818
|
+
goodExample: `DATA(first) = table[ 1 ].
|
|
61811
61819
|
READ TABLE gt_stack ASSIGNING <ls_stack> INDEX 1.`,
|
|
61812
61820
|
};
|
|
61813
61821
|
}
|
|
@@ -62408,8 +62416,8 @@ class LineBreakStyle {
|
|
|
62408
62416
|
return {
|
|
62409
62417
|
key: "line_break_style",
|
|
62410
62418
|
title: "Makes sure line breaks are consistent in the ABAP code",
|
|
62411
|
-
shortDescription: `Enforces LF as newlines in ABAP files
|
|
62412
|
-
|
|
62419
|
+
shortDescription: `Enforces LF as newlines in ABAP files
|
|
62420
|
+
|
|
62413
62421
|
abapGit does not work with CRLF`,
|
|
62414
62422
|
tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
|
|
62415
62423
|
};
|
|
@@ -62478,7 +62486,7 @@ class LineLength extends _abap_rule_1.ABAPRule {
|
|
|
62478
62486
|
key: "line_length",
|
|
62479
62487
|
title: "Line length",
|
|
62480
62488
|
shortDescription: `Detects lines exceeding the provided maximum length.`,
|
|
62481
|
-
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length
|
|
62489
|
+
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length
|
|
62482
62490
|
https://docs.abapopenchecks.org/checks/04/`,
|
|
62483
62491
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
62484
62492
|
};
|
|
@@ -62549,7 +62557,7 @@ class LineOnlyPunc extends _abap_rule_1.ABAPRule {
|
|
|
62549
62557
|
key: "line_only_punc",
|
|
62550
62558
|
title: "Line containing only punctuation",
|
|
62551
62559
|
shortDescription: `Detects lines containing only punctuation.`,
|
|
62552
|
-
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#close-brackets-at-line-end
|
|
62560
|
+
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#close-brackets-at-line-end
|
|
62553
62561
|
https://docs.abapopenchecks.org/checks/16/`,
|
|
62554
62562
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
|
|
62555
62563
|
badExample: "zcl_class=>method(\n).",
|
|
@@ -62809,15 +62817,15 @@ class LocalVariableNames extends _abap_rule_1.ABAPRule {
|
|
|
62809
62817
|
return {
|
|
62810
62818
|
key: "local_variable_names",
|
|
62811
62819
|
title: "Local variable naming conventions",
|
|
62812
|
-
shortDescription: `
|
|
62813
|
-
Allows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols.
|
|
62820
|
+
shortDescription: `
|
|
62821
|
+
Allows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols.
|
|
62814
62822
|
Regexes are case-insensitive.`,
|
|
62815
62823
|
tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
|
|
62816
|
-
badExample: `FORM bar.
|
|
62817
|
-
DATA foo.
|
|
62824
|
+
badExample: `FORM bar.
|
|
62825
|
+
DATA foo.
|
|
62818
62826
|
ENDFORM.`,
|
|
62819
|
-
goodExample: `FORM bar.
|
|
62820
|
-
DATA lv_foo.
|
|
62827
|
+
goodExample: `FORM bar.
|
|
62828
|
+
DATA lv_foo.
|
|
62821
62829
|
ENDFORM.`,
|
|
62822
62830
|
};
|
|
62823
62831
|
}
|
|
@@ -62932,6 +62940,83 @@ exports.LocalVariableNames = LocalVariableNames;
|
|
|
62932
62940
|
|
|
62933
62941
|
/***/ }),
|
|
62934
62942
|
|
|
62943
|
+
/***/ "./node_modules/@abaplint/core/build/src/rules/macro_naming.js":
|
|
62944
|
+
/*!*********************************************************************!*\
|
|
62945
|
+
!*** ./node_modules/@abaplint/core/build/src/rules/macro_naming.js ***!
|
|
62946
|
+
\*********************************************************************/
|
|
62947
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
62948
|
+
|
|
62949
|
+
"use strict";
|
|
62950
|
+
|
|
62951
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
62952
|
+
exports.MacroNaming = exports.MacroNamingConf = void 0;
|
|
62953
|
+
const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
|
|
62954
|
+
const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@abaplint/core/build/src/rules/_abap_rule.js");
|
|
62955
|
+
const Statements = __webpack_require__(/*! ../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
|
|
62956
|
+
const Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
62957
|
+
const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
|
|
62958
|
+
const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
|
|
62959
|
+
const objects_1 = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
|
|
62960
|
+
class MacroNamingConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
62961
|
+
constructor() {
|
|
62962
|
+
super(...arguments);
|
|
62963
|
+
/** The pattern for macros, case insensitive */
|
|
62964
|
+
this.pattern = "^_.+$";
|
|
62965
|
+
}
|
|
62966
|
+
}
|
|
62967
|
+
exports.MacroNamingConf = MacroNamingConf;
|
|
62968
|
+
class MacroNaming extends _abap_rule_1.ABAPRule {
|
|
62969
|
+
constructor() {
|
|
62970
|
+
super(...arguments);
|
|
62971
|
+
this.conf = new MacroNamingConf();
|
|
62972
|
+
}
|
|
62973
|
+
getMetadata() {
|
|
62974
|
+
return {
|
|
62975
|
+
key: "macro_naming",
|
|
62976
|
+
title: "Macro naming conventions",
|
|
62977
|
+
shortDescription: `Allows you to enforce a pattern for macro definitions`,
|
|
62978
|
+
extendedInformation: `Use rule "avoid_use" to avoid macros alotogether.`,
|
|
62979
|
+
tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
|
|
62980
|
+
};
|
|
62981
|
+
}
|
|
62982
|
+
getConfig() {
|
|
62983
|
+
return this.conf;
|
|
62984
|
+
}
|
|
62985
|
+
setConfig(conf) {
|
|
62986
|
+
this.conf = conf;
|
|
62987
|
+
}
|
|
62988
|
+
runParsed(file, obj) {
|
|
62989
|
+
const issues = [];
|
|
62990
|
+
const testRegex = new RegExp(this.conf.pattern, "i");
|
|
62991
|
+
if (obj instanceof objects_1.TypePool) {
|
|
62992
|
+
return [];
|
|
62993
|
+
}
|
|
62994
|
+
for (const stat of file.getStatements()) {
|
|
62995
|
+
if (!(stat.get() instanceof Statements.Define)) {
|
|
62996
|
+
continue;
|
|
62997
|
+
}
|
|
62998
|
+
const expr = stat.findDirectExpression(Expressions.MacroName);
|
|
62999
|
+
if (expr === undefined) {
|
|
63000
|
+
continue;
|
|
63001
|
+
}
|
|
63002
|
+
const token = expr.getFirstToken();
|
|
63003
|
+
if (testRegex.exec(token.getStr())) {
|
|
63004
|
+
continue;
|
|
63005
|
+
}
|
|
63006
|
+
else {
|
|
63007
|
+
const message = "Bad macro name naming, expected \"" + this.conf.pattern + "\", got \"" + token.getStr() + "\"";
|
|
63008
|
+
const issue = issue_1.Issue.atToken(file, token, message, this.getMetadata().key, this.conf.severity);
|
|
63009
|
+
issues.push(issue);
|
|
63010
|
+
}
|
|
63011
|
+
}
|
|
63012
|
+
return issues;
|
|
63013
|
+
}
|
|
63014
|
+
}
|
|
63015
|
+
exports.MacroNaming = MacroNaming;
|
|
63016
|
+
//# sourceMappingURL=macro_naming.js.map
|
|
63017
|
+
|
|
63018
|
+
/***/ }),
|
|
63019
|
+
|
|
62935
63020
|
/***/ "./node_modules/@abaplint/core/build/src/rules/main_file_contents.js":
|
|
62936
63021
|
/*!***************************************************************************!*\
|
|
62937
63022
|
!*** ./node_modules/@abaplint/core/build/src/rules/main_file_contents.js ***!
|
|
@@ -62963,10 +63048,10 @@ class MainFileContents {
|
|
|
62963
63048
|
key: "main_file_contents",
|
|
62964
63049
|
title: "Main file contents",
|
|
62965
63050
|
shortDescription: `Checks related to report declarations.`,
|
|
62966
|
-
extendedInformation: `Does not run if the target version is Cloud
|
|
62967
|
-
|
|
62968
|
-
* PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
|
|
62969
|
-
* TYPEs must begin with "TYPE-POOL <name>."
|
|
63051
|
+
extendedInformation: `Does not run if the target version is Cloud
|
|
63052
|
+
|
|
63053
|
+
* PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
|
|
63054
|
+
* TYPEs must begin with "TYPE-POOL <name>."
|
|
62970
63055
|
`,
|
|
62971
63056
|
};
|
|
62972
63057
|
}
|
|
@@ -63082,17 +63167,17 @@ class ManyParentheses extends _abap_rule_1.ABAPRule {
|
|
|
63082
63167
|
title: "Too many parentheses",
|
|
63083
63168
|
shortDescription: `Searches for expressions where extra parentheses can safely be removed`,
|
|
63084
63169
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
|
|
63085
|
-
badExample: `
|
|
63086
|
-
IF ( destination IS INITIAL ).
|
|
63087
|
-
ENDIF.
|
|
63088
|
-
IF foo = boo AND ( bar = lar AND moo = loo ).
|
|
63089
|
-
ENDIF.
|
|
63170
|
+
badExample: `
|
|
63171
|
+
IF ( destination IS INITIAL ).
|
|
63172
|
+
ENDIF.
|
|
63173
|
+
IF foo = boo AND ( bar = lar AND moo = loo ).
|
|
63174
|
+
ENDIF.
|
|
63090
63175
|
`,
|
|
63091
|
-
goodExample: `
|
|
63092
|
-
IF destination IS INITIAL.
|
|
63093
|
-
ENDIF.
|
|
63094
|
-
IF foo = boo AND bar = lar AND moo = loo.
|
|
63095
|
-
ENDIF.
|
|
63176
|
+
goodExample: `
|
|
63177
|
+
IF destination IS INITIAL.
|
|
63178
|
+
ENDIF.
|
|
63179
|
+
IF foo = boo AND bar = lar AND moo = loo.
|
|
63180
|
+
ENDIF.
|
|
63096
63181
|
`,
|
|
63097
63182
|
};
|
|
63098
63183
|
}
|
|
@@ -63266,14 +63351,14 @@ class MaxOneMethodParameterPerLine extends _abap_rule_1.ABAPRule {
|
|
|
63266
63351
|
title: "Max one method parameter definition per line",
|
|
63267
63352
|
shortDescription: `Keep max one method parameter description per line`,
|
|
63268
63353
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace],
|
|
63269
|
-
badExample: `
|
|
63270
|
-
METHODS apps_scope_token
|
|
63271
|
-
IMPORTING
|
|
63354
|
+
badExample: `
|
|
63355
|
+
METHODS apps_scope_token
|
|
63356
|
+
IMPORTING
|
|
63272
63357
|
body TYPE bodyapps_scope_token client_id TYPE str.`,
|
|
63273
|
-
goodExample: `
|
|
63274
|
-
METHODS apps_scope_token
|
|
63275
|
-
IMPORTING
|
|
63276
|
-
body TYPE bodyapps_scope_token
|
|
63358
|
+
goodExample: `
|
|
63359
|
+
METHODS apps_scope_token
|
|
63360
|
+
IMPORTING
|
|
63361
|
+
body TYPE bodyapps_scope_token
|
|
63277
63362
|
client_id TYPE str.`,
|
|
63278
63363
|
};
|
|
63279
63364
|
}
|
|
@@ -63338,11 +63423,11 @@ class MaxOneStatement extends _abap_rule_1.ABAPRule {
|
|
|
63338
63423
|
key: "max_one_statement",
|
|
63339
63424
|
title: "Max one statement per line",
|
|
63340
63425
|
shortDescription: `Checks that each line contains only a single statement.`,
|
|
63341
|
-
extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
|
|
63342
|
-
|
|
63343
|
-
Does not report anything for chained statements.
|
|
63344
|
-
|
|
63345
|
-
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line
|
|
63426
|
+
extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
|
|
63427
|
+
|
|
63428
|
+
Does not report anything for chained statements.
|
|
63429
|
+
|
|
63430
|
+
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line
|
|
63346
63431
|
https://docs.abapopenchecks.org/checks/11/`,
|
|
63347
63432
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
|
|
63348
63433
|
badExample: `WRITE foo. WRITE bar.`,
|
|
@@ -63680,8 +63765,8 @@ class MethodLength {
|
|
|
63680
63765
|
key: "method_length",
|
|
63681
63766
|
title: "Method/Form Length",
|
|
63682
63767
|
shortDescription: `Checks relating to method/form length.`,
|
|
63683
|
-
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
|
|
63684
|
-
|
|
63768
|
+
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
|
|
63769
|
+
|
|
63685
63770
|
Abstract methods without statements are considered okay.`,
|
|
63686
63771
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
63687
63772
|
};
|
|
@@ -63786,20 +63871,20 @@ class MethodOverwritesBuiltIn extends _abap_rule_1.ABAPRule {
|
|
|
63786
63871
|
key: "method_overwrites_builtin",
|
|
63787
63872
|
title: "Method name overwrites builtin function",
|
|
63788
63873
|
shortDescription: `Checks Method names that overwrite builtin SAP functions`,
|
|
63789
|
-
extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
|
|
63790
|
-
|
|
63791
|
-
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
|
|
63792
|
-
|
|
63874
|
+
extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
|
|
63875
|
+
|
|
63876
|
+
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
|
|
63877
|
+
|
|
63793
63878
|
Interface method names are ignored`,
|
|
63794
63879
|
tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
|
|
63795
|
-
badExample: `CLASS lcl DEFINITION.
|
|
63796
|
-
PUBLIC SECTION.
|
|
63797
|
-
METHODS matches.
|
|
63798
|
-
ENDCLASS.
|
|
63799
|
-
|
|
63800
|
-
CLASS lcl IMPLEMENTATION.
|
|
63801
|
-
METHOD matches.
|
|
63802
|
-
ENDMETHOD.
|
|
63880
|
+
badExample: `CLASS lcl DEFINITION.
|
|
63881
|
+
PUBLIC SECTION.
|
|
63882
|
+
METHODS matches.
|
|
63883
|
+
ENDCLASS.
|
|
63884
|
+
|
|
63885
|
+
CLASS lcl IMPLEMENTATION.
|
|
63886
|
+
METHOD matches.
|
|
63887
|
+
ENDMETHOD.
|
|
63803
63888
|
ENDCLASS.`,
|
|
63804
63889
|
};
|
|
63805
63890
|
}
|
|
@@ -63990,12 +64075,12 @@ class MixReturning extends _abap_rule_1.ABAPRule {
|
|
|
63990
64075
|
// eslint-disable-next-line max-len
|
|
63991
64076
|
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-either-returning-or-exporting-or-changing-but-not-a-combination`,
|
|
63992
64077
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
63993
|
-
badExample: `CLASS lcl DEFINITION.
|
|
63994
|
-
PUBLIC SECTION.
|
|
63995
|
-
METHODS
|
|
63996
|
-
foobar
|
|
63997
|
-
EXPORTING foo TYPE i
|
|
63998
|
-
RETURNING VALUE(rv_string) TYPE string.
|
|
64078
|
+
badExample: `CLASS lcl DEFINITION.
|
|
64079
|
+
PUBLIC SECTION.
|
|
64080
|
+
METHODS
|
|
64081
|
+
foobar
|
|
64082
|
+
EXPORTING foo TYPE i
|
|
64083
|
+
RETURNING VALUE(rv_string) TYPE string.
|
|
63999
64084
|
ENDCLASS.`,
|
|
64000
64085
|
};
|
|
64001
64086
|
}
|
|
@@ -64375,7 +64460,7 @@ class Nesting extends _abap_rule_1.ABAPRule {
|
|
|
64375
64460
|
key: "nesting",
|
|
64376
64461
|
title: "Check nesting depth",
|
|
64377
64462
|
shortDescription: `Checks for methods exceeding a maximum nesting depth`,
|
|
64378
|
-
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low
|
|
64463
|
+
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low
|
|
64379
64464
|
https://docs.abapopenchecks.org/checks/74/`,
|
|
64380
64465
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
64381
64466
|
};
|
|
@@ -64618,7 +64703,7 @@ class NoChainedAssignment extends _abap_rule_1.ABAPRule {
|
|
|
64618
64703
|
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-chain-assignments`,
|
|
64619
64704
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
|
|
64620
64705
|
badExample: `var1 = var2 = var3.`,
|
|
64621
|
-
goodExample: `var2 = var3.
|
|
64706
|
+
goodExample: `var2 = var3.
|
|
64622
64707
|
var1 = var2.`,
|
|
64623
64708
|
};
|
|
64624
64709
|
}
|
|
@@ -64677,8 +64762,8 @@ class NoExternalFormCalls extends _abap_rule_1.ABAPRule {
|
|
|
64677
64762
|
key: "no_external_form_calls",
|
|
64678
64763
|
title: "No external FORM calls",
|
|
64679
64764
|
shortDescription: `Detect external form calls`,
|
|
64680
|
-
badExample: `PERFORM foo IN PROGRAM bar.
|
|
64681
|
-
|
|
64765
|
+
badExample: `PERFORM foo IN PROGRAM bar.
|
|
64766
|
+
|
|
64682
64767
|
PERFORM foo(bar).`,
|
|
64683
64768
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
64684
64769
|
};
|
|
@@ -64739,17 +64824,17 @@ class NoInlineInOptionalBranches extends _abap_rule_1.ABAPRule {
|
|
|
64739
64824
|
key: "no_inline_in_optional_branches",
|
|
64740
64825
|
title: "Don't declare inline in optional branches",
|
|
64741
64826
|
shortDescription: `Don't declare inline in optional branches`,
|
|
64742
|
-
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
|
|
64743
|
-
|
|
64744
|
-
Considered optional branches:
|
|
64745
|
-
* inside IF/ELSEIF/ELSE
|
|
64746
|
-
* inside LOOP
|
|
64747
|
-
* inside WHILE
|
|
64748
|
-
* inside CASE/WHEN, CASE TYPE OF
|
|
64749
|
-
* inside DO
|
|
64750
|
-
* inside SELECT loops
|
|
64751
|
-
|
|
64752
|
-
Not considered optional branches:
|
|
64827
|
+
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
|
|
64828
|
+
|
|
64829
|
+
Considered optional branches:
|
|
64830
|
+
* inside IF/ELSEIF/ELSE
|
|
64831
|
+
* inside LOOP
|
|
64832
|
+
* inside WHILE
|
|
64833
|
+
* inside CASE/WHEN, CASE TYPE OF
|
|
64834
|
+
* inside DO
|
|
64835
|
+
* inside SELECT loops
|
|
64836
|
+
|
|
64837
|
+
Not considered optional branches:
|
|
64753
64838
|
* TRY/CATCH/CLEANUP`,
|
|
64754
64839
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
64755
64840
|
};
|
|
@@ -64849,12 +64934,12 @@ class NoPrefixes extends _abap_rule_1.ABAPRule {
|
|
|
64849
64934
|
key: "no_prefixes",
|
|
64850
64935
|
title: "No Prefixes",
|
|
64851
64936
|
shortDescription: `Dont use hungarian notation`,
|
|
64852
|
-
extendedInformation: `
|
|
64853
|
-
Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
|
|
64854
|
-
allowing all types to become voided, abaplint will then provide less precise syntax errors.
|
|
64855
|
-
|
|
64856
|
-
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
|
|
64857
|
-
|
|
64937
|
+
extendedInformation: `
|
|
64938
|
+
Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
|
|
64939
|
+
allowing all types to become voided, abaplint will then provide less precise syntax errors.
|
|
64940
|
+
|
|
64941
|
+
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
|
|
64942
|
+
|
|
64858
64943
|
https://github.com/SAP/styleguides/blob/main/clean-abap/sub-sections/AvoidEncodings.md`,
|
|
64859
64944
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
|
|
64860
64945
|
badExample: `DATA lv_foo TYPE i.`,
|
|
@@ -65033,7 +65118,7 @@ class NoPublicAttributes extends _abap_rule_1.ABAPRule {
|
|
|
65033
65118
|
return {
|
|
65034
65119
|
key: "no_public_attributes",
|
|
65035
65120
|
title: "No public attributes",
|
|
65036
|
-
shortDescription: `Checks that classes and interfaces don't contain any public attributes.
|
|
65121
|
+
shortDescription: `Checks that classes and interfaces don't contain any public attributes.
|
|
65037
65122
|
Exceptions are excluded from this rule.`,
|
|
65038
65123
|
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#members-private-by-default-protected-only-if-needed`,
|
|
65039
65124
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
@@ -65134,13 +65219,13 @@ class NoYodaConditions extends _abap_rule_1.ABAPRule {
|
|
|
65134
65219
|
key: "no_yoda_conditions",
|
|
65135
65220
|
title: "No Yoda conditions",
|
|
65136
65221
|
shortDescription: `Finds Yoda conditions and reports issues`,
|
|
65137
|
-
extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
|
|
65138
|
-
|
|
65222
|
+
extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
|
|
65223
|
+
|
|
65139
65224
|
Conditions with operators CP, NP, CS, NS, CA, NA, CO, CN are ignored`,
|
|
65140
65225
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
65141
|
-
badExample: `IF 0 <> sy-subrc.
|
|
65226
|
+
badExample: `IF 0 <> sy-subrc.
|
|
65142
65227
|
ENDIF.`,
|
|
65143
|
-
goodExample: `IF sy-subrc <> 0.
|
|
65228
|
+
goodExample: `IF sy-subrc <> 0.
|
|
65144
65229
|
ENDIF.`,
|
|
65145
65230
|
};
|
|
65146
65231
|
}
|
|
@@ -65241,8 +65326,8 @@ class NROBConsistency {
|
|
|
65241
65326
|
key: "nrob_consistency",
|
|
65242
65327
|
title: "Number range consistency",
|
|
65243
65328
|
shortDescription: `Consistency checks for number ranges`,
|
|
65244
|
-
extendedInformation: `Issue reported if percentage warning is over 50%
|
|
65245
|
-
|
|
65329
|
+
extendedInformation: `Issue reported if percentage warning is over 50%
|
|
65330
|
+
|
|
65246
65331
|
Issue reported if the referenced domain is not found(taking error namespace into account)`,
|
|
65247
65332
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
65248
65333
|
};
|
|
@@ -65519,58 +65604,58 @@ class ObsoleteStatement extends _abap_rule_1.ABAPRule {
|
|
|
65519
65604
|
title: "Obsolete statements",
|
|
65520
65605
|
shortDescription: `Checks for usages of certain obsolete statements`,
|
|
65521
65606
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
|
|
65522
|
-
extendedInformation: `
|
|
65523
|
-
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
|
|
65524
|
-
|
|
65525
|
-
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
|
|
65526
|
-
|
|
65527
|
-
SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
|
|
65528
|
-
|
|
65529
|
-
IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
|
|
65530
|
-
|
|
65531
|
-
WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
|
|
65532
|
-
|
|
65533
|
-
FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
|
|
65534
|
-
|
|
65535
|
-
TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
|
|
65536
|
-
|
|
65537
|
-
LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
|
|
65538
|
-
|
|
65539
|
-
COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
|
|
65540
|
-
|
|
65541
|
-
OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
|
|
65542
|
-
|
|
65543
|
-
PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
|
|
65544
|
-
|
|
65545
|
-
RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
|
|
65546
|
-
|
|
65547
|
-
PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
|
|
65548
|
-
|
|
65549
|
-
MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
|
|
65550
|
-
|
|
65551
|
-
SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
|
|
65552
|
-
SELECT COUNT(*) is considered okay
|
|
65553
|
-
|
|
65554
|
-
FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
|
|
65555
|
-
|
|
65556
|
-
SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
|
|
65557
|
-
|
|
65558
|
-
CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
|
|
65559
|
-
|
|
65560
|
-
POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
|
|
65561
|
-
|
|
65562
|
-
OCCURENCES: check for OCCURENCES vs OCCURRENCES
|
|
65563
|
-
|
|
65607
|
+
extendedInformation: `
|
|
65608
|
+
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
|
|
65609
|
+
|
|
65610
|
+
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
|
|
65611
|
+
|
|
65612
|
+
SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
|
|
65613
|
+
|
|
65614
|
+
IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
|
|
65615
|
+
|
|
65616
|
+
WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
|
|
65617
|
+
|
|
65618
|
+
FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
|
|
65619
|
+
|
|
65620
|
+
TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
|
|
65621
|
+
|
|
65622
|
+
LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
|
|
65623
|
+
|
|
65624
|
+
COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
|
|
65625
|
+
|
|
65626
|
+
OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
|
|
65627
|
+
|
|
65628
|
+
PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
|
|
65629
|
+
|
|
65630
|
+
RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
|
|
65631
|
+
|
|
65632
|
+
PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
|
|
65633
|
+
|
|
65634
|
+
MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
|
|
65635
|
+
|
|
65636
|
+
SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
|
|
65637
|
+
SELECT COUNT(*) is considered okay
|
|
65638
|
+
|
|
65639
|
+
FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
|
|
65640
|
+
|
|
65641
|
+
SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
|
|
65642
|
+
|
|
65643
|
+
CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
|
|
65644
|
+
|
|
65645
|
+
POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
|
|
65646
|
+
|
|
65647
|
+
OCCURENCES: check for OCCURENCES vs OCCURRENCES
|
|
65648
|
+
|
|
65564
65649
|
CLIENT SPECIFIED, from 754: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abapselect_client_obsolete.htm`,
|
|
65565
|
-
badExample: `REFRESH itab.
|
|
65566
|
-
|
|
65567
|
-
COMPUTE foo = 2 + 2.
|
|
65568
|
-
|
|
65569
|
-
MULTIPLY lv_foo BY 2.
|
|
65570
|
-
|
|
65571
|
-
INTERFACE intf LOAD.
|
|
65572
|
-
|
|
65573
|
-
IF foo IS SUPPLIED.
|
|
65650
|
+
badExample: `REFRESH itab.
|
|
65651
|
+
|
|
65652
|
+
COMPUTE foo = 2 + 2.
|
|
65653
|
+
|
|
65654
|
+
MULTIPLY lv_foo BY 2.
|
|
65655
|
+
|
|
65656
|
+
INTERFACE intf LOAD.
|
|
65657
|
+
|
|
65658
|
+
IF foo IS SUPPLIED.
|
|
65574
65659
|
ENDIF.`,
|
|
65575
65660
|
};
|
|
65576
65661
|
}
|
|
@@ -65847,7 +65932,7 @@ ENDIF.`,
|
|
|
65847
65932
|
const children = statementNode.getChildren();
|
|
65848
65933
|
const sourceString = children[1].concatTokens();
|
|
65849
65934
|
const targetString = children[3].concatTokens();
|
|
65850
|
-
let operator = children[2].concatTokens();
|
|
65935
|
+
let operator = children[2].concatTokens().toUpperCase();
|
|
65851
65936
|
if (operator === "TO") {
|
|
65852
65937
|
operator = " = ";
|
|
65853
65938
|
}
|
|
@@ -65910,9 +65995,9 @@ class OmitParameterName {
|
|
|
65910
65995
|
key: "omit_parameter_name",
|
|
65911
65996
|
title: "Omit parameter name",
|
|
65912
65997
|
shortDescription: `Omit the parameter name in single parameter calls`,
|
|
65913
|
-
extendedInformation: `
|
|
65914
|
-
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
|
|
65915
|
-
|
|
65998
|
+
extendedInformation: `
|
|
65999
|
+
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
|
|
66000
|
+
|
|
65916
66001
|
EXPORTING must already be omitted for this rule to take effect, https://rules.abaplint.org/exporting/`,
|
|
65917
66002
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
|
|
65918
66003
|
badExample: `method( param = 2 ).`,
|
|
@@ -66118,20 +66203,20 @@ class OmitReceiving extends _abap_rule_1.ABAPRule {
|
|
|
66118
66203
|
shortDescription: `Omit RECEIVING`,
|
|
66119
66204
|
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-receiving`,
|
|
66120
66205
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
66121
|
-
badExample: `
|
|
66122
|
-
upload_pack(
|
|
66123
|
-
EXPORTING
|
|
66124
|
-
io_client = lo_client
|
|
66125
|
-
iv_url = iv_url
|
|
66126
|
-
iv_deepen_level = iv_deepen_level
|
|
66127
|
-
it_hashes = lt_hashes
|
|
66128
|
-
RECEIVING
|
|
66206
|
+
badExample: `
|
|
66207
|
+
upload_pack(
|
|
66208
|
+
EXPORTING
|
|
66209
|
+
io_client = lo_client
|
|
66210
|
+
iv_url = iv_url
|
|
66211
|
+
iv_deepen_level = iv_deepen_level
|
|
66212
|
+
it_hashes = lt_hashes
|
|
66213
|
+
RECEIVING
|
|
66129
66214
|
rt_objects = et_objects ).`,
|
|
66130
|
-
goodExample: `
|
|
66131
|
-
et_objects = upload_pack(
|
|
66132
|
-
io_client = lo_client
|
|
66133
|
-
iv_url = iv_url
|
|
66134
|
-
iv_deepen_level = iv_deepen_level
|
|
66215
|
+
goodExample: `
|
|
66216
|
+
et_objects = upload_pack(
|
|
66217
|
+
io_client = lo_client
|
|
66218
|
+
iv_url = iv_url
|
|
66219
|
+
iv_deepen_level = iv_deepen_level
|
|
66135
66220
|
it_hashes = lt_hashes ).`,
|
|
66136
66221
|
};
|
|
66137
66222
|
}
|
|
@@ -66195,8 +66280,8 @@ class Parser702Chaining extends _abap_rule_1.ABAPRule {
|
|
|
66195
66280
|
return {
|
|
66196
66281
|
key: "parser_702_chaining",
|
|
66197
66282
|
title: "Parser Error, bad chanining on 702",
|
|
66198
|
-
shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
|
|
66199
|
-
this rule finds these and reports errors.
|
|
66283
|
+
shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
|
|
66284
|
+
this rule finds these and reports errors.
|
|
66200
66285
|
Only active on target version 702 and below.`,
|
|
66201
66286
|
tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
|
|
66202
66287
|
};
|
|
@@ -66276,8 +66361,8 @@ class ParserError {
|
|
|
66276
66361
|
return {
|
|
66277
66362
|
key: "parser_error",
|
|
66278
66363
|
title: "Parser error",
|
|
66279
|
-
shortDescription: `Checks for syntax not recognized by abaplint.
|
|
66280
|
-
|
|
66364
|
+
shortDescription: `Checks for syntax not recognized by abaplint.
|
|
66365
|
+
|
|
66281
66366
|
See recognized syntax at https://syntax.abaplint.org`,
|
|
66282
66367
|
tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
|
|
66283
66368
|
};
|
|
@@ -66362,7 +66447,7 @@ class ParserMissingSpace extends _abap_rule_1.ABAPRule {
|
|
|
66362
66447
|
return {
|
|
66363
66448
|
key: "parser_missing_space",
|
|
66364
66449
|
title: "Parser Error, missing space",
|
|
66365
|
-
shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.
|
|
66450
|
+
shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.
|
|
66366
66451
|
This rule makes sure the spaces are consistently required across the language.`,
|
|
66367
66452
|
tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
|
|
66368
66453
|
badExample: `IF ( foo = 'bar').`,
|
|
@@ -66774,25 +66859,25 @@ class PreferInline {
|
|
|
66774
66859
|
key: "prefer_inline",
|
|
66775
66860
|
title: "Prefer Inline Declarations",
|
|
66776
66861
|
shortDescription: `Prefer inline to up-front declarations.`,
|
|
66777
|
-
extendedInformation: `EXPERIMENTAL
|
|
66778
|
-
|
|
66779
|
-
Activates if language version is v740sp02 or above.
|
|
66780
|
-
|
|
66781
|
-
Variables must be local(METHOD or FORM).
|
|
66782
|
-
|
|
66783
|
-
No generic or void typed variables. No syntax errors.
|
|
66784
|
-
|
|
66785
|
-
First position used must be a full/pure write.
|
|
66786
|
-
|
|
66787
|
-
Move statment is not a cast(?=)
|
|
66788
|
-
|
|
66862
|
+
extendedInformation: `EXPERIMENTAL
|
|
66863
|
+
|
|
66864
|
+
Activates if language version is v740sp02 or above.
|
|
66865
|
+
|
|
66866
|
+
Variables must be local(METHOD or FORM).
|
|
66867
|
+
|
|
66868
|
+
No generic or void typed variables. No syntax errors.
|
|
66869
|
+
|
|
66870
|
+
First position used must be a full/pure write.
|
|
66871
|
+
|
|
66872
|
+
Move statment is not a cast(?=)
|
|
66873
|
+
|
|
66789
66874
|
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-inline-to-up-front-declarations`,
|
|
66790
66875
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Experimental, _irule_1.RuleTag.Quickfix],
|
|
66791
|
-
badExample: `DATA foo TYPE i.
|
|
66792
|
-
foo = 2.
|
|
66793
|
-
DATA percentage TYPE decfloat34.
|
|
66876
|
+
badExample: `DATA foo TYPE i.
|
|
66877
|
+
foo = 2.
|
|
66878
|
+
DATA percentage TYPE decfloat34.
|
|
66794
66879
|
percentage = ( comment_number / abs_statement_number ) * 100.`,
|
|
66795
|
-
goodExample: `DATA(foo) = 2.
|
|
66880
|
+
goodExample: `DATA(foo) = 2.
|
|
66796
66881
|
DATA(percentage) = CONV decfloat34( comment_number / abs_statement_number ) * 100.`,
|
|
66797
66882
|
};
|
|
66798
66883
|
}
|
|
@@ -67006,18 +67091,18 @@ class PreferIsNot extends _abap_rule_1.ABAPRule {
|
|
|
67006
67091
|
key: "prefer_is_not",
|
|
67007
67092
|
title: "Prefer IS NOT to NOT IS",
|
|
67008
67093
|
shortDescription: `Prefer IS NOT to NOT IS`,
|
|
67009
|
-
extendedInformation: `
|
|
67010
|
-
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
|
|
67011
|
-
|
|
67094
|
+
extendedInformation: `
|
|
67095
|
+
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
|
|
67096
|
+
|
|
67012
67097
|
"if not is_valid( )." examples are skipped`,
|
|
67013
67098
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
|
|
67014
|
-
goodExample: `IF variable IS NOT INITIAL.
|
|
67015
|
-
IF variable NP 'TODO*'.
|
|
67016
|
-
IF variable <> 42.
|
|
67099
|
+
goodExample: `IF variable IS NOT INITIAL.
|
|
67100
|
+
IF variable NP 'TODO*'.
|
|
67101
|
+
IF variable <> 42.
|
|
67017
67102
|
IF variable CO 'hello'.`,
|
|
67018
|
-
badExample: `IF NOT variable IS INITIAL.
|
|
67019
|
-
IF NOT variable CP 'TODO*'.
|
|
67020
|
-
IF NOT variable = 42.
|
|
67103
|
+
badExample: `IF NOT variable IS INITIAL.
|
|
67104
|
+
IF NOT variable CP 'TODO*'.
|
|
67105
|
+
IF NOT variable = 42.
|
|
67021
67106
|
IF NOT variable CA 'hello'.`,
|
|
67022
67107
|
};
|
|
67023
67108
|
}
|
|
@@ -67205,14 +67290,14 @@ class PreferRaiseExceptionNew extends _abap_rule_1.ABAPRule {
|
|
|
67205
67290
|
key: "prefer_raise_exception_new",
|
|
67206
67291
|
title: "Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE",
|
|
67207
67292
|
shortDescription: `Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE`,
|
|
67208
|
-
extendedInformation: `
|
|
67209
|
-
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
|
|
67210
|
-
|
|
67293
|
+
extendedInformation: `
|
|
67294
|
+
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
|
|
67295
|
+
|
|
67211
67296
|
From 752 and up`,
|
|
67212
67297
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
|
|
67213
67298
|
goodExample: `RAISE EXCEPTION NEW cx_generation_error( previous = exception ).`,
|
|
67214
|
-
badExample: `RAISE EXCEPTION TYPE cx_generation_error
|
|
67215
|
-
EXPORTING
|
|
67299
|
+
badExample: `RAISE EXCEPTION TYPE cx_generation_error
|
|
67300
|
+
EXPORTING
|
|
67216
67301
|
previous = exception.`,
|
|
67217
67302
|
};
|
|
67218
67303
|
}
|
|
@@ -67290,12 +67375,12 @@ class PreferReturningToExporting extends _abap_rule_1.ABAPRule {
|
|
|
67290
67375
|
key: "prefer_returning_to_exporting",
|
|
67291
67376
|
title: "Prefer RETURNING to EXPORTING",
|
|
67292
67377
|
shortDescription: `Prefer RETURNING to EXPORTING. Generic types cannot be RETURNING.`,
|
|
67293
|
-
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting
|
|
67378
|
+
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting
|
|
67294
67379
|
https://docs.abapopenchecks.org/checks/44/`,
|
|
67295
67380
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
67296
|
-
badExample: `CLASS lcl DEFINITION.
|
|
67297
|
-
PUBLIC SECTION.
|
|
67298
|
-
METHODS test EXPORTING ev_foo TYPE i.
|
|
67381
|
+
badExample: `CLASS lcl DEFINITION.
|
|
67382
|
+
PUBLIC SECTION.
|
|
67383
|
+
METHODS test EXPORTING ev_foo TYPE i.
|
|
67299
67384
|
ENDCLASS.`,
|
|
67300
67385
|
};
|
|
67301
67386
|
}
|
|
@@ -67391,8 +67476,8 @@ class PreferXsdbool extends _abap_rule_1.ABAPRule {
|
|
|
67391
67476
|
key: "prefer_xsdbool",
|
|
67392
67477
|
title: "Prefer xsdbool over boolc",
|
|
67393
67478
|
shortDescription: `Prefer xsdbool over boolc`,
|
|
67394
|
-
extendedInformation: `Activates if language version is v740sp08 or above.
|
|
67395
|
-
|
|
67479
|
+
extendedInformation: `Activates if language version is v740sp08 or above.
|
|
67480
|
+
|
|
67396
67481
|
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
|
|
67397
67482
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
|
|
67398
67483
|
badExample: `DATA(sdf) = boolc( 1 = 2 ).`,
|
|
@@ -67464,9 +67549,9 @@ class PreferredCompareOperator extends _abap_rule_1.ABAPRule {
|
|
|
67464
67549
|
title: "Preferred compare operator",
|
|
67465
67550
|
shortDescription: `Configure undesired operator variants`,
|
|
67466
67551
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
|
|
67467
|
-
badExample: `IF foo EQ bar.
|
|
67552
|
+
badExample: `IF foo EQ bar.
|
|
67468
67553
|
ENDIF.`,
|
|
67469
|
-
goodExample: `IF foo = bar.
|
|
67554
|
+
goodExample: `IF foo = bar.
|
|
67470
67555
|
ENDIF.`,
|
|
67471
67556
|
};
|
|
67472
67557
|
}
|
|
@@ -67690,26 +67775,26 @@ class ReduceProceduralCode extends _abap_rule_1.ABAPRule {
|
|
|
67690
67775
|
key: "reduce_procedural_code",
|
|
67691
67776
|
title: "Reduce procedural code",
|
|
67692
67777
|
shortDescription: `Checks FORM and FUNCTION-MODULE have few statements`,
|
|
67693
|
-
extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
|
|
67694
|
-
|
|
67695
|
-
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
|
|
67696
|
-
|
|
67778
|
+
extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
|
|
67779
|
+
|
|
67780
|
+
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
|
|
67781
|
+
|
|
67697
67782
|
Comments are not counted as statements.`,
|
|
67698
67783
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
|
|
67699
|
-
badExample: `FORM foo.
|
|
67700
|
-
DATA lv_bar TYPE i.
|
|
67701
|
-
lv_bar = 2 + 2.
|
|
67702
|
-
IF lv_bar = 4.
|
|
67703
|
-
WRITE 'hello world'.
|
|
67704
|
-
ENDIF.
|
|
67705
|
-
DATA lv_bar TYPE i.
|
|
67706
|
-
lv_bar = 2 + 2.
|
|
67707
|
-
IF lv_bar = 4.
|
|
67708
|
-
WRITE 'hello world'.
|
|
67709
|
-
ENDIF.
|
|
67784
|
+
badExample: `FORM foo.
|
|
67785
|
+
DATA lv_bar TYPE i.
|
|
67786
|
+
lv_bar = 2 + 2.
|
|
67787
|
+
IF lv_bar = 4.
|
|
67788
|
+
WRITE 'hello world'.
|
|
67789
|
+
ENDIF.
|
|
67790
|
+
DATA lv_bar TYPE i.
|
|
67791
|
+
lv_bar = 2 + 2.
|
|
67792
|
+
IF lv_bar = 4.
|
|
67793
|
+
WRITE 'hello world'.
|
|
67794
|
+
ENDIF.
|
|
67710
67795
|
ENDFORM.`,
|
|
67711
|
-
goodExample: `FORM foo.
|
|
67712
|
-
NEW zcl_global_class( )->run_logic( ).
|
|
67796
|
+
goodExample: `FORM foo.
|
|
67797
|
+
NEW zcl_global_class( )->run_logic( ).
|
|
67713
67798
|
ENDFORM.`,
|
|
67714
67799
|
};
|
|
67715
67800
|
}
|
|
@@ -67953,10 +68038,10 @@ class RemoveDescriptions {
|
|
|
67953
68038
|
return {
|
|
67954
68039
|
key: "remove_descriptions",
|
|
67955
68040
|
title: "Remove descriptions",
|
|
67956
|
-
shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
|
|
67957
|
-
|
|
67958
|
-
Class descriptions are required, see rule description_empty.
|
|
67959
|
-
|
|
68041
|
+
shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
|
|
68042
|
+
|
|
68043
|
+
Class descriptions are required, see rule description_empty.
|
|
68044
|
+
|
|
67960
68045
|
Consider using ABAP Doc for documentation.`,
|
|
67961
68046
|
tags: [],
|
|
67962
68047
|
};
|
|
@@ -68081,16 +68166,14 @@ class RFCErrorHandling extends _abap_rule_1.ABAPRule {
|
|
|
68081
68166
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
68082
68167
|
shortDescription: `Checks that exceptions 'system_failure' and 'communication_failure' are handled in RFC calls`,
|
|
68083
68168
|
extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenrfc_exception.htm`,
|
|
68084
|
-
badExample: `
|
|
68085
|
-
CALL FUNCTION 'ZRFC'
|
|
68169
|
+
badExample: `CALL FUNCTION 'ZRFC'
|
|
68086
68170
|
DESTINATION lv_rfc.`,
|
|
68087
|
-
goodExample: `
|
|
68088
|
-
|
|
68089
|
-
|
|
68090
|
-
|
|
68091
|
-
|
|
68092
|
-
|
|
68093
|
-
resource_failure = 3
|
|
68171
|
+
goodExample: `CALL FUNCTION 'ZRFC'
|
|
68172
|
+
DESTINATION lv_rfc
|
|
68173
|
+
EXCEPTIONS
|
|
68174
|
+
system_failure = 1 MESSAGE msg
|
|
68175
|
+
communication_failure = 2 MESSAGE msg
|
|
68176
|
+
resource_failure = 3
|
|
68094
68177
|
OTHERS = 4.`,
|
|
68095
68178
|
};
|
|
68096
68179
|
}
|
|
@@ -68174,11 +68257,11 @@ class SelectAddOrderBy {
|
|
|
68174
68257
|
key: "select_add_order_by",
|
|
68175
68258
|
title: "SELECT add ORDER BY",
|
|
68176
68259
|
shortDescription: `SELECTs add ORDER BY clause`,
|
|
68177
|
-
extendedInformation: `
|
|
68178
|
-
This will make sure that the SELECT statement returns results in the same sequence on different databases
|
|
68179
|
-
|
|
68180
|
-
add ORDER BY PRIMARY KEY if in doubt
|
|
68181
|
-
|
|
68260
|
+
extendedInformation: `
|
|
68261
|
+
This will make sure that the SELECT statement returns results in the same sequence on different databases
|
|
68262
|
+
|
|
68263
|
+
add ORDER BY PRIMARY KEY if in doubt
|
|
68264
|
+
|
|
68182
68265
|
If the target is a sorted/hashed table, no issue is reported`,
|
|
68183
68266
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
68184
68267
|
badExample: `SELECT * FROM db INTO TABLE @DATA(tab).`,
|
|
@@ -68309,14 +68392,14 @@ class SelectPerformance {
|
|
|
68309
68392
|
key: "select_performance",
|
|
68310
68393
|
title: "SELECT performance",
|
|
68311
68394
|
shortDescription: `Various checks regarding SELECT performance.`,
|
|
68312
|
-
extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
|
|
68313
|
-
|
|
68395
|
+
extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
|
|
68396
|
+
|
|
68314
68397
|
SELECT *: not reported if using INTO/APPENDING CORRESPONDING FIELDS OF`,
|
|
68315
68398
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Performance],
|
|
68316
|
-
badExample: `SELECT field1, field2 FROM table
|
|
68317
|
-
INTO @DATA(structure) UP TO 1 ROWS ORDER BY field3 DESCENDING.
|
|
68399
|
+
badExample: `SELECT field1, field2 FROM table
|
|
68400
|
+
INTO @DATA(structure) UP TO 1 ROWS ORDER BY field3 DESCENDING.
|
|
68318
68401
|
ENDSELECT.`,
|
|
68319
|
-
goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
|
|
68402
|
+
goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
|
|
68320
68403
|
INTO TABLE @DATA(table) ORDER BY field3 DESCENDING`,
|
|
68321
68404
|
};
|
|
68322
68405
|
}
|
|
@@ -68430,8 +68513,8 @@ class SelectSingleFullKey {
|
|
|
68430
68513
|
key: "select_single_full_key",
|
|
68431
68514
|
title: "Detect SELECT SINGLE which are possibily not unique",
|
|
68432
68515
|
shortDescription: `Detect SELECT SINGLE which are possibily not unique`,
|
|
68433
|
-
extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
|
|
68434
|
-
|
|
68516
|
+
extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
|
|
68517
|
+
|
|
68435
68518
|
If the statement contains a JOIN it is not checked`,
|
|
68436
68519
|
pseudoComment: "EC CI_NOORDER",
|
|
68437
68520
|
tags: [_irule_1.RuleTag.Quickfix],
|
|
@@ -68855,8 +68938,8 @@ class SICFConsistency {
|
|
|
68855
68938
|
key: "sicf_consistency",
|
|
68856
68939
|
title: "SICF consistency",
|
|
68857
68940
|
shortDescription: `Checks the validity of ICF services`,
|
|
68858
|
-
extendedInformation: `* Class defined in handler must exist
|
|
68859
|
-
* Class must not have any syntax errors
|
|
68941
|
+
extendedInformation: `* Class defined in handler must exist
|
|
68942
|
+
* Class must not have any syntax errors
|
|
68860
68943
|
* Class must implement interface IF_HTTP_EXTENSION`,
|
|
68861
68944
|
};
|
|
68862
68945
|
}
|
|
@@ -68968,23 +69051,23 @@ class SlowParameterPassing {
|
|
|
68968
69051
|
shortDescription: `Detects slow pass by value passing for methods where parameter is not changed`,
|
|
68969
69052
|
extendedInformation: `Method parameters defined in interfaces is not checked`,
|
|
68970
69053
|
tags: [_irule_1.RuleTag.Performance],
|
|
68971
|
-
badExample: `CLASS lcl DEFINITION.
|
|
68972
|
-
PUBLIC SECTION.
|
|
68973
|
-
METHODS bar IMPORTING VALUE(sdf) TYPE string.
|
|
68974
|
-
ENDCLASS.
|
|
68975
|
-
CLASS lcl IMPLEMENTATION.
|
|
68976
|
-
METHOD bar.
|
|
68977
|
-
WRITE sdf.
|
|
68978
|
-
ENDMETHOD.
|
|
69054
|
+
badExample: `CLASS lcl DEFINITION.
|
|
69055
|
+
PUBLIC SECTION.
|
|
69056
|
+
METHODS bar IMPORTING VALUE(sdf) TYPE string.
|
|
69057
|
+
ENDCLASS.
|
|
69058
|
+
CLASS lcl IMPLEMENTATION.
|
|
69059
|
+
METHOD bar.
|
|
69060
|
+
WRITE sdf.
|
|
69061
|
+
ENDMETHOD.
|
|
68979
69062
|
ENDCLASS.`,
|
|
68980
|
-
goodExample: `CLASS lcl DEFINITION.
|
|
68981
|
-
PUBLIC SECTION.
|
|
68982
|
-
METHODS bar IMPORTING sdf TYPE string.
|
|
68983
|
-
ENDCLASS.
|
|
68984
|
-
CLASS lcl IMPLEMENTATION.
|
|
68985
|
-
METHOD bar.
|
|
68986
|
-
WRITE sdf.
|
|
68987
|
-
ENDMETHOD.
|
|
69063
|
+
goodExample: `CLASS lcl DEFINITION.
|
|
69064
|
+
PUBLIC SECTION.
|
|
69065
|
+
METHODS bar IMPORTING sdf TYPE string.
|
|
69066
|
+
ENDCLASS.
|
|
69067
|
+
CLASS lcl IMPLEMENTATION.
|
|
69068
|
+
METHOD bar.
|
|
69069
|
+
WRITE sdf.
|
|
69070
|
+
ENDMETHOD.
|
|
68988
69071
|
ENDCLASS.`,
|
|
68989
69072
|
};
|
|
68990
69073
|
}
|
|
@@ -69241,8 +69324,8 @@ class SpaceBeforeDot extends _abap_rule_1.ABAPRule {
|
|
|
69241
69324
|
key: "space_before_dot",
|
|
69242
69325
|
title: "Space before dot",
|
|
69243
69326
|
shortDescription: `Checks for extra spaces before dots at the ends of statements`,
|
|
69244
|
-
extendedInformation: `
|
|
69245
|
-
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
|
|
69327
|
+
extendedInformation: `
|
|
69328
|
+
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
|
|
69246
69329
|
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#condense-your-code`,
|
|
69247
69330
|
tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
69248
69331
|
badExample: `WRITE bar .`,
|
|
@@ -69428,12 +69511,12 @@ class SQLValueConversion {
|
|
|
69428
69511
|
key: "sql_value_conversion",
|
|
69429
69512
|
title: "Implicit SQL Value Conversion",
|
|
69430
69513
|
shortDescription: `Ensure types match when selecting from database`,
|
|
69431
|
-
extendedInformation: `
|
|
69432
|
-
* Integer to CHAR conversion
|
|
69433
|
-
* Integer to NUMC conversion
|
|
69434
|
-
* NUMC to Integer conversion
|
|
69435
|
-
* CHAR to Integer conversion
|
|
69436
|
-
* Source field longer than database field, CHAR -> CHAR
|
|
69514
|
+
extendedInformation: `
|
|
69515
|
+
* Integer to CHAR conversion
|
|
69516
|
+
* Integer to NUMC conversion
|
|
69517
|
+
* NUMC to Integer conversion
|
|
69518
|
+
* CHAR to Integer conversion
|
|
69519
|
+
* Source field longer than database field, CHAR -> CHAR
|
|
69437
69520
|
* Source field longer than database field, NUMC -> NUMC`,
|
|
69438
69521
|
tags: [],
|
|
69439
69522
|
};
|
|
@@ -69505,7 +69588,7 @@ class StartAtTab extends _abap_rule_1.ABAPRule {
|
|
|
69505
69588
|
key: "start_at_tab",
|
|
69506
69589
|
title: "Start at tab",
|
|
69507
69590
|
shortDescription: `Checks that statements start at tabstops.`,
|
|
69508
|
-
extendedInformation: `Reports max 100 issues per file
|
|
69591
|
+
extendedInformation: `Reports max 100 issues per file
|
|
69509
69592
|
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
|
|
69510
69593
|
tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
69511
69594
|
badExample: ` WRITE a.`,
|
|
@@ -69682,12 +69765,12 @@ class StrictSQL extends _abap_rule_1.ABAPRule {
|
|
|
69682
69765
|
key: "strict_sql",
|
|
69683
69766
|
title: "Strict SQL",
|
|
69684
69767
|
shortDescription: `Strict SQL`,
|
|
69685
|
-
extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
|
|
69686
|
-
|
|
69687
|
-
https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
|
|
69688
|
-
|
|
69689
|
-
Also see separate rule sql_escape_host_variables
|
|
69690
|
-
|
|
69768
|
+
extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
|
|
69769
|
+
|
|
69770
|
+
https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
|
|
69771
|
+
|
|
69772
|
+
Also see separate rule sql_escape_host_variables
|
|
69773
|
+
|
|
69691
69774
|
Activates from v750 and up`,
|
|
69692
69775
|
tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix],
|
|
69693
69776
|
badExample: `SELECT * FROM ztabl INTO TABLE @rt_content WHERE type = @iv_type ORDER BY PRIMARY KEY.`,
|
|
@@ -69941,11 +70024,11 @@ class SyModification extends _abap_rule_1.ABAPRule {
|
|
|
69941
70024
|
key: "sy_modification",
|
|
69942
70025
|
title: "Modification of SY fields",
|
|
69943
70026
|
shortDescription: `Finds modification of sy fields`,
|
|
69944
|
-
extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
|
|
69945
|
-
|
|
70027
|
+
extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
|
|
70028
|
+
|
|
69946
70029
|
Changes to SY-TVAR* fields are not reported`,
|
|
69947
70030
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
69948
|
-
badExample: `sy-uname = 2.
|
|
70031
|
+
badExample: `sy-uname = 2.
|
|
69949
70032
|
sy = sy.`,
|
|
69950
70033
|
};
|
|
69951
70034
|
}
|
|
@@ -70007,8 +70090,8 @@ class TABLEnhancementCategory {
|
|
|
70007
70090
|
key: "tabl_enhancement_category",
|
|
70008
70091
|
title: "TABL enhancement category must be set",
|
|
70009
70092
|
shortDescription: `Checks that tables do not have the enhancement category 'not classified'.`,
|
|
70010
|
-
extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
|
|
70011
|
-
|
|
70093
|
+
extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
|
|
70094
|
+
|
|
70012
70095
|
You may use standard report RS_DDIC_CLASSIFICATION_FINAL for adjustment.`,
|
|
70013
70096
|
tags: [],
|
|
70014
70097
|
};
|
|
@@ -70136,9 +70219,9 @@ class TypeFormParameters extends _abap_rule_1.ABAPRule {
|
|
|
70136
70219
|
title: "Type FORM parameters",
|
|
70137
70220
|
shortDescription: `Checks for untyped FORM parameters`,
|
|
70138
70221
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
70139
|
-
badExample: `FORM foo USING bar.
|
|
70222
|
+
badExample: `FORM foo USING bar.
|
|
70140
70223
|
ENDFORM.`,
|
|
70141
|
-
goodExample: `FORM foo USING bar TYPE string.
|
|
70224
|
+
goodExample: `FORM foo USING bar TYPE string.
|
|
70142
70225
|
ENDFORM.`,
|
|
70143
70226
|
};
|
|
70144
70227
|
}
|
|
@@ -70192,7 +70275,7 @@ const objects_1 = __webpack_require__(/*! ../objects */ "./node_modules/@abaplin
|
|
|
70192
70275
|
class TypesNamingConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
70193
70276
|
constructor() {
|
|
70194
70277
|
super(...arguments);
|
|
70195
|
-
/** The pattern for TYPES */
|
|
70278
|
+
/** The pattern for TYPES, case insensitive */
|
|
70196
70279
|
this.pattern = "^TY_.+$";
|
|
70197
70280
|
}
|
|
70198
70281
|
}
|
|
@@ -70811,38 +70894,38 @@ class UnnecessaryPragma extends _abap_rule_1.ABAPRule {
|
|
|
70811
70894
|
key: "unnecessary_pragma",
|
|
70812
70895
|
title: "Unnecessary Pragma",
|
|
70813
70896
|
shortDescription: `Finds pragmas which can be removed`,
|
|
70814
|
-
extendedInformation: `* NO_HANDLER with handler
|
|
70815
|
-
|
|
70816
|
-
* NEEDED without definition
|
|
70817
|
-
|
|
70818
|
-
* NO_TEXT without texts
|
|
70819
|
-
|
|
70820
|
-
* SUBRC_OK where sy-subrc is checked
|
|
70821
|
-
|
|
70897
|
+
extendedInformation: `* NO_HANDLER with handler
|
|
70898
|
+
|
|
70899
|
+
* NEEDED without definition
|
|
70900
|
+
|
|
70901
|
+
* NO_TEXT without texts
|
|
70902
|
+
|
|
70903
|
+
* SUBRC_OK where sy-subrc is checked
|
|
70904
|
+
|
|
70822
70905
|
NO_HANDLER inside macros are not checked`,
|
|
70823
70906
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
70824
|
-
badExample: `TRY.
|
|
70825
|
-
...
|
|
70826
|
-
CATCH zcx_abapgit_exception ##NO_HANDLER.
|
|
70827
|
-
RETURN. " it has a handler
|
|
70828
|
-
ENDTRY.
|
|
70829
|
-
MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
|
|
70830
|
-
SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
|
|
70831
|
-
IF sy-subrc <> 0.
|
|
70907
|
+
badExample: `TRY.
|
|
70908
|
+
...
|
|
70909
|
+
CATCH zcx_abapgit_exception ##NO_HANDLER.
|
|
70910
|
+
RETURN. " it has a handler
|
|
70911
|
+
ENDTRY.
|
|
70912
|
+
MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
|
|
70913
|
+
SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
|
|
70914
|
+
IF sy-subrc <> 0.
|
|
70832
70915
|
ENDIF.`,
|
|
70833
|
-
goodExample: `TRY.
|
|
70834
|
-
...
|
|
70835
|
-
CATCH zcx_abapgit_exception.
|
|
70836
|
-
RETURN.
|
|
70837
|
-
ENDTRY.
|
|
70838
|
-
MESSAGE w125(zbar) WITH c_foo INTO message.
|
|
70839
|
-
SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
|
|
70840
|
-
IF sy-subrc <> 0.
|
|
70841
|
-
ENDIF.
|
|
70842
|
-
|
|
70843
|
-
DATA: BEGIN OF blah ##NEEDED,
|
|
70844
|
-
test1 TYPE string,
|
|
70845
|
-
test2 TYPE string,
|
|
70916
|
+
goodExample: `TRY.
|
|
70917
|
+
...
|
|
70918
|
+
CATCH zcx_abapgit_exception.
|
|
70919
|
+
RETURN.
|
|
70920
|
+
ENDTRY.
|
|
70921
|
+
MESSAGE w125(zbar) WITH c_foo INTO message.
|
|
70922
|
+
SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
|
|
70923
|
+
IF sy-subrc <> 0.
|
|
70924
|
+
ENDIF.
|
|
70925
|
+
|
|
70926
|
+
DATA: BEGIN OF blah ##NEEDED,
|
|
70927
|
+
test1 TYPE string,
|
|
70928
|
+
test2 TYPE string,
|
|
70846
70929
|
END OF blah.`,
|
|
70847
70930
|
};
|
|
70848
70931
|
}
|
|
@@ -71009,18 +71092,18 @@ class UnnecessaryReturn extends _abap_rule_1.ABAPRule {
|
|
|
71009
71092
|
shortDescription: `Finds unnecessary RETURN statements`,
|
|
71010
71093
|
extendedInformation: `Finds unnecessary RETURN statements`,
|
|
71011
71094
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
|
|
71012
|
-
badExample: `FORM hello1.
|
|
71013
|
-
WRITE 'world'.
|
|
71014
|
-
RETURN.
|
|
71015
|
-
ENDFORM.
|
|
71016
|
-
|
|
71017
|
-
FORM foo.
|
|
71018
|
-
IF 1 = 2.
|
|
71019
|
-
RETURN.
|
|
71020
|
-
ENDIF.
|
|
71095
|
+
badExample: `FORM hello1.
|
|
71096
|
+
WRITE 'world'.
|
|
71097
|
+
RETURN.
|
|
71098
|
+
ENDFORM.
|
|
71099
|
+
|
|
71100
|
+
FORM foo.
|
|
71101
|
+
IF 1 = 2.
|
|
71102
|
+
RETURN.
|
|
71103
|
+
ENDIF.
|
|
71021
71104
|
ENDFORM.`,
|
|
71022
|
-
goodExample: `FORM hello2.
|
|
71023
|
-
WRITE 'world'.
|
|
71105
|
+
goodExample: `FORM hello2.
|
|
71106
|
+
WRITE 'world'.
|
|
71024
71107
|
ENDFORM.`,
|
|
71025
71108
|
};
|
|
71026
71109
|
}
|
|
@@ -71371,13 +71454,13 @@ class UnusedMacros {
|
|
|
71371
71454
|
title: "Unused macros",
|
|
71372
71455
|
shortDescription: `Checks for unused macro definitions definitions`,
|
|
71373
71456
|
tags: [_irule_1.RuleTag.Quickfix],
|
|
71374
|
-
badExample: `DEFINE foobar1.
|
|
71375
|
-
WRITE 'hello'.
|
|
71457
|
+
badExample: `DEFINE foobar1.
|
|
71458
|
+
WRITE 'hello'.
|
|
71376
71459
|
END-OF-DEFINITION.`,
|
|
71377
|
-
goodExample: `DEFINE foobar2.
|
|
71378
|
-
WRITE 'hello'.
|
|
71379
|
-
END-OF-DEFINITION.
|
|
71380
|
-
|
|
71460
|
+
goodExample: `DEFINE foobar2.
|
|
71461
|
+
WRITE 'hello'.
|
|
71462
|
+
END-OF-DEFINITION.
|
|
71463
|
+
|
|
71381
71464
|
foobar2.`,
|
|
71382
71465
|
};
|
|
71383
71466
|
}
|
|
@@ -71485,17 +71568,17 @@ class UnusedMethods {
|
|
|
71485
71568
|
key: "unused_methods",
|
|
71486
71569
|
title: "Unused methods",
|
|
71487
71570
|
shortDescription: `Checks for unused methods`,
|
|
71488
|
-
extendedInformation: `Checks private and protected methods.
|
|
71489
|
-
|
|
71490
|
-
Unused methods are not reported if the object contains parser or syntax errors.
|
|
71491
|
-
|
|
71492
|
-
Skips:
|
|
71493
|
-
* methods FOR TESTING
|
|
71494
|
-
* methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
|
|
71495
|
-
* class_constructor + constructor methods
|
|
71496
|
-
* event handlers
|
|
71497
|
-
* methods that are redefined
|
|
71498
|
-
* INCLUDEs
|
|
71571
|
+
extendedInformation: `Checks private and protected methods.
|
|
71572
|
+
|
|
71573
|
+
Unused methods are not reported if the object contains parser or syntax errors.
|
|
71574
|
+
|
|
71575
|
+
Skips:
|
|
71576
|
+
* methods FOR TESTING
|
|
71577
|
+
* methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
|
|
71578
|
+
* class_constructor + constructor methods
|
|
71579
|
+
* event handlers
|
|
71580
|
+
* methods that are redefined
|
|
71581
|
+
* INCLUDEs
|
|
71499
71582
|
`,
|
|
71500
71583
|
tags: [],
|
|
71501
71584
|
pragma: "##CALLED",
|
|
@@ -71929,23 +72012,23 @@ class UnusedVariables {
|
|
|
71929
72012
|
key: "unused_variables",
|
|
71930
72013
|
title: "Unused variables",
|
|
71931
72014
|
shortDescription: `Checks for unused variables and constants`,
|
|
71932
|
-
extendedInformation: `Skips event parameters.
|
|
71933
|
-
|
|
71934
|
-
Note that this currently does not work if the source code uses macros.
|
|
71935
|
-
|
|
71936
|
-
Unused variables are not reported if the object contains parser or syntax errors.
|
|
71937
|
-
|
|
72015
|
+
extendedInformation: `Skips event parameters.
|
|
72016
|
+
|
|
72017
|
+
Note that this currently does not work if the source code uses macros.
|
|
72018
|
+
|
|
72019
|
+
Unused variables are not reported if the object contains parser or syntax errors.
|
|
72020
|
+
|
|
71938
72021
|
Errors found in INCLUDES are reported for the main program.`,
|
|
71939
72022
|
tags: [_irule_1.RuleTag.Quickfix],
|
|
71940
72023
|
pragma: "##NEEDED",
|
|
71941
72024
|
pseudoComment: "EC NEEDED",
|
|
71942
|
-
badExample: `DATA: BEGIN OF blah1,
|
|
71943
|
-
test TYPE string,
|
|
71944
|
-
test2 TYPE string,
|
|
72025
|
+
badExample: `DATA: BEGIN OF blah1,
|
|
72026
|
+
test TYPE string,
|
|
72027
|
+
test2 TYPE string,
|
|
71945
72028
|
END OF blah1.`,
|
|
71946
|
-
goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
|
|
71947
|
-
test TYPE string,
|
|
71948
|
-
test2 TYPE string,
|
|
72029
|
+
goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
|
|
72030
|
+
test TYPE string,
|
|
72031
|
+
test2 TYPE string,
|
|
71949
72032
|
END OF blah2.`,
|
|
71950
72033
|
};
|
|
71951
72034
|
}
|
|
@@ -72164,15 +72247,15 @@ class UseBoolExpression extends _abap_rule_1.ABAPRule {
|
|
|
72164
72247
|
shortDescription: `Use boolean expression, xsdbool from 740sp08 and up, boolc from 702 and up`,
|
|
72165
72248
|
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
|
|
72166
72249
|
tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
|
|
72167
|
-
badExample: `IF line IS INITIAL.
|
|
72168
|
-
has_entries = abap_false.
|
|
72169
|
-
ELSE.
|
|
72170
|
-
has_entries = abap_true.
|
|
72171
|
-
ENDIF.
|
|
72172
|
-
|
|
72250
|
+
badExample: `IF line IS INITIAL.
|
|
72251
|
+
has_entries = abap_false.
|
|
72252
|
+
ELSE.
|
|
72253
|
+
has_entries = abap_true.
|
|
72254
|
+
ENDIF.
|
|
72255
|
+
|
|
72173
72256
|
DATA(fsdf) = COND #( WHEN foo <> bar THEN abap_true ELSE abap_false ).`,
|
|
72174
|
-
goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
|
|
72175
|
-
|
|
72257
|
+
goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
|
|
72258
|
+
|
|
72176
72259
|
DATA(fsdf) = xsdbool( foo <> bar ).`,
|
|
72177
72260
|
};
|
|
72178
72261
|
}
|
|
@@ -72290,15 +72373,15 @@ class UseClassBasedExceptions extends _abap_rule_1.ABAPRule {
|
|
|
72290
72373
|
shortDescription: `Use class based exceptions, checks interface and class definitions`,
|
|
72291
72374
|
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-class-based-exceptions`,
|
|
72292
72375
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
72293
|
-
badExample: `INTERFACE lif.
|
|
72294
|
-
METHODS load_data
|
|
72295
|
-
EXCEPTIONS
|
|
72296
|
-
invalid_parameter.
|
|
72376
|
+
badExample: `INTERFACE lif.
|
|
72377
|
+
METHODS load_data
|
|
72378
|
+
EXCEPTIONS
|
|
72379
|
+
invalid_parameter.
|
|
72297
72380
|
ENDINTERFACE.`,
|
|
72298
|
-
goodExample: `INTERFACE lif.
|
|
72299
|
-
METHODS load_data
|
|
72300
|
-
RAISING
|
|
72301
|
-
cx_something.
|
|
72381
|
+
goodExample: `INTERFACE lif.
|
|
72382
|
+
METHODS load_data
|
|
72383
|
+
RAISING
|
|
72384
|
+
cx_something.
|
|
72302
72385
|
ENDINTERFACE.`,
|
|
72303
72386
|
};
|
|
72304
72387
|
}
|
|
@@ -72358,15 +72441,15 @@ class UseLineExists extends _abap_rule_1.ABAPRule {
|
|
|
72358
72441
|
key: "use_line_exists",
|
|
72359
72442
|
title: "Use line_exists",
|
|
72360
72443
|
shortDescription: `Use line_exists, from 740sp02 and up`,
|
|
72361
|
-
extendedInformation: `
|
|
72362
|
-
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
|
|
72363
|
-
|
|
72444
|
+
extendedInformation: `
|
|
72445
|
+
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
|
|
72446
|
+
|
|
72364
72447
|
Not reported if the READ TABLE statement contains BINARY SEARCH.`,
|
|
72365
72448
|
tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
72366
|
-
badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
|
|
72367
|
-
IF sy-subrc = 0.
|
|
72449
|
+
badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
|
|
72450
|
+
IF sy-subrc = 0.
|
|
72368
72451
|
ENDIF.`,
|
|
72369
|
-
goodExample: `IF line_exists( my_table[ key = 'A' ] ).
|
|
72452
|
+
goodExample: `IF line_exists( my_table[ key = 'A' ] ).
|
|
72370
72453
|
ENDIF.`,
|
|
72371
72454
|
};
|
|
72372
72455
|
}
|
|
@@ -72476,10 +72559,10 @@ class UseNew extends _abap_rule_1.ABAPRule {
|
|
|
72476
72559
|
key: "use_new",
|
|
72477
72560
|
title: "Use NEW",
|
|
72478
72561
|
shortDescription: `Checks for deprecated CREATE OBJECT statements.`,
|
|
72479
|
-
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
|
|
72480
|
-
|
|
72481
|
-
If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
|
|
72482
|
-
|
|
72562
|
+
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
|
|
72563
|
+
|
|
72564
|
+
If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
|
|
72565
|
+
|
|
72483
72566
|
Applicable from v740sp02 and up`,
|
|
72484
72567
|
badExample: `CREATE OBJECT ref.`,
|
|
72485
72568
|
goodExample: `ref = NEW #( ).`,
|
|
@@ -72577,13 +72660,13 @@ class WhenOthersLast extends _abap_rule_1.ABAPRule {
|
|
|
72577
72660
|
title: "WHEN OTHERS last",
|
|
72578
72661
|
shortDescription: `Checks that WHEN OTHERS is placed the last within a CASE statement.`,
|
|
72579
72662
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
72580
|
-
badExample: `CASE bar.
|
|
72581
|
-
WHEN OTHERS.
|
|
72582
|
-
WHEN 2.
|
|
72663
|
+
badExample: `CASE bar.
|
|
72664
|
+
WHEN OTHERS.
|
|
72665
|
+
WHEN 2.
|
|
72583
72666
|
ENDCASE.`,
|
|
72584
|
-
goodExample: `CASE bar.
|
|
72585
|
-
WHEN 2.
|
|
72586
|
-
WHEN OTHERS.
|
|
72667
|
+
goodExample: `CASE bar.
|
|
72668
|
+
WHEN 2.
|
|
72669
|
+
WHEN OTHERS.
|
|
72587
72670
|
ENDCASE.`,
|
|
72588
72671
|
};
|
|
72589
72672
|
}
|
|
@@ -73557,7 +73640,8 @@ exports.NameValidator = NameValidator;
|
|
|
73557
73640
|
"use strict";
|
|
73558
73641
|
|
|
73559
73642
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
73560
|
-
exports.
|
|
73643
|
+
exports.defaultVersion = exports.Version = void 0;
|
|
73644
|
+
exports.getPreviousVersion = getPreviousVersion;
|
|
73561
73645
|
var Version;
|
|
73562
73646
|
(function (Version) {
|
|
73563
73647
|
Version["OpenABAP"] = "open-abap";
|
|
@@ -73592,7 +73676,6 @@ function getPreviousVersion(v) {
|
|
|
73592
73676
|
}
|
|
73593
73677
|
return all[found - 1];
|
|
73594
73678
|
}
|
|
73595
|
-
exports.getPreviousVersion = getPreviousVersion;
|
|
73596
73679
|
//# sourceMappingURL=version.js.map
|
|
73597
73680
|
|
|
73598
73681
|
/***/ }),
|
|
@@ -73637,7 +73720,8 @@ exports.VirtualPosition = VirtualPosition;
|
|
|
73637
73720
|
"use strict";
|
|
73638
73721
|
|
|
73639
73722
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
73640
|
-
exports.
|
|
73723
|
+
exports.xmlToArray = xmlToArray;
|
|
73724
|
+
exports.unescape = unescape;
|
|
73641
73725
|
function xmlToArray(data) {
|
|
73642
73726
|
if (data === undefined) {
|
|
73643
73727
|
return [];
|
|
@@ -73649,7 +73733,6 @@ function xmlToArray(data) {
|
|
|
73649
73733
|
return [data];
|
|
73650
73734
|
}
|
|
73651
73735
|
}
|
|
73652
|
-
exports.xmlToArray = xmlToArray;
|
|
73653
73736
|
function unescape(str) {
|
|
73654
73737
|
if (str === undefined) {
|
|
73655
73738
|
return "";
|
|
@@ -73661,7 +73744,6 @@ function unescape(str) {
|
|
|
73661
73744
|
str = str.replace(/'/g, "'");
|
|
73662
73745
|
return str;
|
|
73663
73746
|
}
|
|
73664
|
-
exports.unescape = unescape;
|
|
73665
73747
|
//# sourceMappingURL=xml_utils.js.map
|
|
73666
73748
|
|
|
73667
73749
|
/***/ }),
|
|
@@ -77955,7 +78037,12 @@ class Keywords {
|
|
|
77955
78037
|
for (const f of o.getABAPFiles()) {
|
|
77956
78038
|
const tokens = [];
|
|
77957
78039
|
for (const s of f.getStatements()) {
|
|
77958
|
-
|
|
78040
|
+
if (s.get() instanceof abaplint.MacroCall) {
|
|
78041
|
+
tokens.push(...this.handleMacro(s));
|
|
78042
|
+
}
|
|
78043
|
+
else {
|
|
78044
|
+
tokens.push(...this.traverse(s, f));
|
|
78045
|
+
}
|
|
77959
78046
|
}
|
|
77960
78047
|
if (tokens.length === 0) {
|
|
77961
78048
|
continue;
|
|
@@ -77971,6 +78058,20 @@ class Keywords {
|
|
|
77971
78058
|
}
|
|
77972
78059
|
reg.parse();
|
|
77973
78060
|
}
|
|
78061
|
+
handleMacro(node) {
|
|
78062
|
+
const tokens = [];
|
|
78063
|
+
for (const token of node.getTokens()) {
|
|
78064
|
+
for (const k of this.keywords) {
|
|
78065
|
+
const lower = token.getStr().toLowerCase();
|
|
78066
|
+
if (k === lower
|
|
78067
|
+
|| "!" + k === lower
|
|
78068
|
+
|| lower.endsWith("~" + k)) {
|
|
78069
|
+
tokens.push(token);
|
|
78070
|
+
}
|
|
78071
|
+
}
|
|
78072
|
+
}
|
|
78073
|
+
return tokens;
|
|
78074
|
+
}
|
|
77974
78075
|
traverse(node, file) {
|
|
77975
78076
|
const ret = [];
|
|
77976
78077
|
for (const c of node.getChildren()) {
|
|
@@ -81081,7 +81182,8 @@ exports.InitializationTranspiler = InitializationTranspiler;
|
|
|
81081
81182
|
"use strict";
|
|
81082
81183
|
|
|
81083
81184
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
81084
|
-
exports.
|
|
81185
|
+
exports.InsertDatabaseTranspiler = void 0;
|
|
81186
|
+
exports.findConnection = findConnection;
|
|
81085
81187
|
const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
81086
81188
|
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
81087
81189
|
const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/@abaplint/transpiler/build/src/expressions/index.js");
|
|
@@ -81125,7 +81227,6 @@ function findConnection(connection) {
|
|
|
81125
81227
|
}
|
|
81126
81228
|
return con;
|
|
81127
81229
|
}
|
|
81128
|
-
exports.findConnection = findConnection;
|
|
81129
81230
|
//# sourceMappingURL=insert_database.js.map
|
|
81130
81231
|
|
|
81131
81232
|
/***/ }),
|