@abaplint/cli 2.110.1 → 2.110.3
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/README.md +4 -4
- package/abaplint +2 -2
- package/build/cli.js +851 -851
- package/package.json +63 -63
package/build/cli.js
CHANGED
|
@@ -824,7 +824,8 @@ exports.Total = Total;
|
|
|
824
824
|
"use strict";
|
|
825
825
|
|
|
826
826
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
827
|
-
exports.
|
|
827
|
+
exports.GENERIC_ERROR = void 0;
|
|
828
|
+
exports.run = run;
|
|
828
829
|
const fs = __webpack_require__(/*! fs */ "fs");
|
|
829
830
|
const os = __webpack_require__(/*! os */ "os");
|
|
830
831
|
const path = __webpack_require__(/*! path */ "path");
|
|
@@ -1033,7 +1034,6 @@ async function run(arg) {
|
|
|
1033
1034
|
}
|
|
1034
1035
|
return { output, issues, reg };
|
|
1035
1036
|
}
|
|
1036
|
-
exports.run = run;
|
|
1037
1037
|
//# sourceMappingURL=index.js.map
|
|
1038
1038
|
|
|
1039
1039
|
/***/ }),
|
|
@@ -2711,7 +2711,24 @@ exports.WStaticArrowW = WStaticArrowW;
|
|
|
2711
2711
|
"use strict";
|
|
2712
2712
|
|
|
2713
2713
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2714
|
-
exports.
|
|
2714
|
+
exports.Combi = exports.Expression = void 0;
|
|
2715
|
+
exports.str = str;
|
|
2716
|
+
exports.regex = regex;
|
|
2717
|
+
exports.tok = tok;
|
|
2718
|
+
exports.seq = seq;
|
|
2719
|
+
exports.alt = alt;
|
|
2720
|
+
exports.altPrio = altPrio;
|
|
2721
|
+
exports.opt = opt;
|
|
2722
|
+
exports.optPrio = optPrio;
|
|
2723
|
+
exports.per = per;
|
|
2724
|
+
exports.star = star;
|
|
2725
|
+
exports.starPrio = starPrio;
|
|
2726
|
+
exports.plus = plus;
|
|
2727
|
+
exports.plusPrio = plusPrio;
|
|
2728
|
+
exports.ver = ver;
|
|
2729
|
+
exports.verNot = verNot;
|
|
2730
|
+
exports.failCombinator = failCombinator;
|
|
2731
|
+
exports.failStar = failStar;
|
|
2715
2732
|
const Tokens = __webpack_require__(/*! ../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
|
|
2716
2733
|
const nodes_1 = __webpack_require__(/*! ../nodes */ "./node_modules/@abaplint/core/build/src/abap/nodes/index.js");
|
|
2717
2734
|
const version_1 = __webpack_require__(/*! ../../version */ "./node_modules/@abaplint/core/build/src/version.js");
|
|
@@ -3524,15 +3541,12 @@ function str(s) {
|
|
|
3524
3541
|
return new Word(s);
|
|
3525
3542
|
}
|
|
3526
3543
|
}
|
|
3527
|
-
exports.str = str;
|
|
3528
3544
|
function regex(r) {
|
|
3529
3545
|
return new Regex(r);
|
|
3530
3546
|
}
|
|
3531
|
-
exports.regex = regex;
|
|
3532
3547
|
function tok(t) {
|
|
3533
3548
|
return new Token(t.name);
|
|
3534
3549
|
}
|
|
3535
|
-
exports.tok = tok;
|
|
3536
3550
|
const expressionSingletons = {};
|
|
3537
3551
|
const stringSingletons = {};
|
|
3538
3552
|
function map(s) {
|
|
@@ -3561,65 +3575,51 @@ function seq(first, second, ...rest) {
|
|
|
3561
3575
|
list.push(...rest.map(map));
|
|
3562
3576
|
return new Sequence(list);
|
|
3563
3577
|
}
|
|
3564
|
-
exports.seq = seq;
|
|
3565
3578
|
function alt(first, second, ...rest) {
|
|
3566
3579
|
const list = [map(first), map(second)];
|
|
3567
3580
|
list.push(...rest.map(map));
|
|
3568
3581
|
return new Alternative(list);
|
|
3569
3582
|
}
|
|
3570
|
-
exports.alt = alt;
|
|
3571
3583
|
function altPrio(first, second, ...rest) {
|
|
3572
3584
|
const list = [map(first), map(second)];
|
|
3573
3585
|
list.push(...rest.map(map));
|
|
3574
3586
|
return new AlternativePriority(list);
|
|
3575
3587
|
}
|
|
3576
|
-
exports.altPrio = altPrio;
|
|
3577
3588
|
function opt(first) {
|
|
3578
3589
|
return new Optional(map(first));
|
|
3579
3590
|
}
|
|
3580
|
-
exports.opt = opt;
|
|
3581
3591
|
function optPrio(first) {
|
|
3582
3592
|
return new OptionalPriority(map(first));
|
|
3583
3593
|
}
|
|
3584
|
-
exports.optPrio = optPrio;
|
|
3585
3594
|
function per(first, second, ...rest) {
|
|
3586
3595
|
const list = [map(first), map(second)];
|
|
3587
3596
|
list.push(...rest.map(map));
|
|
3588
3597
|
return new Permutation(list);
|
|
3589
3598
|
}
|
|
3590
|
-
exports.per = per;
|
|
3591
3599
|
function star(first) {
|
|
3592
3600
|
return new Star(map(first));
|
|
3593
3601
|
}
|
|
3594
|
-
exports.star = star;
|
|
3595
3602
|
function starPrio(first) {
|
|
3596
3603
|
return new StarPriority(map(first));
|
|
3597
3604
|
}
|
|
3598
|
-
exports.starPrio = starPrio;
|
|
3599
3605
|
function plus(first) {
|
|
3600
3606
|
return new Plus(map(first));
|
|
3601
3607
|
}
|
|
3602
|
-
exports.plus = plus;
|
|
3603
3608
|
function plusPrio(first) {
|
|
3604
3609
|
return new PlusPriority(map(first));
|
|
3605
3610
|
}
|
|
3606
|
-
exports.plusPrio = plusPrio;
|
|
3607
3611
|
function ver(version, first, or) {
|
|
3608
3612
|
return new Vers(version, map(first), or);
|
|
3609
3613
|
}
|
|
3610
|
-
exports.ver = ver;
|
|
3611
3614
|
function verNot(version, first) {
|
|
3612
3615
|
return new VersNot(version, map(first));
|
|
3613
3616
|
}
|
|
3614
|
-
exports.verNot = verNot;
|
|
3615
3617
|
function failCombinator() {
|
|
3616
3618
|
return new FailCombinator();
|
|
3617
3619
|
}
|
|
3618
|
-
exports.failCombinator = failCombinator;
|
|
3619
3620
|
function failStar() {
|
|
3620
3621
|
return new FailStar();
|
|
3621
3622
|
}
|
|
3622
|
-
exports.failStar = failStar;
|
|
3623
3623
|
//# sourceMappingURL=combi.js.map
|
|
3624
3624
|
|
|
3625
3625
|
/***/ }),
|
|
@@ -3708,6 +3708,7 @@ class ExpandMacros {
|
|
|
3708
3708
|
else if (type instanceof Statements.Include) {
|
|
3709
3709
|
const includeName = (_b = statement.findDirectExpression(Expressions.IncludeName)) === null || _b === void 0 ? void 0 : _b.concatTokens();
|
|
3710
3710
|
// todo, this does not take function module includes into account
|
|
3711
|
+
// todo, workaround for cyclic includes?
|
|
3711
3712
|
const prog = (_c = this.reg) === null || _c === void 0 ? void 0 : _c.getObject("PROG", includeName);
|
|
3712
3713
|
if (prog) {
|
|
3713
3714
|
prog.parse(this.version, this.globalMacros, this.reg);
|
|
@@ -7920,8 +7921,9 @@ class SQLCase extends combi_1.Expression {
|
|
|
7920
7921
|
getRunnable() {
|
|
7921
7922
|
const field = (0, combi_1.altPrio)(_1.SQLAggregation, SQLCase, _1.SQLFunction, _1.SQLPath, sql_field_name_1.SQLFieldName, constant_1.Constant);
|
|
7922
7923
|
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)));
|
|
7923
|
-
const
|
|
7924
|
-
const
|
|
7924
|
+
const sourc = (0, combi_1.altPrio)(SQLCase, _1.SQLAggregation, _1.SQLFunction, sql_source_1.SQLSource);
|
|
7925
|
+
const when = (0, combi_1.seq)("WHEN", (0, combi_1.alt)(constant_1.Constant, sql_cond_1.SQLCond), "THEN", sourc, (0, combi_1.starPrio)(sub));
|
|
7926
|
+
const els = (0, combi_1.seq)("ELSE", sourc);
|
|
7925
7927
|
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.plus)(when), (0, combi_1.optPrio)(els), "END"));
|
|
7926
7928
|
}
|
|
7927
7929
|
}
|
|
@@ -8316,21 +8318,22 @@ const sql_aggregation_1 = __webpack_require__(/*! ./sql_aggregation */ "./node_m
|
|
|
8316
8318
|
class SQLFunction extends combi_1.Expression {
|
|
8317
8319
|
getRunnable() {
|
|
8318
8320
|
const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeftW), source_1.Source, (0, combi_1.tok)(tokens_1.WParenRightW));
|
|
8319
|
-
const at = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), (0, combi_1.
|
|
8320
|
-
const param = (0, combi_1.
|
|
8321
|
+
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)));
|
|
8322
|
+
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);
|
|
8321
8323
|
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");
|
|
8324
|
+
const commaParam = (0, combi_1.seq)(",", param);
|
|
8322
8325
|
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)));
|
|
8323
8326
|
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)));
|
|
8324
8327
|
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)));
|
|
8325
|
-
const coalesce = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("coalesce", (0, combi_1.tok)(tokens_1.ParenLeftW), param,
|
|
8326
|
-
const concat = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("concat", (0, combi_1.tok)(tokens_1.ParenLeftW), param,
|
|
8327
|
-
const div = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("div", (0, combi_1.tok)(tokens_1.ParenLeftW), param,
|
|
8328
|
+
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)));
|
|
8329
|
+
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)));
|
|
8330
|
+
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)));
|
|
8328
8331
|
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)));
|
|
8329
8332
|
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)));
|
|
8330
8333
|
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)));
|
|
8331
|
-
const mod = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("mod", (0, combi_1.tok)(tokens_1.ParenLeftW), param,
|
|
8332
|
-
const replace = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("replace", (0, combi_1.tok)(tokens_1.ParenLeftW), param,
|
|
8333
|
-
const round = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("round", (0, combi_1.tok)(tokens_1.ParenLeftW), param,
|
|
8334
|
+
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)));
|
|
8335
|
+
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)));
|
|
8336
|
+
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)));
|
|
8334
8337
|
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)));
|
|
8335
8338
|
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)));
|
|
8336
8339
|
return (0, combi_1.altPrio)(uuid, abs, ceil, floor, cast, div, mod, coalesce, concat, replace, length, lower, upper, round);
|
|
@@ -17974,7 +17977,13 @@ StructureParser.singletons = {};
|
|
|
17974
17977
|
"use strict";
|
|
17975
17978
|
|
|
17976
17979
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
17977
|
-
exports.
|
|
17980
|
+
exports.seq = seq;
|
|
17981
|
+
exports.alt = alt;
|
|
17982
|
+
exports.beginEnd = beginEnd;
|
|
17983
|
+
exports.opt = opt;
|
|
17984
|
+
exports.star = star;
|
|
17985
|
+
exports.sta = sta;
|
|
17986
|
+
exports.sub = sub;
|
|
17978
17987
|
const nodes_1 = __webpack_require__(/*! ../../nodes */ "./node_modules/@abaplint/core/build/src/abap/nodes/index.js");
|
|
17979
17988
|
const _statement_1 = __webpack_require__(/*! ../../2_statements/statements/_statement */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js");
|
|
17980
17989
|
class Sequence {
|
|
@@ -18282,27 +18291,21 @@ class SubStatement {
|
|
|
18282
18291
|
function seq(first, ...rest) {
|
|
18283
18292
|
return new Sequence([first].concat(rest));
|
|
18284
18293
|
}
|
|
18285
|
-
exports.seq = seq;
|
|
18286
18294
|
function alt(first, ...rest) {
|
|
18287
18295
|
return new Alternative([first].concat(rest));
|
|
18288
18296
|
}
|
|
18289
|
-
exports.alt = alt;
|
|
18290
18297
|
function beginEnd(begin, body, end) {
|
|
18291
18298
|
return new Sequence([begin, body, end]);
|
|
18292
18299
|
}
|
|
18293
|
-
exports.beginEnd = beginEnd;
|
|
18294
18300
|
function opt(o) {
|
|
18295
18301
|
return new Optional(o);
|
|
18296
18302
|
}
|
|
18297
|
-
exports.opt = opt;
|
|
18298
18303
|
function star(s) {
|
|
18299
18304
|
return new Star(s);
|
|
18300
18305
|
}
|
|
18301
|
-
exports.star = star;
|
|
18302
18306
|
function sta(s) {
|
|
18303
18307
|
return new SubStatement(s);
|
|
18304
18308
|
}
|
|
18305
|
-
exports.sta = sta;
|
|
18306
18309
|
const singletons = {};
|
|
18307
18310
|
function sub(s) {
|
|
18308
18311
|
if (singletons[s.name] === undefined) {
|
|
@@ -18310,7 +18313,6 @@ function sub(s) {
|
|
|
18310
18313
|
}
|
|
18311
18314
|
return singletons[s.name];
|
|
18312
18315
|
}
|
|
18313
|
-
exports.sub = sub;
|
|
18314
18316
|
//# sourceMappingURL=_combi.js.map
|
|
18315
18317
|
|
|
18316
18318
|
/***/ }),
|
|
@@ -18561,10 +18563,9 @@ const _combi_1 = __webpack_require__(/*! ./_combi */ "./node_modules/@abaplint/c
|
|
|
18561
18563
|
const private_section_1 = __webpack_require__(/*! ./private_section */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/private_section.js");
|
|
18562
18564
|
const protected_section_1 = __webpack_require__(/*! ./protected_section */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/protected_section.js");
|
|
18563
18565
|
const public_section_1 = __webpack_require__(/*! ./public_section */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/public_section.js");
|
|
18564
|
-
const statements_1 = __webpack_require__(/*! ../../2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
|
|
18565
18566
|
class ClassDefinition {
|
|
18566
18567
|
getMatcher() {
|
|
18567
|
-
const body = (0, _combi_1.seq)((0, _combi_1.opt)((0, _combi_1.sta)(
|
|
18568
|
+
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)));
|
|
18568
18569
|
return (0, _combi_1.beginEnd)((0, _combi_1.sta)(Statements.ClassDefinition), body, (0, _combi_1.sta)(Statements.EndClass));
|
|
18569
18570
|
}
|
|
18570
18571
|
}
|
|
@@ -34467,13 +34468,13 @@ class FlowGraph {
|
|
|
34467
34468
|
this.label = label;
|
|
34468
34469
|
}
|
|
34469
34470
|
toDigraph() {
|
|
34470
|
-
return `digraph G {
|
|
34471
|
-
labelloc="t";
|
|
34472
|
-
label="${this.label}";
|
|
34473
|
-
graph [fontname = "helvetica"];
|
|
34474
|
-
node [fontname = "helvetica", shape="box"];
|
|
34475
|
-
edge [fontname = "helvetica"];
|
|
34476
|
-
${this.toTextEdges()}
|
|
34471
|
+
return `digraph G {
|
|
34472
|
+
labelloc="t";
|
|
34473
|
+
label="${this.label}";
|
|
34474
|
+
graph [fontname = "helvetica"];
|
|
34475
|
+
node [fontname = "helvetica", shape="box"];
|
|
34476
|
+
edge [fontname = "helvetica"];
|
|
34477
|
+
${this.toTextEdges()}
|
|
34477
34478
|
}`;
|
|
34478
34479
|
}
|
|
34479
34480
|
listSources(node) {
|
|
@@ -41003,7 +41004,9 @@ __exportStar(__webpack_require__(/*! ./ddl_type */ "./node_modules/@abaplint/cor
|
|
|
41003
41004
|
"use strict";
|
|
41004
41005
|
|
|
41005
41006
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
41006
|
-
exports.
|
|
41007
|
+
exports.EditHelper = exports.EditDraft = void 0;
|
|
41008
|
+
exports.applyEditSingle = applyEditSingle;
|
|
41009
|
+
exports.applyEditList = applyEditList;
|
|
41007
41010
|
const position_1 = __webpack_require__(/*! ./position */ "./node_modules/@abaplint/core/build/src/position.js");
|
|
41008
41011
|
const memory_file_1 = __webpack_require__(/*! ./files/memory_file */ "./node_modules/@abaplint/core/build/src/files/memory_file.js");
|
|
41009
41012
|
class EditDraft {
|
|
@@ -41221,7 +41224,6 @@ function applyEditSingle(reg, edit) {
|
|
|
41221
41224
|
reg.updateFile(result);
|
|
41222
41225
|
}
|
|
41223
41226
|
}
|
|
41224
|
-
exports.applyEditSingle = applyEditSingle;
|
|
41225
41227
|
/** returns list of filenames which were changed */
|
|
41226
41228
|
function applyEditList(reg, edits) {
|
|
41227
41229
|
const ret = [];
|
|
@@ -41251,7 +41253,6 @@ function applyEditList(reg, edits) {
|
|
|
41251
41253
|
}
|
|
41252
41254
|
return ret;
|
|
41253
41255
|
}
|
|
41254
|
-
exports.applyEditList = applyEditList;
|
|
41255
41256
|
//# sourceMappingURL=edit_helper.js.map
|
|
41256
41257
|
|
|
41257
41258
|
/***/ }),
|
|
@@ -42569,13 +42570,13 @@ class Help {
|
|
|
42569
42570
|
/////////////////////////////////////////////////
|
|
42570
42571
|
static dumpABAP(file, reg, textDocument, position) {
|
|
42571
42572
|
let content = "";
|
|
42572
|
-
content = `
|
|
42573
|
-
<a href="#_tokens" rel="no-refresh">Tokens</a> |
|
|
42574
|
-
<a href="#_statements" rel="no-refresh">Statements</a> |
|
|
42575
|
-
<a href="#_structure" rel="no-refresh">Structure</a> |
|
|
42576
|
-
<a href="#_files" rel="no-refresh">Files</a> |
|
|
42577
|
-
<a href="#_info" rel="no-refresh">Info Dump</a>
|
|
42578
|
-
<hr>
|
|
42573
|
+
content = `
|
|
42574
|
+
<a href="#_tokens" rel="no-refresh">Tokens</a> |
|
|
42575
|
+
<a href="#_statements" rel="no-refresh">Statements</a> |
|
|
42576
|
+
<a href="#_structure" rel="no-refresh">Structure</a> |
|
|
42577
|
+
<a href="#_files" rel="no-refresh">Files</a> |
|
|
42578
|
+
<a href="#_info" rel="no-refresh">Info Dump</a>
|
|
42579
|
+
<hr>
|
|
42579
42580
|
` +
|
|
42580
42581
|
"<tt>" + textDocument.uri + " (" +
|
|
42581
42582
|
(position.line + 1) + ", " +
|
|
@@ -51777,7 +51778,7 @@ class Registry {
|
|
|
51777
51778
|
}
|
|
51778
51779
|
static abaplintVersion() {
|
|
51779
51780
|
// magic, see build script "version.sh"
|
|
51780
|
-
return "2.110.
|
|
51781
|
+
return "2.110.3";
|
|
51781
51782
|
}
|
|
51782
51783
|
getDDICReferences() {
|
|
51783
51784
|
return this.ddicReferences;
|
|
@@ -52096,10 +52097,10 @@ class SevenBitAscii {
|
|
|
52096
52097
|
key: "7bit_ascii",
|
|
52097
52098
|
title: "Check for 7bit ascii",
|
|
52098
52099
|
shortDescription: `Only allow characters from the 7bit ASCII set.`,
|
|
52099
|
-
extendedInformation: `https://docs.abapopenchecks.org/checks/05/
|
|
52100
|
-
|
|
52101
|
-
https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
|
|
52102
|
-
|
|
52100
|
+
extendedInformation: `https://docs.abapopenchecks.org/checks/05/
|
|
52101
|
+
|
|
52102
|
+
https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
|
|
52103
|
+
|
|
52103
52104
|
Checkes files with extensions ".abap" and ".asddls"`,
|
|
52104
52105
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
52105
52106
|
badExample: `WRITE '뽑'.`,
|
|
@@ -52305,10 +52306,10 @@ class Abapdoc extends _abap_rule_1.ABAPRule {
|
|
|
52305
52306
|
key: "abapdoc",
|
|
52306
52307
|
title: "Check abapdoc",
|
|
52307
52308
|
shortDescription: `Various checks regarding abapdoc.`,
|
|
52308
|
-
extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
|
|
52309
|
-
|
|
52310
|
-
Plus class and interface definitions.
|
|
52311
|
-
|
|
52309
|
+
extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
|
|
52310
|
+
|
|
52311
|
+
Plus class and interface definitions.
|
|
52312
|
+
|
|
52312
52313
|
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#abap-doc-only-for-public-apis`,
|
|
52313
52314
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
|
|
52314
52315
|
};
|
|
@@ -52446,49 +52447,49 @@ class AlignParameters extends _abap_rule_1.ABAPRule {
|
|
|
52446
52447
|
key: "align_parameters",
|
|
52447
52448
|
title: "Align Parameters",
|
|
52448
52449
|
shortDescription: `Checks for vertially aligned parameters`,
|
|
52449
|
-
extendedInformation: `Checks:
|
|
52450
|
-
* function module calls
|
|
52451
|
-
* method calls
|
|
52452
|
-
* VALUE constructors
|
|
52453
|
-
* NEW constructors
|
|
52454
|
-
* RAISE EXCEPTION statements
|
|
52455
|
-
* CREATE OBJECT statements
|
|
52456
|
-
* RAISE EVENT statements
|
|
52457
|
-
|
|
52458
|
-
https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
|
|
52459
|
-
|
|
52460
|
-
Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
|
|
52461
|
-
|
|
52462
|
-
If parameters are on the same row, no issues are reported, see
|
|
52450
|
+
extendedInformation: `Checks:
|
|
52451
|
+
* function module calls
|
|
52452
|
+
* method calls
|
|
52453
|
+
* VALUE constructors
|
|
52454
|
+
* NEW constructors
|
|
52455
|
+
* RAISE EXCEPTION statements
|
|
52456
|
+
* CREATE OBJECT statements
|
|
52457
|
+
* RAISE EVENT statements
|
|
52458
|
+
|
|
52459
|
+
https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
|
|
52460
|
+
|
|
52461
|
+
Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
|
|
52462
|
+
|
|
52463
|
+
If parameters are on the same row, no issues are reported, see
|
|
52463
52464
|
https://rules.abaplint.org/max_one_method_parameter_per_line/ for splitting parameters to lines`,
|
|
52464
52465
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
|
|
52465
|
-
badExample: `CALL FUNCTION 'FOOBAR'
|
|
52466
|
-
EXPORTING
|
|
52467
|
-
foo = 2
|
|
52468
|
-
parameter = 3.
|
|
52469
|
-
|
|
52470
|
-
foobar( moo = 1
|
|
52471
|
-
param = 1 ).
|
|
52472
|
-
|
|
52473
|
-
foo = VALUE #(
|
|
52474
|
-
foo = bar
|
|
52466
|
+
badExample: `CALL FUNCTION 'FOOBAR'
|
|
52467
|
+
EXPORTING
|
|
52468
|
+
foo = 2
|
|
52469
|
+
parameter = 3.
|
|
52470
|
+
|
|
52471
|
+
foobar( moo = 1
|
|
52472
|
+
param = 1 ).
|
|
52473
|
+
|
|
52474
|
+
foo = VALUE #(
|
|
52475
|
+
foo = bar
|
|
52475
52476
|
moo = 2 ).`,
|
|
52476
|
-
goodExample: `CALL FUNCTION 'FOOBAR'
|
|
52477
|
-
EXPORTING
|
|
52478
|
-
foo = 2
|
|
52479
|
-
parameter = 3.
|
|
52480
|
-
|
|
52481
|
-
foobar( moo = 1
|
|
52482
|
-
param = 1 ).
|
|
52483
|
-
|
|
52484
|
-
foo = VALUE #(
|
|
52485
|
-
foo = bar
|
|
52486
|
-
moo = 2 ).
|
|
52487
|
-
|
|
52488
|
-
DATA(sdf) = VALUE type(
|
|
52489
|
-
common_val = 2
|
|
52490
|
-
another_common = 5
|
|
52491
|
-
( row_value = 4
|
|
52477
|
+
goodExample: `CALL FUNCTION 'FOOBAR'
|
|
52478
|
+
EXPORTING
|
|
52479
|
+
foo = 2
|
|
52480
|
+
parameter = 3.
|
|
52481
|
+
|
|
52482
|
+
foobar( moo = 1
|
|
52483
|
+
param = 1 ).
|
|
52484
|
+
|
|
52485
|
+
foo = VALUE #(
|
|
52486
|
+
foo = bar
|
|
52487
|
+
moo = 2 ).
|
|
52488
|
+
|
|
52489
|
+
DATA(sdf) = VALUE type(
|
|
52490
|
+
common_val = 2
|
|
52491
|
+
another_common = 5
|
|
52492
|
+
( row_value = 4
|
|
52492
52493
|
value_foo = 5 ) ).`,
|
|
52493
52494
|
};
|
|
52494
52495
|
}
|
|
@@ -52922,37 +52923,37 @@ class AlignTypeExpressions extends _abap_rule_1.ABAPRule {
|
|
|
52922
52923
|
key: "align_type_expressions",
|
|
52923
52924
|
title: "Align TYPE expressions",
|
|
52924
52925
|
shortDescription: `Align TYPE expressions in statements`,
|
|
52925
|
-
extendedInformation: `
|
|
52926
|
-
Currently works for METHODS + BEGIN OF
|
|
52927
|
-
|
|
52928
|
-
If BEGIN OF has an INCLUDE TYPE its ignored
|
|
52929
|
-
|
|
52930
|
-
Also note that clean ABAP does not recommend aligning TYPE clauses:
|
|
52926
|
+
extendedInformation: `
|
|
52927
|
+
Currently works for METHODS + BEGIN OF
|
|
52928
|
+
|
|
52929
|
+
If BEGIN OF has an INCLUDE TYPE its ignored
|
|
52930
|
+
|
|
52931
|
+
Also note that clean ABAP does not recommend aligning TYPE clauses:
|
|
52931
52932
|
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-align-type-clauses`,
|
|
52932
52933
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix],
|
|
52933
|
-
badExample: `
|
|
52934
|
-
TYPES: BEGIN OF foo,
|
|
52935
|
-
bar TYPE i,
|
|
52936
|
-
foobar TYPE i,
|
|
52937
|
-
END OF foo.
|
|
52938
|
-
|
|
52939
|
-
INTERFACE lif.
|
|
52940
|
-
METHODS bar
|
|
52941
|
-
IMPORTING
|
|
52942
|
-
foo TYPE i
|
|
52943
|
-
foobar TYPE i.
|
|
52934
|
+
badExample: `
|
|
52935
|
+
TYPES: BEGIN OF foo,
|
|
52936
|
+
bar TYPE i,
|
|
52937
|
+
foobar TYPE i,
|
|
52938
|
+
END OF foo.
|
|
52939
|
+
|
|
52940
|
+
INTERFACE lif.
|
|
52941
|
+
METHODS bar
|
|
52942
|
+
IMPORTING
|
|
52943
|
+
foo TYPE i
|
|
52944
|
+
foobar TYPE i.
|
|
52944
52945
|
ENDINTERFACE.`,
|
|
52945
|
-
goodExample: `
|
|
52946
|
-
TYPES: BEGIN OF foo,
|
|
52947
|
-
bar TYPE i,
|
|
52948
|
-
foobar TYPE i,
|
|
52949
|
-
END OF foo.
|
|
52950
|
-
|
|
52951
|
-
INTERFACE lif.
|
|
52952
|
-
METHODS bar
|
|
52953
|
-
IMPORTING
|
|
52954
|
-
foo TYPE i
|
|
52955
|
-
foobar TYPE i.
|
|
52946
|
+
goodExample: `
|
|
52947
|
+
TYPES: BEGIN OF foo,
|
|
52948
|
+
bar TYPE i,
|
|
52949
|
+
foobar TYPE i,
|
|
52950
|
+
END OF foo.
|
|
52951
|
+
|
|
52952
|
+
INTERFACE lif.
|
|
52953
|
+
METHODS bar
|
|
52954
|
+
IMPORTING
|
|
52955
|
+
foo TYPE i
|
|
52956
|
+
foobar TYPE i.
|
|
52956
52957
|
ENDINTERFACE.`,
|
|
52957
52958
|
};
|
|
52958
52959
|
}
|
|
@@ -53231,15 +53232,15 @@ class AmbiguousStatement extends _abap_rule_1.ABAPRule {
|
|
|
53231
53232
|
return {
|
|
53232
53233
|
key: "ambiguous_statement",
|
|
53233
53234
|
title: "Check for ambigious statements",
|
|
53234
|
-
shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
|
|
53235
|
-
Add "TABLE" keyword or "@" for escaping SQL variables
|
|
53236
|
-
|
|
53235
|
+
shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
|
|
53236
|
+
Add "TABLE" keyword or "@" for escaping SQL variables
|
|
53237
|
+
|
|
53237
53238
|
Only works if the target version is 740sp05 or above`,
|
|
53238
53239
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
53239
|
-
badExample: `DELETE foo FROM bar.
|
|
53240
|
+
badExample: `DELETE foo FROM bar.
|
|
53240
53241
|
MODIFY foo FROM bar.`,
|
|
53241
|
-
goodExample: `DELETE foo FROM @bar.
|
|
53242
|
-
MODIFY TABLE foo FROM bar.
|
|
53242
|
+
goodExample: `DELETE foo FROM @bar.
|
|
53243
|
+
MODIFY TABLE foo FROM bar.
|
|
53243
53244
|
MODIFY zfoo FROM @wa.`,
|
|
53244
53245
|
};
|
|
53245
53246
|
}
|
|
@@ -53344,16 +53345,16 @@ class AvoidUse extends _abap_rule_1.ABAPRule {
|
|
|
53344
53345
|
key: "avoid_use",
|
|
53345
53346
|
title: "Avoid use of certain statements",
|
|
53346
53347
|
shortDescription: `Detects usage of certain statements.`,
|
|
53347
|
-
extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
|
|
53348
|
-
|
|
53349
|
-
Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
|
|
53350
|
-
|
|
53351
|
-
STATICS: use CLASS-DATA instead
|
|
53352
|
-
|
|
53353
|
-
DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
|
|
53354
|
-
|
|
53355
|
-
TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
|
|
53356
|
-
|
|
53348
|
+
extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
|
|
53349
|
+
|
|
53350
|
+
Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
|
|
53351
|
+
|
|
53352
|
+
STATICS: use CLASS-DATA instead
|
|
53353
|
+
|
|
53354
|
+
DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
|
|
53355
|
+
|
|
53356
|
+
TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
|
|
53357
|
+
|
|
53357
53358
|
BREAK points`,
|
|
53358
53359
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
53359
53360
|
};
|
|
@@ -53485,11 +53486,11 @@ class BeginEndNames extends _abap_rule_1.ABAPRule {
|
|
|
53485
53486
|
title: "Check BEGIN END names",
|
|
53486
53487
|
shortDescription: `Check BEGIN OF and END OF names match, plus there must be statements between BEGIN and END`,
|
|
53487
53488
|
tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
|
|
53488
|
-
badExample: `DATA: BEGIN OF stru,
|
|
53489
|
-
field TYPE i,
|
|
53489
|
+
badExample: `DATA: BEGIN OF stru,
|
|
53490
|
+
field TYPE i,
|
|
53490
53491
|
END OF structure_not_the_same.`,
|
|
53491
|
-
goodExample: `DATA: BEGIN OF stru,
|
|
53492
|
-
field TYPE i,
|
|
53492
|
+
goodExample: `DATA: BEGIN OF stru,
|
|
53493
|
+
field TYPE i,
|
|
53493
53494
|
END OF stru.`,
|
|
53494
53495
|
};
|
|
53495
53496
|
}
|
|
@@ -53586,20 +53587,20 @@ class BeginSingleInclude extends _abap_rule_1.ABAPRule {
|
|
|
53586
53587
|
title: "BEGIN contains single INCLUDE",
|
|
53587
53588
|
shortDescription: `Finds TYPE BEGIN with just one INCLUDE TYPE, and DATA with single INCLUDE STRUCTURE`,
|
|
53588
53589
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
53589
|
-
badExample: `TYPES: BEGIN OF dummy1.
|
|
53590
|
-
INCLUDE TYPE dselc.
|
|
53591
|
-
TYPES: END OF dummy1.
|
|
53592
|
-
|
|
53593
|
-
DATA BEGIN OF foo.
|
|
53594
|
-
INCLUDE STRUCTURE syst.
|
|
53595
|
-
DATA END OF foo.
|
|
53596
|
-
|
|
53597
|
-
STATICS BEGIN OF bar.
|
|
53598
|
-
INCLUDE STRUCTURE syst.
|
|
53590
|
+
badExample: `TYPES: BEGIN OF dummy1.
|
|
53591
|
+
INCLUDE TYPE dselc.
|
|
53592
|
+
TYPES: END OF dummy1.
|
|
53593
|
+
|
|
53594
|
+
DATA BEGIN OF foo.
|
|
53595
|
+
INCLUDE STRUCTURE syst.
|
|
53596
|
+
DATA END OF foo.
|
|
53597
|
+
|
|
53598
|
+
STATICS BEGIN OF bar.
|
|
53599
|
+
INCLUDE STRUCTURE syst.
|
|
53599
53600
|
STATICS END OF bar.`,
|
|
53600
|
-
goodExample: `DATA BEGIN OF foo.
|
|
53601
|
-
DATA field TYPE i.
|
|
53602
|
-
INCLUDE STRUCTURE dselc.
|
|
53601
|
+
goodExample: `DATA BEGIN OF foo.
|
|
53602
|
+
DATA field TYPE i.
|
|
53603
|
+
INCLUDE STRUCTURE dselc.
|
|
53603
53604
|
DATA END OF foo.`,
|
|
53604
53605
|
};
|
|
53605
53606
|
}
|
|
@@ -53689,9 +53690,9 @@ class CallTransactionAuthorityCheck extends _abap_rule_1.ABAPRule {
|
|
|
53689
53690
|
extendedInformation: `https://docs.abapopenchecks.org/checks/54/`,
|
|
53690
53691
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
|
|
53691
53692
|
badExample: `CALL TRANSACTION 'FOO'.`,
|
|
53692
|
-
goodExample: `TRY.
|
|
53693
|
-
CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
|
|
53694
|
-
CATCH cx_sy_authorization_error.
|
|
53693
|
+
goodExample: `TRY.
|
|
53694
|
+
CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
|
|
53695
|
+
CATCH cx_sy_authorization_error.
|
|
53695
53696
|
ENDTRY.`,
|
|
53696
53697
|
};
|
|
53697
53698
|
}
|
|
@@ -53756,10 +53757,10 @@ class CDSCommentStyle {
|
|
|
53756
53757
|
key: "cds_comment_style",
|
|
53757
53758
|
title: "CDS Comment Style",
|
|
53758
53759
|
shortDescription: `Check for obsolete comment style`,
|
|
53759
|
-
extendedInformation: `Check for obsolete comment style
|
|
53760
|
-
|
|
53761
|
-
Comments starting with "--" are considered obsolete
|
|
53762
|
-
|
|
53760
|
+
extendedInformation: `Check for obsolete comment style
|
|
53761
|
+
|
|
53762
|
+
Comments starting with "--" are considered obsolete
|
|
53763
|
+
|
|
53763
53764
|
https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abencds_general_syntax_rules.htm`,
|
|
53764
53765
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
53765
53766
|
badExample: "-- this is a comment",
|
|
@@ -53826,10 +53827,10 @@ class CDSLegacyView {
|
|
|
53826
53827
|
title: "CDS Legacy View",
|
|
53827
53828
|
shortDescription: `Identify CDS Legacy Views`,
|
|
53828
53829
|
// eslint-disable-next-line max-len
|
|
53829
|
-
extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
|
|
53830
|
-
|
|
53831
|
-
https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
|
|
53832
|
-
|
|
53830
|
+
extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
|
|
53831
|
+
|
|
53832
|
+
https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
|
|
53833
|
+
|
|
53833
53834
|
v755 and up`,
|
|
53834
53835
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Upport],
|
|
53835
53836
|
};
|
|
@@ -53984,10 +53985,10 @@ class ChainMainlyDeclarations extends _abap_rule_1.ABAPRule {
|
|
|
53984
53985
|
key: "chain_mainly_declarations",
|
|
53985
53986
|
title: "Chain mainly declarations",
|
|
53986
53987
|
shortDescription: `Chain mainly declarations, allows chaining for the configured statements, reports errors for other statements.`,
|
|
53987
|
-
extendedInformation: `
|
|
53988
|
-
https://docs.abapopenchecks.org/checks/23/
|
|
53989
|
-
|
|
53990
|
-
https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
|
|
53988
|
+
extendedInformation: `
|
|
53989
|
+
https://docs.abapopenchecks.org/checks/23/
|
|
53990
|
+
|
|
53991
|
+
https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
|
|
53991
53992
|
`,
|
|
53992
53993
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
|
|
53993
53994
|
badExample: `CALL METHOD: bar.`,
|
|
@@ -54163,17 +54164,17 @@ class ChangeIfToCase extends _abap_rule_1.ABAPRule {
|
|
|
54163
54164
|
title: "Change IF to CASE",
|
|
54164
54165
|
shortDescription: `Finds IF constructs that can be changed to CASE`,
|
|
54165
54166
|
// eslint-disable-next-line max-len
|
|
54166
|
-
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
|
|
54167
|
-
|
|
54167
|
+
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
|
|
54168
|
+
|
|
54168
54169
|
If the first comparison is a boolean compare, no issue is reported.`,
|
|
54169
54170
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
|
|
54170
|
-
badExample: `IF l_fcat-fieldname EQ 'FOO'.
|
|
54171
|
-
ELSEIF l_fcat-fieldname = 'BAR'
|
|
54172
|
-
OR l_fcat-fieldname = 'MOO'.
|
|
54171
|
+
badExample: `IF l_fcat-fieldname EQ 'FOO'.
|
|
54172
|
+
ELSEIF l_fcat-fieldname = 'BAR'
|
|
54173
|
+
OR l_fcat-fieldname = 'MOO'.
|
|
54173
54174
|
ENDIF.`,
|
|
54174
|
-
goodExample: `CASE l_fcat-fieldname.
|
|
54175
|
-
WHEN 'FOO'.
|
|
54176
|
-
WHEN 'BAR' OR 'MOO'.
|
|
54175
|
+
goodExample: `CASE l_fcat-fieldname.
|
|
54176
|
+
WHEN 'FOO'.
|
|
54177
|
+
WHEN 'BAR' OR 'MOO'.
|
|
54177
54178
|
ENDCASE.`,
|
|
54178
54179
|
};
|
|
54179
54180
|
}
|
|
@@ -54310,8 +54311,8 @@ class CheckAbstract extends _abap_rule_1.ABAPRule {
|
|
|
54310
54311
|
return {
|
|
54311
54312
|
key: "check_abstract",
|
|
54312
54313
|
title: "Check abstract methods and classes",
|
|
54313
|
-
shortDescription: `Checks abstract methods and classes:
|
|
54314
|
-
- class defined as abstract and final,
|
|
54314
|
+
shortDescription: `Checks abstract methods and classes:
|
|
54315
|
+
- class defined as abstract and final,
|
|
54315
54316
|
- non-abstract class contains abstract methods`,
|
|
54316
54317
|
extendedInformation: `If a class defines only constants, use an interface instead`,
|
|
54317
54318
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
@@ -54392,11 +54393,11 @@ class CheckComments extends _abap_rule_1.ABAPRule {
|
|
|
54392
54393
|
return {
|
|
54393
54394
|
key: "check_comments",
|
|
54394
54395
|
title: "Check Comments",
|
|
54395
|
-
shortDescription: `
|
|
54396
|
+
shortDescription: `
|
|
54396
54397
|
Various checks for comment usage.`,
|
|
54397
|
-
extendedInformation: `
|
|
54398
|
-
Detects end of line comments. Comments starting with "#EC" or "##" are ignored
|
|
54399
|
-
|
|
54398
|
+
extendedInformation: `
|
|
54399
|
+
Detects end of line comments. Comments starting with "#EC" or "##" are ignored
|
|
54400
|
+
|
|
54400
54401
|
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#put-comments-before-the-statement-they-relate-to`,
|
|
54401
54402
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
54402
54403
|
badExample: `WRITE 2. " descriptive comment`,
|
|
@@ -54558,9 +54559,9 @@ class CheckInclude {
|
|
|
54558
54559
|
key: "check_include",
|
|
54559
54560
|
title: "Check INCLUDEs",
|
|
54560
54561
|
shortDescription: `Checks INCLUDE statements`,
|
|
54561
|
-
extendedInformation: `
|
|
54562
|
-
* Reports unused includes
|
|
54563
|
-
* Errors if the includes are not found
|
|
54562
|
+
extendedInformation: `
|
|
54563
|
+
* Reports unused includes
|
|
54564
|
+
* Errors if the includes are not found
|
|
54564
54565
|
* Error if including a main program`,
|
|
54565
54566
|
tags: [_irule_1.RuleTag.Syntax],
|
|
54566
54567
|
};
|
|
@@ -54636,14 +54637,14 @@ class CheckSubrc extends _abap_rule_1.ABAPRule {
|
|
|
54636
54637
|
key: "check_subrc",
|
|
54637
54638
|
title: "Check sy-subrc",
|
|
54638
54639
|
shortDescription: `Check sy-subrc`,
|
|
54639
|
-
extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
|
|
54640
|
-
|
|
54641
|
-
If sy-dbcnt is checked after database statements, it is considered okay.
|
|
54642
|
-
|
|
54643
|
-
"SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
|
|
54644
|
-
|
|
54645
|
-
If IS ASSIGNED is checked after assigning, it is considered okay.
|
|
54646
|
-
|
|
54640
|
+
extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
|
|
54641
|
+
|
|
54642
|
+
If sy-dbcnt is checked after database statements, it is considered okay.
|
|
54643
|
+
|
|
54644
|
+
"SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
|
|
54645
|
+
|
|
54646
|
+
If IS ASSIGNED is checked after assigning, it is considered okay.
|
|
54647
|
+
|
|
54647
54648
|
FIND statement with MATCH COUNT is considered okay if subrc is not checked`,
|
|
54648
54649
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
|
|
54649
54650
|
pseudoComment: "EC CI_SUBRC",
|
|
@@ -55212,17 +55213,17 @@ class ClassicExceptionsOverlap extends _abap_rule_1.ABAPRule {
|
|
|
55212
55213
|
shortDescription: `Find overlapping classic exceptions`,
|
|
55213
55214
|
extendedInformation: `When debugging its typically good to know exactly which exception is caught`,
|
|
55214
55215
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
55215
|
-
badExample: `CALL FUNCTION 'SOMETHING'
|
|
55216
|
-
EXCEPTIONS
|
|
55217
|
-
system_failure = 1 MESSAGE lv_message
|
|
55218
|
-
communication_failure = 1 MESSAGE lv_message
|
|
55219
|
-
resource_failure = 1
|
|
55216
|
+
badExample: `CALL FUNCTION 'SOMETHING'
|
|
55217
|
+
EXCEPTIONS
|
|
55218
|
+
system_failure = 1 MESSAGE lv_message
|
|
55219
|
+
communication_failure = 1 MESSAGE lv_message
|
|
55220
|
+
resource_failure = 1
|
|
55220
55221
|
OTHERS = 1.`,
|
|
55221
|
-
goodExample: `CALL FUNCTION 'SOMETHING'
|
|
55222
|
-
EXCEPTIONS
|
|
55223
|
-
system_failure = 1 MESSAGE lv_message
|
|
55224
|
-
communication_failure = 2 MESSAGE lv_message
|
|
55225
|
-
resource_failure = 3
|
|
55222
|
+
goodExample: `CALL FUNCTION 'SOMETHING'
|
|
55223
|
+
EXCEPTIONS
|
|
55224
|
+
system_failure = 1 MESSAGE lv_message
|
|
55225
|
+
communication_failure = 2 MESSAGE lv_message
|
|
55226
|
+
resource_failure = 3
|
|
55226
55227
|
OTHERS = 4.`,
|
|
55227
55228
|
};
|
|
55228
55229
|
}
|
|
@@ -55468,7 +55469,7 @@ class CommentedCode extends _abap_rule_1.ABAPRule {
|
|
|
55468
55469
|
key: "commented_code",
|
|
55469
55470
|
title: "Find commented code",
|
|
55470
55471
|
shortDescription: `Detects usage of commented out code.`,
|
|
55471
|
-
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it
|
|
55472
|
+
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it
|
|
55472
55473
|
https://docs.abapopenchecks.org/checks/14/`,
|
|
55473
55474
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
|
|
55474
55475
|
badExample: `* WRITE 'hello world'.`,
|
|
@@ -55701,10 +55702,10 @@ class ConstructorVisibilityPublic {
|
|
|
55701
55702
|
key: "constructor_visibility_public",
|
|
55702
55703
|
title: "Check constructor visibility is public",
|
|
55703
55704
|
shortDescription: `Constructor must be placed in the public section, even if the class is not CREATE PUBLIC.`,
|
|
55704
|
-
extendedInformation: `
|
|
55705
|
-
This only applies to global classes.
|
|
55706
|
-
|
|
55707
|
-
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
|
|
55705
|
+
extendedInformation: `
|
|
55706
|
+
This only applies to global classes.
|
|
55707
|
+
|
|
55708
|
+
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
|
|
55708
55709
|
https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abeninstance_constructor_guidl.htm`,
|
|
55709
55710
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
55710
55711
|
};
|
|
@@ -55779,8 +55780,8 @@ class ContainsTab extends _abap_rule_1.ABAPRule {
|
|
|
55779
55780
|
key: "contains_tab",
|
|
55780
55781
|
title: "Code contains tab",
|
|
55781
55782
|
shortDescription: `Checks for usage of tabs (enable to enforce spaces)`,
|
|
55782
|
-
extendedInformation: `
|
|
55783
|
-
https://docs.abapopenchecks.org/checks/09/
|
|
55783
|
+
extendedInformation: `
|
|
55784
|
+
https://docs.abapopenchecks.org/checks/09/
|
|
55784
55785
|
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
|
|
55785
55786
|
tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
55786
55787
|
badExample: `\tWRITE 'hello world'.`,
|
|
@@ -55867,10 +55868,10 @@ class CyclicOO {
|
|
|
55867
55868
|
key: "cyclic_oo",
|
|
55868
55869
|
title: "Cyclic OO",
|
|
55869
55870
|
shortDescription: `Finds cyclic OO references`,
|
|
55870
|
-
extendedInformation: `Runs for global INTF + CLAS objects
|
|
55871
|
-
|
|
55872
|
-
Objects must be without syntax errors for this rule to take effect
|
|
55873
|
-
|
|
55871
|
+
extendedInformation: `Runs for global INTF + CLAS objects
|
|
55872
|
+
|
|
55873
|
+
Objects must be without syntax errors for this rule to take effect
|
|
55874
|
+
|
|
55874
55875
|
References in testclass includes are ignored`,
|
|
55875
55876
|
};
|
|
55876
55877
|
}
|
|
@@ -56112,7 +56113,7 @@ class DangerousStatement extends _abap_rule_1.ABAPRule {
|
|
|
56112
56113
|
key: "dangerous_statement",
|
|
56113
56114
|
title: "Dangerous statement",
|
|
56114
56115
|
shortDescription: `Detects potentially dangerous statements`,
|
|
56115
|
-
extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
|
|
56116
|
+
extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
|
|
56116
56117
|
dynamic SQL can potentially create SQL injection problems`,
|
|
56117
56118
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
|
|
56118
56119
|
};
|
|
@@ -56316,13 +56317,13 @@ class DefinitionsTop extends _abap_rule_1.ABAPRule {
|
|
|
56316
56317
|
shortDescription: `Checks that definitions are placed at the beginning of METHODs, FORMs and FUNCTIONs.`,
|
|
56317
56318
|
extendedInformation: `https://docs.abapopenchecks.org/checks/17/`,
|
|
56318
56319
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
|
|
56319
|
-
badExample: `FROM foo.
|
|
56320
|
-
WRITE 'hello'.
|
|
56321
|
-
DATA int TYPE i.
|
|
56320
|
+
badExample: `FROM foo.
|
|
56321
|
+
WRITE 'hello'.
|
|
56322
|
+
DATA int TYPE i.
|
|
56322
56323
|
ENDFORM.`,
|
|
56323
|
-
goodExample: `FROM foo.
|
|
56324
|
-
DATA int TYPE i.
|
|
56325
|
-
WRITE 'hello'.
|
|
56324
|
+
goodExample: `FROM foo.
|
|
56325
|
+
DATA int TYPE i.
|
|
56326
|
+
WRITE 'hello'.
|
|
56326
56327
|
ENDFORM.`,
|
|
56327
56328
|
};
|
|
56328
56329
|
}
|
|
@@ -56858,39 +56859,39 @@ class Downport {
|
|
|
56858
56859
|
key: "downport",
|
|
56859
56860
|
title: "Downport statement",
|
|
56860
56861
|
shortDescription: `Downport functionality`,
|
|
56861
|
-
extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with
|
|
56862
|
-
a higher level language version. If successful, various rules are applied to downport the statement.
|
|
56863
|
-
Target downport version is always v702, thus rule is only enabled if target version is v702.
|
|
56864
|
-
|
|
56865
|
-
Current rules:
|
|
56866
|
-
* NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/
|
|
56867
|
-
* DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/
|
|
56868
|
-
* FIELD-SYMBOL() definitions are outlined
|
|
56869
|
-
* CONV is outlined
|
|
56870
|
-
* COND is outlined
|
|
56871
|
-
* REDUCE is outlined
|
|
56872
|
-
* SWITCH is outlined
|
|
56873
|
-
* FILTER is outlined
|
|
56874
|
-
* APPEND expression is outlined
|
|
56875
|
-
* INSERT expression is outlined
|
|
56876
|
-
* EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/
|
|
56877
|
-
* CAST changed to ?=
|
|
56878
|
-
* LOOP AT method_call( ) is outlined
|
|
56879
|
-
* VALUE # with structure fields
|
|
56880
|
-
* VALUE # with internal table lines
|
|
56881
|
-
* Table Expressions are outlined
|
|
56882
|
-
* SELECT INTO @DATA definitions are outlined
|
|
56883
|
-
* Some occurrences of string template formatting option ALPHA changed to function module call
|
|
56884
|
-
* SELECT/INSERT/MODIFY/DELETE/UPDATE "," in field list removed, "@" in source/targets removed
|
|
56885
|
-
* PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods
|
|
56886
|
-
* RAISE EXCEPTION ... MESSAGE
|
|
56887
|
-
* Moving with +=, -=, /=, *=, &&= is expanded
|
|
56888
|
-
* line_exists and line_index is downported to READ TABLE
|
|
56889
|
-
* ENUMs, but does not nessesarily give the correct type and value
|
|
56890
|
-
* MESSAGE with non simple source
|
|
56891
|
-
|
|
56892
|
-
Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.
|
|
56893
|
-
|
|
56862
|
+
extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with
|
|
56863
|
+
a higher level language version. If successful, various rules are applied to downport the statement.
|
|
56864
|
+
Target downport version is always v702, thus rule is only enabled if target version is v702.
|
|
56865
|
+
|
|
56866
|
+
Current rules:
|
|
56867
|
+
* NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/
|
|
56868
|
+
* DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/
|
|
56869
|
+
* FIELD-SYMBOL() definitions are outlined
|
|
56870
|
+
* CONV is outlined
|
|
56871
|
+
* COND is outlined
|
|
56872
|
+
* REDUCE is outlined
|
|
56873
|
+
* SWITCH is outlined
|
|
56874
|
+
* FILTER is outlined
|
|
56875
|
+
* APPEND expression is outlined
|
|
56876
|
+
* INSERT expression is outlined
|
|
56877
|
+
* EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/
|
|
56878
|
+
* CAST changed to ?=
|
|
56879
|
+
* LOOP AT method_call( ) is outlined
|
|
56880
|
+
* VALUE # with structure fields
|
|
56881
|
+
* VALUE # with internal table lines
|
|
56882
|
+
* Table Expressions are outlined
|
|
56883
|
+
* SELECT INTO @DATA definitions are outlined
|
|
56884
|
+
* Some occurrences of string template formatting option ALPHA changed to function module call
|
|
56885
|
+
* SELECT/INSERT/MODIFY/DELETE/UPDATE "," in field list removed, "@" in source/targets removed
|
|
56886
|
+
* PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods
|
|
56887
|
+
* RAISE EXCEPTION ... MESSAGE
|
|
56888
|
+
* Moving with +=, -=, /=, *=, &&= is expanded
|
|
56889
|
+
* line_exists and line_index is downported to READ TABLE
|
|
56890
|
+
* ENUMs, but does not nessesarily give the correct type and value
|
|
56891
|
+
* MESSAGE with non simple source
|
|
56892
|
+
|
|
56893
|
+
Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.
|
|
56894
|
+
|
|
56894
56895
|
Make sure to test the downported code, it might not always be completely correct.`,
|
|
56895
56896
|
tags: [_irule_1.RuleTag.Downport, _irule_1.RuleTag.Quickfix],
|
|
56896
56897
|
};
|
|
@@ -57468,10 +57469,10 @@ Make sure to test the downported code, it might not always be completely correct
|
|
|
57468
57469
|
const fieldName = f.concatTokens();
|
|
57469
57470
|
fieldDefinition += indentation + " " + fieldName + " TYPE " + tableName + "-" + fieldName + ",\n";
|
|
57470
57471
|
}
|
|
57471
|
-
fieldDefinition = `DATA: BEGIN OF ${name},
|
|
57472
|
+
fieldDefinition = `DATA: BEGIN OF ${name},
|
|
57472
57473
|
${fieldDefinition}${indentation} END OF ${name}.`;
|
|
57473
57474
|
}
|
|
57474
|
-
const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
|
|
57475
|
+
const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
|
|
57475
57476
|
${indentation}`);
|
|
57476
57477
|
const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
|
|
57477
57478
|
const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
|
|
@@ -57515,12 +57516,12 @@ ${indentation}`);
|
|
|
57515
57516
|
}
|
|
57516
57517
|
const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
|
|
57517
57518
|
const name = ((_c = inlineData.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || "error";
|
|
57518
|
-
let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
|
|
57519
|
-
${fieldDefinitions}${indentation} END OF ${uniqueName}.
|
|
57520
|
-
${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.
|
|
57519
|
+
let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
|
|
57520
|
+
${fieldDefinitions}${indentation} END OF ${uniqueName}.
|
|
57521
|
+
${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.
|
|
57521
57522
|
${indentation}`);
|
|
57522
57523
|
if (fieldDefinitions === "") {
|
|
57523
|
-
fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.
|
|
57524
|
+
fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.
|
|
57524
57525
|
${indentation}`);
|
|
57525
57526
|
}
|
|
57526
57527
|
const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
|
|
@@ -57588,7 +57589,7 @@ ${indentation}`);
|
|
|
57588
57589
|
const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
|
|
57589
57590
|
const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
|
|
57590
57591
|
const firstToken = high.getFirstToken();
|
|
57591
|
-
const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
|
|
57592
|
+
const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
|
|
57592
57593
|
${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
|
|
57593
57594
|
const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
|
|
57594
57595
|
const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
|
|
@@ -57642,7 +57643,7 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
|
|
|
57642
57643
|
const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
|
|
57643
57644
|
const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
|
|
57644
57645
|
const firstToken = high.getFirstToken();
|
|
57645
|
-
const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
|
|
57646
|
+
const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
|
|
57646
57647
|
${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
|
|
57647
57648
|
const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
|
|
57648
57649
|
const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
|
|
@@ -57684,14 +57685,14 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
|
|
|
57684
57685
|
const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
|
|
57685
57686
|
const firstToken = high.getFirstToken();
|
|
57686
57687
|
// note that the tabix restore should be done before throwing the exception
|
|
57687
|
-
const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.
|
|
57688
|
-
${indentation}DATA ${tabixBackup} LIKE sy-tabix.
|
|
57689
|
-
${indentation}${tabixBackup} = sy-tabix.
|
|
57690
|
-
${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.
|
|
57691
|
-
${indentation}sy-tabix = ${tabixBackup}.
|
|
57692
|
-
${indentation}IF sy-subrc <> 0.
|
|
57693
|
-
${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
|
|
57694
|
-
${indentation}ENDIF.
|
|
57688
|
+
const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.
|
|
57689
|
+
${indentation}DATA ${tabixBackup} LIKE sy-tabix.
|
|
57690
|
+
${indentation}${tabixBackup} = sy-tabix.
|
|
57691
|
+
${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.
|
|
57692
|
+
${indentation}sy-tabix = ${tabixBackup}.
|
|
57693
|
+
${indentation}IF sy-subrc <> 0.
|
|
57694
|
+
${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
|
|
57695
|
+
${indentation}ENDIF.
|
|
57695
57696
|
${indentation}`);
|
|
57696
57697
|
const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, startToken.getStart(), tableExpression.getLastToken().getEnd(), uniqueName);
|
|
57697
57698
|
const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
|
|
@@ -57748,7 +57749,7 @@ ${indentation}`);
|
|
|
57748
57749
|
const className = classNames[0].concatTokens();
|
|
57749
57750
|
const targetName = (_b = target.findFirstExpression(Expressions.TargetField)) === null || _b === void 0 ? void 0 : _b.concatTokens();
|
|
57750
57751
|
const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
|
|
57751
|
-
const code = ` DATA ${targetName} TYPE REF TO ${className}.
|
|
57752
|
+
const code = ` DATA ${targetName} TYPE REF TO ${className}.
|
|
57752
57753
|
${indentation}CATCH ${className} INTO ${targetName}.`;
|
|
57753
57754
|
const fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getStart(), node.getEnd(), code);
|
|
57754
57755
|
return issue_1.Issue.atToken(lowFile, node.getFirstToken(), "Outline DATA", this.getMetadata().key, this.conf.severity, fix);
|
|
@@ -57910,16 +57911,16 @@ ${indentation}CATCH ${className} INTO ${targetName}.`;
|
|
|
57910
57911
|
const uniqueName1 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
|
|
57911
57912
|
const uniqueName2 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
|
|
57912
57913
|
const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
|
|
57913
|
-
let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
|
|
57914
|
-
${indentation}${uniqueName1}-msgid = ${id}.
|
|
57914
|
+
let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
|
|
57915
|
+
${indentation}${uniqueName1}-msgid = ${id}.
|
|
57915
57916
|
${indentation}${uniqueName1}-msgno = ${number}.\n`;
|
|
57916
57917
|
if (withs.length > 0) {
|
|
57917
|
-
abap += `${indentation}${uniqueName1}-attr1 = 'IF_T100_DYN_MSG~MSGV1'.
|
|
57918
|
-
${indentation}${uniqueName1}-attr2 = 'IF_T100_DYN_MSG~MSGV2'.
|
|
57919
|
-
${indentation}${uniqueName1}-attr3 = 'IF_T100_DYN_MSG~MSGV3'.
|
|
57918
|
+
abap += `${indentation}${uniqueName1}-attr1 = 'IF_T100_DYN_MSG~MSGV1'.
|
|
57919
|
+
${indentation}${uniqueName1}-attr2 = 'IF_T100_DYN_MSG~MSGV2'.
|
|
57920
|
+
${indentation}${uniqueName1}-attr3 = 'IF_T100_DYN_MSG~MSGV3'.
|
|
57920
57921
|
${indentation}${uniqueName1}-attr4 = 'IF_T100_DYN_MSG~MSGV4'.\n`;
|
|
57921
57922
|
}
|
|
57922
|
-
abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
|
|
57923
|
+
abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
|
|
57923
57924
|
${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`;
|
|
57924
57925
|
if (withs.length > 0) {
|
|
57925
57926
|
abap += `${indentation}${uniqueName2}->if_t100_dyn_msg~msgty = 'E'.\n`;
|
|
@@ -58031,10 +58032,10 @@ ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`
|
|
|
58031
58032
|
let code = "";
|
|
58032
58033
|
if (sourceRef.findFirstExpression(Expressions.TableExpression)) {
|
|
58033
58034
|
const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
|
|
58034
|
-
code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).
|
|
58035
|
-
IF sy-subrc <> 0.
|
|
58036
|
-
RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
|
|
58037
|
-
ENDIF.
|
|
58035
|
+
code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).
|
|
58036
|
+
IF sy-subrc <> 0.
|
|
58037
|
+
RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
|
|
58038
|
+
ENDIF.
|
|
58038
58039
|
GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
|
|
58039
58040
|
}
|
|
58040
58041
|
else {
|
|
@@ -58123,20 +58124,20 @@ GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
|
|
|
58123
58124
|
const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
|
|
58124
58125
|
const uniqueFS = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
|
|
58125
58126
|
const uniqueNameIndex = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
|
|
58126
|
-
code += ` items LIKE ${loopSourceName},
|
|
58127
|
-
END OF ${groupTargetName}type.
|
|
58128
|
-
DATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.
|
|
58129
|
-
DATA ${uniqueName} LIKE LINE OF ${groupTargetName}tab.
|
|
58127
|
+
code += ` items LIKE ${loopSourceName},
|
|
58128
|
+
END OF ${groupTargetName}type.
|
|
58129
|
+
DATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.
|
|
58130
|
+
DATA ${uniqueName} LIKE LINE OF ${groupTargetName}tab.
|
|
58130
58131
|
LOOP AT ${loopSourceName} ${(_l = high.findFirstExpression(Expressions.LoopTarget)) === null || _l === void 0 ? void 0 : _l.concatTokens()}.\n`;
|
|
58131
58132
|
if (groupIndexName !== undefined) {
|
|
58132
58133
|
code += `DATA(${uniqueNameIndex}) = sy-tabix.\n`;
|
|
58133
58134
|
}
|
|
58134
|
-
code += `READ TABLE ${groupTargetName}tab ASSIGNING FIELD-SYMBOL(<${uniqueFS}>) WITH KEY ${condition}.
|
|
58135
|
+
code += `READ TABLE ${groupTargetName}tab ASSIGNING FIELD-SYMBOL(<${uniqueFS}>) WITH KEY ${condition}.
|
|
58135
58136
|
IF sy-subrc = 0.\n`;
|
|
58136
58137
|
if (groupCountName !== undefined) {
|
|
58137
58138
|
code += ` <${uniqueFS}>-${groupCountName} = <${uniqueFS}>-${groupCountName} + 1.\n`;
|
|
58138
58139
|
}
|
|
58139
|
-
code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
|
|
58140
|
+
code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
|
|
58140
58141
|
ELSE.\n`;
|
|
58141
58142
|
code += ` CLEAR ${uniqueName}.\n`;
|
|
58142
58143
|
for (const c of group.findAllExpressions(Expressions.LoopGroupByComponent)) {
|
|
@@ -58157,8 +58158,8 @@ ELSE.\n`;
|
|
|
58157
58158
|
}
|
|
58158
58159
|
code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE ${uniqueName}-items.\n`;
|
|
58159
58160
|
code += ` INSERT ${uniqueName} INTO TABLE ${groupTargetName}tab.\n`;
|
|
58160
|
-
code += `ENDIF.
|
|
58161
|
-
ENDLOOP.
|
|
58161
|
+
code += `ENDIF.
|
|
58162
|
+
ENDLOOP.
|
|
58162
58163
|
LOOP AT ${groupTargetName}tab ${groupTarget}.`;
|
|
58163
58164
|
let fix = edit_helper_1.EditHelper.replaceRange(lowFile, high.getFirstToken().getStart(), high.getLastToken().getEnd(), code);
|
|
58164
58165
|
for (const l of ((_m = highFile.getStructure()) === null || _m === void 0 ? void 0 : _m.findAllStructures(Structures.Loop)) || []) {
|
|
@@ -58330,7 +58331,7 @@ LOOP AT ${groupTargetName}tab ${groupTarget}.`;
|
|
|
58330
58331
|
const enumName = (_b = high.findExpressionAfterToken("ENUM")) === null || _b === void 0 ? void 0 : _b.concatTokens();
|
|
58331
58332
|
const structureName = (_c = high.findExpressionAfterToken("STRUCTURE")) === null || _c === void 0 ? void 0 : _c.concatTokens();
|
|
58332
58333
|
// all ENUMS are char like?
|
|
58333
|
-
let code = `TYPES ${enumName} TYPE string.
|
|
58334
|
+
let code = `TYPES ${enumName} TYPE string.
|
|
58334
58335
|
CONSTANTS: BEGIN OF ${structureName},\n`;
|
|
58335
58336
|
let count = 1;
|
|
58336
58337
|
for (const e of enumStructure.findDirectStatements(Statements.TypeEnum).concat(enumStructure.findDirectStatements(Statements.Type))) {
|
|
@@ -58374,14 +58375,14 @@ CONSTANTS: BEGIN OF ${structureName},\n`;
|
|
|
58374
58375
|
const tabixBackup = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
|
|
58375
58376
|
const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
|
|
58376
58377
|
// restore tabix before exeption
|
|
58377
|
-
const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.
|
|
58378
|
-
${indentation}DATA ${tabixBackup} LIKE sy-tabix.
|
|
58379
|
-
${indentation}${tabixBackup} = sy-tabix.
|
|
58380
|
-
${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.
|
|
58381
|
-
${indentation}sy-tabix = ${tabixBackup}.
|
|
58382
|
-
${indentation}IF sy-subrc <> 0.
|
|
58383
|
-
${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
|
|
58384
|
-
${indentation}ENDIF.
|
|
58378
|
+
const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.
|
|
58379
|
+
${indentation}DATA ${tabixBackup} LIKE sy-tabix.
|
|
58380
|
+
${indentation}${tabixBackup} = sy-tabix.
|
|
58381
|
+
${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.
|
|
58382
|
+
${indentation}sy-tabix = ${tabixBackup}.
|
|
58383
|
+
${indentation}IF sy-subrc <> 0.
|
|
58384
|
+
${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
|
|
58385
|
+
${indentation}ENDIF.
|
|
58385
58386
|
${indentation}${uniqueName}`;
|
|
58386
58387
|
const start = target.getFirstToken().getStart();
|
|
58387
58388
|
const end = (_a = tableExpression.findDirectTokenByText("]")) === null || _a === void 0 ? void 0 : _a.getEnd();
|
|
@@ -58465,11 +58466,11 @@ ${indentation}${uniqueName}`;
|
|
|
58465
58466
|
const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
|
|
58466
58467
|
const source = (_b = templateSource === null || templateSource === void 0 ? void 0 : templateSource.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens();
|
|
58467
58468
|
const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
|
|
58468
|
-
const code = `DATA ${uniqueName} TYPE string.
|
|
58469
|
-
${indentation}CALL FUNCTION '${functionName}'
|
|
58470
|
-
${indentation} EXPORTING
|
|
58471
|
-
${indentation} input = ${source}
|
|
58472
|
-
${indentation} IMPORTING
|
|
58469
|
+
const code = `DATA ${uniqueName} TYPE string.
|
|
58470
|
+
${indentation}CALL FUNCTION '${functionName}'
|
|
58471
|
+
${indentation} EXPORTING
|
|
58472
|
+
${indentation} input = ${source}
|
|
58473
|
+
${indentation} IMPORTING
|
|
58473
58474
|
${indentation} output = ${uniqueName}.\n`;
|
|
58474
58475
|
const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), code);
|
|
58475
58476
|
const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, child.getFirstToken().getStart(), child.getLastToken().getEnd(), uniqueName);
|
|
@@ -59781,12 +59782,12 @@ class EasyToFindMessages {
|
|
|
59781
59782
|
key: "easy_to_find_messages",
|
|
59782
59783
|
title: "Easy to find messages",
|
|
59783
59784
|
shortDescription: `Make messages easy to find`,
|
|
59784
|
-
extendedInformation: `All messages must be statically referenced exactly once
|
|
59785
|
-
|
|
59786
|
-
Only MESSAGE and RAISE statments are counted as static references
|
|
59787
|
-
|
|
59788
|
-
Also see rule "message_exists"
|
|
59789
|
-
|
|
59785
|
+
extendedInformation: `All messages must be statically referenced exactly once
|
|
59786
|
+
|
|
59787
|
+
Only MESSAGE and RAISE statments are counted as static references
|
|
59788
|
+
|
|
59789
|
+
Also see rule "message_exists"
|
|
59790
|
+
|
|
59790
59791
|
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#make-messages-easy-to-find`,
|
|
59791
59792
|
tags: [_irule_1.RuleTag.Styleguide],
|
|
59792
59793
|
};
|
|
@@ -59871,8 +59872,8 @@ class EmptyLineinStatement extends _abap_rule_1.ABAPRule {
|
|
|
59871
59872
|
key: "empty_line_in_statement",
|
|
59872
59873
|
title: "Find empty lines in statements",
|
|
59873
59874
|
shortDescription: `Checks that statements do not contain empty lines.`,
|
|
59874
|
-
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
|
|
59875
|
-
|
|
59875
|
+
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
|
|
59876
|
+
|
|
59876
59877
|
https://docs.abapopenchecks.org/checks/41/`,
|
|
59877
59878
|
tags: [_irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
|
|
59878
59879
|
badExample: `WRITE\n\nhello.`,
|
|
@@ -60048,13 +60049,13 @@ class EmptyStructure extends _abap_rule_1.ABAPRule {
|
|
|
60048
60049
|
shortDescription: `Checks that the code does not contain empty blocks.`,
|
|
60049
60050
|
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-empty-if-branches`,
|
|
60050
60051
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
60051
|
-
badExample: `IF foo = bar.
|
|
60052
|
-
ENDIF.
|
|
60053
|
-
|
|
60054
|
-
DO 2 TIMES.
|
|
60052
|
+
badExample: `IF foo = bar.
|
|
60053
|
+
ENDIF.
|
|
60054
|
+
|
|
60055
|
+
DO 2 TIMES.
|
|
60055
60056
|
ENDDO.`,
|
|
60056
|
-
goodExample: `LOOP AT itab WHERE qty = 0 OR date > sy-datum.
|
|
60057
|
-
ENDLOOP.
|
|
60057
|
+
goodExample: `LOOP AT itab WHERE qty = 0 OR date > sy-datum.
|
|
60058
|
+
ENDLOOP.
|
|
60058
60059
|
result = xsdbool( sy-subrc = 0 ).`,
|
|
60059
60060
|
};
|
|
60060
60061
|
}
|
|
@@ -60196,10 +60197,10 @@ class ExitOrCheck extends _abap_rule_1.ABAPRule {
|
|
|
60196
60197
|
return {
|
|
60197
60198
|
key: "exit_or_check",
|
|
60198
60199
|
title: "Find EXIT or CHECK outside loops",
|
|
60199
|
-
shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
|
|
60200
|
+
shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
|
|
60200
60201
|
Use RETURN to leave procesing blocks instead.`,
|
|
60201
|
-
extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
|
|
60202
|
-
https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
|
|
60202
|
+
extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
|
|
60203
|
+
https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
|
|
60203
60204
|
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#check-vs-return`,
|
|
60204
60205
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
|
|
60205
60206
|
};
|
|
@@ -60282,12 +60283,12 @@ class ExpandMacros extends _abap_rule_1.ABAPRule {
|
|
|
60282
60283
|
key: "expand_macros",
|
|
60283
60284
|
title: "Expand Macros",
|
|
60284
60285
|
shortDescription: `Allows expanding macro calls with quick fixes`,
|
|
60285
|
-
extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
|
|
60286
|
-
|
|
60286
|
+
extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
|
|
60287
|
+
|
|
60287
60288
|
Note that macros/DEFINE cannot be used in the ABAP Cloud programming model`,
|
|
60288
|
-
badExample: `DEFINE _hello.
|
|
60289
|
-
WRITE 'hello'.
|
|
60290
|
-
END-OF-DEFINITION.
|
|
60289
|
+
badExample: `DEFINE _hello.
|
|
60290
|
+
WRITE 'hello'.
|
|
60291
|
+
END-OF-DEFINITION.
|
|
60291
60292
|
_hello.`,
|
|
60292
60293
|
goodExample: `WRITE 'hello'.`,
|
|
60293
60294
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
|
|
@@ -60374,7 +60375,7 @@ class Exporting extends _abap_rule_1.ABAPRule {
|
|
|
60374
60375
|
shortDescription: `Detects EXPORTING statements which can be omitted.`,
|
|
60375
60376
|
badExample: `call_method( EXPORTING foo = bar ).`,
|
|
60376
60377
|
goodExample: `call_method( foo = bar ).`,
|
|
60377
|
-
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-optional-keyword-exporting
|
|
60378
|
+
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-optional-keyword-exporting
|
|
60378
60379
|
https://docs.abapopenchecks.org/checks/30/`,
|
|
60379
60380
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
|
|
60380
60381
|
};
|
|
@@ -60472,7 +60473,7 @@ class ForbiddenIdentifier extends _abap_rule_1.ABAPRule {
|
|
|
60472
60473
|
key: "forbidden_identifier",
|
|
60473
60474
|
title: "Forbidden Identifier",
|
|
60474
60475
|
shortDescription: `Forbid use of specified identifiers, list of regex.`,
|
|
60475
|
-
extendedInformation: `Used in the transpiler to find javascript keywords in ABAP identifiers,
|
|
60476
|
+
extendedInformation: `Used in the transpiler to find javascript keywords in ABAP identifiers,
|
|
60476
60477
|
https://github.com/abaplint/transpiler/blob/bda94b8b56e2b7f2f87be2168f12361aa530220e/packages/transpiler/src/validation.ts#L44`,
|
|
60477
60478
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
60478
60479
|
};
|
|
@@ -60714,8 +60715,8 @@ class ForbiddenVoidType {
|
|
|
60714
60715
|
key: "forbidden_void_type",
|
|
60715
60716
|
title: "Forbidden Void Types",
|
|
60716
60717
|
shortDescription: `Avoid usage of specified void types.`,
|
|
60717
|
-
extendedInformation: `Inspiration:
|
|
60718
|
-
BOOLEAN, BOOLE_D, CHAR01, CHAR1, CHAR10, CHAR12, CHAR128, CHAR2, CHAR20, CHAR4, CHAR70,
|
|
60718
|
+
extendedInformation: `Inspiration:
|
|
60719
|
+
BOOLEAN, BOOLE_D, CHAR01, CHAR1, CHAR10, CHAR12, CHAR128, CHAR2, CHAR20, CHAR4, CHAR70,
|
|
60719
60720
|
DATS, TIMS, DATUM, FLAG, INT4, NUMC3, NUMC4, SAP_BOOL, TEXT25, TEXT80, X255, XFELD`,
|
|
60720
60721
|
};
|
|
60721
60722
|
}
|
|
@@ -60958,7 +60959,7 @@ class FullyTypeITabs extends _abap_rule_1.ABAPRule {
|
|
|
60958
60959
|
key: "fully_type_itabs",
|
|
60959
60960
|
title: "Fully type internal tables",
|
|
60960
60961
|
shortDescription: `No implict table types or table keys`,
|
|
60961
|
-
badExample: `DATA lt_foo TYPE TABLE OF ty.
|
|
60962
|
+
badExample: `DATA lt_foo TYPE TABLE OF ty.
|
|
60962
60963
|
DATA lt_bar TYPE STANDARD TABLE OF ty.`,
|
|
60963
60964
|
goodExample: `DATA lt_foo TYPE STANDARD TABLE OF ty WITH EMPTY KEY.`,
|
|
60964
60965
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
@@ -61143,26 +61144,26 @@ class FunctionalWriting extends _abap_rule_1.ABAPRule {
|
|
|
61143
61144
|
key: "functional_writing",
|
|
61144
61145
|
title: "Use functional writing",
|
|
61145
61146
|
shortDescription: `Detects usage of call method when functional style calls can be used.`,
|
|
61146
|
-
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-calls
|
|
61147
|
+
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-calls
|
|
61147
61148
|
https://docs.abapopenchecks.org/checks/07/`,
|
|
61148
61149
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
|
|
61149
|
-
badExample: `CALL METHOD zcl_class=>method( ).
|
|
61150
|
-
CALL METHOD cl_abap_typedescr=>describe_by_name
|
|
61151
|
-
EXPORTING
|
|
61152
|
-
p_name = 'NAME'
|
|
61153
|
-
RECEIVING
|
|
61154
|
-
p_descr_ref = lr_typedescr
|
|
61155
|
-
EXCEPTIONS
|
|
61156
|
-
type_not_found = 1
|
|
61150
|
+
badExample: `CALL METHOD zcl_class=>method( ).
|
|
61151
|
+
CALL METHOD cl_abap_typedescr=>describe_by_name
|
|
61152
|
+
EXPORTING
|
|
61153
|
+
p_name = 'NAME'
|
|
61154
|
+
RECEIVING
|
|
61155
|
+
p_descr_ref = lr_typedescr
|
|
61156
|
+
EXCEPTIONS
|
|
61157
|
+
type_not_found = 1
|
|
61157
61158
|
OTHERS = 2.`,
|
|
61158
|
-
goodExample: `zcl_class=>method( ).
|
|
61159
|
-
cl_abap_typedescr=>describe_by_name(
|
|
61160
|
-
EXPORTING
|
|
61161
|
-
p_name = 'NAME'
|
|
61162
|
-
RECEIVING
|
|
61163
|
-
p_descr_ref = lr_typedescr
|
|
61164
|
-
EXCEPTIONS
|
|
61165
|
-
type_not_found = 1
|
|
61159
|
+
goodExample: `zcl_class=>method( ).
|
|
61160
|
+
cl_abap_typedescr=>describe_by_name(
|
|
61161
|
+
EXPORTING
|
|
61162
|
+
p_name = 'NAME'
|
|
61163
|
+
RECEIVING
|
|
61164
|
+
p_descr_ref = lr_typedescr
|
|
61165
|
+
EXCEPTIONS
|
|
61166
|
+
type_not_found = 1
|
|
61166
61167
|
OTHERS = 2 ).`,
|
|
61167
61168
|
};
|
|
61168
61169
|
}
|
|
@@ -61273,14 +61274,14 @@ class GlobalClass extends _abap_rule_1.ABAPRule {
|
|
|
61273
61274
|
key: "global_class",
|
|
61274
61275
|
title: "Global class checks",
|
|
61275
61276
|
shortDescription: `Checks related to global classes`,
|
|
61276
|
-
extendedInformation: `* global classes must be in own files
|
|
61277
|
-
|
|
61278
|
-
* file names must match class name
|
|
61279
|
-
|
|
61280
|
-
* file names must match interface name
|
|
61281
|
-
|
|
61282
|
-
* global classes must be global definitions
|
|
61283
|
-
|
|
61277
|
+
extendedInformation: `* global classes must be in own files
|
|
61278
|
+
|
|
61279
|
+
* file names must match class name
|
|
61280
|
+
|
|
61281
|
+
* file names must match interface name
|
|
61282
|
+
|
|
61283
|
+
* global classes must be global definitions
|
|
61284
|
+
|
|
61284
61285
|
* global interfaces must be global definitions`,
|
|
61285
61286
|
tags: [_irule_1.RuleTag.Syntax],
|
|
61286
61287
|
};
|
|
@@ -61379,21 +61380,21 @@ class IdenticalConditions extends _abap_rule_1.ABAPRule {
|
|
|
61379
61380
|
return {
|
|
61380
61381
|
key: "identical_conditions",
|
|
61381
61382
|
title: "Identical conditions",
|
|
61382
|
-
shortDescription: `Find identical conditions in IF + CASE + WHILE etc
|
|
61383
|
-
|
|
61383
|
+
shortDescription: `Find identical conditions in IF + CASE + WHILE etc
|
|
61384
|
+
|
|
61384
61385
|
Prerequsites: code is pretty printed with identical cAsE`,
|
|
61385
61386
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
61386
|
-
badExample: `IF foo = bar OR 1 = a OR foo = bar.
|
|
61387
|
-
ENDIF.
|
|
61388
|
-
CASE bar.
|
|
61389
|
-
WHEN '1'.
|
|
61390
|
-
WHEN 'A' OR '1'.
|
|
61387
|
+
badExample: `IF foo = bar OR 1 = a OR foo = bar.
|
|
61388
|
+
ENDIF.
|
|
61389
|
+
CASE bar.
|
|
61390
|
+
WHEN '1'.
|
|
61391
|
+
WHEN 'A' OR '1'.
|
|
61391
61392
|
ENDCASE.`,
|
|
61392
|
-
goodExample: `IF foo = bar OR 1 = a.
|
|
61393
|
-
ENDIF.
|
|
61394
|
-
CASE bar.
|
|
61395
|
-
WHEN '1'.
|
|
61396
|
-
WHEN 'A'.
|
|
61393
|
+
goodExample: `IF foo = bar OR 1 = a.
|
|
61394
|
+
ENDIF.
|
|
61395
|
+
CASE bar.
|
|
61396
|
+
WHEN '1'.
|
|
61397
|
+
WHEN 'A'.
|
|
61397
61398
|
ENDCASE.`,
|
|
61398
61399
|
};
|
|
61399
61400
|
}
|
|
@@ -61527,23 +61528,23 @@ class IdenticalContents extends _abap_rule_1.ABAPRule {
|
|
|
61527
61528
|
key: "identical_contents",
|
|
61528
61529
|
title: "Identical contents",
|
|
61529
61530
|
shortDescription: `Find identical contents in blocks inside IFs, both in the beginning and in the end.`,
|
|
61530
|
-
extendedInformation: `
|
|
61531
|
-
Prerequsites: code is pretty printed with identical cAsE
|
|
61532
|
-
|
|
61531
|
+
extendedInformation: `
|
|
61532
|
+
Prerequsites: code is pretty printed with identical cAsE
|
|
61533
|
+
|
|
61533
61534
|
Chained statments are ignored`,
|
|
61534
61535
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
61535
|
-
badExample: `IF foo = bar.
|
|
61536
|
-
WRITE 'bar'.
|
|
61537
|
-
WRITE 'world'.
|
|
61538
|
-
ELSE.
|
|
61539
|
-
WRITE 'foo'.
|
|
61540
|
-
WRITE 'world'.
|
|
61536
|
+
badExample: `IF foo = bar.
|
|
61537
|
+
WRITE 'bar'.
|
|
61538
|
+
WRITE 'world'.
|
|
61539
|
+
ELSE.
|
|
61540
|
+
WRITE 'foo'.
|
|
61541
|
+
WRITE 'world'.
|
|
61541
61542
|
ENDIF.`,
|
|
61542
|
-
goodExample: `IF foo = bar.
|
|
61543
|
-
WRITE 'bar'.
|
|
61544
|
-
ELSE.
|
|
61545
|
-
WRITE 'foo'.
|
|
61546
|
-
ENDIF.
|
|
61543
|
+
goodExample: `IF foo = bar.
|
|
61544
|
+
WRITE 'bar'.
|
|
61545
|
+
ELSE.
|
|
61546
|
+
WRITE 'foo'.
|
|
61547
|
+
ENDIF.
|
|
61547
61548
|
WRITE 'world'.`,
|
|
61548
61549
|
};
|
|
61549
61550
|
}
|
|
@@ -61651,12 +61652,12 @@ class IdenticalDescriptions {
|
|
|
61651
61652
|
key: "identical_descriptions",
|
|
61652
61653
|
title: "Identical descriptions",
|
|
61653
61654
|
shortDescription: `Searches for objects with the same type and same description`,
|
|
61654
|
-
extendedInformation: `Case insensitive
|
|
61655
|
-
|
|
61656
|
-
Only checks the master language descriptions
|
|
61657
|
-
|
|
61658
|
-
Dependencies are skipped
|
|
61659
|
-
|
|
61655
|
+
extendedInformation: `Case insensitive
|
|
61656
|
+
|
|
61657
|
+
Only checks the master language descriptions
|
|
61658
|
+
|
|
61659
|
+
Dependencies are skipped
|
|
61660
|
+
|
|
61660
61661
|
Works for: INTF, CLAS, DOMA, DTEL, FUNC in same FUGR`,
|
|
61661
61662
|
tags: [],
|
|
61662
61663
|
};
|
|
@@ -61830,43 +61831,43 @@ class IfInIf extends _abap_rule_1.ABAPRule {
|
|
|
61830
61831
|
key: "if_in_if",
|
|
61831
61832
|
title: "IF in IF",
|
|
61832
61833
|
shortDescription: `Detects nested ifs which can be refactored.`,
|
|
61833
|
-
extendedInformation: `
|
|
61834
|
-
Directly nested IFs without ELSE can be refactored to a single condition using AND.
|
|
61835
|
-
|
|
61836
|
-
ELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.
|
|
61837
|
-
|
|
61838
|
-
https://docs.abapopenchecks.org/checks/01/
|
|
61834
|
+
extendedInformation: `
|
|
61835
|
+
Directly nested IFs without ELSE can be refactored to a single condition using AND.
|
|
61836
|
+
|
|
61837
|
+
ELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.
|
|
61838
|
+
|
|
61839
|
+
https://docs.abapopenchecks.org/checks/01/
|
|
61839
61840
|
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low`,
|
|
61840
|
-
badExample: `IF condition1.
|
|
61841
|
-
IF condition2.
|
|
61842
|
-
...
|
|
61843
|
-
ENDIF.
|
|
61844
|
-
ENDIF.
|
|
61845
|
-
|
|
61846
|
-
IF condition1.
|
|
61847
|
-
...
|
|
61848
|
-
ELSE.
|
|
61849
|
-
IF condition2.
|
|
61850
|
-
...
|
|
61851
|
-
ENDIF.
|
|
61841
|
+
badExample: `IF condition1.
|
|
61842
|
+
IF condition2.
|
|
61843
|
+
...
|
|
61844
|
+
ENDIF.
|
|
61845
|
+
ENDIF.
|
|
61846
|
+
|
|
61847
|
+
IF condition1.
|
|
61848
|
+
...
|
|
61849
|
+
ELSE.
|
|
61850
|
+
IF condition2.
|
|
61851
|
+
...
|
|
61852
|
+
ENDIF.
|
|
61852
61853
|
ENDIF.`,
|
|
61853
|
-
goodExample: `IF ( condition1 ) AND ( condition2 ).
|
|
61854
|
-
...
|
|
61855
|
-
ENDIF.
|
|
61856
|
-
|
|
61857
|
-
IF condition1.
|
|
61858
|
-
...
|
|
61859
|
-
ELSEIF condition2.
|
|
61860
|
-
...
|
|
61861
|
-
ENDIF.
|
|
61862
|
-
|
|
61863
|
-
CASE variable.
|
|
61864
|
-
WHEN value1.
|
|
61865
|
-
...
|
|
61866
|
-
WHEN value2.
|
|
61867
|
-
IF condition2.
|
|
61868
|
-
...
|
|
61869
|
-
ENDIF.
|
|
61854
|
+
goodExample: `IF ( condition1 ) AND ( condition2 ).
|
|
61855
|
+
...
|
|
61856
|
+
ENDIF.
|
|
61857
|
+
|
|
61858
|
+
IF condition1.
|
|
61859
|
+
...
|
|
61860
|
+
ELSEIF condition2.
|
|
61861
|
+
...
|
|
61862
|
+
ENDIF.
|
|
61863
|
+
|
|
61864
|
+
CASE variable.
|
|
61865
|
+
WHEN value1.
|
|
61866
|
+
...
|
|
61867
|
+
WHEN value2.
|
|
61868
|
+
IF condition2.
|
|
61869
|
+
...
|
|
61870
|
+
ENDIF.
|
|
61870
61871
|
ENDCASE.`,
|
|
61871
61872
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
|
|
61872
61873
|
};
|
|
@@ -62051,9 +62052,9 @@ class ImplementMethods extends _abap_rule_1.ABAPRule {
|
|
|
62051
62052
|
for (const i of ((_a = file.getStructure()) === null || _a === void 0 ? void 0 : _a.findAllStatements(Statements.ClassImplementation)) || []) {
|
|
62052
62053
|
const name = (_b = i.findFirstExpression(Expressions.ClassName)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr().toUpperCase();
|
|
62053
62054
|
if (name === impl.identifier.getName().toUpperCase()) {
|
|
62054
|
-
return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
|
|
62055
|
-
METHOD ${methodName.toLowerCase()}.
|
|
62056
|
-
RETURN. " todo, implement method
|
|
62055
|
+
return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
|
|
62056
|
+
METHOD ${methodName.toLowerCase()}.
|
|
62057
|
+
RETURN. " todo, implement method
|
|
62057
62058
|
ENDMETHOD.`);
|
|
62058
62059
|
}
|
|
62059
62060
|
}
|
|
@@ -62241,19 +62242,19 @@ class InStatementIndentation extends _abap_rule_1.ABAPRule {
|
|
|
62241
62242
|
key: "in_statement_indentation",
|
|
62242
62243
|
title: "In-statement indentation",
|
|
62243
62244
|
shortDescription: "Checks alignment within statements which span multiple lines.",
|
|
62244
|
-
extendedInformation: `Lines following the first line should be indented once (2 spaces).
|
|
62245
|
-
|
|
62246
|
-
For block declaration statements, lines after the first should be indented an additional time (default: +2 spaces)
|
|
62245
|
+
extendedInformation: `Lines following the first line should be indented once (2 spaces).
|
|
62246
|
+
|
|
62247
|
+
For block declaration statements, lines after the first should be indented an additional time (default: +2 spaces)
|
|
62247
62248
|
to distinguish them better from code within the block.`,
|
|
62248
|
-
badExample: `IF 1 = 1
|
|
62249
|
-
AND 2 = 2.
|
|
62250
|
-
WRITE 'hello' &&
|
|
62251
|
-
'world'.
|
|
62249
|
+
badExample: `IF 1 = 1
|
|
62250
|
+
AND 2 = 2.
|
|
62251
|
+
WRITE 'hello' &&
|
|
62252
|
+
'world'.
|
|
62252
62253
|
ENDIF.`,
|
|
62253
|
-
goodExample: `IF 1 = 1
|
|
62254
|
-
AND 2 = 2.
|
|
62255
|
-
WRITE 'hello' &&
|
|
62256
|
-
'world'.
|
|
62254
|
+
goodExample: `IF 1 = 1
|
|
62255
|
+
AND 2 = 2.
|
|
62256
|
+
WRITE 'hello' &&
|
|
62257
|
+
'world'.
|
|
62257
62258
|
ENDIF.`,
|
|
62258
62259
|
tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
|
|
62259
62260
|
};
|
|
@@ -62376,23 +62377,23 @@ class Indentation extends _abap_rule_1.ABAPRule {
|
|
|
62376
62377
|
title: "Indentation",
|
|
62377
62378
|
shortDescription: `Checks indentation`,
|
|
62378
62379
|
tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
|
|
62379
|
-
badExample: `CLASS lcl DEFINITION.
|
|
62380
|
-
PRIVATE SECTION.
|
|
62381
|
-
METHODS constructor.
|
|
62382
|
-
ENDCLASS.
|
|
62383
|
-
|
|
62384
|
-
CLASS lcl IMPLEMENTATION.
|
|
62385
|
-
METHOD constructor.
|
|
62386
|
-
ENDMETHOD.
|
|
62380
|
+
badExample: `CLASS lcl DEFINITION.
|
|
62381
|
+
PRIVATE SECTION.
|
|
62382
|
+
METHODS constructor.
|
|
62383
|
+
ENDCLASS.
|
|
62384
|
+
|
|
62385
|
+
CLASS lcl IMPLEMENTATION.
|
|
62386
|
+
METHOD constructor.
|
|
62387
|
+
ENDMETHOD.
|
|
62387
62388
|
ENDCLASS.`,
|
|
62388
|
-
goodExample: `CLASS lcl DEFINITION.
|
|
62389
|
-
PRIVATE SECTION.
|
|
62390
|
-
METHODS constructor.
|
|
62391
|
-
ENDCLASS.
|
|
62392
|
-
|
|
62393
|
-
CLASS lcl IMPLEMENTATION.
|
|
62394
|
-
METHOD constructor.
|
|
62395
|
-
ENDMETHOD.
|
|
62389
|
+
goodExample: `CLASS lcl DEFINITION.
|
|
62390
|
+
PRIVATE SECTION.
|
|
62391
|
+
METHODS constructor.
|
|
62392
|
+
ENDCLASS.
|
|
62393
|
+
|
|
62394
|
+
CLASS lcl IMPLEMENTATION.
|
|
62395
|
+
METHOD constructor.
|
|
62396
|
+
ENDMETHOD.
|
|
62396
62397
|
ENDCLASS.`,
|
|
62397
62398
|
};
|
|
62398
62399
|
}
|
|
@@ -62781,9 +62782,9 @@ class IntfReferencingClas {
|
|
|
62781
62782
|
key: "intf_referencing_clas",
|
|
62782
62783
|
title: "INTF referencing CLAS",
|
|
62783
62784
|
shortDescription: `Interface contains references to class`,
|
|
62784
|
-
extendedInformation: `Only global interfaces are checked.
|
|
62785
|
-
Only first level references are checked.
|
|
62786
|
-
Exception class references are ignored.
|
|
62785
|
+
extendedInformation: `Only global interfaces are checked.
|
|
62786
|
+
Only first level references are checked.
|
|
62787
|
+
Exception class references are ignored.
|
|
62787
62788
|
Void references are ignored.`,
|
|
62788
62789
|
};
|
|
62789
62790
|
}
|
|
@@ -62868,9 +62869,9 @@ class InvalidTableIndex extends _abap_rule_1.ABAPRule {
|
|
|
62868
62869
|
title: "Invalid Table Index",
|
|
62869
62870
|
shortDescription: `Issues error for constant table index zero, as ABAP starts from 1`,
|
|
62870
62871
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
|
|
62871
|
-
badExample: `DATA(first) = table[ 0 ].
|
|
62872
|
+
badExample: `DATA(first) = table[ 0 ].
|
|
62872
62873
|
READ TABLE gt_stack ASSIGNING <ls_stack> INDEX 0.`,
|
|
62873
|
-
goodExample: `DATA(first) = table[ 1 ].
|
|
62874
|
+
goodExample: `DATA(first) = table[ 1 ].
|
|
62874
62875
|
READ TABLE gt_stack ASSIGNING <ls_stack> INDEX 1.`,
|
|
62875
62876
|
};
|
|
62876
62877
|
}
|
|
@@ -63471,8 +63472,8 @@ class LineBreakStyle {
|
|
|
63471
63472
|
return {
|
|
63472
63473
|
key: "line_break_style",
|
|
63473
63474
|
title: "Makes sure line breaks are consistent in the ABAP code",
|
|
63474
|
-
shortDescription: `Enforces LF as newlines in ABAP files
|
|
63475
|
-
|
|
63475
|
+
shortDescription: `Enforces LF as newlines in ABAP files
|
|
63476
|
+
|
|
63476
63477
|
abapGit does not work with CRLF`,
|
|
63477
63478
|
tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
|
|
63478
63479
|
};
|
|
@@ -63541,7 +63542,7 @@ class LineLength extends _abap_rule_1.ABAPRule {
|
|
|
63541
63542
|
key: "line_length",
|
|
63542
63543
|
title: "Line length",
|
|
63543
63544
|
shortDescription: `Detects lines exceeding the provided maximum length.`,
|
|
63544
|
-
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length
|
|
63545
|
+
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length
|
|
63545
63546
|
https://docs.abapopenchecks.org/checks/04/`,
|
|
63546
63547
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
63547
63548
|
};
|
|
@@ -63612,7 +63613,7 @@ class LineOnlyPunc extends _abap_rule_1.ABAPRule {
|
|
|
63612
63613
|
key: "line_only_punc",
|
|
63613
63614
|
title: "Line containing only punctuation",
|
|
63614
63615
|
shortDescription: `Detects lines containing only punctuation.`,
|
|
63615
|
-
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#close-brackets-at-line-end
|
|
63616
|
+
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#close-brackets-at-line-end
|
|
63616
63617
|
https://docs.abapopenchecks.org/checks/16/`,
|
|
63617
63618
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
|
|
63618
63619
|
badExample: "zcl_class=>method(\n).",
|
|
@@ -63872,15 +63873,15 @@ class LocalVariableNames extends _abap_rule_1.ABAPRule {
|
|
|
63872
63873
|
return {
|
|
63873
63874
|
key: "local_variable_names",
|
|
63874
63875
|
title: "Local variable naming conventions",
|
|
63875
|
-
shortDescription: `
|
|
63876
|
-
Allows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols.
|
|
63876
|
+
shortDescription: `
|
|
63877
|
+
Allows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols.
|
|
63877
63878
|
Regexes are case-insensitive.`,
|
|
63878
63879
|
tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
|
|
63879
|
-
badExample: `FORM bar.
|
|
63880
|
-
DATA foo.
|
|
63880
|
+
badExample: `FORM bar.
|
|
63881
|
+
DATA foo.
|
|
63881
63882
|
ENDFORM.`,
|
|
63882
|
-
goodExample: `FORM bar.
|
|
63883
|
-
DATA lv_foo.
|
|
63883
|
+
goodExample: `FORM bar.
|
|
63884
|
+
DATA lv_foo.
|
|
63884
63885
|
ENDFORM.`,
|
|
63885
63886
|
};
|
|
63886
63887
|
}
|
|
@@ -64103,10 +64104,10 @@ class MainFileContents {
|
|
|
64103
64104
|
key: "main_file_contents",
|
|
64104
64105
|
title: "Main file contents",
|
|
64105
64106
|
shortDescription: `Checks related to report declarations.`,
|
|
64106
|
-
extendedInformation: `Does not run if the target version is Cloud
|
|
64107
|
-
|
|
64108
|
-
* PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
|
|
64109
|
-
* TYPEs must begin with "TYPE-POOL <name>."
|
|
64107
|
+
extendedInformation: `Does not run if the target version is Cloud
|
|
64108
|
+
|
|
64109
|
+
* PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
|
|
64110
|
+
* TYPEs must begin with "TYPE-POOL <name>."
|
|
64110
64111
|
`,
|
|
64111
64112
|
};
|
|
64112
64113
|
}
|
|
@@ -64222,17 +64223,17 @@ class ManyParentheses extends _abap_rule_1.ABAPRule {
|
|
|
64222
64223
|
title: "Too many parentheses",
|
|
64223
64224
|
shortDescription: `Searches for expressions where extra parentheses can safely be removed`,
|
|
64224
64225
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
|
|
64225
|
-
badExample: `
|
|
64226
|
-
IF ( destination IS INITIAL ).
|
|
64227
|
-
ENDIF.
|
|
64228
|
-
IF foo = boo AND ( bar = lar AND moo = loo ).
|
|
64229
|
-
ENDIF.
|
|
64226
|
+
badExample: `
|
|
64227
|
+
IF ( destination IS INITIAL ).
|
|
64228
|
+
ENDIF.
|
|
64229
|
+
IF foo = boo AND ( bar = lar AND moo = loo ).
|
|
64230
|
+
ENDIF.
|
|
64230
64231
|
`,
|
|
64231
|
-
goodExample: `
|
|
64232
|
-
IF destination IS INITIAL.
|
|
64233
|
-
ENDIF.
|
|
64234
|
-
IF foo = boo AND bar = lar AND moo = loo.
|
|
64235
|
-
ENDIF.
|
|
64232
|
+
goodExample: `
|
|
64233
|
+
IF destination IS INITIAL.
|
|
64234
|
+
ENDIF.
|
|
64235
|
+
IF foo = boo AND bar = lar AND moo = loo.
|
|
64236
|
+
ENDIF.
|
|
64236
64237
|
`,
|
|
64237
64238
|
};
|
|
64238
64239
|
}
|
|
@@ -64406,14 +64407,14 @@ class MaxOneMethodParameterPerLine extends _abap_rule_1.ABAPRule {
|
|
|
64406
64407
|
title: "Max one method parameter definition per line",
|
|
64407
64408
|
shortDescription: `Keep max one method parameter description per line`,
|
|
64408
64409
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace],
|
|
64409
|
-
badExample: `
|
|
64410
|
-
METHODS apps_scope_token
|
|
64411
|
-
IMPORTING
|
|
64410
|
+
badExample: `
|
|
64411
|
+
METHODS apps_scope_token
|
|
64412
|
+
IMPORTING
|
|
64412
64413
|
body TYPE bodyapps_scope_token client_id TYPE str.`,
|
|
64413
|
-
goodExample: `
|
|
64414
|
-
METHODS apps_scope_token
|
|
64415
|
-
IMPORTING
|
|
64416
|
-
body TYPE bodyapps_scope_token
|
|
64414
|
+
goodExample: `
|
|
64415
|
+
METHODS apps_scope_token
|
|
64416
|
+
IMPORTING
|
|
64417
|
+
body TYPE bodyapps_scope_token
|
|
64417
64418
|
client_id TYPE str.`,
|
|
64418
64419
|
};
|
|
64419
64420
|
}
|
|
@@ -64478,11 +64479,11 @@ class MaxOneStatement extends _abap_rule_1.ABAPRule {
|
|
|
64478
64479
|
key: "max_one_statement",
|
|
64479
64480
|
title: "Max one statement per line",
|
|
64480
64481
|
shortDescription: `Checks that each line contains only a single statement.`,
|
|
64481
|
-
extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
|
|
64482
|
-
|
|
64483
|
-
Does not report anything for chained statements.
|
|
64484
|
-
|
|
64485
|
-
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line
|
|
64482
|
+
extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
|
|
64483
|
+
|
|
64484
|
+
Does not report anything for chained statements.
|
|
64485
|
+
|
|
64486
|
+
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line
|
|
64486
64487
|
https://docs.abapopenchecks.org/checks/11/`,
|
|
64487
64488
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
|
|
64488
64489
|
badExample: `WRITE foo. WRITE bar.`,
|
|
@@ -64820,8 +64821,8 @@ class MethodLength {
|
|
|
64820
64821
|
key: "method_length",
|
|
64821
64822
|
title: "Method/Form Length",
|
|
64822
64823
|
shortDescription: `Checks relating to method/form length.`,
|
|
64823
|
-
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
|
|
64824
|
-
|
|
64824
|
+
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
|
|
64825
|
+
|
|
64825
64826
|
Abstract methods without statements are considered okay.`,
|
|
64826
64827
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
64827
64828
|
};
|
|
@@ -64926,20 +64927,20 @@ class MethodOverwritesBuiltIn extends _abap_rule_1.ABAPRule {
|
|
|
64926
64927
|
key: "method_overwrites_builtin",
|
|
64927
64928
|
title: "Method name overwrites builtin function",
|
|
64928
64929
|
shortDescription: `Checks Method names that overwrite builtin SAP functions`,
|
|
64929
|
-
extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
|
|
64930
|
-
|
|
64931
|
-
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
|
|
64932
|
-
|
|
64930
|
+
extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
|
|
64931
|
+
|
|
64932
|
+
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
|
|
64933
|
+
|
|
64933
64934
|
Interface method names are ignored`,
|
|
64934
64935
|
tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
|
|
64935
|
-
badExample: `CLASS lcl DEFINITION.
|
|
64936
|
-
PUBLIC SECTION.
|
|
64937
|
-
METHODS matches.
|
|
64938
|
-
ENDCLASS.
|
|
64939
|
-
|
|
64940
|
-
CLASS lcl IMPLEMENTATION.
|
|
64941
|
-
METHOD matches.
|
|
64942
|
-
ENDMETHOD.
|
|
64936
|
+
badExample: `CLASS lcl DEFINITION.
|
|
64937
|
+
PUBLIC SECTION.
|
|
64938
|
+
METHODS matches.
|
|
64939
|
+
ENDCLASS.
|
|
64940
|
+
|
|
64941
|
+
CLASS lcl IMPLEMENTATION.
|
|
64942
|
+
METHOD matches.
|
|
64943
|
+
ENDMETHOD.
|
|
64943
64944
|
ENDCLASS.`,
|
|
64944
64945
|
};
|
|
64945
64946
|
}
|
|
@@ -65130,12 +65131,12 @@ class MixReturning extends _abap_rule_1.ABAPRule {
|
|
|
65130
65131
|
// eslint-disable-next-line max-len
|
|
65131
65132
|
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-either-returning-or-exporting-or-changing-but-not-a-combination`,
|
|
65132
65133
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
65133
|
-
badExample: `CLASS lcl DEFINITION.
|
|
65134
|
-
PUBLIC SECTION.
|
|
65135
|
-
METHODS
|
|
65136
|
-
foobar
|
|
65137
|
-
EXPORTING foo TYPE i
|
|
65138
|
-
RETURNING VALUE(rv_string) TYPE string.
|
|
65134
|
+
badExample: `CLASS lcl DEFINITION.
|
|
65135
|
+
PUBLIC SECTION.
|
|
65136
|
+
METHODS
|
|
65137
|
+
foobar
|
|
65138
|
+
EXPORTING foo TYPE i
|
|
65139
|
+
RETURNING VALUE(rv_string) TYPE string.
|
|
65139
65140
|
ENDCLASS.`,
|
|
65140
65141
|
};
|
|
65141
65142
|
}
|
|
@@ -65515,7 +65516,7 @@ class Nesting extends _abap_rule_1.ABAPRule {
|
|
|
65515
65516
|
key: "nesting",
|
|
65516
65517
|
title: "Check nesting depth",
|
|
65517
65518
|
shortDescription: `Checks for methods exceeding a maximum nesting depth`,
|
|
65518
|
-
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low
|
|
65519
|
+
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low
|
|
65519
65520
|
https://docs.abapopenchecks.org/checks/74/`,
|
|
65520
65521
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
65521
65522
|
};
|
|
@@ -65758,7 +65759,7 @@ class NoChainedAssignment extends _abap_rule_1.ABAPRule {
|
|
|
65758
65759
|
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-chain-assignments`,
|
|
65759
65760
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
|
|
65760
65761
|
badExample: `var1 = var2 = var3.`,
|
|
65761
|
-
goodExample: `var2 = var3.
|
|
65762
|
+
goodExample: `var2 = var3.
|
|
65762
65763
|
var1 = var2.`,
|
|
65763
65764
|
};
|
|
65764
65765
|
}
|
|
@@ -65817,8 +65818,8 @@ class NoExternalFormCalls extends _abap_rule_1.ABAPRule {
|
|
|
65817
65818
|
key: "no_external_form_calls",
|
|
65818
65819
|
title: "No external FORM calls",
|
|
65819
65820
|
shortDescription: `Detect external form calls`,
|
|
65820
|
-
badExample: `PERFORM foo IN PROGRAM bar.
|
|
65821
|
-
|
|
65821
|
+
badExample: `PERFORM foo IN PROGRAM bar.
|
|
65822
|
+
|
|
65822
65823
|
PERFORM foo(bar).`,
|
|
65823
65824
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
65824
65825
|
};
|
|
@@ -65879,17 +65880,17 @@ class NoInlineInOptionalBranches extends _abap_rule_1.ABAPRule {
|
|
|
65879
65880
|
key: "no_inline_in_optional_branches",
|
|
65880
65881
|
title: "Don't declare inline in optional branches",
|
|
65881
65882
|
shortDescription: `Don't declare inline in optional branches`,
|
|
65882
|
-
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
|
|
65883
|
-
|
|
65884
|
-
Considered optional branches:
|
|
65885
|
-
* inside IF/ELSEIF/ELSE
|
|
65886
|
-
* inside LOOP
|
|
65887
|
-
* inside WHILE
|
|
65888
|
-
* inside CASE/WHEN, CASE TYPE OF
|
|
65889
|
-
* inside DO
|
|
65890
|
-
* inside SELECT loops
|
|
65891
|
-
|
|
65892
|
-
Not considered optional branches:
|
|
65883
|
+
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
|
|
65884
|
+
|
|
65885
|
+
Considered optional branches:
|
|
65886
|
+
* inside IF/ELSEIF/ELSE
|
|
65887
|
+
* inside LOOP
|
|
65888
|
+
* inside WHILE
|
|
65889
|
+
* inside CASE/WHEN, CASE TYPE OF
|
|
65890
|
+
* inside DO
|
|
65891
|
+
* inside SELECT loops
|
|
65892
|
+
|
|
65893
|
+
Not considered optional branches:
|
|
65893
65894
|
* TRY/CATCH/CLEANUP`,
|
|
65894
65895
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
65895
65896
|
};
|
|
@@ -65989,12 +65990,12 @@ class NoPrefixes extends _abap_rule_1.ABAPRule {
|
|
|
65989
65990
|
key: "no_prefixes",
|
|
65990
65991
|
title: "No Prefixes",
|
|
65991
65992
|
shortDescription: `Dont use hungarian notation`,
|
|
65992
|
-
extendedInformation: `
|
|
65993
|
-
Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
|
|
65994
|
-
allowing all types to become voided, abaplint will then provide less precise syntax errors.
|
|
65995
|
-
|
|
65996
|
-
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
|
|
65997
|
-
|
|
65993
|
+
extendedInformation: `
|
|
65994
|
+
Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
|
|
65995
|
+
allowing all types to become voided, abaplint will then provide less precise syntax errors.
|
|
65996
|
+
|
|
65997
|
+
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
|
|
65998
|
+
|
|
65998
65999
|
https://github.com/SAP/styleguides/blob/main/clean-abap/sub-sections/AvoidEncodings.md`,
|
|
65999
66000
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
|
|
66000
66001
|
badExample: `DATA lv_foo TYPE i.`,
|
|
@@ -66173,7 +66174,7 @@ class NoPublicAttributes extends _abap_rule_1.ABAPRule {
|
|
|
66173
66174
|
return {
|
|
66174
66175
|
key: "no_public_attributes",
|
|
66175
66176
|
title: "No public attributes",
|
|
66176
|
-
shortDescription: `Checks that classes and interfaces don't contain any public attributes.
|
|
66177
|
+
shortDescription: `Checks that classes and interfaces don't contain any public attributes.
|
|
66177
66178
|
Exceptions are excluded from this rule.`,
|
|
66178
66179
|
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#members-private-by-default-protected-only-if-needed`,
|
|
66179
66180
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
@@ -66274,13 +66275,13 @@ class NoYodaConditions extends _abap_rule_1.ABAPRule {
|
|
|
66274
66275
|
key: "no_yoda_conditions",
|
|
66275
66276
|
title: "No Yoda conditions",
|
|
66276
66277
|
shortDescription: `Finds Yoda conditions and reports issues`,
|
|
66277
|
-
extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
|
|
66278
|
-
|
|
66278
|
+
extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
|
|
66279
|
+
|
|
66279
66280
|
Conditions with operators CP, NP, CS, NS, CA, NA, CO, CN are ignored`,
|
|
66280
66281
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
66281
|
-
badExample: `IF 0 <> sy-subrc.
|
|
66282
|
+
badExample: `IF 0 <> sy-subrc.
|
|
66282
66283
|
ENDIF.`,
|
|
66283
|
-
goodExample: `IF sy-subrc <> 0.
|
|
66284
|
+
goodExample: `IF sy-subrc <> 0.
|
|
66284
66285
|
ENDIF.`,
|
|
66285
66286
|
};
|
|
66286
66287
|
}
|
|
@@ -66381,8 +66382,8 @@ class NROBConsistency {
|
|
|
66381
66382
|
key: "nrob_consistency",
|
|
66382
66383
|
title: "Number range consistency",
|
|
66383
66384
|
shortDescription: `Consistency checks for number ranges`,
|
|
66384
|
-
extendedInformation: `Issue reported if percentage warning is over 50%
|
|
66385
|
-
|
|
66385
|
+
extendedInformation: `Issue reported if percentage warning is over 50%
|
|
66386
|
+
|
|
66386
66387
|
Issue reported if the referenced domain is not found(taking error namespace into account)`,
|
|
66387
66388
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
66388
66389
|
};
|
|
@@ -66659,58 +66660,58 @@ class ObsoleteStatement extends _abap_rule_1.ABAPRule {
|
|
|
66659
66660
|
title: "Obsolete statements",
|
|
66660
66661
|
shortDescription: `Checks for usages of certain obsolete statements`,
|
|
66661
66662
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
|
|
66662
|
-
extendedInformation: `
|
|
66663
|
-
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
|
|
66664
|
-
|
|
66665
|
-
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
|
|
66666
|
-
|
|
66667
|
-
SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
|
|
66668
|
-
|
|
66669
|
-
IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
|
|
66670
|
-
|
|
66671
|
-
WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
|
|
66672
|
-
|
|
66673
|
-
FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
|
|
66674
|
-
|
|
66675
|
-
TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
|
|
66676
|
-
|
|
66677
|
-
LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
|
|
66678
|
-
|
|
66679
|
-
COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
|
|
66680
|
-
|
|
66681
|
-
OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
|
|
66682
|
-
|
|
66683
|
-
PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
|
|
66684
|
-
|
|
66685
|
-
RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
|
|
66686
|
-
|
|
66687
|
-
PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
|
|
66688
|
-
|
|
66689
|
-
MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
|
|
66690
|
-
|
|
66691
|
-
SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
|
|
66692
|
-
SELECT COUNT(*) is considered okay
|
|
66693
|
-
|
|
66694
|
-
FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
|
|
66695
|
-
|
|
66696
|
-
SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
|
|
66697
|
-
|
|
66698
|
-
CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
|
|
66699
|
-
|
|
66700
|
-
POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
|
|
66701
|
-
|
|
66702
|
-
OCCURENCES: check for OCCURENCES vs OCCURRENCES
|
|
66703
|
-
|
|
66663
|
+
extendedInformation: `
|
|
66664
|
+
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
|
|
66665
|
+
|
|
66666
|
+
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
|
|
66667
|
+
|
|
66668
|
+
SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
|
|
66669
|
+
|
|
66670
|
+
IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
|
|
66671
|
+
|
|
66672
|
+
WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
|
|
66673
|
+
|
|
66674
|
+
FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
|
|
66675
|
+
|
|
66676
|
+
TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
|
|
66677
|
+
|
|
66678
|
+
LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
|
|
66679
|
+
|
|
66680
|
+
COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
|
|
66681
|
+
|
|
66682
|
+
OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
|
|
66683
|
+
|
|
66684
|
+
PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
|
|
66685
|
+
|
|
66686
|
+
RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
|
|
66687
|
+
|
|
66688
|
+
PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
|
|
66689
|
+
|
|
66690
|
+
MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
|
|
66691
|
+
|
|
66692
|
+
SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
|
|
66693
|
+
SELECT COUNT(*) is considered okay
|
|
66694
|
+
|
|
66695
|
+
FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
|
|
66696
|
+
|
|
66697
|
+
SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
|
|
66698
|
+
|
|
66699
|
+
CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
|
|
66700
|
+
|
|
66701
|
+
POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
|
|
66702
|
+
|
|
66703
|
+
OCCURENCES: check for OCCURENCES vs OCCURRENCES
|
|
66704
|
+
|
|
66704
66705
|
CLIENT SPECIFIED, from 754: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abapselect_client_obsolete.htm`,
|
|
66705
|
-
badExample: `REFRESH itab.
|
|
66706
|
-
|
|
66707
|
-
COMPUTE foo = 2 + 2.
|
|
66708
|
-
|
|
66709
|
-
MULTIPLY lv_foo BY 2.
|
|
66710
|
-
|
|
66711
|
-
INTERFACE intf LOAD.
|
|
66712
|
-
|
|
66713
|
-
IF foo IS SUPPLIED.
|
|
66706
|
+
badExample: `REFRESH itab.
|
|
66707
|
+
|
|
66708
|
+
COMPUTE foo = 2 + 2.
|
|
66709
|
+
|
|
66710
|
+
MULTIPLY lv_foo BY 2.
|
|
66711
|
+
|
|
66712
|
+
INTERFACE intf LOAD.
|
|
66713
|
+
|
|
66714
|
+
IF foo IS SUPPLIED.
|
|
66714
66715
|
ENDIF.`,
|
|
66715
66716
|
};
|
|
66716
66717
|
}
|
|
@@ -67050,9 +67051,9 @@ class OmitParameterName {
|
|
|
67050
67051
|
key: "omit_parameter_name",
|
|
67051
67052
|
title: "Omit parameter name",
|
|
67052
67053
|
shortDescription: `Omit the parameter name in single parameter calls`,
|
|
67053
|
-
extendedInformation: `
|
|
67054
|
-
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
|
|
67055
|
-
|
|
67054
|
+
extendedInformation: `
|
|
67055
|
+
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
|
|
67056
|
+
|
|
67056
67057
|
EXPORTING must already be omitted for this rule to take effect, https://rules.abaplint.org/exporting/`,
|
|
67057
67058
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
|
|
67058
67059
|
badExample: `method( param = 2 ).`,
|
|
@@ -67258,20 +67259,20 @@ class OmitReceiving extends _abap_rule_1.ABAPRule {
|
|
|
67258
67259
|
shortDescription: `Omit RECEIVING`,
|
|
67259
67260
|
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-receiving`,
|
|
67260
67261
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
67261
|
-
badExample: `
|
|
67262
|
-
upload_pack(
|
|
67263
|
-
EXPORTING
|
|
67264
|
-
io_client = lo_client
|
|
67265
|
-
iv_url = iv_url
|
|
67266
|
-
iv_deepen_level = iv_deepen_level
|
|
67267
|
-
it_hashes = lt_hashes
|
|
67268
|
-
RECEIVING
|
|
67262
|
+
badExample: `
|
|
67263
|
+
upload_pack(
|
|
67264
|
+
EXPORTING
|
|
67265
|
+
io_client = lo_client
|
|
67266
|
+
iv_url = iv_url
|
|
67267
|
+
iv_deepen_level = iv_deepen_level
|
|
67268
|
+
it_hashes = lt_hashes
|
|
67269
|
+
RECEIVING
|
|
67269
67270
|
rt_objects = et_objects ).`,
|
|
67270
|
-
goodExample: `
|
|
67271
|
-
et_objects = upload_pack(
|
|
67272
|
-
io_client = lo_client
|
|
67273
|
-
iv_url = iv_url
|
|
67274
|
-
iv_deepen_level = iv_deepen_level
|
|
67271
|
+
goodExample: `
|
|
67272
|
+
et_objects = upload_pack(
|
|
67273
|
+
io_client = lo_client
|
|
67274
|
+
iv_url = iv_url
|
|
67275
|
+
iv_deepen_level = iv_deepen_level
|
|
67275
67276
|
it_hashes = lt_hashes ).`,
|
|
67276
67277
|
};
|
|
67277
67278
|
}
|
|
@@ -67335,8 +67336,8 @@ class Parser702Chaining extends _abap_rule_1.ABAPRule {
|
|
|
67335
67336
|
return {
|
|
67336
67337
|
key: "parser_702_chaining",
|
|
67337
67338
|
title: "Parser Error, bad chanining on 702",
|
|
67338
|
-
shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
|
|
67339
|
-
this rule finds these and reports errors.
|
|
67339
|
+
shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
|
|
67340
|
+
this rule finds these and reports errors.
|
|
67340
67341
|
Only active on target version 702 and below.`,
|
|
67341
67342
|
tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
|
|
67342
67343
|
};
|
|
@@ -67416,8 +67417,8 @@ class ParserError {
|
|
|
67416
67417
|
return {
|
|
67417
67418
|
key: "parser_error",
|
|
67418
67419
|
title: "Parser error",
|
|
67419
|
-
shortDescription: `Checks for syntax not recognized by abaplint.
|
|
67420
|
-
|
|
67420
|
+
shortDescription: `Checks for syntax not recognized by abaplint.
|
|
67421
|
+
|
|
67421
67422
|
See recognized syntax at https://syntax.abaplint.org`,
|
|
67422
67423
|
tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
|
|
67423
67424
|
};
|
|
@@ -67502,7 +67503,7 @@ class ParserMissingSpace extends _abap_rule_1.ABAPRule {
|
|
|
67502
67503
|
return {
|
|
67503
67504
|
key: "parser_missing_space",
|
|
67504
67505
|
title: "Parser Error, missing space",
|
|
67505
|
-
shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.
|
|
67506
|
+
shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.
|
|
67506
67507
|
This rule makes sure the spaces are consistently required across the language.`,
|
|
67507
67508
|
tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
|
|
67508
67509
|
badExample: `IF ( foo = 'bar').`,
|
|
@@ -67914,25 +67915,25 @@ class PreferInline {
|
|
|
67914
67915
|
key: "prefer_inline",
|
|
67915
67916
|
title: "Prefer Inline Declarations",
|
|
67916
67917
|
shortDescription: `Prefer inline to up-front declarations.`,
|
|
67917
|
-
extendedInformation: `EXPERIMENTAL
|
|
67918
|
-
|
|
67919
|
-
Activates if language version is v740sp02 or above.
|
|
67920
|
-
|
|
67921
|
-
Variables must be local(METHOD or FORM).
|
|
67922
|
-
|
|
67923
|
-
No generic or void typed variables. No syntax errors.
|
|
67924
|
-
|
|
67925
|
-
First position used must be a full/pure write.
|
|
67926
|
-
|
|
67927
|
-
Move statment is not a cast(?=)
|
|
67928
|
-
|
|
67918
|
+
extendedInformation: `EXPERIMENTAL
|
|
67919
|
+
|
|
67920
|
+
Activates if language version is v740sp02 or above.
|
|
67921
|
+
|
|
67922
|
+
Variables must be local(METHOD or FORM).
|
|
67923
|
+
|
|
67924
|
+
No generic or void typed variables. No syntax errors.
|
|
67925
|
+
|
|
67926
|
+
First position used must be a full/pure write.
|
|
67927
|
+
|
|
67928
|
+
Move statment is not a cast(?=)
|
|
67929
|
+
|
|
67929
67930
|
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-inline-to-up-front-declarations`,
|
|
67930
67931
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Experimental, _irule_1.RuleTag.Quickfix],
|
|
67931
|
-
badExample: `DATA foo TYPE i.
|
|
67932
|
-
foo = 2.
|
|
67933
|
-
DATA percentage TYPE decfloat34.
|
|
67932
|
+
badExample: `DATA foo TYPE i.
|
|
67933
|
+
foo = 2.
|
|
67934
|
+
DATA percentage TYPE decfloat34.
|
|
67934
67935
|
percentage = ( comment_number / abs_statement_number ) * 100.`,
|
|
67935
|
-
goodExample: `DATA(foo) = 2.
|
|
67936
|
+
goodExample: `DATA(foo) = 2.
|
|
67936
67937
|
DATA(percentage) = CONV decfloat34( comment_number / abs_statement_number ) * 100.`,
|
|
67937
67938
|
};
|
|
67938
67939
|
}
|
|
@@ -68146,18 +68147,18 @@ class PreferIsNot extends _abap_rule_1.ABAPRule {
|
|
|
68146
68147
|
key: "prefer_is_not",
|
|
68147
68148
|
title: "Prefer IS NOT to NOT IS",
|
|
68148
68149
|
shortDescription: `Prefer IS NOT to NOT IS`,
|
|
68149
|
-
extendedInformation: `
|
|
68150
|
-
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
|
|
68151
|
-
|
|
68150
|
+
extendedInformation: `
|
|
68151
|
+
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
|
|
68152
|
+
|
|
68152
68153
|
"if not is_valid( )." examples are skipped`,
|
|
68153
68154
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
|
|
68154
|
-
goodExample: `IF variable IS NOT INITIAL.
|
|
68155
|
-
IF variable NP 'TODO*'.
|
|
68156
|
-
IF variable <> 42.
|
|
68155
|
+
goodExample: `IF variable IS NOT INITIAL.
|
|
68156
|
+
IF variable NP 'TODO*'.
|
|
68157
|
+
IF variable <> 42.
|
|
68157
68158
|
IF variable CO 'hello'.`,
|
|
68158
|
-
badExample: `IF NOT variable IS INITIAL.
|
|
68159
|
-
IF NOT variable CP 'TODO*'.
|
|
68160
|
-
IF NOT variable = 42.
|
|
68159
|
+
badExample: `IF NOT variable IS INITIAL.
|
|
68160
|
+
IF NOT variable CP 'TODO*'.
|
|
68161
|
+
IF NOT variable = 42.
|
|
68161
68162
|
IF NOT variable CA 'hello'.`,
|
|
68162
68163
|
};
|
|
68163
68164
|
}
|
|
@@ -68345,14 +68346,14 @@ class PreferRaiseExceptionNew extends _abap_rule_1.ABAPRule {
|
|
|
68345
68346
|
key: "prefer_raise_exception_new",
|
|
68346
68347
|
title: "Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE",
|
|
68347
68348
|
shortDescription: `Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE`,
|
|
68348
|
-
extendedInformation: `
|
|
68349
|
-
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
|
|
68350
|
-
|
|
68349
|
+
extendedInformation: `
|
|
68350
|
+
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
|
|
68351
|
+
|
|
68351
68352
|
From 752 and up`,
|
|
68352
68353
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
|
|
68353
68354
|
goodExample: `RAISE EXCEPTION NEW cx_generation_error( previous = exception ).`,
|
|
68354
|
-
badExample: `RAISE EXCEPTION TYPE cx_generation_error
|
|
68355
|
-
EXPORTING
|
|
68355
|
+
badExample: `RAISE EXCEPTION TYPE cx_generation_error
|
|
68356
|
+
EXPORTING
|
|
68356
68357
|
previous = exception.`,
|
|
68357
68358
|
};
|
|
68358
68359
|
}
|
|
@@ -68430,12 +68431,12 @@ class PreferReturningToExporting extends _abap_rule_1.ABAPRule {
|
|
|
68430
68431
|
key: "prefer_returning_to_exporting",
|
|
68431
68432
|
title: "Prefer RETURNING to EXPORTING",
|
|
68432
68433
|
shortDescription: `Prefer RETURNING to EXPORTING. Generic types cannot be RETURNING.`,
|
|
68433
|
-
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting
|
|
68434
|
+
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting
|
|
68434
68435
|
https://docs.abapopenchecks.org/checks/44/`,
|
|
68435
68436
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
68436
|
-
badExample: `CLASS lcl DEFINITION.
|
|
68437
|
-
PUBLIC SECTION.
|
|
68438
|
-
METHODS test EXPORTING ev_foo TYPE i.
|
|
68437
|
+
badExample: `CLASS lcl DEFINITION.
|
|
68438
|
+
PUBLIC SECTION.
|
|
68439
|
+
METHODS test EXPORTING ev_foo TYPE i.
|
|
68439
68440
|
ENDCLASS.`,
|
|
68440
68441
|
};
|
|
68441
68442
|
}
|
|
@@ -68531,8 +68532,8 @@ class PreferXsdbool extends _abap_rule_1.ABAPRule {
|
|
|
68531
68532
|
key: "prefer_xsdbool",
|
|
68532
68533
|
title: "Prefer xsdbool over boolc",
|
|
68533
68534
|
shortDescription: `Prefer xsdbool over boolc`,
|
|
68534
|
-
extendedInformation: `Activates if language version is v740sp08 or above.
|
|
68535
|
-
|
|
68535
|
+
extendedInformation: `Activates if language version is v740sp08 or above.
|
|
68536
|
+
|
|
68536
68537
|
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
|
|
68537
68538
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
|
|
68538
68539
|
badExample: `DATA(sdf) = boolc( 1 = 2 ).`,
|
|
@@ -68604,9 +68605,9 @@ class PreferredCompareOperator extends _abap_rule_1.ABAPRule {
|
|
|
68604
68605
|
title: "Preferred compare operator",
|
|
68605
68606
|
shortDescription: `Configure undesired operator variants`,
|
|
68606
68607
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
|
|
68607
|
-
badExample: `IF foo EQ bar.
|
|
68608
|
+
badExample: `IF foo EQ bar.
|
|
68608
68609
|
ENDIF.`,
|
|
68609
|
-
goodExample: `IF foo = bar.
|
|
68610
|
+
goodExample: `IF foo = bar.
|
|
68610
68611
|
ENDIF.`,
|
|
68611
68612
|
};
|
|
68612
68613
|
}
|
|
@@ -68830,26 +68831,26 @@ class ReduceProceduralCode extends _abap_rule_1.ABAPRule {
|
|
|
68830
68831
|
key: "reduce_procedural_code",
|
|
68831
68832
|
title: "Reduce procedural code",
|
|
68832
68833
|
shortDescription: `Checks FORM and FUNCTION-MODULE have few statements`,
|
|
68833
|
-
extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
|
|
68834
|
-
|
|
68835
|
-
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
|
|
68836
|
-
|
|
68834
|
+
extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
|
|
68835
|
+
|
|
68836
|
+
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
|
|
68837
|
+
|
|
68837
68838
|
Comments are not counted as statements.`,
|
|
68838
68839
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
|
|
68839
|
-
badExample: `FORM foo.
|
|
68840
|
-
DATA lv_bar TYPE i.
|
|
68841
|
-
lv_bar = 2 + 2.
|
|
68842
|
-
IF lv_bar = 4.
|
|
68843
|
-
WRITE 'hello world'.
|
|
68844
|
-
ENDIF.
|
|
68845
|
-
DATA lv_bar TYPE i.
|
|
68846
|
-
lv_bar = 2 + 2.
|
|
68847
|
-
IF lv_bar = 4.
|
|
68848
|
-
WRITE 'hello world'.
|
|
68849
|
-
ENDIF.
|
|
68840
|
+
badExample: `FORM foo.
|
|
68841
|
+
DATA lv_bar TYPE i.
|
|
68842
|
+
lv_bar = 2 + 2.
|
|
68843
|
+
IF lv_bar = 4.
|
|
68844
|
+
WRITE 'hello world'.
|
|
68845
|
+
ENDIF.
|
|
68846
|
+
DATA lv_bar TYPE i.
|
|
68847
|
+
lv_bar = 2 + 2.
|
|
68848
|
+
IF lv_bar = 4.
|
|
68849
|
+
WRITE 'hello world'.
|
|
68850
|
+
ENDIF.
|
|
68850
68851
|
ENDFORM.`,
|
|
68851
|
-
goodExample: `FORM foo.
|
|
68852
|
-
NEW zcl_global_class( )->run_logic( ).
|
|
68852
|
+
goodExample: `FORM foo.
|
|
68853
|
+
NEW zcl_global_class( )->run_logic( ).
|
|
68853
68854
|
ENDFORM.`,
|
|
68854
68855
|
};
|
|
68855
68856
|
}
|
|
@@ -69093,10 +69094,10 @@ class RemoveDescriptions {
|
|
|
69093
69094
|
return {
|
|
69094
69095
|
key: "remove_descriptions",
|
|
69095
69096
|
title: "Remove descriptions",
|
|
69096
|
-
shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
|
|
69097
|
-
|
|
69098
|
-
Class descriptions are required, see rule description_empty.
|
|
69099
|
-
|
|
69097
|
+
shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
|
|
69098
|
+
|
|
69099
|
+
Class descriptions are required, see rule description_empty.
|
|
69100
|
+
|
|
69100
69101
|
Consider using ABAP Doc for documentation.`,
|
|
69101
69102
|
tags: [],
|
|
69102
69103
|
};
|
|
@@ -69221,14 +69222,14 @@ class RFCErrorHandling extends _abap_rule_1.ABAPRule {
|
|
|
69221
69222
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
69222
69223
|
shortDescription: `Checks that exceptions 'system_failure' and 'communication_failure' are handled in RFC calls`,
|
|
69223
69224
|
extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenrfc_exception.htm`,
|
|
69224
|
-
badExample: `CALL FUNCTION 'ZRFC'
|
|
69225
|
+
badExample: `CALL FUNCTION 'ZRFC'
|
|
69225
69226
|
DESTINATION lv_rfc.`,
|
|
69226
|
-
goodExample: `CALL FUNCTION 'ZRFC'
|
|
69227
|
-
DESTINATION lv_rfc
|
|
69228
|
-
EXCEPTIONS
|
|
69229
|
-
system_failure = 1 MESSAGE msg
|
|
69230
|
-
communication_failure = 2 MESSAGE msg
|
|
69231
|
-
resource_failure = 3
|
|
69227
|
+
goodExample: `CALL FUNCTION 'ZRFC'
|
|
69228
|
+
DESTINATION lv_rfc
|
|
69229
|
+
EXCEPTIONS
|
|
69230
|
+
system_failure = 1 MESSAGE msg
|
|
69231
|
+
communication_failure = 2 MESSAGE msg
|
|
69232
|
+
resource_failure = 3
|
|
69232
69233
|
OTHERS = 4.`,
|
|
69233
69234
|
};
|
|
69234
69235
|
}
|
|
@@ -69312,11 +69313,11 @@ class SelectAddOrderBy {
|
|
|
69312
69313
|
key: "select_add_order_by",
|
|
69313
69314
|
title: "SELECT add ORDER BY",
|
|
69314
69315
|
shortDescription: `SELECTs add ORDER BY clause`,
|
|
69315
|
-
extendedInformation: `
|
|
69316
|
-
This will make sure that the SELECT statement returns results in the same sequence on different databases
|
|
69317
|
-
|
|
69318
|
-
add ORDER BY PRIMARY KEY if in doubt
|
|
69319
|
-
|
|
69316
|
+
extendedInformation: `
|
|
69317
|
+
This will make sure that the SELECT statement returns results in the same sequence on different databases
|
|
69318
|
+
|
|
69319
|
+
add ORDER BY PRIMARY KEY if in doubt
|
|
69320
|
+
|
|
69320
69321
|
If the target is a sorted/hashed table, no issue is reported`,
|
|
69321
69322
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
69322
69323
|
badExample: `SELECT * FROM db INTO TABLE @DATA(tab).`,
|
|
@@ -69447,14 +69448,14 @@ class SelectPerformance {
|
|
|
69447
69448
|
key: "select_performance",
|
|
69448
69449
|
title: "SELECT performance",
|
|
69449
69450
|
shortDescription: `Various checks regarding SELECT performance.`,
|
|
69450
|
-
extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
|
|
69451
|
-
|
|
69451
|
+
extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
|
|
69452
|
+
|
|
69452
69453
|
SELECT *: not reported if using INTO/APPENDING CORRESPONDING FIELDS OF`,
|
|
69453
69454
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Performance],
|
|
69454
|
-
badExample: `SELECT field1, field2 FROM table
|
|
69455
|
-
INTO @DATA(structure) UP TO 1 ROWS ORDER BY field3 DESCENDING.
|
|
69455
|
+
badExample: `SELECT field1, field2 FROM table
|
|
69456
|
+
INTO @DATA(structure) UP TO 1 ROWS ORDER BY field3 DESCENDING.
|
|
69456
69457
|
ENDSELECT.`,
|
|
69457
|
-
goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
|
|
69458
|
+
goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
|
|
69458
69459
|
INTO TABLE @DATA(table) ORDER BY field3 DESCENDING`,
|
|
69459
69460
|
};
|
|
69460
69461
|
}
|
|
@@ -69568,8 +69569,8 @@ class SelectSingleFullKey {
|
|
|
69568
69569
|
key: "select_single_full_key",
|
|
69569
69570
|
title: "Detect SELECT SINGLE which are possibily not unique",
|
|
69570
69571
|
shortDescription: `Detect SELECT SINGLE which are possibily not unique`,
|
|
69571
|
-
extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
|
|
69572
|
-
|
|
69572
|
+
extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
|
|
69573
|
+
|
|
69573
69574
|
If the statement contains a JOIN it is not checked`,
|
|
69574
69575
|
pseudoComment: "EC CI_NOORDER",
|
|
69575
69576
|
tags: [_irule_1.RuleTag.Quickfix],
|
|
@@ -69993,8 +69994,8 @@ class SICFConsistency {
|
|
|
69993
69994
|
key: "sicf_consistency",
|
|
69994
69995
|
title: "SICF consistency",
|
|
69995
69996
|
shortDescription: `Checks the validity of ICF services`,
|
|
69996
|
-
extendedInformation: `* Class defined in handler must exist
|
|
69997
|
-
* Class must not have any syntax errors
|
|
69997
|
+
extendedInformation: `* Class defined in handler must exist
|
|
69998
|
+
* Class must not have any syntax errors
|
|
69998
69999
|
* Class must implement interface IF_HTTP_EXTENSION`,
|
|
69999
70000
|
};
|
|
70000
70001
|
}
|
|
@@ -70106,23 +70107,23 @@ class SlowParameterPassing {
|
|
|
70106
70107
|
shortDescription: `Detects slow pass by value passing for methods where parameter is not changed`,
|
|
70107
70108
|
extendedInformation: `Method parameters defined in interfaces is not checked`,
|
|
70108
70109
|
tags: [_irule_1.RuleTag.Performance],
|
|
70109
|
-
badExample: `CLASS lcl DEFINITION.
|
|
70110
|
-
PUBLIC SECTION.
|
|
70111
|
-
METHODS bar IMPORTING VALUE(sdf) TYPE string.
|
|
70112
|
-
ENDCLASS.
|
|
70113
|
-
CLASS lcl IMPLEMENTATION.
|
|
70114
|
-
METHOD bar.
|
|
70115
|
-
WRITE sdf.
|
|
70116
|
-
ENDMETHOD.
|
|
70110
|
+
badExample: `CLASS lcl DEFINITION.
|
|
70111
|
+
PUBLIC SECTION.
|
|
70112
|
+
METHODS bar IMPORTING VALUE(sdf) TYPE string.
|
|
70113
|
+
ENDCLASS.
|
|
70114
|
+
CLASS lcl IMPLEMENTATION.
|
|
70115
|
+
METHOD bar.
|
|
70116
|
+
WRITE sdf.
|
|
70117
|
+
ENDMETHOD.
|
|
70117
70118
|
ENDCLASS.`,
|
|
70118
|
-
goodExample: `CLASS lcl DEFINITION.
|
|
70119
|
-
PUBLIC SECTION.
|
|
70120
|
-
METHODS bar IMPORTING sdf TYPE string.
|
|
70121
|
-
ENDCLASS.
|
|
70122
|
-
CLASS lcl IMPLEMENTATION.
|
|
70123
|
-
METHOD bar.
|
|
70124
|
-
WRITE sdf.
|
|
70125
|
-
ENDMETHOD.
|
|
70119
|
+
goodExample: `CLASS lcl DEFINITION.
|
|
70120
|
+
PUBLIC SECTION.
|
|
70121
|
+
METHODS bar IMPORTING sdf TYPE string.
|
|
70122
|
+
ENDCLASS.
|
|
70123
|
+
CLASS lcl IMPLEMENTATION.
|
|
70124
|
+
METHOD bar.
|
|
70125
|
+
WRITE sdf.
|
|
70126
|
+
ENDMETHOD.
|
|
70126
70127
|
ENDCLASS.`,
|
|
70127
70128
|
};
|
|
70128
70129
|
}
|
|
@@ -70379,8 +70380,8 @@ class SpaceBeforeDot extends _abap_rule_1.ABAPRule {
|
|
|
70379
70380
|
key: "space_before_dot",
|
|
70380
70381
|
title: "Space before dot",
|
|
70381
70382
|
shortDescription: `Checks for extra spaces before dots at the ends of statements`,
|
|
70382
|
-
extendedInformation: `
|
|
70383
|
-
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
|
|
70383
|
+
extendedInformation: `
|
|
70384
|
+
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
|
|
70384
70385
|
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#condense-your-code`,
|
|
70385
70386
|
tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
70386
70387
|
badExample: `WRITE bar .`,
|
|
@@ -70566,12 +70567,12 @@ class SQLValueConversion {
|
|
|
70566
70567
|
key: "sql_value_conversion",
|
|
70567
70568
|
title: "Implicit SQL Value Conversion",
|
|
70568
70569
|
shortDescription: `Ensure types match when selecting from database`,
|
|
70569
|
-
extendedInformation: `
|
|
70570
|
-
* Integer to CHAR conversion
|
|
70571
|
-
* Integer to NUMC conversion
|
|
70572
|
-
* NUMC to Integer conversion
|
|
70573
|
-
* CHAR to Integer conversion
|
|
70574
|
-
* Source field longer than database field, CHAR -> CHAR
|
|
70570
|
+
extendedInformation: `
|
|
70571
|
+
* Integer to CHAR conversion
|
|
70572
|
+
* Integer to NUMC conversion
|
|
70573
|
+
* NUMC to Integer conversion
|
|
70574
|
+
* CHAR to Integer conversion
|
|
70575
|
+
* Source field longer than database field, CHAR -> CHAR
|
|
70575
70576
|
* Source field longer than database field, NUMC -> NUMC`,
|
|
70576
70577
|
tags: [],
|
|
70577
70578
|
};
|
|
@@ -70643,7 +70644,7 @@ class StartAtTab extends _abap_rule_1.ABAPRule {
|
|
|
70643
70644
|
key: "start_at_tab",
|
|
70644
70645
|
title: "Start at tab",
|
|
70645
70646
|
shortDescription: `Checks that statements start at tabstops.`,
|
|
70646
|
-
extendedInformation: `Reports max 100 issues per file
|
|
70647
|
+
extendedInformation: `Reports max 100 issues per file
|
|
70647
70648
|
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
|
|
70648
70649
|
tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
70649
70650
|
badExample: ` WRITE a.`,
|
|
@@ -70820,12 +70821,12 @@ class StrictSQL extends _abap_rule_1.ABAPRule {
|
|
|
70820
70821
|
key: "strict_sql",
|
|
70821
70822
|
title: "Strict SQL",
|
|
70822
70823
|
shortDescription: `Strict SQL`,
|
|
70823
|
-
extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
|
|
70824
|
-
|
|
70825
|
-
https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
|
|
70826
|
-
|
|
70827
|
-
Also see separate rule sql_escape_host_variables
|
|
70828
|
-
|
|
70824
|
+
extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
|
|
70825
|
+
|
|
70826
|
+
https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
|
|
70827
|
+
|
|
70828
|
+
Also see separate rule sql_escape_host_variables
|
|
70829
|
+
|
|
70829
70830
|
Activates from v750 and up`,
|
|
70830
70831
|
tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix],
|
|
70831
70832
|
badExample: `SELECT * FROM ztabl INTO TABLE @rt_content WHERE type = @iv_type ORDER BY PRIMARY KEY.`,
|
|
@@ -71079,11 +71080,11 @@ class SyModification extends _abap_rule_1.ABAPRule {
|
|
|
71079
71080
|
key: "sy_modification",
|
|
71080
71081
|
title: "Modification of SY fields",
|
|
71081
71082
|
shortDescription: `Finds modification of sy fields`,
|
|
71082
|
-
extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
|
|
71083
|
-
|
|
71083
|
+
extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
|
|
71084
|
+
|
|
71084
71085
|
Changes to SY-TVAR* fields are not reported`,
|
|
71085
71086
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
71086
|
-
badExample: `sy-uname = 2.
|
|
71087
|
+
badExample: `sy-uname = 2.
|
|
71087
71088
|
sy = sy.`,
|
|
71088
71089
|
};
|
|
71089
71090
|
}
|
|
@@ -71145,8 +71146,8 @@ class TABLEnhancementCategory {
|
|
|
71145
71146
|
key: "tabl_enhancement_category",
|
|
71146
71147
|
title: "TABL enhancement category must be set",
|
|
71147
71148
|
shortDescription: `Checks that tables do not have the enhancement category 'not classified'.`,
|
|
71148
|
-
extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
|
|
71149
|
-
|
|
71149
|
+
extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
|
|
71150
|
+
|
|
71150
71151
|
You may use standard report RS_DDIC_CLASSIFICATION_FINAL for adjustment.`,
|
|
71151
71152
|
tags: [],
|
|
71152
71153
|
};
|
|
@@ -71274,9 +71275,9 @@ class TypeFormParameters extends _abap_rule_1.ABAPRule {
|
|
|
71274
71275
|
title: "Type FORM parameters",
|
|
71275
71276
|
shortDescription: `Checks for untyped FORM parameters`,
|
|
71276
71277
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
71277
|
-
badExample: `FORM foo USING bar.
|
|
71278
|
+
badExample: `FORM foo USING bar.
|
|
71278
71279
|
ENDFORM.`,
|
|
71279
|
-
goodExample: `FORM foo USING bar TYPE string.
|
|
71280
|
+
goodExample: `FORM foo USING bar TYPE string.
|
|
71280
71281
|
ENDFORM.`,
|
|
71281
71282
|
};
|
|
71282
71283
|
}
|
|
@@ -71949,38 +71950,38 @@ class UnnecessaryPragma extends _abap_rule_1.ABAPRule {
|
|
|
71949
71950
|
key: "unnecessary_pragma",
|
|
71950
71951
|
title: "Unnecessary Pragma",
|
|
71951
71952
|
shortDescription: `Finds pragmas which can be removed`,
|
|
71952
|
-
extendedInformation: `* NO_HANDLER with handler
|
|
71953
|
-
|
|
71954
|
-
* NEEDED without definition
|
|
71955
|
-
|
|
71956
|
-
* NO_TEXT without texts
|
|
71957
|
-
|
|
71958
|
-
* SUBRC_OK where sy-subrc is checked
|
|
71959
|
-
|
|
71953
|
+
extendedInformation: `* NO_HANDLER with handler
|
|
71954
|
+
|
|
71955
|
+
* NEEDED without definition
|
|
71956
|
+
|
|
71957
|
+
* NO_TEXT without texts
|
|
71958
|
+
|
|
71959
|
+
* SUBRC_OK where sy-subrc is checked
|
|
71960
|
+
|
|
71960
71961
|
NO_HANDLER inside macros are not checked`,
|
|
71961
71962
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
71962
|
-
badExample: `TRY.
|
|
71963
|
-
...
|
|
71964
|
-
CATCH zcx_abapgit_exception ##NO_HANDLER.
|
|
71965
|
-
RETURN. " it has a handler
|
|
71966
|
-
ENDTRY.
|
|
71967
|
-
MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
|
|
71968
|
-
SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
|
|
71969
|
-
IF sy-subrc <> 0.
|
|
71963
|
+
badExample: `TRY.
|
|
71964
|
+
...
|
|
71965
|
+
CATCH zcx_abapgit_exception ##NO_HANDLER.
|
|
71966
|
+
RETURN. " it has a handler
|
|
71967
|
+
ENDTRY.
|
|
71968
|
+
MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
|
|
71969
|
+
SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
|
|
71970
|
+
IF sy-subrc <> 0.
|
|
71970
71971
|
ENDIF.`,
|
|
71971
|
-
goodExample: `TRY.
|
|
71972
|
-
...
|
|
71973
|
-
CATCH zcx_abapgit_exception.
|
|
71974
|
-
RETURN.
|
|
71975
|
-
ENDTRY.
|
|
71976
|
-
MESSAGE w125(zbar) WITH c_foo INTO message.
|
|
71977
|
-
SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
|
|
71978
|
-
IF sy-subrc <> 0.
|
|
71979
|
-
ENDIF.
|
|
71980
|
-
|
|
71981
|
-
DATA: BEGIN OF blah ##NEEDED,
|
|
71982
|
-
test1 TYPE string,
|
|
71983
|
-
test2 TYPE string,
|
|
71972
|
+
goodExample: `TRY.
|
|
71973
|
+
...
|
|
71974
|
+
CATCH zcx_abapgit_exception.
|
|
71975
|
+
RETURN.
|
|
71976
|
+
ENDTRY.
|
|
71977
|
+
MESSAGE w125(zbar) WITH c_foo INTO message.
|
|
71978
|
+
SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
|
|
71979
|
+
IF sy-subrc <> 0.
|
|
71980
|
+
ENDIF.
|
|
71981
|
+
|
|
71982
|
+
DATA: BEGIN OF blah ##NEEDED,
|
|
71983
|
+
test1 TYPE string,
|
|
71984
|
+
test2 TYPE string,
|
|
71984
71985
|
END OF blah.`,
|
|
71985
71986
|
};
|
|
71986
71987
|
}
|
|
@@ -72147,18 +72148,18 @@ class UnnecessaryReturn extends _abap_rule_1.ABAPRule {
|
|
|
72147
72148
|
shortDescription: `Finds unnecessary RETURN statements`,
|
|
72148
72149
|
extendedInformation: `Finds unnecessary RETURN statements`,
|
|
72149
72150
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
|
|
72150
|
-
badExample: `FORM hello1.
|
|
72151
|
-
WRITE 'world'.
|
|
72152
|
-
RETURN.
|
|
72153
|
-
ENDFORM.
|
|
72154
|
-
|
|
72155
|
-
FORM foo.
|
|
72156
|
-
IF 1 = 2.
|
|
72157
|
-
RETURN.
|
|
72158
|
-
ENDIF.
|
|
72151
|
+
badExample: `FORM hello1.
|
|
72152
|
+
WRITE 'world'.
|
|
72153
|
+
RETURN.
|
|
72154
|
+
ENDFORM.
|
|
72155
|
+
|
|
72156
|
+
FORM foo.
|
|
72157
|
+
IF 1 = 2.
|
|
72158
|
+
RETURN.
|
|
72159
|
+
ENDIF.
|
|
72159
72160
|
ENDFORM.`,
|
|
72160
|
-
goodExample: `FORM hello2.
|
|
72161
|
-
WRITE 'world'.
|
|
72161
|
+
goodExample: `FORM hello2.
|
|
72162
|
+
WRITE 'world'.
|
|
72162
72163
|
ENDFORM.`,
|
|
72163
72164
|
};
|
|
72164
72165
|
}
|
|
@@ -72509,13 +72510,13 @@ class UnusedMacros {
|
|
|
72509
72510
|
title: "Unused macros",
|
|
72510
72511
|
shortDescription: `Checks for unused macro definitions definitions`,
|
|
72511
72512
|
tags: [_irule_1.RuleTag.Quickfix],
|
|
72512
|
-
badExample: `DEFINE foobar1.
|
|
72513
|
-
WRITE 'hello'.
|
|
72513
|
+
badExample: `DEFINE foobar1.
|
|
72514
|
+
WRITE 'hello'.
|
|
72514
72515
|
END-OF-DEFINITION.`,
|
|
72515
|
-
goodExample: `DEFINE foobar2.
|
|
72516
|
-
WRITE 'hello'.
|
|
72517
|
-
END-OF-DEFINITION.
|
|
72518
|
-
|
|
72516
|
+
goodExample: `DEFINE foobar2.
|
|
72517
|
+
WRITE 'hello'.
|
|
72518
|
+
END-OF-DEFINITION.
|
|
72519
|
+
|
|
72519
72520
|
foobar2.`,
|
|
72520
72521
|
};
|
|
72521
72522
|
}
|
|
@@ -72623,17 +72624,17 @@ class UnusedMethods {
|
|
|
72623
72624
|
key: "unused_methods",
|
|
72624
72625
|
title: "Unused methods",
|
|
72625
72626
|
shortDescription: `Checks for unused methods`,
|
|
72626
|
-
extendedInformation: `Checks private and protected methods.
|
|
72627
|
-
|
|
72628
|
-
Unused methods are not reported if the object contains parser or syntax errors.
|
|
72629
|
-
|
|
72630
|
-
Skips:
|
|
72631
|
-
* methods FOR TESTING
|
|
72632
|
-
* methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
|
|
72633
|
-
* class_constructor + constructor methods
|
|
72634
|
-
* event handlers
|
|
72635
|
-
* methods that are redefined
|
|
72636
|
-
* INCLUDEs
|
|
72627
|
+
extendedInformation: `Checks private and protected methods.
|
|
72628
|
+
|
|
72629
|
+
Unused methods are not reported if the object contains parser or syntax errors.
|
|
72630
|
+
|
|
72631
|
+
Skips:
|
|
72632
|
+
* methods FOR TESTING
|
|
72633
|
+
* methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
|
|
72634
|
+
* class_constructor + constructor methods
|
|
72635
|
+
* event handlers
|
|
72636
|
+
* methods that are redefined
|
|
72637
|
+
* INCLUDEs
|
|
72637
72638
|
`,
|
|
72638
72639
|
tags: [],
|
|
72639
72640
|
pragma: "##CALLED",
|
|
@@ -73067,23 +73068,23 @@ class UnusedVariables {
|
|
|
73067
73068
|
key: "unused_variables",
|
|
73068
73069
|
title: "Unused variables",
|
|
73069
73070
|
shortDescription: `Checks for unused variables and constants`,
|
|
73070
|
-
extendedInformation: `Skips event parameters.
|
|
73071
|
-
|
|
73072
|
-
Note that this currently does not work if the source code uses macros.
|
|
73073
|
-
|
|
73074
|
-
Unused variables are not reported if the object contains parser or syntax errors.
|
|
73075
|
-
|
|
73071
|
+
extendedInformation: `Skips event parameters.
|
|
73072
|
+
|
|
73073
|
+
Note that this currently does not work if the source code uses macros.
|
|
73074
|
+
|
|
73075
|
+
Unused variables are not reported if the object contains parser or syntax errors.
|
|
73076
|
+
|
|
73076
73077
|
Errors found in INCLUDES are reported for the main program.`,
|
|
73077
73078
|
tags: [_irule_1.RuleTag.Quickfix],
|
|
73078
73079
|
pragma: "##NEEDED",
|
|
73079
73080
|
pseudoComment: "EC NEEDED",
|
|
73080
|
-
badExample: `DATA: BEGIN OF blah1,
|
|
73081
|
-
test TYPE string,
|
|
73082
|
-
test2 TYPE string,
|
|
73081
|
+
badExample: `DATA: BEGIN OF blah1,
|
|
73082
|
+
test TYPE string,
|
|
73083
|
+
test2 TYPE string,
|
|
73083
73084
|
END OF blah1.`,
|
|
73084
|
-
goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
|
|
73085
|
-
test TYPE string,
|
|
73086
|
-
test2 TYPE string,
|
|
73085
|
+
goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
|
|
73086
|
+
test TYPE string,
|
|
73087
|
+
test2 TYPE string,
|
|
73087
73088
|
END OF blah2.`,
|
|
73088
73089
|
};
|
|
73089
73090
|
}
|
|
@@ -73302,15 +73303,15 @@ class UseBoolExpression extends _abap_rule_1.ABAPRule {
|
|
|
73302
73303
|
shortDescription: `Use boolean expression, xsdbool from 740sp08 and up, boolc from 702 and up`,
|
|
73303
73304
|
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
|
|
73304
73305
|
tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
|
|
73305
|
-
badExample: `IF line IS INITIAL.
|
|
73306
|
-
has_entries = abap_false.
|
|
73307
|
-
ELSE.
|
|
73308
|
-
has_entries = abap_true.
|
|
73309
|
-
ENDIF.
|
|
73310
|
-
|
|
73306
|
+
badExample: `IF line IS INITIAL.
|
|
73307
|
+
has_entries = abap_false.
|
|
73308
|
+
ELSE.
|
|
73309
|
+
has_entries = abap_true.
|
|
73310
|
+
ENDIF.
|
|
73311
|
+
|
|
73311
73312
|
DATA(fsdf) = COND #( WHEN foo <> bar THEN abap_true ELSE abap_false ).`,
|
|
73312
|
-
goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
|
|
73313
|
-
|
|
73313
|
+
goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
|
|
73314
|
+
|
|
73314
73315
|
DATA(fsdf) = xsdbool( foo <> bar ).`,
|
|
73315
73316
|
};
|
|
73316
73317
|
}
|
|
@@ -73428,15 +73429,15 @@ class UseClassBasedExceptions extends _abap_rule_1.ABAPRule {
|
|
|
73428
73429
|
shortDescription: `Use class based exceptions, checks interface and class definitions`,
|
|
73429
73430
|
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-class-based-exceptions`,
|
|
73430
73431
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
73431
|
-
badExample: `INTERFACE lif.
|
|
73432
|
-
METHODS load_data
|
|
73433
|
-
EXCEPTIONS
|
|
73434
|
-
invalid_parameter.
|
|
73432
|
+
badExample: `INTERFACE lif.
|
|
73433
|
+
METHODS load_data
|
|
73434
|
+
EXCEPTIONS
|
|
73435
|
+
invalid_parameter.
|
|
73435
73436
|
ENDINTERFACE.`,
|
|
73436
|
-
goodExample: `INTERFACE lif.
|
|
73437
|
-
METHODS load_data
|
|
73438
|
-
RAISING
|
|
73439
|
-
cx_something.
|
|
73437
|
+
goodExample: `INTERFACE lif.
|
|
73438
|
+
METHODS load_data
|
|
73439
|
+
RAISING
|
|
73440
|
+
cx_something.
|
|
73440
73441
|
ENDINTERFACE.`,
|
|
73441
73442
|
};
|
|
73442
73443
|
}
|
|
@@ -73496,15 +73497,15 @@ class UseLineExists extends _abap_rule_1.ABAPRule {
|
|
|
73496
73497
|
key: "use_line_exists",
|
|
73497
73498
|
title: "Use line_exists",
|
|
73498
73499
|
shortDescription: `Use line_exists, from 740sp02 and up`,
|
|
73499
|
-
extendedInformation: `
|
|
73500
|
-
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
|
|
73501
|
-
|
|
73500
|
+
extendedInformation: `
|
|
73501
|
+
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
|
|
73502
|
+
|
|
73502
73503
|
Not reported if the READ TABLE statement contains BINARY SEARCH.`,
|
|
73503
73504
|
tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
73504
|
-
badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
|
|
73505
|
-
IF sy-subrc = 0.
|
|
73505
|
+
badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
|
|
73506
|
+
IF sy-subrc = 0.
|
|
73506
73507
|
ENDIF.`,
|
|
73507
|
-
goodExample: `IF line_exists( my_table[ key = 'A' ] ).
|
|
73508
|
+
goodExample: `IF line_exists( my_table[ key = 'A' ] ).
|
|
73508
73509
|
ENDIF.`,
|
|
73509
73510
|
};
|
|
73510
73511
|
}
|
|
@@ -73614,10 +73615,10 @@ class UseNew extends _abap_rule_1.ABAPRule {
|
|
|
73614
73615
|
key: "use_new",
|
|
73615
73616
|
title: "Use NEW",
|
|
73616
73617
|
shortDescription: `Checks for deprecated CREATE OBJECT statements.`,
|
|
73617
|
-
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
|
|
73618
|
-
|
|
73619
|
-
If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
|
|
73620
|
-
|
|
73618
|
+
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
|
|
73619
|
+
|
|
73620
|
+
If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
|
|
73621
|
+
|
|
73621
73622
|
Applicable from v740sp02 and up`,
|
|
73622
73623
|
badExample: `CREATE OBJECT ref.`,
|
|
73623
73624
|
goodExample: `ref = NEW #( ).`,
|
|
@@ -73715,13 +73716,13 @@ class WhenOthersLast extends _abap_rule_1.ABAPRule {
|
|
|
73715
73716
|
title: "WHEN OTHERS last",
|
|
73716
73717
|
shortDescription: `Checks that WHEN OTHERS is placed the last within a CASE statement.`,
|
|
73717
73718
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
73718
|
-
badExample: `CASE bar.
|
|
73719
|
-
WHEN OTHERS.
|
|
73720
|
-
WHEN 2.
|
|
73719
|
+
badExample: `CASE bar.
|
|
73720
|
+
WHEN OTHERS.
|
|
73721
|
+
WHEN 2.
|
|
73721
73722
|
ENDCASE.`,
|
|
73722
|
-
goodExample: `CASE bar.
|
|
73723
|
-
WHEN 2.
|
|
73724
|
-
WHEN OTHERS.
|
|
73723
|
+
goodExample: `CASE bar.
|
|
73724
|
+
WHEN 2.
|
|
73725
|
+
WHEN OTHERS.
|
|
73725
73726
|
ENDCASE.`,
|
|
73726
73727
|
};
|
|
73727
73728
|
}
|
|
@@ -74695,7 +74696,8 @@ exports.NameValidator = NameValidator;
|
|
|
74695
74696
|
"use strict";
|
|
74696
74697
|
|
|
74697
74698
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
74698
|
-
exports.
|
|
74699
|
+
exports.defaultVersion = exports.Version = void 0;
|
|
74700
|
+
exports.getPreviousVersion = getPreviousVersion;
|
|
74699
74701
|
var Version;
|
|
74700
74702
|
(function (Version) {
|
|
74701
74703
|
Version["OpenABAP"] = "open-abap";
|
|
@@ -74730,7 +74732,6 @@ function getPreviousVersion(v) {
|
|
|
74730
74732
|
}
|
|
74731
74733
|
return all[found - 1];
|
|
74732
74734
|
}
|
|
74733
|
-
exports.getPreviousVersion = getPreviousVersion;
|
|
74734
74735
|
//# sourceMappingURL=version.js.map
|
|
74735
74736
|
|
|
74736
74737
|
/***/ }),
|
|
@@ -74775,7 +74776,8 @@ exports.VirtualPosition = VirtualPosition;
|
|
|
74775
74776
|
"use strict";
|
|
74776
74777
|
|
|
74777
74778
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
74778
|
-
exports.
|
|
74779
|
+
exports.xmlToArray = xmlToArray;
|
|
74780
|
+
exports.unescape = unescape;
|
|
74779
74781
|
function xmlToArray(data) {
|
|
74780
74782
|
if (data === undefined) {
|
|
74781
74783
|
return [];
|
|
@@ -74787,7 +74789,6 @@ function xmlToArray(data) {
|
|
|
74787
74789
|
return [data];
|
|
74788
74790
|
}
|
|
74789
74791
|
}
|
|
74790
|
-
exports.xmlToArray = xmlToArray;
|
|
74791
74792
|
function unescape(str) {
|
|
74792
74793
|
if (str === undefined) {
|
|
74793
74794
|
return "";
|
|
@@ -74799,7 +74800,6 @@ function unescape(str) {
|
|
|
74799
74800
|
str = str.replace(/'/g, "'");
|
|
74800
74801
|
return str;
|
|
74801
74802
|
}
|
|
74802
|
-
exports.unescape = unescape;
|
|
74803
74803
|
//# sourceMappingURL=xml_utils.js.map
|
|
74804
74804
|
|
|
74805
74805
|
/***/ }),
|