@abaplint/core 2.120.8 → 2.120.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/src/abap/2_statements/expressions/compare.js +1 -1
- package/build/src/abap/2_statements/expressions/string_template_formatting.js +1 -1
- package/build/src/abap/5_syntax/_builtin.js +1 -1
- package/build/src/abap/5_syntax/_type_utils.js +1 -1
- package/build/src/abap/5_syntax/statements/ranges.js +5 -0
- package/build/src/abap/5_syntax/structures/type_mesh.js +101 -0
- package/build/src/abap/5_syntax/syntax.js +8 -0
- package/build/src/abap/types/class_attributes.js +8 -0
- package/build/src/registry.js +1 -1
- package/build/src/rules/7bit_ascii.js +1 -1
- package/build/src/rules/avoid_use.js +1 -1
- package/build/src/rules/cds_comment_style.js +1 -1
- package/build/src/rules/chain_mainly_declarations.js +1 -1
- package/build/src/rules/clear_exporting_parameters.js +1 -1
- package/build/src/rules/constructor_visibility_public.js +1 -1
- package/build/src/rules/exit_or_check.js +2 -2
- package/build/src/rules/expand_macros.js +1 -1
- package/build/src/rules/fm_global_parameters_obsolete.js +1 -1
- package/build/src/rules/form_tables_obsolete.js +1 -1
- package/build/src/rules/implicit_start_of_selection.js +1 -1
- package/build/src/rules/method_overwrites_builtin.js +1 -1
- package/build/src/rules/mix_returning.js +1 -1
- package/build/src/rules/no_macros.js +1 -1
- package/build/src/rules/obsolete_statement.js +18 -18
- package/build/src/rules/pragma_style.js +1 -1
- package/build/src/rules/rfc_error_handling.js +1 -1
- package/build/src/rules/strict_sql.js +2 -2
- package/build/src/rules/sy_modification.js +1 -1
- package/build/src/rules/tables_declared_locally.js +1 -1
- package/package.json +1 -1
|
@@ -12,7 +12,7 @@ class Compare extends combi_1.Expression {
|
|
|
12
12
|
const inn = (0, combi_1.seq)((0, combi_1.optPrio)("NOT"), "IN", (0, combi_1.altPrio)(_1.Source, list));
|
|
13
13
|
const sopt = (0, combi_1.seq)("IS", (0, combi_1.optPrio)("NOT"), (0, combi_1.altPrio)("SUPPLIED", "BOUND", (0, combi_1.ver)(version_1.Release.v750, (0, combi_1.seq)("INSTANCE OF", _1.ClassName), { also: combi_1.AlsoIn.OpenABAP }), "REQUESTED", "INITIAL"));
|
|
14
14
|
const between = (0, combi_1.seq)((0, combi_1.optPrio)("NOT"), "BETWEEN", _1.Source, "AND", _1.Source);
|
|
15
|
-
// https://help.sap.com/doc/
|
|
15
|
+
// https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-us/abennews-740_sp08-expressions.html
|
|
16
16
|
// but also seems to work in v740sp05, blah
|
|
17
17
|
const predicate = (0, combi_1.ver)(version_1.Release.v740sp08, _1.MethodCallChain, { also: combi_1.AlsoIn.OpenABAP });
|
|
18
18
|
const rett = (0, combi_1.seq)(_1.Source, (0, combi_1.altPrio)((0, combi_1.seq)(_1.CompareOperator, _1.Source), inn, between, sopt));
|
|
@@ -7,7 +7,7 @@ const version_1 = require("../../../version");
|
|
|
7
7
|
const dynamic_1 = require("./dynamic");
|
|
8
8
|
class StringTemplateFormatting extends combi_1.Expression {
|
|
9
9
|
getRunnable() {
|
|
10
|
-
// https://help.sap.com/doc/
|
|
10
|
+
// https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-us/abapcompute_string_format_options.html
|
|
11
11
|
const alphaOptions = (0, combi_1.altPrio)("OUT", "RAW", "IN", _1.Source);
|
|
12
12
|
const alignOptions = (0, combi_1.altPrio)("LEFT", "RIGHT", "CENTER", _1.Source, dynamic_1.Dynamic);
|
|
13
13
|
const dateTimeOptions = (0, combi_1.altPrio)("RAW", "ISO", "USER", "ENVIRONMENT", _1.Source, dynamic_1.Dynamic);
|
|
@@ -372,7 +372,7 @@ class BuiltIn {
|
|
|
372
372
|
const sy = new _typed_identifier_1.TypedIdentifier(id1, BuiltIn.filename, type, ["read_only" /* IdentifierMeta.ReadOnly */, "built-in" /* IdentifierMeta.BuiltIn */]);
|
|
373
373
|
const id2 = new tokens_1.Identifier(new position_1.Position(this.row++, 1), "syst");
|
|
374
374
|
const syst = new _typed_identifier_1.TypedIdentifier(id2, BuiltIn.filename, type, ["read_only" /* IdentifierMeta.ReadOnly */, "built-in" /* IdentifierMeta.BuiltIn */]);
|
|
375
|
-
// https://help.sap.com/doc/
|
|
375
|
+
// https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-us/abennews-610-system.html
|
|
376
376
|
const id3 = new tokens_1.Identifier(new position_1.Position(this.row++, 1), "sy-repid");
|
|
377
377
|
const syrepid = new _typed_identifier_1.TypedIdentifier(id3, BuiltIn.filename, new basic_1.CharacterType(40, { qualifiedName: "sy-repid" }), ["read_only" /* IdentifierMeta.ReadOnly */, "built-in" /* IdentifierMeta.BuiltIn */]);
|
|
378
378
|
const id4 = new tokens_1.Identifier(new position_1.Position(this.row++, 1), "syst-repid");
|
|
@@ -434,7 +434,7 @@ class TypeUtils {
|
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
436
|
else if (source instanceof basic_1.IntegerType) {
|
|
437
|
-
if (target instanceof basic_1.StringType) {
|
|
437
|
+
if (target instanceof basic_1.StringType || target instanceof basic_1.DateType) {
|
|
438
438
|
return false;
|
|
439
439
|
}
|
|
440
440
|
else if (target instanceof basic_1.Integer8Type || target instanceof basic_1.PackedType) {
|
|
@@ -38,10 +38,15 @@ const Expressions = __importStar(require("../../2_statements/expressions"));
|
|
|
38
38
|
const _typed_identifier_1 = require("../../types/_typed_identifier");
|
|
39
39
|
const basic_1 = require("../../types/basic");
|
|
40
40
|
const basic_types_1 = require("../basic_types");
|
|
41
|
+
const _syntax_input_1 = require("../_syntax_input");
|
|
41
42
|
const assert_error_1 = require("../assert_error");
|
|
42
43
|
class Ranges {
|
|
43
44
|
runSyntax(node, input) {
|
|
44
45
|
var _a;
|
|
46
|
+
if (input.scope.isAnyOO()) {
|
|
47
|
+
const message = "RANGES is not allowed within classes";
|
|
48
|
+
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
49
|
+
}
|
|
45
50
|
const nameToken = (_a = node.findFirstExpression(Expressions.DefinitionName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
|
|
46
51
|
const typeExpression = node.findFirstExpression(Expressions.SimpleFieldChain2);
|
|
47
52
|
if (typeExpression === undefined) {
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.TypeMesh = void 0;
|
|
37
|
+
const Expressions = __importStar(require("../../2_statements/expressions"));
|
|
38
|
+
const Statements = __importStar(require("../../2_statements/statements"));
|
|
39
|
+
const nodes_1 = require("../../nodes");
|
|
40
|
+
const _typed_identifier_1 = require("../../types/_typed_identifier");
|
|
41
|
+
const Basic = __importStar(require("../../types/basic"));
|
|
42
|
+
const basic_types_1 = require("../basic_types");
|
|
43
|
+
const type_1 = require("../statements/type");
|
|
44
|
+
const _scope_type_1 = require("../_scope_type");
|
|
45
|
+
class TypeMesh {
|
|
46
|
+
runSyntax(node, input) {
|
|
47
|
+
var _a;
|
|
48
|
+
const begin = node.findDirectStatement(Statements.TypeMeshBegin);
|
|
49
|
+
if (begin === undefined) {
|
|
50
|
+
return undefined;
|
|
51
|
+
}
|
|
52
|
+
const name = (_a = begin.findFirstExpression(Expressions.NamespaceSimpleName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
|
|
53
|
+
if (name === undefined) {
|
|
54
|
+
return undefined;
|
|
55
|
+
}
|
|
56
|
+
const components = [];
|
|
57
|
+
for (const c of node.getChildren()) {
|
|
58
|
+
if (!(c instanceof nodes_1.StatementNode)) {
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
const ctyp = c.get();
|
|
62
|
+
if (ctyp instanceof Statements.Type) {
|
|
63
|
+
const found = new type_1.Type().runSyntax(c, input, name.getStr() + "-");
|
|
64
|
+
if (found) {
|
|
65
|
+
components.push({ name: found.getName(), type: found.getType() });
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
else if (ctyp instanceof Statements.TypeMesh) {
|
|
69
|
+
const found = this.runMeshNode(c, input);
|
|
70
|
+
if (found) {
|
|
71
|
+
components.push({ name: found.getName(), type: found.getType() });
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
let qualifiedName = name.getStr();
|
|
76
|
+
if (input.scope.getType() === _scope_type_1.ScopeType.ClassDefinition
|
|
77
|
+
|| input.scope.getType() === _scope_type_1.ScopeType.Interface) {
|
|
78
|
+
qualifiedName = input.scope.getName() + "=>" + qualifiedName;
|
|
79
|
+
}
|
|
80
|
+
return new _typed_identifier_1.TypedIdentifier(name, input.filename, new Basic.StructureType(components, qualifiedName));
|
|
81
|
+
}
|
|
82
|
+
////////////////////
|
|
83
|
+
runMeshNode(node, input) {
|
|
84
|
+
var _a;
|
|
85
|
+
const nameToken = (_a = node.findFirstExpression(Expressions.NamespaceSimpleName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
|
|
86
|
+
if (nameToken === undefined) {
|
|
87
|
+
return undefined;
|
|
88
|
+
}
|
|
89
|
+
const typeName = node.findFirstExpression(Expressions.TypeName);
|
|
90
|
+
let type = new basic_types_1.BasicTypes(input).resolveTypeName(typeName);
|
|
91
|
+
if (type === undefined) {
|
|
92
|
+
type = new Basic.UnknownType("Mesh node, unknown type " + (typeName === null || typeName === void 0 ? void 0 : typeName.concatTokens()));
|
|
93
|
+
}
|
|
94
|
+
else if (node.concatTokens().toUpperCase().includes(" TYPE REF TO ")) {
|
|
95
|
+
type = new Basic.DataReference(type);
|
|
96
|
+
}
|
|
97
|
+
return new _typed_identifier_1.TypedIdentifier(nameToken, input.filename, type);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
exports.TypeMesh = TypeMesh;
|
|
101
|
+
//# sourceMappingURL=type_mesh.js.map
|
|
@@ -46,6 +46,7 @@ const objects_1 = require("../../objects");
|
|
|
46
46
|
const position_1 = require("../../position");
|
|
47
47
|
const data_1 = require("./structures/data");
|
|
48
48
|
const type_enum_1 = require("./structures/type_enum");
|
|
49
|
+
const type_mesh_1 = require("./structures/type_mesh");
|
|
49
50
|
const types_1 = require("./structures/types");
|
|
50
51
|
const statics_1 = require("./structures/statics");
|
|
51
52
|
const constants_1 = require("./structures/constants");
|
|
@@ -480,6 +481,13 @@ class SyntaxLogic {
|
|
|
480
481
|
this.scope.addIdentifier(new statics_1.Statics().runSyntax(node, input));
|
|
481
482
|
return true;
|
|
482
483
|
}
|
|
484
|
+
else if (stru instanceof Structures.TypeMesh) {
|
|
485
|
+
const found = new type_mesh_1.TypeMesh().runSyntax(node, input);
|
|
486
|
+
if (found) {
|
|
487
|
+
this.scope.addType(found);
|
|
488
|
+
}
|
|
489
|
+
return true;
|
|
490
|
+
}
|
|
483
491
|
else if (stru instanceof Structures.TypeEnum) {
|
|
484
492
|
const values = new type_enum_1.TypeEnum().runSyntax(node, input).values;
|
|
485
493
|
this.scope.addList(values);
|
|
@@ -47,6 +47,7 @@ const data_1 = require("../5_syntax/statements/data");
|
|
|
47
47
|
const constant_1 = require("../5_syntax/statements/constant");
|
|
48
48
|
const data_2 = require("../5_syntax/structures/data");
|
|
49
49
|
const type_enum_1 = require("../5_syntax/structures/type_enum");
|
|
50
|
+
const type_mesh_1 = require("../5_syntax/structures/type_mesh");
|
|
50
51
|
const constants_1 = require("../5_syntax/structures/constants");
|
|
51
52
|
const type_definitions_1 = require("./type_definitions");
|
|
52
53
|
const types_1 = require("../5_syntax/structures/types");
|
|
@@ -207,6 +208,13 @@ class Attributes {
|
|
|
207
208
|
// scope.addIdentifier(attr);
|
|
208
209
|
}
|
|
209
210
|
}
|
|
211
|
+
else if (ctyp instanceof Structures.TypeMesh) {
|
|
212
|
+
const res = new type_mesh_1.TypeMesh().runSyntax(c, input);
|
|
213
|
+
if (res) {
|
|
214
|
+
input.scope.addType(res);
|
|
215
|
+
this.tlist.push({ type: res, visibility });
|
|
216
|
+
}
|
|
217
|
+
}
|
|
210
218
|
else if (ctyp instanceof Structures.Types) {
|
|
211
219
|
const res = new types_1.Types().runSyntax(c, input);
|
|
212
220
|
if (res) {
|
package/build/src/registry.js
CHANGED
|
@@ -19,7 +19,7 @@ class SevenBitAscii {
|
|
|
19
19
|
shortDescription: `Only allow characters from the 7bit ASCII set.`,
|
|
20
20
|
extendedInformation: `https://docs.abapopenchecks.org/checks/05/
|
|
21
21
|
|
|
22
|
-
https://help.sap.com/doc/
|
|
22
|
+
https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abencharacter_set_guidl.html
|
|
23
23
|
|
|
24
24
|
Checkes files with extensions ".abap" and ".asddls"`,
|
|
25
25
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
@@ -79,7 +79,7 @@ class AvoidUse extends _abap_rule_1.ABAPRule {
|
|
|
79
79
|
shortDescription: `Detects usage of certain statements.`,
|
|
80
80
|
extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
|
|
81
81
|
|
|
82
|
-
Macros: https://help.sap.com/doc/
|
|
82
|
+
Macros: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abenmacros_guidl.html
|
|
83
83
|
|
|
84
84
|
STATICS: use CLASS-DATA instead
|
|
85
85
|
|
|
@@ -23,7 +23,7 @@ class CDSCommentStyle {
|
|
|
23
23
|
|
|
24
24
|
Comments starting with "--" are considered obsolete
|
|
25
25
|
|
|
26
|
-
https://help.sap.com/doc/
|
|
26
|
+
https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-us/abencds_general_syntax_rules.html`,
|
|
27
27
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
28
28
|
badExample: "-- this is a comment",
|
|
29
29
|
goodExample: "// this is a comment",
|
|
@@ -81,7 +81,7 @@ class ChainMainlyDeclarations extends _abap_rule_1.ABAPRule {
|
|
|
81
81
|
extendedInformation: `
|
|
82
82
|
https://docs.abapopenchecks.org/checks/23/
|
|
83
83
|
|
|
84
|
-
https://help.sap.com/doc/
|
|
84
|
+
https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abenchained_statements_guidl.html
|
|
85
85
|
`,
|
|
86
86
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
|
|
87
87
|
badExample: `CALL METHOD: bar.`,
|
|
@@ -37,7 +37,7 @@ before reading it, so a leftover value is not accidentally used.
|
|
|
37
37
|
|
|
38
38
|
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#clear-or-overwrite-exporting-reference-parameters
|
|
39
39
|
|
|
40
|
-
https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abenref_transf_output_param_guidl.
|
|
40
|
+
https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abenref_transf_output_param_guidl.html
|
|
41
41
|
|
|
42
42
|
Note: EXPORTING parameters passed by VALUE are always initialized and are therefore not reported.
|
|
43
43
|
Reading and writing the parameter in the same statement (e.g. "ev_result = ev_result + 1") is reported,
|
|
@@ -22,7 +22,7 @@ class ConstructorVisibilityPublic {
|
|
|
22
22
|
This only applies to global classes.
|
|
23
23
|
|
|
24
24
|
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
|
|
25
|
-
https://help.sap.com/doc/
|
|
25
|
+
https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abeninstance_constructor_guidl.html`,
|
|
26
26
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
27
27
|
badExample: `CLASS zcl_foo DEFINITION PUBLIC CREATE PRIVATE.
|
|
28
28
|
PRIVATE SECTION.
|
|
@@ -59,8 +59,8 @@ class ExitOrCheck extends _abap_rule_1.ABAPRule {
|
|
|
59
59
|
title: "Find EXIT or CHECK outside loops",
|
|
60
60
|
shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
|
|
61
61
|
Use RETURN to leave procesing blocks instead.`,
|
|
62
|
-
extendedInformation: `https://help.sap.com/doc/
|
|
63
|
-
https://help.sap.com/doc/
|
|
62
|
+
extendedInformation: `https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abenleave_processing_blocks.html
|
|
63
|
+
https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abapcheck_processing_blocks.html
|
|
64
64
|
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#check-vs-return`,
|
|
65
65
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
|
|
66
66
|
badExample: `CHECK is_valid = abap_true.
|
|
@@ -21,7 +21,7 @@ class ExpandMacros extends _abap_rule_1.ABAPRule {
|
|
|
21
21
|
key: "expand_macros",
|
|
22
22
|
title: "Expand Macros",
|
|
23
23
|
shortDescription: `Allows expanding macro calls with quick fixes`,
|
|
24
|
-
extendedInformation: `Macros: https://help.sap.com/doc/
|
|
24
|
+
extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abenmacros_guidl.html
|
|
25
25
|
|
|
26
26
|
Note that macros/DEFINE cannot be used in the ABAP Cloud programming model`,
|
|
27
27
|
badExample: `DEFINE _hello.
|
|
@@ -50,7 +50,7 @@ class FMGlobalParametersObsolete {
|
|
|
50
50
|
key: "fm_global_parameters_obsolete",
|
|
51
51
|
title: "FM Global Parameters Obsolete",
|
|
52
52
|
shortDescription: `Check for function modules with global parameters`,
|
|
53
|
-
extendedInformation: `https://help.sap.com/doc/
|
|
53
|
+
extendedInformation: `https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abenglobal_parameters_obsolete.html`,
|
|
54
54
|
tags: [],
|
|
55
55
|
};
|
|
56
56
|
}
|
|
@@ -53,7 +53,7 @@ class FormTablesObsolete extends _abap_rule_1.ABAPRule {
|
|
|
53
53
|
key: "form_tables_obsolete",
|
|
54
54
|
title: "TABLES parameters are obsolete",
|
|
55
55
|
shortDescription: `Checks for TABLES parameters in forms.`,
|
|
56
|
-
extendedInformation: `https://help.sap.com/doc/
|
|
56
|
+
extendedInformation: `https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abapform_tables.html`,
|
|
57
57
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
58
58
|
badExample: `FORM update_items TABLES items.
|
|
59
59
|
ENDFORM.`,
|
|
@@ -57,7 +57,7 @@ class ImplicitStartOfSelection extends _abap_rule_1.ABAPRule {
|
|
|
57
57
|
shortDescription: `Add explicit selection screen event handling`,
|
|
58
58
|
extendedInformation: `Only runs for executable programs
|
|
59
59
|
|
|
60
|
-
https://help.sap.com/doc/
|
|
60
|
+
https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-us/abapstart-of-selection.html`,
|
|
61
61
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
62
62
|
badExample: `REPORT zfoo.
|
|
63
63
|
WRITE 'hello'.`,
|
|
@@ -19,7 +19,7 @@ class MethodOverwritesBuiltIn extends _abap_rule_1.ABAPRule {
|
|
|
19
19
|
key: "method_overwrites_builtin",
|
|
20
20
|
title: "Method name overwrites builtin function",
|
|
21
21
|
shortDescription: `Checks Method names that overwrite builtin SAP functions`,
|
|
22
|
-
extendedInformation: `https://help.sap.com/doc/
|
|
22
|
+
extendedInformation: `https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-us/abenbuilt_in_functions_overview.html
|
|
23
23
|
|
|
24
24
|
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
|
|
25
25
|
|
|
@@ -56,7 +56,7 @@ class MixReturning extends _abap_rule_1.ABAPRule {
|
|
|
56
56
|
shortDescription: `Checks that methods don't have a mixture of returning and exporting/changing parameters`,
|
|
57
57
|
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-either-returning-or-exporting-or-changing-but-not-a-combination
|
|
58
58
|
|
|
59
|
-
This syntax is not allowed on versions earlier than 740sp02, https://help.sap.com/doc/
|
|
59
|
+
This syntax is not allowed on versions earlier than 740sp02, https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-us/abennews-740-abap_objects.html#!ABAP_MODIFICATION_1@1@`,
|
|
60
60
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Syntax],
|
|
61
61
|
badExample: `CLASS lcl DEFINITION.
|
|
62
62
|
PUBLIC SECTION.
|
|
@@ -54,7 +54,7 @@ class NoMacros extends _abap_rule_1.ABAPRule {
|
|
|
54
54
|
shortDescription: `Checks that macros are not used`,
|
|
55
55
|
extendedInformation: `Macros reduce readability and are difficult to debug, use methods or form routines instead.
|
|
56
56
|
|
|
57
|
-
https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abenmacros_guidl.
|
|
57
|
+
https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abenmacros_guidl.html`,
|
|
58
58
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
59
59
|
badExample: `DEFINE _macro.
|
|
60
60
|
WRITE 'hello'.
|
|
@@ -131,44 +131,44 @@ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-func
|
|
|
131
131
|
|
|
132
132
|
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
|
|
133
133
|
|
|
134
|
-
SET EXTENDED CHECK: https://help.sap.com/doc/
|
|
134
|
+
SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-us/abapset_extended_check.html
|
|
135
135
|
|
|
136
|
-
IS REQUESTED: https://help.sap.com/doc/
|
|
136
|
+
IS REQUESTED: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abenlogexp_requested.html
|
|
137
137
|
|
|
138
|
-
WITH HEADER LINE: https://help.sap.com/doc/
|
|
138
|
+
WITH HEADER LINE: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abapdata_header_line.html
|
|
139
139
|
|
|
140
|
-
FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/
|
|
140
|
+
FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-us/abapfield-symbols_obsolete_typing.html
|
|
141
141
|
|
|
142
|
-
TYPE-POOLS: from 702, https://help.sap.com/doc/
|
|
142
|
+
TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abennews-71-program_load.html
|
|
143
143
|
|
|
144
|
-
LOAD addition: from 702, https://help.sap.com/doc/
|
|
144
|
+
LOAD addition: from 702, https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abennews-71-program_load.html
|
|
145
145
|
|
|
146
|
-
COMMUICATION: https://help.sap.com/doc/
|
|
146
|
+
COMMUICATION: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-us/abapcommunication.html
|
|
147
147
|
|
|
148
|
-
OCCURS: https://help.sap.com/doc/
|
|
148
|
+
OCCURS: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-us/abapdata_occurs.html
|
|
149
149
|
|
|
150
|
-
PARAMETER: https://help.sap.com/doc/
|
|
150
|
+
PARAMETER: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abapparameter.html
|
|
151
151
|
|
|
152
|
-
RANGES: https://help.sap.com/doc/
|
|
152
|
+
RANGES: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abapranges.html
|
|
153
153
|
|
|
154
|
-
PACK: https://help.sap.com/doc/
|
|
154
|
+
PACK: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-us/abappack.html
|
|
155
155
|
|
|
156
|
-
MOVE: https://help.sap.com/doc/
|
|
156
|
+
MOVE: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-us/abapmove_obs.html
|
|
157
157
|
|
|
158
|
-
SELECT without INTO: https://help.sap.com/doc/
|
|
158
|
+
SELECT without INTO: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abapselect_obsolete.html
|
|
159
159
|
SELECT COUNT(*) is considered okay
|
|
160
160
|
|
|
161
|
-
FREE MEMORY: https://help.sap.com/doc/
|
|
161
|
+
FREE MEMORY: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-us/abapfree_mem_id_obsolete.html
|
|
162
162
|
|
|
163
|
-
SORT BY FS: https://help.sap.com/doc/
|
|
163
|
+
SORT BY FS: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abapsort_itab_obsolete.html
|
|
164
164
|
|
|
165
|
-
CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/
|
|
165
|
+
CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abapcall_transformation_objects.html
|
|
166
166
|
|
|
167
|
-
POSIX REGEX: https://help.sap.com/doc/
|
|
167
|
+
POSIX REGEX: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/ABENREGEX_MIGRATING_POSIX.html
|
|
168
168
|
|
|
169
169
|
OCCURENCES: check for OCCURENCES vs OCCURRENCES
|
|
170
170
|
|
|
171
|
-
CLIENT SPECIFIED, from 754: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/
|
|
171
|
+
CLIENT SPECIFIED, from 754: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abapselect_client_obsolete.html`,
|
|
172
172
|
badExample: `REFRESH itab.
|
|
173
173
|
|
|
174
174
|
COMPUTE foo = 2 + 2.
|
|
@@ -24,7 +24,7 @@ class PragmaStyle extends _abap_rule_1.ABAPRule {
|
|
|
24
24
|
title: "Pragma Style",
|
|
25
25
|
shortDescription: `Check pragmas placement and case`,
|
|
26
26
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
27
|
-
extendedInformation: `https://help.sap.com/doc/
|
|
27
|
+
extendedInformation: `https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/ABENPRAGMA.html`,
|
|
28
28
|
badExample: `DATA field ##NO_TEXT TYPE i.`,
|
|
29
29
|
goodExample: `DATA field TYPE i ##NO_TEXT.`,
|
|
30
30
|
};
|
|
@@ -54,7 +54,7 @@ class RFCErrorHandling extends _abap_rule_1.ABAPRule {
|
|
|
54
54
|
title: "RFC error handling",
|
|
55
55
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
56
56
|
shortDescription: `Checks that exceptions 'system_failure' and 'communication_failure' are handled in RFC calls`,
|
|
57
|
-
extendedInformation: `https://help.sap.com/doc/
|
|
57
|
+
extendedInformation: `https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abenrfc_exception.html`,
|
|
58
58
|
badExample: `CALL FUNCTION 'ZRFC'
|
|
59
59
|
DESTINATION lv_rfc.`,
|
|
60
60
|
goodExample: `CALL FUNCTION 'ZRFC'
|
|
@@ -55,9 +55,9 @@ class StrictSQL extends _abap_rule_1.ABAPRule {
|
|
|
55
55
|
key: "strict_sql",
|
|
56
56
|
title: "Strict SQL",
|
|
57
57
|
shortDescription: `Strict SQL`,
|
|
58
|
-
extendedInformation: `https://help.sap.com/doc/
|
|
58
|
+
extendedInformation: `https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abapinto_clause.html
|
|
59
59
|
|
|
60
|
-
https://help.sap.com/doc/
|
|
60
|
+
https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/ABENABAP_SQL_STRICT_MODES.html
|
|
61
61
|
|
|
62
62
|
Also see separate rule sql_escape_host_variables
|
|
63
63
|
|
|
@@ -52,7 +52,7 @@ class SyModification extends _abap_rule_1.ABAPRule {
|
|
|
52
52
|
key: "sy_modification",
|
|
53
53
|
title: "Modification of SY fields",
|
|
54
54
|
shortDescription: `Finds modification of sy fields`,
|
|
55
|
-
extendedInformation: `https://help.sap.com/doc/
|
|
55
|
+
extendedInformation: `https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abensystem_fields.html
|
|
56
56
|
|
|
57
57
|
Changes to SY-TVAR* fields are not reported
|
|
58
58
|
|
|
@@ -53,7 +53,7 @@ class TablesDeclaredLocally extends _abap_rule_1.ABAPRule {
|
|
|
53
53
|
key: "tables_declared_locally",
|
|
54
54
|
title: "Check for locally declared TABLES",
|
|
55
55
|
shortDescription: `TABLES are always global, so declare them globally`,
|
|
56
|
-
extendedInformation: `https://help.sap.com/doc/
|
|
56
|
+
extendedInformation: `https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-us/abaptables.html`,
|
|
57
57
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
58
58
|
badExample: `FORM foo.
|
|
59
59
|
TABLES t100.
|