@abaplint/core 2.113.200 → 2.113.202

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.
@@ -6,7 +6,7 @@ const expressions_1 = require("../expressions");
6
6
  const version_1 = require("../../../version");
7
7
  class Select {
8
8
  getMatcher() {
9
- const union = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("UNION", (0, combi_1.optPrio)((0, combi_1.altPrio)("DISTINCT", "ALL")), expressions_1.Select));
9
+ const union = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("UNION", (0, combi_1.optPrio)((0, combi_1.altPrio)("DISTINCT", "ALL")), expressions_1.Select), version_1.Version.OpenABAP);
10
10
  return (0, combi_1.seq)(expressions_1.Select, (0, combi_1.starPrio)(union));
11
11
  }
12
12
  }
@@ -63,6 +63,11 @@ class Append {
63
63
  if (sourceType instanceof basic_1.TableType) {
64
64
  sourceType = sourceType.getRowType();
65
65
  }
66
+ else if (!(sourceType instanceof basic_1.VoidType) && !(sourceType instanceof basic_1.UnknownType)) {
67
+ const message = "LINES OF must be a table type";
68
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
69
+ return;
70
+ }
66
71
  if (targetType instanceof basic_1.TableType) {
67
72
  targetType = targetType.getRowType();
68
73
  }
@@ -15,14 +15,18 @@ exports.SELECTION_EVENTS = [
15
15
  Statements.EndOfPage,
16
16
  ];
17
17
  exports.DECLARATION_STUFF = [
18
+ Statements.Type,
19
+ Statements.TypeBegin,
20
+ Statements.TypeEnum,
21
+ Statements.TypeEnumBegin,
18
22
  Statements.Data,
19
23
  Statements.DataBegin,
20
24
  Statements.Constant,
25
+ Statements.ConstantBegin,
21
26
  Statements.Tables,
22
27
  Statements.Include, // this is not super correct, but anyhow
23
28
  Statements.Parameter,
24
29
  Statements.SelectionScreen,
25
- Statements.ConstantBegin,
26
30
  Statements.Define,
27
31
  ];
28
32
  //# sourceMappingURL=selection_events.js.map
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.113.200";
70
+ return "2.113.202";
71
71
  }
72
72
  getDDICReferences() {
73
73
  return this.ddicReferences;
@@ -11,6 +11,7 @@ class CheckCommentsConf extends _basic_rule_config_1.BasicRuleConfig {
11
11
  super(...arguments);
12
12
  /** Allows the use of end-of-line comments. */
13
13
  this.allowEndOfLine = false;
14
+ this.maxIssuesPerFile = 10;
14
15
  }
15
16
  }
16
17
  exports.CheckCommentsConf = CheckCommentsConf;
@@ -56,6 +57,10 @@ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#put-comment
56
57
  if (this.conf.allowEndOfLine === true) {
57
58
  return [];
58
59
  }
60
+ let max = this.getConfig().maxIssuesPerFile;
61
+ if (max === undefined || max < 1) {
62
+ max = 10;
63
+ }
59
64
  const commentRows = [];
60
65
  for (let i = 0; i < rows.length; i++) {
61
66
  const row = rows[i];
@@ -72,6 +77,9 @@ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#put-comment
72
77
  continue;
73
78
  }
74
79
  issues.push(issue_1.Issue.atStatement(file, statement, this.getDescription(IssueType.EndOfLine), this.getMetadata().key, this.conf.severity));
80
+ if (issues.length >= max) {
81
+ break;
82
+ }
75
83
  }
76
84
  }
77
85
  return issues;
@@ -26,6 +26,7 @@ class IndentationConf extends _basic_rule_config_1.BasicRuleConfig {
26
26
  this.globalClassSkipFirst = false;
27
27
  this.ignoreGlobalClassDefinition = false;
28
28
  this.ignoreGlobalInterface = false;
29
+ this.maxIssuesPerFile = 10;
29
30
  }
30
31
  }
31
32
  exports.IndentationConf = IndentationConf;
