@abaplint/core 2.113.61 → 2.113.63
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 +6 -6
- package/build/abaplint.d.ts +1 -1
- package/build/src/abap/2_statements/expressions/corresponding_body.js +1 -1
- package/build/src/abap/2_statements/expressions/entity_association.js +1 -1
- package/build/src/abap/2_statements/expressions/type_structure.js +5 -4
- package/build/src/abap/2_statements/expressions/type_table.js +1 -1
- package/build/src/abap/2_statements/expressions/write_offset_length.js +1 -1
- package/build/src/abap/2_statements/statements/add.js +2 -1
- package/build/src/abap/2_statements/statements/describe.js +2 -1
- package/build/src/abap/2_statements/statements/import.js +1 -1
- package/build/src/abap/2_statements/statements/infotypes.js +4 -2
- package/build/src/abap/2_statements/statements/program.js +1 -1
- package/build/src/abap/2_statements/statements/read_dataset.js +1 -1
- package/build/src/abap/2_statements/statements/read_entities.js +1 -1
- package/build/src/abap/2_statements/statements/selectionscreen.js +4 -2
- package/build/src/abap/2_statements/statements/write.js +1 -1
- package/build/src/abap/flow/flow_graph.js +7 -7
- package/build/src/lsp/help.js +10 -10
- package/build/src/objects/table.js +6 -3
- package/build/src/registry.js +1 -1
- package/build/src/rules/7bit_ascii.js +4 -4
- package/build/src/rules/abapdoc.js +4 -4
- package/build/src/rules/add_test_attributes.js +20 -20
- package/build/src/rules/align_parameters.js +40 -40
- package/build/src/rules/align_type_expressions.js +28 -28
- package/build/src/rules/ambiguous_statement.js +7 -7
- package/build/src/rules/avoid_use.js +10 -10
- package/build/src/rules/begin_end_names.js +4 -4
- package/build/src/rules/begin_single_include.js +13 -13
- package/build/src/rules/call_transaction_authority_check.js +3 -3
- package/build/src/rules/cds_comment_style.js +4 -4
- package/build/src/rules/cds_legacy_view.js +4 -4
- package/build/src/rules/chain_mainly_declarations.js +4 -4
- package/build/src/rules/change_if_to_case.js +8 -8
- package/build/src/rules/check_abstract.js +2 -2
- package/build/src/rules/check_comments.js +4 -4
- package/build/src/rules/check_include.js +3 -3
- package/build/src/rules/check_subrc.js +8 -8
- package/build/src/rules/classic_exceptions_overlap.js +10 -10
- package/build/src/rules/commented_code.js +1 -1
- package/build/src/rules/constructor_visibility_public.js +4 -4
- package/build/src/rules/contains_tab.js +2 -2
- package/build/src/rules/cyclic_oo.js +4 -4
- package/build/src/rules/dangerous_statement.js +1 -1
- package/build/src/rules/definitions_top.js +6 -6
- package/build/src/rules/downport.js +82 -82
- package/build/src/rules/easy_to_find_messages.js +6 -6
- package/build/src/rules/empty_event.js +6 -6
- package/build/src/rules/empty_line_in_statement.js +2 -2
- package/build/src/rules/empty_structure.js +6 -6
- package/build/src/rules/exit_or_check.js +3 -3
- package/build/src/rules/expand_macros.js +5 -5
- package/build/src/rules/exporting.js +1 -1
- package/build/src/rules/forbidden_identifier.js +1 -1
- package/build/src/rules/forbidden_void_type.js +2 -2
- package/build/src/rules/fully_type_itabs.js +2 -2
- package/build/src/rules/functional_writing.js +17 -17
- package/build/src/rules/global_class.js +8 -8
- package/build/src/rules/identical_conditions.js +12 -12
- package/build/src/rules/identical_contents.js +14 -14
- package/build/src/rules/identical_descriptions.js +6 -6
- package/build/src/rules/if_in_if.js +35 -35
- package/build/src/rules/implement_methods.js +3 -3
- package/build/src/rules/implicit_start_of_selection.js +5 -5
- package/build/src/rules/in_statement_indentation.js +11 -11
- package/build/src/rules/indentation.js +16 -16
- package/build/src/rules/intf_referencing_clas.js +3 -3
- package/build/src/rules/invalid_table_index.js +2 -2
- package/build/src/rules/line_break_style.js +2 -2
- package/build/src/rules/line_length.js +1 -1
- package/build/src/rules/line_only_punc.js +1 -1
- package/build/src/rules/local_variable_names.js +6 -6
- package/build/src/rules/macro_naming.js +2 -2
- package/build/src/rules/main_file_contents.js +4 -4
- package/build/src/rules/many_parentheses.js +10 -10
- package/build/src/rules/max_one_method_parameter_per_line.js +7 -7
- package/build/src/rules/max_one_statement.js +5 -5
- package/build/src/rules/method_length.js +2 -2
- package/build/src/rules/method_overwrites_builtin.js +12 -12
- package/build/src/rules/mix_returning.js +6 -6
- package/build/src/rules/nesting.js +1 -1
- package/build/src/rules/no_chained_assignment.js +1 -1
- package/build/src/rules/no_external_form_calls.js +2 -2
- package/build/src/rules/no_inline_in_optional_branches.js +11 -11
- package/build/src/rules/no_prefixes.js +6 -6
- package/build/src/rules/no_public_attributes.js +1 -1
- package/build/src/rules/no_yoda_conditions.js +4 -4
- package/build/src/rules/nrob_consistency.js +2 -2
- package/build/src/rules/obsolete_statement.js +51 -51
- package/build/src/rules/omit_parameter_name.js +3 -3
- package/build/src/rules/omit_receiving.js +13 -13
- package/build/src/rules/parser_702_chaining.js +2 -2
- package/build/src/rules/parser_error.js +2 -2
- package/build/src/rules/parser_missing_space.js +1 -1
- package/build/src/rules/prefer_inline.js +16 -16
- package/build/src/rules/prefer_is_not.js +9 -9
- package/build/src/rules/prefer_raise_exception_new.js +5 -5
- package/build/src/rules/prefer_returning_to_exporting.js +4 -4
- package/build/src/rules/prefer_xsdbool.js +2 -2
- package/build/src/rules/preferred_compare_operator.js +2 -2
- package/build/src/rules/reduce_procedural_code.js +17 -17
- package/build/src/rules/remove_descriptions.js +4 -4
- package/build/src/rules/rfc_error_handling.js +7 -7
- package/build/src/rules/select_add_order_by.js +5 -5
- package/build/src/rules/select_performance.js +5 -5
- package/build/src/rules/select_single_full_key.js +2 -2
- package/build/src/rules/sicf_consistency.js +2 -2
- package/build/src/rules/slow_parameter_passing.js +16 -16
- package/build/src/rules/space_before_dot.js +2 -2
- package/build/src/rules/sql_value_conversion.js +6 -6
- package/build/src/rules/start_at_tab.js +1 -1
- package/build/src/rules/strict_sql.js +6 -6
- package/build/src/rules/sy_modification.js +3 -3
- package/build/src/rules/tabl_enhancement_category.js +2 -2
- package/build/src/rules/tables_declared_locally.js +2 -2
- package/build/src/rules/type_form_parameters.js +2 -2
- package/build/src/rules/unnecessary_pragma.js +29 -29
- package/build/src/rules/unnecessary_return.js +11 -11
- package/build/src/rules/unused_macros.js +6 -6
- package/build/src/rules/unused_methods.js +12 -12
- package/build/src/rules/unused_variables.js +12 -12
- package/build/src/rules/use_bool_expression.js +8 -8
- package/build/src/rules/use_class_based_exceptions.js +8 -8
- package/build/src/rules/use_line_exists.js +6 -6
- package/build/src/rules/use_new.js +4 -4
- package/build/src/rules/when_others_last.js +6 -6
- package/package.json +70 -70
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
# @abaplint/core
|
|
2
|
-
|
|
3
|
-
[abaplint](https://abaplint.org) core library
|
|
4
|
-
|
|
5
|
-
Exposes functionality like the parser and rules, which can be used in other projects.
|
|
6
|
-
|
|
1
|
+
# @abaplint/core
|
|
2
|
+
|
|
3
|
+
[abaplint](https://abaplint.org) core library
|
|
4
|
+
|
|
5
|
+
Exposes functionality like the parser and rules, which can be used in other projects.
|
|
6
|
+
|
|
7
7
|
For more information see https://github.com/abaplint/abaplint
|
package/build/abaplint.d.ts
CHANGED
|
@@ -2024,7 +2024,7 @@ declare class Enhancement_2 implements IStatement {
|
|
|
2024
2024
|
|
|
2025
2025
|
declare enum EnhancementCategory {
|
|
2026
2026
|
NotClassified = "0",
|
|
2027
|
-
|
|
2027
|
+
CannotBeEnhanced = "1",
|
|
2028
2028
|
Character = "2",
|
|
2029
2029
|
CharacterOrNumeric = "3",
|
|
2030
2030
|
Deep = "4"
|
|
@@ -11,7 +11,7 @@ class CorrespondingBody extends combi_1.Expression {
|
|
|
11
11
|
const mapping = (0, combi_1.seq)("MAPPING", (0, combi_1.plus)((0, combi_1.seq)(_1.ComponentName, "=", component_chain_1.ComponentChain)));
|
|
12
12
|
const baseParen = (0, combi_1.seq)("BASE", (0, combi_1.tok)(tokens_1.WParenLeftW), _1.Source, (0, combi_1.tok)(tokens_1.WParenRightW));
|
|
13
13
|
const discarding = (0, combi_1.ver)(version_1.Version.v751, "DISCARDING DUPLICATES");
|
|
14
|
-
return (0, combi_1.seq)((0, combi_1.optPrio)("DEEP"), (0, combi_1.optPrio)(baseParen), _1.Source, (0, combi_1.optPrio)(discarding), (0, combi_1.optPrio)(mapping), (0, combi_1.optPrio)((0, combi_1.seq)("EXCEPT", (0, combi_1.alt)((0, combi_1.plus)(_1.Field), "*"))));
|
|
14
|
+
return (0, combi_1.seq)((0, combi_1.optPrio)("DEEP"), (0, combi_1.optPrio)(baseParen), _1.Source, (0, combi_1.optPrio)(discarding), (0, combi_1.optPrio)(mapping), (0, combi_1.optPrio)("CHANGING CONTROL"), (0, combi_1.optPrio)((0, combi_1.seq)("EXCEPT", (0, combi_1.alt)((0, combi_1.plus)(_1.Field), "*"))));
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
exports.CorrespondingBody = CorrespondingBody;
|
|
@@ -4,7 +4,7 @@ exports.EntityAssociation = void 0;
|
|
|
4
4
|
const combi_1 = require("../combi");
|
|
5
5
|
class EntityAssociation extends combi_1.Expression {
|
|
6
6
|
getRunnable() {
|
|
7
|
-
return (0, combi_1.regex)(
|
|
7
|
+
return (0, combi_1.regex)(/^\w+(\\_|\\\\)\w+$/);
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
exports.EntityAssociation = EntityAssociation;
|
|
@@ -7,11 +7,12 @@ class TypeStructure extends combi_1.Expression {
|
|
|
7
7
|
getRunnable() {
|
|
8
8
|
// todo, add version,
|
|
9
9
|
const hier = (0, combi_1.seq)("HIERARCHY", _1.NamespaceSimpleName);
|
|
10
|
-
const create = (0, combi_1.seq)("CREATE", _1.NamespaceSimpleName);
|
|
11
|
-
const update = (0, combi_1.seq)("UPDATE", _1.NamespaceSimpleName);
|
|
12
|
-
const action = (0, combi_1.seq)("ACTION IMPORT", _1.
|
|
10
|
+
const create = (0, combi_1.seq)("CREATE", (0, combi_1.alt)(_1.NamespaceSimpleName, _1.EntityAssociation));
|
|
11
|
+
const update = (0, combi_1.seq)("UPDATE", (0, combi_1.alt)(_1.NamespaceSimpleName, _1.EntityAssociation));
|
|
12
|
+
const action = (0, combi_1.seq)("ACTION IMPORT", _1.Source);
|
|
13
|
+
const permissionsRequest = (0, combi_1.seq)("PERMISSIONS REQUEST", _1.NamespaceSimpleName);
|
|
13
14
|
const evt = (0, combi_1.seq)("EVENT", _1.EventName);
|
|
14
|
-
return (0, combi_1.seq)("TYPE STRUCTURE FOR", (0, combi_1.altPrio)(hier, evt, create, update, action));
|
|
15
|
+
return (0, combi_1.seq)("TYPE STRUCTURE FOR", (0, combi_1.altPrio)(hier, evt, create, update, action, permissionsRequest));
|
|
15
16
|
}
|
|
16
17
|
}
|
|
17
18
|
exports.TypeStructure = TypeStructure;
|
|
@@ -19,7 +19,7 @@ class TypeTable extends combi_1.Expression {
|
|
|
19
19
|
// "WITH" is not allowed as a field name in keys
|
|
20
20
|
const typetable = (0, combi_1.alt)(generic, (0, combi_1.seq)(normal1, (0, combi_1.alt)((0, combi_1.opt)((0, combi_1.per)(header, initial, (0, combi_1.plusPrio)(type_table_key_1.TypeTableKey))), (0, combi_1.seq)((0, combi_1.plus)(type_table_key_1.TypeTableKey), (0, combi_1.optPrio)(initial)))));
|
|
21
21
|
const occurs = (0, combi_1.seq)("OCCURS", (0, combi_1.altPrio)(_1.Integer, field_chain_1.FieldChain));
|
|
22
|
-
const derived = (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("TABLE FOR", (0, combi_1.altPrio)("ACTION IMPORT", "ACTION RESULT", "CREATE", "EVENT", "FAILED", "LOCK", "READ RESULT", "UPDATE"), _1.TypeName));
|
|
22
|
+
const derived = (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("TABLE FOR", (0, combi_1.altPrio)("ACTION IMPORT", "ACTION RESULT", "CREATE", "EVENT", "FAILED", "LOCK", "READ RESULT", "UPDATE"), (0, combi_1.alt)(_1.TypeName, _1.EntityAssociation)));
|
|
23
23
|
const oldType = (0, combi_1.seq)((0, combi_1.opt)("REF TO"), _1.TypeName, (0, combi_1.alt)((0, combi_1.seq)(occurs, (0, combi_1.opt)(header)), header));
|
|
24
24
|
const oldLike = (0, combi_1.seq)((0, combi_1.opt)("REF TO"), field_chain_1.FieldChain, (0, combi_1.alt)((0, combi_1.seq)(occurs, (0, combi_1.opt)(header)), header));
|
|
25
25
|
const typeLine = (0, combi_1.seq)("LINE OF", _1.TypeName, occurs, header);
|
|
@@ -8,7 +8,7 @@ class WriteOffsetLength extends combi_1.Expression {
|
|
|
8
8
|
getRunnable() {
|
|
9
9
|
const post = (0, combi_1.seq)((0, combi_1.alt)(simple_field_chain2_1.SimpleFieldChain2, (0, combi_1.regex)(/^[\d]+$/), (0, combi_1.regex)(/^\*$/)), (0, combi_1.alt)((0, combi_1.tok)(tokens_1.ParenRightW), (0, combi_1.tok)(tokens_1.ParenRight)));
|
|
10
10
|
const wlength = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeft), post);
|
|
11
|
-
const length = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeft), post);
|
|
11
|
+
const length = (0, combi_1.seq)((0, combi_1.alt)((0, combi_1.tok)(tokens_1.WParenLeft), (0, combi_1.tok)(tokens_1.ParenLeft)), post);
|
|
12
12
|
const complex = (0, combi_1.alt)(wlength, (0, combi_1.seq)((0, combi_1.alt)(simple_field_chain2_1.SimpleFieldChain2, (0, combi_1.regex)(/^\/?[\w\d]+$/), "/"), (0, combi_1.opt)(length)));
|
|
13
13
|
const at = (0, combi_1.seq)((0, combi_1.opt)("AT"), complex);
|
|
14
14
|
return at;
|
|
@@ -6,7 +6,8 @@ const expressions_1 = require("../expressions");
|
|
|
6
6
|
class Add {
|
|
7
7
|
getMatcher() {
|
|
8
8
|
const to = (0, combi_1.seq)("TO", expressions_1.Target);
|
|
9
|
-
const
|
|
9
|
+
const giving = (0, combi_1.seq)("GIVING", expressions_1.FieldSub);
|
|
10
|
+
const then = (0, combi_1.seq)("THEN", expressions_1.FieldSub, "UNTIL", expressions_1.FieldSub, (0, combi_1.alt)(giving, to));
|
|
10
11
|
const ret = (0, combi_1.seq)("ADD", expressions_1.Source, (0, combi_1.altPrio)(to, then));
|
|
11
12
|
return ret;
|
|
12
13
|
}
|
|
@@ -20,8 +20,9 @@ class Describe {
|
|
|
20
20
|
const index = (0, combi_1.seq)("INDEX", expressions_1.Source);
|
|
21
21
|
const top = (0, combi_1.seq)("TOP-LINES", expressions_1.Target);
|
|
22
22
|
const lineSize = (0, combi_1.seq)("LINE-SIZE", expressions_1.Target);
|
|
23
|
+
const lineCount = (0, combi_1.seq)("LINE-COUNT", expressions_1.Target);
|
|
23
24
|
const first = (0, combi_1.seq)("FIRST-LINE", expressions_1.Target);
|
|
24
|
-
const list = (0, combi_1.seq)("LIST", (0, combi_1.per)(lines, pages, index, line, page, top, first, lineSize));
|
|
25
|
+
const list = (0, combi_1.seq)("LIST", (0, combi_1.per)(lines, pages, index, line, page, top, first, lineSize, lineCount));
|
|
25
26
|
const ret = (0, combi_1.seq)("DESCRIBE", (0, combi_1.altPrio)(table, field, distance, list));
|
|
26
27
|
return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
|
|
27
28
|
}
|
|
@@ -12,7 +12,7 @@ class Import {
|
|
|
12
12
|
const using = (0, combi_1.seq)("USING", expressions_1.Source);
|
|
13
13
|
const cluster = (0, combi_1.seq)(expressions_1.NamespaceSimpleName, (0, combi_1.tok)(tokens_1.ParenLeft), (0, combi_1.regex)(/^[\w$%\^]{2}$/), (0, combi_1.tok)(tokens_1.ParenRightW));
|
|
14
14
|
const buffer = (0, combi_1.seq)("DATA BUFFER", expressions_1.Source);
|
|
15
|
-
const memory = (0, combi_1.seq)("MEMORY ID", expressions_1.Source);
|
|
15
|
+
const memory = (0, combi_1.seq)("MEMORY", (0, combi_1.opt)((0, combi_1.seq)("ID", expressions_1.Source)));
|
|
16
16
|
const table = (0, combi_1.seq)("INTERNAL TABLE", expressions_1.Source);
|
|
17
17
|
const shared = (0, combi_1.seq)((0, combi_1.alt)("SHARED MEMORY", "SHARED BUFFER"), cluster, (0, combi_1.per)(dto, client, id));
|
|
18
18
|
const database = (0, combi_1.seq)("DATABASE", cluster, (0, combi_1.per)(dto, client, id, using));
|
|
@@ -7,8 +7,10 @@ const version_1 = require("../../../version");
|
|
|
7
7
|
class Infotypes {
|
|
8
8
|
getMatcher() {
|
|
9
9
|
const occurs = (0, combi_1.seq)("OCCURS", expressions_1.Constant);
|
|
10
|
-
const name = (0, combi_1.seq)("NAME", expressions_1.
|
|
11
|
-
const
|
|
10
|
+
const name = (0, combi_1.seq)("NAME", expressions_1.FieldSub);
|
|
11
|
+
const mode = "MODE N";
|
|
12
|
+
const valid = (0, combi_1.seq)("VALID FROM", expressions_1.Source, "TO", expressions_1.Source);
|
|
13
|
+
const ret = (0, combi_1.seq)("INFOTYPES", (0, combi_1.regex)(/^\d\d\d\d$/), (0, combi_1.optPrio)(valid), (0, combi_1.optPrio)(name), (0, combi_1.optPrio)(occurs), (0, combi_1.optPrio)(mode));
|
|
12
14
|
return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
|
|
13
15
|
}
|
|
14
16
|
}
|
|
@@ -9,7 +9,7 @@ class Program {
|
|
|
9
9
|
const message = (0, combi_1.seq)("MESSAGE-ID", expressions_1.MessageClass);
|
|
10
10
|
const size = (0, combi_1.seq)("LINE-SIZE", expressions_1.Source);
|
|
11
11
|
const heading = (0, combi_1.str)("NO STANDARD PAGE HEADING");
|
|
12
|
-
const line = (0, combi_1.seq)("LINE-COUNT", expressions_1.Source);
|
|
12
|
+
const line = (0, combi_1.seq)("LINE-COUNT", expressions_1.Source, (0, combi_1.opt)(expressions_1.FieldLength));
|
|
13
13
|
const options = (0, combi_1.per)(message, size, heading, line);
|
|
14
14
|
const ret = (0, combi_1.seq)("PROGRAM", (0, combi_1.opt)(expressions_1.ReportName), (0, combi_1.opt)(options));
|
|
15
15
|
return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
|
|
@@ -6,7 +6,7 @@ const expressions_1 = require("../expressions");
|
|
|
6
6
|
const version_1 = require("../../../version");
|
|
7
7
|
class ReadDataset {
|
|
8
8
|
getMatcher() {
|
|
9
|
-
const ret = (0, combi_1.seq)("READ DATASET", expressions_1.Source, "INTO", expressions_1.Target, (0, combi_1.opt)((0, combi_1.seq)("MAXIMUM LENGTH", expressions_1.Source)
|
|
9
|
+
const ret = (0, combi_1.seq)("READ DATASET", expressions_1.Source, "INTO", expressions_1.Target, (0, combi_1.opt)((0, combi_1.per)((0, combi_1.seq)("MAXIMUM LENGTH", expressions_1.Source), (0, combi_1.seq)("ACTUAL LENGTH", expressions_1.Target), (0, combi_1.seq)("LENGTH", expressions_1.Target))));
|
|
10
10
|
return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
|
|
11
11
|
}
|
|
12
12
|
}
|
|
@@ -10,7 +10,7 @@ class ReadEntities {
|
|
|
10
10
|
const from = (0, combi_1.seq)("FROM", expressions_1.Source);
|
|
11
11
|
const fields = (0, combi_1.seq)("FIELDS", (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.plus)(expressions_1.SimpleName), (0, combi_1.tok)(tokens_1.WParenRightW), "WITH", expressions_1.Source);
|
|
12
12
|
const all = (0, combi_1.seq)("ALL FIELDS WITH", expressions_1.Source);
|
|
13
|
-
const s = (0, combi_1.seq)("READ ENTITIES OF", expressions_1.NamespaceSimpleName, (0, combi_1.opt)("IN LOCAL MODE"), "ENTITY", expressions_1.SimpleName, (0, combi_1.opt)((0, combi_1.seq)("BY", expressions_1.AssociationName)), (0, combi_1.alt)(fields, from, all), "RESULT", expressions_1.Target, (0, combi_1.optPrio)((0, combi_1.seq)("LINK", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("FAILED", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("REPORTED", expressions_1.Target)));
|
|
13
|
+
const s = (0, combi_1.seq)("READ ENTITIES OF", expressions_1.NamespaceSimpleName, (0, combi_1.opt)("IN LOCAL MODE"), "ENTITY", expressions_1.SimpleName, (0, combi_1.opt)((0, combi_1.seq)("BY", expressions_1.AssociationName)), (0, combi_1.alt)(fields, from, all), (0, combi_1.optPrio)((0, combi_1.seq)("RESULT", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("LINK", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("FAILED", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("REPORTED", expressions_1.Target)));
|
|
14
14
|
return (0, combi_1.ver)(version_1.Version.v754, s);
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -35,11 +35,13 @@ class SelectionScreen {
|
|
|
35
35
|
const pos = (0, combi_1.seq)("POSITION", (0, combi_1.altPrio)(posIntegers, posSymbols), (0, combi_1.opt)((0, combi_1.seq)("FOR TABLE", expressions_1.Field)));
|
|
36
36
|
const incl = (0, combi_1.seq)("INCLUDE BLOCKS", expressions_1.BlockName);
|
|
37
37
|
const tabbed = (0, combi_1.seq)("BEGIN OF TABBED BLOCK", expressions_1.BlockName, "FOR", expressions_1.Integer, "LINES", (0, combi_1.optPrio)("NO INTERVALS"));
|
|
38
|
-
const uline = (0, combi_1.seq)("ULINE", (0, combi_1.opt)(position));
|
|
38
|
+
const uline = (0, combi_1.seq)("ULINE", (0, combi_1.opt)(position), (0, combi_1.opt)(modif));
|
|
39
39
|
const param = (0, combi_1.seq)("INCLUDE PARAMETERS", expressions_1.Field);
|
|
40
40
|
const iso = (0, combi_1.seq)("INCLUDE SELECT-OPTIONS", expressions_1.Field);
|
|
41
41
|
const exclude = (0, combi_1.seq)("EXCLUDE", (0, combi_1.alt)("IDS", "PARAMETERS"), (0, combi_1.regex)(/^\w+$/));
|
|
42
|
-
const
|
|
42
|
+
const beginVersion = (0, combi_1.seq)("BEGIN OF VERSION", (0, combi_1.regex)(/^\w+$/), expressions_1.TextElement);
|
|
43
|
+
const endVersion = (0, combi_1.seq)("END OF VERSION", (0, combi_1.regex)(/^\w+$/));
|
|
44
|
+
const ret = (0, combi_1.seq)("SELECTION-SCREEN", (0, combi_1.altPrio)(comment, func, skip, pos, incl, iso, push, tab, uline, beginBlock, tabbed, endBlock, beginLine, endLine, param, beginScreen, endScreen, exclude, beginVersion, endVersion));
|
|
43
45
|
return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
|
|
44
46
|
}
|
|
45
47
|
}
|
|
@@ -11,7 +11,7 @@ class Write {
|
|
|
11
11
|
const dateFormat = (0, combi_1.altPrio)("DD/MM/YY", "MM/DD/YY", "DD/MM/YYYY", "MM/DD/YYYY", "DDMMYY", "MMDDYY", "YYMMDD");
|
|
12
12
|
const as = (0, combi_1.seq)("AS", (0, combi_1.altPrio)("LINE", "ICON", "CHECKBOX", "SYMBOL"));
|
|
13
13
|
const to = (0, combi_1.seq)("TO", expressions_1.Target);
|
|
14
|
-
const options = (0, combi_1.per)(mask, to, (0, combi_1.seq)("EXPONENT", expressions_1.Source), "NO-GROUPING", "NO-ZERO", "CENTERED", (0, combi_1.seq)("INPUT", (0, combi_1.opt)(onOff)), "NO-GAP", "LEFT-JUSTIFIED", as, (0, combi_1.seq)("FRAMES", onOff), (0, combi_1.seq)("HOTSPOT", (0, combi_1.opt)(onOff)), "RIGHT-JUSTIFIED", (0, combi_1.seq)("TIME ZONE", expressions_1.Source), (0, combi_1.seq)("UNDER", expressions_1.Source), (0, combi_1.seq)("STYLE", expressions_1.Source), (0, combi_1.seq)("ROUND", expressions_1.Source), (0, combi_1.seq)("QUICKINFO", expressions_1.Source), "ENVIRONMENT TIME FORMAT", dateFormat, (0, combi_1.seq)("UNIT", expressions_1.Source), (0, combi_1.seq)("INTENSIFIED", (0, combi_1.opt)(onOff)), (0, combi_1.seq)("INDEX", expressions_1.Source), (0, combi_1.seq)("DECIMALS", expressions_1.Source), (0, combi_1.seq)("INVERSE", (0, combi_1.opt)(onOff)), expressions_1.Color, (0, combi_1.seq)("CURRENCY", expressions_1.Source), "NO-SIGN");
|
|
14
|
+
const options = (0, combi_1.per)(mask, to, (0, combi_1.seq)("EXPONENT", expressions_1.Source), "NO-GROUPING", "NO-ZERO", "CENTERED", (0, combi_1.seq)("INPUT", (0, combi_1.opt)(onOff)), "NO-GAP", "LEFT-JUSTIFIED", as, (0, combi_1.seq)("FRAMES", onOff), (0, combi_1.seq)("HOTSPOT", (0, combi_1.opt)(onOff)), "RIGHT-JUSTIFIED", (0, combi_1.seq)("TIME ZONE", expressions_1.Source), (0, combi_1.seq)("UNDER", expressions_1.Source), (0, combi_1.seq)("STYLE", expressions_1.Source), (0, combi_1.seq)("ROUND", expressions_1.Source), (0, combi_1.seq)("QUICKINFO", expressions_1.Source), "ENVIRONMENT TIME FORMAT", dateFormat, (0, combi_1.seq)("UNIT", expressions_1.Source), (0, combi_1.seq)("INTENSIFIED", (0, combi_1.opt)(onOff)), (0, combi_1.seq)("INDEX", expressions_1.Source), (0, combi_1.seq)("DECIMALS", expressions_1.Source), (0, combi_1.seq)("INVERSE", (0, combi_1.opt)(onOff)), expressions_1.Color, (0, combi_1.seq)("CURRENCY", expressions_1.Source), "RESET", "NO-SIGN");
|
|
15
15
|
const ret = (0, combi_1.seq)("WRITE", (0, combi_1.alt)("AT /", (0, combi_1.seq)((0, combi_1.opt)(expressions_1.WriteOffsetLength), (0, combi_1.alt)(expressions_1.Source, expressions_1.Dynamic, "/"), (0, combi_1.opt)(options))));
|
|
16
16
|
return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
|
|
17
17
|
}
|
|
@@ -94,13 +94,13 @@ class FlowGraph {
|
|
|
94
94
|
this.label = label;
|
|
95
95
|
}
|
|
96
96
|
toDigraph() {
|
|
97
|
-
return `digraph G {
|
|
98
|
-
labelloc="t";
|
|
99
|
-
label="${this.label}";
|
|
100
|
-
graph [fontname = "helvetica"];
|
|
101
|
-
node [fontname = "helvetica", shape="box"];
|
|
102
|
-
edge [fontname = "helvetica"];
|
|
103
|
-
${this.toTextEdges()}
|
|
97
|
+
return `digraph G {
|
|
98
|
+
labelloc="t";
|
|
99
|
+
label="${this.label}";
|
|
100
|
+
graph [fontname = "helvetica"];
|
|
101
|
+
node [fontname = "helvetica", shape="box"];
|
|
102
|
+
edge [fontname = "helvetica"];
|
|
103
|
+
${this.toTextEdges()}
|
|
104
104
|
}`;
|
|
105
105
|
}
|
|
106
106
|
listSources(node) {
|
package/build/src/lsp/help.js
CHANGED
|
@@ -20,13 +20,13 @@ class Help {
|
|
|
20
20
|
/////////////////////////////////////////////////
|
|
21
21
|
static dumpABAP(file, reg, textDocument, position) {
|
|
22
22
|
let content = "";
|
|
23
|
-
content = `
|
|
24
|
-
<a href="#_tokens" rel="no-refresh">Tokens</a> |
|
|
25
|
-
<a href="#_statements" rel="no-refresh">Statements</a> |
|
|
26
|
-
<a href="#_structure" rel="no-refresh">Structure</a> |
|
|
27
|
-
<a href="#_files" rel="no-refresh">Files</a> |
|
|
28
|
-
<a href="#_info" rel="no-refresh">Info Dump</a>
|
|
29
|
-
<hr>
|
|
23
|
+
content = `
|
|
24
|
+
<a href="#_tokens" rel="no-refresh">Tokens</a> |
|
|
25
|
+
<a href="#_statements" rel="no-refresh">Statements</a> |
|
|
26
|
+
<a href="#_structure" rel="no-refresh">Structure</a> |
|
|
27
|
+
<a href="#_files" rel="no-refresh">Files</a> |
|
|
28
|
+
<a href="#_info" rel="no-refresh">Info Dump</a>
|
|
29
|
+
<hr>
|
|
30
30
|
` +
|
|
31
31
|
"<tt>" + textDocument.uri + " (" +
|
|
32
32
|
(position.line + 1) + ", " +
|
|
@@ -181,9 +181,9 @@ class Help {
|
|
|
181
181
|
return ret + "</ul>";
|
|
182
182
|
}
|
|
183
183
|
static tokens(file) {
|
|
184
|
-
let inner = `<table><tr><td><b>String</b></td><td><b>Type</b></td>
|
|
185
|
-
<td><b>Row</b></td><td><b>Column</b></td>
|
|
186
|
-
<td><b>vRow</b></td><td><b>vColumn</b></td>
|
|
184
|
+
let inner = `<table><tr><td><b>String</b></td><td><b>Type</b></td>
|
|
185
|
+
<td><b>Row</b></td><td><b>Column</b></td>
|
|
186
|
+
<td><b>vRow</b></td><td><b>vColumn</b></td>
|
|
187
187
|
</tr>`;
|
|
188
188
|
for (const token of file.getTokens()) {
|
|
189
189
|
const tStart = token.getStart();
|
|
@@ -11,7 +11,7 @@ const version_1 = require("../version");
|
|
|
11
11
|
var EnhancementCategory;
|
|
12
12
|
(function (EnhancementCategory) {
|
|
13
13
|
EnhancementCategory["NotClassified"] = "0";
|
|
14
|
-
EnhancementCategory["
|
|
14
|
+
EnhancementCategory["CannotBeEnhanced"] = "1";
|
|
15
15
|
EnhancementCategory["Character"] = "2";
|
|
16
16
|
EnhancementCategory["CharacterOrNumeric"] = "3";
|
|
17
17
|
EnhancementCategory["Deep"] = "4";
|
|
@@ -116,8 +116,11 @@ class Table extends _abstract_object_1.AbstractObject {
|
|
|
116
116
|
if (field.GROUPNAME !== undefined) {
|
|
117
117
|
components.push({ name: field.GROUPNAME, type: found });
|
|
118
118
|
}
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
if (field.FIELDNAME.startsWith(".INCLU-") === false
|
|
120
|
+
|| field.FIELDNAME === ".INCLU--AP") {
|
|
121
|
+
for (const c of found.getComponents()) {
|
|
122
|
+
components.push({ name: c.name, type: c.type });
|
|
123
|
+
}
|
|
121
124
|
}
|
|
122
125
|
}
|
|
123
126
|
else if ((((_a = field.PRECFIELD) === null || _a === void 0 ? void 0 : _a.startsWith("CI_")) || ((_b = field.PRECFIELD) === null || _b === void 0 ? void 0 : _b.startsWith("SI_")))
|
package/build/src/registry.js
CHANGED
|
@@ -17,10 +17,10 @@ class SevenBitAscii {
|
|
|
17
17
|
key: "7bit_ascii",
|
|
18
18
|
title: "Check for 7bit ascii",
|
|
19
19
|
shortDescription: `Only allow characters from the 7bit ASCII set.`,
|
|
20
|
-
extendedInformation: `https://docs.abapopenchecks.org/checks/05/
|
|
21
|
-
|
|
22
|
-
https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
|
|
23
|
-
|
|
20
|
+
extendedInformation: `https://docs.abapopenchecks.org/checks/05/
|
|
21
|
+
|
|
22
|
+
https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
|
|
23
|
+
|
|
24
24
|
Checkes files with extensions ".abap" and ".asddls"`,
|
|
25
25
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
26
26
|
badExample: `WRITE '뽑'.`,
|
|
@@ -28,10 +28,10 @@ class Abapdoc extends _abap_rule_1.ABAPRule {
|
|
|
28
28
|
key: "abapdoc",
|
|
29
29
|
title: "Check abapdoc",
|
|
30
30
|
shortDescription: `Various checks regarding abapdoc.`,
|
|
31
|
-
extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
|
|
32
|
-
|
|
33
|
-
Plus class and interface definitions.
|
|
34
|
-
|
|
31
|
+
extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
|
|
32
|
+
|
|
33
|
+
Plus class and interface definitions.
|
|
34
|
+
|
|
35
35
|
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#abap-doc-only-for-public-apis`,
|
|
36
36
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
|
|
37
37
|
};
|
|
@@ -21,27 +21,27 @@ class AddTestAttributes extends _abap_rule_1.ABAPRule {
|
|
|
21
21
|
title: "Add test attributes for tests classes with test methods",
|
|
22
22
|
shortDescription: `Add test attributes DURATION and RISK LEVEL for tests classes with test methods`,
|
|
23
23
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
24
|
-
badExample: `CLASS ltcl_test1 DEFINITION FINAL FOR TESTING.
|
|
25
|
-
PUBLIC SECTION.
|
|
26
|
-
PROTECTED SECTION.
|
|
27
|
-
PRIVATE SECTION.
|
|
28
|
-
METHODS test FOR TESTING RAISING cx_static_check.
|
|
29
|
-
ENDCLASS.
|
|
30
|
-
|
|
31
|
-
CLASS ltcl_test1 IMPLEMENTATION.
|
|
32
|
-
METHOD test.
|
|
33
|
-
ENDMETHOD.
|
|
24
|
+
badExample: `CLASS ltcl_test1 DEFINITION FINAL FOR TESTING.
|
|
25
|
+
PUBLIC SECTION.
|
|
26
|
+
PROTECTED SECTION.
|
|
27
|
+
PRIVATE SECTION.
|
|
28
|
+
METHODS test FOR TESTING RAISING cx_static_check.
|
|
29
|
+
ENDCLASS.
|
|
30
|
+
|
|
31
|
+
CLASS ltcl_test1 IMPLEMENTATION.
|
|
32
|
+
METHOD test.
|
|
33
|
+
ENDMETHOD.
|
|
34
34
|
ENDCLASS.`,
|
|
35
|
-
goodExample: `CLASS ltcl_test2 DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
|
|
36
|
-
PUBLIC SECTION.
|
|
37
|
-
PROTECTED SECTION.
|
|
38
|
-
PRIVATE SECTION.
|
|
39
|
-
METHODS test FOR TESTING RAISING cx_static_check.
|
|
40
|
-
ENDCLASS.
|
|
41
|
-
|
|
42
|
-
CLASS ltcl_test2 IMPLEMENTATION.
|
|
43
|
-
METHOD test.
|
|
44
|
-
ENDMETHOD.
|
|
35
|
+
goodExample: `CLASS ltcl_test2 DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
|
|
36
|
+
PUBLIC SECTION.
|
|
37
|
+
PROTECTED SECTION.
|
|
38
|
+
PRIVATE SECTION.
|
|
39
|
+
METHODS test FOR TESTING RAISING cx_static_check.
|
|
40
|
+
ENDCLASS.
|
|
41
|
+
|
|
42
|
+
CLASS ltcl_test2 IMPLEMENTATION.
|
|
43
|
+
METHOD test.
|
|
44
|
+
ENDMETHOD.
|
|
45
45
|
ENDCLASS.`,
|
|
46
46
|
};
|
|
47
47
|
}
|
|
@@ -22,49 +22,49 @@ class AlignParameters extends _abap_rule_1.ABAPRule {
|
|
|
22
22
|
key: "align_parameters",
|
|
23
23
|
title: "Align Parameters",
|
|
24
24
|
shortDescription: `Checks for vertially aligned parameters`,
|
|
25
|
-
extendedInformation: `Checks:
|
|
26
|
-
* function module calls
|
|
27
|
-
* method calls
|
|
28
|
-
* VALUE constructors
|
|
29
|
-
* NEW constructors
|
|
30
|
-
* RAISE EXCEPTION statements
|
|
31
|
-
* CREATE OBJECT statements
|
|
32
|
-
* RAISE EVENT statements
|
|
33
|
-
|
|
34
|
-
https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
|
|
35
|
-
|
|
36
|
-
Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
|
|
37
|
-
|
|
38
|
-
If parameters are on the same row, no issues are reported, see
|
|
25
|
+
extendedInformation: `Checks:
|
|
26
|
+
* function module calls
|
|
27
|
+
* method calls
|
|
28
|
+
* VALUE constructors
|
|
29
|
+
* NEW constructors
|
|
30
|
+
* RAISE EXCEPTION statements
|
|
31
|
+
* CREATE OBJECT statements
|
|
32
|
+
* RAISE EVENT statements
|
|
33
|
+
|
|
34
|
+
https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
|
|
35
|
+
|
|
36
|
+
Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
|
|
37
|
+
|
|
38
|
+
If parameters are on the same row, no issues are reported, see
|
|
39
39
|
https://rules.abaplint.org/max_one_method_parameter_per_line/ for splitting parameters to lines`,
|
|
40
40
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
|
|
41
|
-
badExample: `CALL FUNCTION 'FOOBAR'
|
|
42
|
-
EXPORTING
|
|
43
|
-
foo = 2
|
|
44
|
-
parameter = 3.
|
|
45
|
-
|
|
46
|
-
foobar( moo = 1
|
|
47
|
-
param = 1 ).
|
|
48
|
-
|
|
49
|
-
foo = VALUE #(
|
|
50
|
-
foo = bar
|
|
41
|
+
badExample: `CALL FUNCTION 'FOOBAR'
|
|
42
|
+
EXPORTING
|
|
43
|
+
foo = 2
|
|
44
|
+
parameter = 3.
|
|
45
|
+
|
|
46
|
+
foobar( moo = 1
|
|
47
|
+
param = 1 ).
|
|
48
|
+
|
|
49
|
+
foo = VALUE #(
|
|
50
|
+
foo = bar
|
|
51
51
|
moo = 2 ).`,
|
|
52
|
-
goodExample: `CALL FUNCTION 'FOOBAR'
|
|
53
|
-
EXPORTING
|
|
54
|
-
foo = 2
|
|
55
|
-
parameter = 3.
|
|
56
|
-
|
|
57
|
-
foobar( moo = 1
|
|
58
|
-
param = 1 ).
|
|
59
|
-
|
|
60
|
-
foo = VALUE #(
|
|
61
|
-
foo = bar
|
|
62
|
-
moo = 2 ).
|
|
63
|
-
|
|
64
|
-
DATA(sdf) = VALUE type(
|
|
65
|
-
common_val = 2
|
|
66
|
-
another_common = 5
|
|
67
|
-
( row_value = 4
|
|
52
|
+
goodExample: `CALL FUNCTION 'FOOBAR'
|
|
53
|
+
EXPORTING
|
|
54
|
+
foo = 2
|
|
55
|
+
parameter = 3.
|
|
56
|
+
|
|
57
|
+
foobar( moo = 1
|
|
58
|
+
param = 1 ).
|
|
59
|
+
|
|
60
|
+
foo = VALUE #(
|
|
61
|
+
foo = bar
|
|
62
|
+
moo = 2 ).
|
|
63
|
+
|
|
64
|
+
DATA(sdf) = VALUE type(
|
|
65
|
+
common_val = 2
|
|
66
|
+
another_common = 5
|
|
67
|
+
( row_value = 4
|
|
68
68
|
value_foo = 5 ) ).`,
|
|
69
69
|
};
|
|
70
70
|
}
|
|
@@ -30,37 +30,37 @@ class AlignTypeExpressions extends _abap_rule_1.ABAPRule {
|
|
|
30
30
|
key: "align_type_expressions",
|
|
31
31
|
title: "Align TYPE expressions",
|
|
32
32
|
shortDescription: `Align TYPE expressions in statements`,
|
|
33
|
-
extendedInformation: `
|
|
34
|
-
Currently works for METHODS + BEGIN OF
|
|
35
|
-
|
|
36
|
-
If BEGIN OF has an INCLUDE TYPE its ignored
|
|
37
|
-
|
|
38
|
-
Also note that clean ABAP does not recommend aligning TYPE clauses:
|
|
33
|
+
extendedInformation: `
|
|
34
|
+
Currently works for METHODS + BEGIN OF
|
|
35
|
+
|
|
36
|
+
If BEGIN OF has an INCLUDE TYPE its ignored
|
|
37
|
+
|
|
38
|
+
Also note that clean ABAP does not recommend aligning TYPE clauses:
|
|
39
39
|
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-align-type-clauses`,
|
|
40
40
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix],
|
|
41
|
-
badExample: `
|
|
42
|
-
TYPES: BEGIN OF foo,
|
|
43
|
-
bar TYPE i,
|
|
44
|
-
foobar TYPE i,
|
|
45
|
-
END OF foo.
|
|
46
|
-
|
|
47
|
-
INTERFACE lif.
|
|
48
|
-
METHODS bar
|
|
49
|
-
IMPORTING
|
|
50
|
-
foo TYPE i
|
|
51
|
-
foobar TYPE i.
|
|
41
|
+
badExample: `
|
|
42
|
+
TYPES: BEGIN OF foo,
|
|
43
|
+
bar TYPE i,
|
|
44
|
+
foobar TYPE i,
|
|
45
|
+
END OF foo.
|
|
46
|
+
|
|
47
|
+
INTERFACE lif.
|
|
48
|
+
METHODS bar
|
|
49
|
+
IMPORTING
|
|
50
|
+
foo TYPE i
|
|
51
|
+
foobar TYPE i.
|
|
52
52
|
ENDINTERFACE.`,
|
|
53
|
-
goodExample: `
|
|
54
|
-
TYPES: BEGIN OF foo,
|
|
55
|
-
bar TYPE i,
|
|
56
|
-
foobar TYPE i,
|
|
57
|
-
END OF foo.
|
|
58
|
-
|
|
59
|
-
INTERFACE lif.
|
|
60
|
-
METHODS bar
|
|
61
|
-
IMPORTING
|
|
62
|
-
foo TYPE i
|
|
63
|
-
foobar TYPE i.
|
|
53
|
+
goodExample: `
|
|
54
|
+
TYPES: BEGIN OF foo,
|
|
55
|
+
bar TYPE i,
|
|
56
|
+
foobar TYPE i,
|
|
57
|
+
END OF foo.
|
|
58
|
+
|
|
59
|
+
INTERFACE lif.
|
|
60
|
+
METHODS bar
|
|
61
|
+
IMPORTING
|
|
62
|
+
foo TYPE i
|
|
63
|
+
foobar TYPE i.
|
|
64
64
|
ENDINTERFACE.`,
|
|
65
65
|
};
|
|
66
66
|
}
|
|
@@ -20,16 +20,16 @@ class AmbiguousStatement extends _abap_rule_1.ABAPRule {
|
|
|
20
20
|
return {
|
|
21
21
|
key: "ambiguous_statement",
|
|
22
22
|
title: "Check for ambigious statements",
|
|
23
|
-
shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
|
|
24
|
-
Add "TABLE" keyword or "@" for escaping SQL variables
|
|
25
|
-
|
|
23
|
+
shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
|
|
24
|
+
Add "TABLE" keyword or "@" for escaping SQL variables
|
|
25
|
+
|
|
26
26
|
Only works if the target version is 740sp05 or above`,
|
|
27
27
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
28
|
-
badExample: `DELETE foo FROM bar.
|
|
28
|
+
badExample: `DELETE foo FROM bar.
|
|
29
29
|
MODIFY foo FROM bar.`,
|
|
30
|
-
goodExample: `DELETE foo FROM @bar.
|
|
31
|
-
DELETE TABLE itab FROM 2.
|
|
32
|
-
MODIFY zfoo FROM @wa.
|
|
30
|
+
goodExample: `DELETE foo FROM @bar.
|
|
31
|
+
DELETE TABLE itab FROM 2.
|
|
32
|
+
MODIFY zfoo FROM @wa.
|
|
33
33
|
MODIFY TABLE foo FROM bar.`,
|
|
34
34
|
};
|
|
35
35
|
}
|
|
@@ -44,16 +44,16 @@ class AvoidUse extends _abap_rule_1.ABAPRule {
|
|
|
44
44
|
key: "avoid_use",
|
|
45
45
|
title: "Avoid use of certain statements",
|
|
46
46
|
shortDescription: `Detects usage of certain statements.`,
|
|
47
|
-
extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
|
|
48
|
-
|
|
49
|
-
Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
|
|
50
|
-
|
|
51
|
-
STATICS: use CLASS-DATA instead
|
|
52
|
-
|
|
53
|
-
DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
|
|
54
|
-
|
|
55
|
-
TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
|
|
56
|
-
|
|
47
|
+
extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
|
|
48
|
+
|
|
49
|
+
Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
|
|
50
|
+
|
|
51
|
+
STATICS: use CLASS-DATA instead
|
|
52
|
+
|
|
53
|
+
DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
|
|
54
|
+
|
|
55
|
+
TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
|
|
56
|
+
|
|
57
57
|
BREAK points`,
|
|
58
58
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
59
59
|
};
|
|
@@ -24,11 +24,11 @@ class BeginEndNames extends _abap_rule_1.ABAPRule {
|
|
|
24
24
|
title: "Check BEGIN END names",
|
|
25
25
|
shortDescription: `Check BEGIN OF and END OF names match, plus there must be statements between BEGIN and END`,
|
|
26
26
|
tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
|
|
27
|
-
badExample: `DATA: BEGIN OF stru,
|
|
28
|
-
field TYPE i,
|
|
27
|
+
badExample: `DATA: BEGIN OF stru,
|
|
28
|
+
field TYPE i,
|
|
29
29
|
END OF structure_not_the_same.`,
|
|
30
|
-
goodExample: `DATA: BEGIN OF stru,
|
|
31
|
-
field TYPE i,
|
|
30
|
+
goodExample: `DATA: BEGIN OF stru,
|
|
31
|
+
field TYPE i,
|
|
32
32
|
END OF stru.`,
|
|
33
33
|
};
|
|
34
34
|
}
|