@abaplint/core 2.93.56 → 2.93.58

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.
@@ -2821,6 +2821,8 @@ declare interface IFunctionModuleParameter {
2821
2821
  name: string;
2822
2822
  direction: FunctionModuleParameterDirection;
2823
2823
  type: string | undefined;
2824
+ optional: boolean;
2825
+ defaultValue: string | undefined;
2824
2826
  }
2825
2827
 
2826
2828
  declare interface IGlobalConfig {
@@ -114,7 +114,7 @@ class Procedural {
114
114
  found = c.getType();
115
115
  }
116
116
  }
117
- if (found instanceof basic_1.UnknownType && param.type) {
117
+ if ((found instanceof basic_1.UnknownType || found instanceof basic_1.VoidType) && param.type) {
118
118
  const f = ddic.lookupBuiltinType(param.type);
119
119
  if (f) {
120
120
  found = f;
@@ -39,6 +39,8 @@ class FunctionModuleDefinition {
39
39
  name: param.PARAMETER,
40
40
  direction: FunctionModuleParameterDirection.importing,
41
41
  type: param.TYP || param.DBFIELD,
42
+ optional: param.OPTIONAL === "X",
43
+ defaultValue: param.DEFAULT,
42
44
  });
43
45
  }
44
46
  }
@@ -51,6 +53,8 @@ class FunctionModuleDefinition {
51
53
  name: param.PARAMETER,
52
54
  direction: FunctionModuleParameterDirection.changing,
53
55
  type: param.TYP || param.DBFIELD,
56
+ optional: param.OPTIONAL === "X",
57
+ defaultValue: param.DEFAULT,
54
58
  });
55
59
  }
56
60
  }
@@ -63,6 +67,8 @@ class FunctionModuleDefinition {
63
67
  name: param.PARAMETER,
64
68
  direction: FunctionModuleParameterDirection.exporting,
65
69
  type: param.TYP || param.DBFIELD,
70
+ optional: true,
71
+ defaultValue: undefined,
66
72
  });
67
73
  }
68
74
  }
@@ -76,6 +82,8 @@ class FunctionModuleDefinition {
76
82
  direction: FunctionModuleParameterDirection.tables,
77
83
  // table types are stored in TYP
78
84
  type: param.DBSTRUCT || param.TYP,
85
+ optional: param.OPTIONAL === "X",
86
+ defaultValue: undefined,
79
87
  });
80
88
  }
81
89
  }
@@ -63,7 +63,7 @@ class Registry {
63
63
  }
64
64
  static abaplintVersion() {
65
65
  // magic, see build script "version.sh"
66
- return "2.93.56";
66
+ return "2.93.58";
67
67
  }
68
68
  getDDICReferences() {
69
69
  return this.references;
@@ -12,6 +12,8 @@ const edit_helper_1 = require("../edit_helper");
12
12
  class AvoidUseConf extends _basic_rule_config_1.BasicRuleConfig {
13
13
  constructor() {
14
14
  super(...arguments);
15
+ /** Do not emit quick fix suggestion */
16
+ this.skipQuickFix = false;
15
17
  /** Detects DEFINE (macro definitions) */
16
18
  this.define = true;
17
19
  /** Detects statics */
@@ -73,7 +75,7 @@ TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md
73
75
  const children = statementNode.getChildren();
74
76
  if (children.length === 6 && children[3].getFirstToken().getStr().toUpperCase() === "LINES") {
75
77
  message = "DESCRIBE LINES, use lines() instead";
76
- fix = this.getDescribeLinesFix(file, statementNode);
78
+ fix = this.conf.skipQuickFix === true ? undefined : this.getDescribeLinesFix(file, statementNode);
77
79
  }
78
80
  }
79
81
  else if (this.conf.statics && statement instanceof Statements.StaticBegin) {
@@ -91,7 +93,7 @@ TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md
91
93
  }
92
94
  else if (this.conf.break && statement instanceof Statements.Break) {
93
95
  message = "BREAK/BREAK-POINT";
94
- fix = edit_helper_1.EditHelper.deleteStatement(file, statementNode);
96
+ fix = this.conf.skipQuickFix === true ? undefined : edit_helper_1.EditHelper.deleteStatement(file, statementNode);
95
97
  }
96
98
  if (message) {
97
99
  issues.push(issue_1.Issue.atStatement(file, statementNode, this.getDescription(message), this.getMetadata().key, this.conf.severity, fix));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.93.56",
3
+ "version": "2.93.58",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -49,7 +49,7 @@
49
49
  "@microsoft/api-extractor": "^7.33.5",
50
50
  "@types/chai": "^4.3.3",
51
51
  "@types/mocha": "^10.0.0",
52
- "@types/node": "^18.11.7",
52
+ "@types/node": "^18.11.8",
53
53
  "chai": "^4.3.6",
54
54
  "eslint": "^8.26.0",
55
55
  "mocha": "^10.1.0",