@@ -68,7 +69,10 @@ ENDCLASS.`,
68
69
  }
69
70
  runParsed(file, obj) {
70
71
  var _a, _b;
71
- const MAX_ISSUES = 100;
72
+ let max = this.getConfig().maxIssuesPerFile;
73
+ if (max === undefined || max < 1) {
74
+ max = 10;
75
+ }
72
76
  let skip = false;
73
77
  if (file.getStructure() === undefined) {
74
78
  return []; // syntax error in file
@@ -140,7 +144,7 @@ ENDCLASS.`,
140
144
  const message = "Indentation problem, expected " + expected + " spaces";
141
145
  const issue = issue_1.Issue.atPosition(file, position, message, this.getMetadata().key, this.conf.severity, fix);
142
146
  ret.push(issue);
143
- if (ret.length >= MAX_ISSUES) {
147
+ if (ret.length >= max) {
144
148
  break;
145
149
  }
146
150
  }
@@ -33,6 +33,7 @@ class KeywordCaseConf extends _basic_rule_config_1.BasicRuleConfig {
33
33
  this.ignoreGlobalClassBoundaries = false;
34
34
  /** A list of keywords to be ignored */
35
35
  this.ignoreKeywords = [];
36
+ this.maxIssuesPerFile = 10;
36
37
  }
37
38
  }
38
39
  exports.KeywordCaseConf = KeywordCaseConf;
@@ -143,6 +144,10 @@ class KeywordCase extends _abap_rule_1.ABAPRule {
143
144
  return [];
144
145
  }
145
146
  }
147
+ let max = this.getConfig().maxIssuesPerFile;
148
+ if (max === undefined || max < 1) {
149
+ max = 10;
150
+ }
146
151
  const skip = new Skip(this.getConfig());
147
152
  let prev = undefined;
148
153
  for (const statement of file.getStatements()) {
@@ -165,6 +170,9 @@ class KeywordCase extends _abap_rule_1.ABAPRule {
165
170
  }
166
171
  prev = result[0].token;
167
172
  }
173
+ if (issues.length >= max) {
174
+ break;
175
+ }
168
176
  }
169
177
  return issues;
170
178
  }
@@ -10,6 +10,7 @@ class LineLengthConf extends _basic_rule_config_1.BasicRuleConfig {
10
10
  super(...arguments);
11
11
  /** Maximum line length in characters, trailing whitespace ignored */
12
12
  this.length = 120;
13
+ this.maxIssuesPerFile = 10;
13
14
  }
14
15
  }
15
16
  exports.LineLengthConf = LineLengthConf;
@@ -38,6 +39,10 @@ https://docs.abapopenchecks.org/checks/04/`,
38
39
  const issues = [];
39
40
  // maximum line length in abap files
40
41
  const maxLineLength = 255;
42
+ let max = this.getConfig().maxIssuesPerFile;
43
+ if (max === undefined || max < 1) {
44
+ max = 10;
45
+ }
41
46
  const array = file.getRawRows();
42
47
  for (let rowIndex = 0; rowIndex < array.length; rowIndex++) {
43
48
  const row = array[rowIndex].replace("\r", "");
@@ -49,6 +54,9 @@ https://docs.abapopenchecks.org/checks/04/`,
49
54
  const message = `Reduce line length to max ${this.conf.length}, currently ${row.length}`;
50
55
  issues.push(issue_1.Issue.atRow(file, rowIndex + 1, message, this.getMetadata().key, this.conf.severity));
51
56
  }
57
+ if (issues.length >= max) {
58
+ break;
59
+ }
52
60
  }
53
61
  return issues;
54
62
  }
@@ -23,6 +23,7 @@ class NoPrefixesConf extends _basic_rule_config_1.BasicRuleConfig {
23
23
  /** importing, exporting, returning and changing parameters, case insensitive regex */
24
24
  this.methodParameters = "^[ICER].?_";
25
25
  this.allowIsPrefixBoolean = true;
26
+ this.maxIssuesPerFile = 10;
26
27
  // todo, public localClass: string = "";
27
28
  // todo, public localInterface: string = "";
28
29
  // todo, public functionModuleParameters: string = "";
@@ -69,21 +70,40 @@ https://github.com/SAP/styleguides/blob/main/clean-abap/sub-sections/AvoidEncodi
69
70
  // syntax error, skip
70
71
  return [];
71
72
  }
