@abaplint/core 2.120.7 → 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.
Files changed (33) hide show
  1. package/build/src/abap/2_statements/expressions/compare.js +1 -1
  2. package/build/src/abap/2_statements/expressions/perform_using.js +2 -2
  3. package/build/src/abap/2_statements/expressions/string_template_formatting.js +1 -1
  4. package/build/src/abap/5_syntax/_builtin.js +1 -1
  5. package/build/src/abap/5_syntax/_type_utils.js +1 -1
  6. package/build/src/abap/5_syntax/statements/perform.js +1 -1
  7. package/build/src/abap/5_syntax/statements/ranges.js +5 -0
  8. package/build/src/abap/5_syntax/structures/type_mesh.js +101 -0
  9. package/build/src/abap/5_syntax/syntax.js +8 -0
  10. package/build/src/abap/types/class_attributes.js +8 -0
  11. package/build/src/registry.js +1 -1
  12. package/build/src/rules/7bit_ascii.js +1 -1
  13. package/build/src/rules/avoid_use.js +1 -1
  14. package/build/src/rules/cds_comment_style.js +1 -1
  15. package/build/src/rules/chain_mainly_declarations.js +1 -1
  16. package/build/src/rules/clear_exporting_parameters.js +1 -1
  17. package/build/src/rules/constructor_visibility_public.js +1 -1
  18. package/build/src/rules/exit_or_check.js +2 -2
  19. package/build/src/rules/expand_macros.js +1 -1
  20. package/build/src/rules/fm_global_parameters_obsolete.js +1 -1
  21. package/build/src/rules/form_tables_obsolete.js +1 -1
  22. package/build/src/rules/implicit_start_of_selection.js +1 -1
  23. package/build/src/rules/method_overwrites_builtin.js +1 -1
  24. package/build/src/rules/mix_returning.js +1 -1
  25. package/build/src/rules/no_macros.js +1 -1
  26. package/build/src/rules/no_prefixes.js +3 -3
  27. package/build/src/rules/obsolete_statement.js +18 -18
  28. package/build/src/rules/pragma_style.js +1 -1
  29. package/build/src/rules/rfc_error_handling.js +1 -1
  30. package/build/src/rules/strict_sql.js +2 -2
  31. package/build/src/rules/sy_modification.js +1 -1
  32. package/build/src/rules/tables_declared_locally.js +1 -1
  33. 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/abapdocu_752_index_htm/7.52/en-us/abennews-740_sp08-expressions.htm
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));
@@ -2,10 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PerformUsing = void 0;
4
4
  const combi_1 = require("../combi");
5
- const source_1 = require("./source");
5
+ const simple_source3_1 = require("./simple_source3");
6
6
  class PerformUsing extends combi_1.Expression {
7
7
  getRunnable() {
8
- const using = (0, combi_1.seq)("USING", (0, combi_1.plus)(source_1.Source));
8
+ const using = (0, combi_1.seq)("USING", (0, combi_1.plus)(simple_source3_1.SimpleSource3));
9
9
  return using;
10
10
  }
11
11
  }
@@ -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/abapdocu_752_index_htm/7.52/en-us/abapcompute_string_format_options.htm
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/abapdocu_751_index_htm/7.51/en-us/abennews-610-system.htm
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) {
@@ -60,7 +60,7 @@ class Perform {
60
60
  }
61
61
  }
62
62
  for (const u of node.findDirectExpressions(Expressions.PerformUsing)) {
63
- for (const s of u.findDirectExpressions(Expressions.Source)) {
63
+ for (const s of u.findDirectExpressions(Expressions.SimpleSource3)) {
64
64
  source_1.Source.runSyntax(s, input);
65
65
  }
66
66
  }
@@ -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) {
@@ -75,7 +75,7 @@ class Registry {
75
75
  }
76
76
  static abaplintVersion() {
77
77
  // magic, see build script "version.js"
78
- return "2.120.7";
78
+ return "2.120.9";
79
79
  }
80
80
  getDDICReferences() {
81
81
  return this.ddicReferences;
@@ -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/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
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/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
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/abapdocu_752_index_htm/7.52/en-us/abencds_general_syntax_rules.htm`,
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/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
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.htm
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/abapdocu_751_index_htm/7.51/en-US/abeninstance_constructor_guidl.htm`,
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/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
63
- https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
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/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
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/abapdocu_750_index_htm/7.50/en-US/abenglobal_parameters_obsolete.htm`,
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/abapdocu_751_index_htm/7.51/en-US/abapform_tables.htm`,
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/abapdocu_751_index_htm/7.51/en-us/abapstart-of-selection.htm`,
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/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
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/abapdocu_752_index_htm/7.52/en-us/abennews-740-abap_objects.htm#!ABAP_MODIFICATION_1@1@`,
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.htm`,
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'.
@@ -220,13 +220,13 @@ https://github.com/SAP/styleguides/blob/main/clean-abap/sub-sections/AvoidEncodi
220
220
  return ret;
221
221
  }
222
222
  checkMethodParameters(topNode, regex, file) {
223
- var _a, _b;
223
+ var _a, _b, _c;
224
224
  const ret = [];
225
225
  for (const method of topNode.findAllStatements(Statements.MethodDef)) {
226
226
  for (const param of method.findAllExpressionsMulti([Expressions.MethodDefReturning, Expressions.MethodParam])) {
227
227
  const nameToken = param === null || param === void 0 ? void 0 : param.findFirstExpression(Expressions.MethodParamName);
228
- const type = (_b = (_a = param === null || param === void 0 ? void 0 : param.findFirstExpression(Expressions.TypeParam)) === null || _a === void 0 ? void 0 : _a.concatTokens()) === null || _b === void 0 ? void 0 : _b.toUpperCase();
229
- if (this.getConfig().allowIsPrefixBoolean === true && (type === null || type === void 0 ? void 0 : type.endsWith("TYPE ABAP_BOOL"))) {
228
+ const typeName = (_c = (_b = (_a = param === null || param === void 0 ? void 0 : param.findFirstExpression(Expressions.TypeParam)) === null || _a === void 0 ? void 0 : _a.findFirstExpression(Expressions.TypeNameOrInfer)) === null || _b === void 0 ? void 0 : _b.concatTokens()) === null || _c === void 0 ? void 0 : _c.toUpperCase();
229
+ if (this.getConfig().allowIsPrefixBoolean === true && typeName === "ABAP_BOOL") {
230
230
  continue;
231
231
  }
232
232
  const name = nameToken === null || nameToken === void 0 ? void 0 : nameToken.concatTokens();
@@ -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/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
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/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
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/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
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/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
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/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
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/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
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/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
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/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
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/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
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/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
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/abapdocu_751_index_htm/7.51/en-us/abappack.htm
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/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
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/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
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/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
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/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
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/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
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/abapdocu_755_index_htm/7.55/en-US/index.htm
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/index.htm?file=abapselect_client_obsolete.htm`,
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/abapdocu_cp_index_htm/CLOUD/en-US/abenpragma.htm`,
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/abapdocu_750_index_htm/7.50/en-US/abenrfc_exception.htm`,
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/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
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/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
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/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
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/abapdocu_752_index_htm/7.52/en-us/abaptables.htm`,
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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.120.7",
3
+ "version": "2.120.9",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",