73
+ let max = config.maxIssuesPerFile;
74
+ if (max === undefined || max < 1) {
75
+ max = 10;
76
+ }
72
77
  if (config.data !== undefined && config.data !== "") {
73
78
  ret.push(...this.checkData(structure, new RegExp(config.data, "i"), file));
74
79
  }
80
+ if (ret.length >= max) {
81
+ return ret;
82
+ }
75
83
  if (config.statics !== undefined && config.statics !== "") {
76
84
  ret.push(...this.checkStatics(structure, new RegExp(config.statics, "i"), file));
77
85
  }
86
+ if (ret.length >= max) {
87
+ return ret;
88
+ }
78
89
  if (config.fieldSymbols !== undefined && config.fieldSymbols !== "") {
79
90
  ret.push(...this.checkFieldSymbols(structure, new RegExp(config.fieldSymbols, "i"), file));
80
91
  }
92
+ if (ret.length >= max) {
93
+ return ret;
94
+ }
81
95
  if (config.constants !== undefined && config.constants !== "") {
82
96
  ret.push(...this.checkConstants(structure, new RegExp(config.constants, "i"), file));
83
97
  }
98
+ if (ret.length >= max) {
99
+ return ret;
100
+ }
84
101
  if (config.types !== undefined && config.types !== "") {
85
102
  ret.push(...this.checkTypes(structure, new RegExp(config.types, "i"), file));
86
103
  }
104
+ if (ret.length >= max) {
105
+ return ret;
106
+ }
87
107
  if (config.methodParameters !== undefined && config.methodParameters !== "") {
88
108
  ret.push(...this.checkMethodParameters(structure, new RegExp(config.methodParameters, "i"), file));
89
109
  }
@@ -8,6 +8,10 @@ const _irule_1 = require("./_irule");
8
8
  const edit_helper_1 = require("../edit_helper");
9
9
  const _statement_1 = require("../abap/2_statements/statements/_statement");
10
10
  class UnnecessaryChainingConf extends _basic_rule_config_1.BasicRuleConfig {
11
+ constructor() {
12
+ super(...arguments);
13
+ this.maxIssuesPerFile = 10;
14
+ }
11
15
  }
12
16
  exports.UnnecessaryChainingConf = UnnecessaryChainingConf;
13
17
  class UnnecessaryChaining extends _abap_rule_1.ABAPRule {
@@ -34,6 +38,10 @@ class UnnecessaryChaining extends _abap_rule_1.ABAPRule {
34
38
  }
35
39
  runParsed(file) {
36
40
  const issues = [];
41
+ let max = this.getConfig().maxIssuesPerFile;
42
+ if (max === undefined || max < 1) {
43
+ max = 10;
44
+ }
37
45
  const statements = file.getStatements();
38
46
  for (let i = 0; i < statements.length; i++) {
39
47
  const colon = statements[i].getColon();
@@ -64,6 +72,9 @@ class UnnecessaryChaining extends _abap_rule_1.ABAPRule {
64
72
  const message = "Unnecessary chaining";
65
73
  const issue = issue_1.Issue.atToken(file, colon, message, this.getMetadata().key, this.conf.severity, fix);
66
74
  issues.push(issue);
75
+ if (issues.length >= max) {
76
+ break;
77
+ }
67
78
  }
68
79
  return issues;
69
80
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.113.200",
3
+ "version": "2.113.202",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -50,12 +50,12 @@
50
50
  },
51
51
  "homepage": "https://abaplint.org",
52
52
  "devDependencies": {
53
- "@microsoft/api-extractor": "^7.52.11",
53
+ "@microsoft/api-extractor": "^7.52.13",
54
54
  "@types/chai": "^4.3.20",
55
55
  "@types/mocha": "^10.0.10",
56
- "@types/node": "^24.3.0",
56
+ "@types/node": "^24.4.0",
57
57
  "chai": "^4.5.0",
58
- "eslint": "^9.34.0",
58
+ "eslint": "^9.35.0",
59
59
  "mocha": "^11.7.2",
60
60
  "c8": "^10.1.3",
61
61
  "source-map-support": "^0.5.21",