@abaplint/cli 2.119.62 → 2.119.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.
Files changed (2) hide show
  1. package/build/cli.js +32 -23
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -19851,7 +19851,7 @@ class TypeMesh {
19851
19851
  const on = (0, combi_1.seq)("ON", expressions_1.NamespaceSimpleName, "=", expressions_1.NamespaceSimpleName, (0, combi_1.star)((0, combi_1.seq)("AND", expressions_1.NamespaceSimpleName, "=", expressions_1.NamespaceSimpleName)));
19852
19852
  const using = (0, combi_1.seq)("USING KEY", expressions_1.NamespaceSimpleName);
19853
19853
  const association = (0, combi_1.seq)("ASSOCIATION", expressions_1.NamespaceSimpleName, "TO", expressions_1.NamespaceSimpleName, (0, combi_1.plus)(on));
19854
- const ret = (0, combi_1.ver)(version_1.Release.v751, (0, combi_1.seq)("TYPES", expressions_1.NamespaceSimpleName, "TYPE", (0, combi_1.opt)("REF TO"), expressions_1.TypeName, (0, combi_1.plus)(association), (0, combi_1.opt)(using)));
19854
+ const ret = (0, combi_1.ver)(version_1.Release.v740sp05, (0, combi_1.seq)("TYPES", expressions_1.NamespaceSimpleName, "TYPE", (0, combi_1.opt)("REF TO"), expressions_1.TypeName, (0, combi_1.plus)(association), (0, combi_1.opt)(using)));
19855
19855
  return ret;
19856
19856
  }
19857
19857
  }
@@ -59639,6 +59639,7 @@ function parseDynpros(parsed) {
59639
59639
  fields.push({
59640
59640
  name: f.NAME,
59641
59641
  type: f.TYPE,
59642
+ contType: f.CONT_TYPE,
59642
59643
  length: parseNumber(f.LENGTH),
59643
59644
  vislength: parseNumber(f.VISLENGTH),
59644
59645
  line: parseNumber(f.LINE),
@@ -61526,9 +61527,8 @@ class DataDefinition extends _abstract_object_1.AbstractObject {
61526
61527
  }
61527
61528
  if (found === undefined) {
61528
61529
  // typed virtual element: VIRTUAL <name> : <type>
61529
- const names = e.findAllExpressions(expressions_1.CDSName);
61530
- if (e.findDirectTokenByText("VIRTUAL") !== undefined && names.length > 0) {
61531
- found = names[0];
61530
+ if (e.findDirectTokenByText("VIRTUAL") !== undefined) {
61531
+ found = e.findFirstExpression(expressions_1.CDSName);
61532
61532
  }
61533
61533
  }
61534
61534
  if (found === undefined) {
@@ -68820,7 +68820,7 @@ class Registry {
68820
68820
  }
68821
68821
  static abaplintVersion() {
68822
68822
  // magic, see build script "version.js"
68823
- return "2.119.62";
68823
+ return "2.119.63";
68824
68824
  }
68825
68825
  getDDICReferences() {
68826
68826
  return this.ddicReferences;
@@ -70991,17 +70991,22 @@ class BeginEndNames extends _abap_rule_1.ABAPRule {
70991
70991
  test(stru, type, b, e, file) {
70992
70992
  const output = [];
70993
70993
  for (const sub of stru.findAllStructuresRecursive(type)) {
70994
- let begin = sub.findDirectStatements(b)[0].findFirstExpression(Expressions.NamespaceSimpleName);
70994
+ const beginStatement = sub.findDirectStatement(b);
70995
+ const endStatement = sub.findDirectStatement(e);
70996
+ if (beginStatement === undefined || endStatement === undefined) {
70997
+ continue;
70998
+ }
70999
+ let begin = beginStatement.findFirstExpression(Expressions.NamespaceSimpleName);
70995
71000
  if (begin === undefined) {
70996
- begin = sub.findDirectStatements(b)[0].findFirstExpression(Expressions.DefinitionName);
71001
+ begin = beginStatement.findFirstExpression(Expressions.DefinitionName);
70997
71002
  }
70998
71003
  if (begin === undefined) {
70999
71004
  continue;
71000
71005
  }
71001
71006
  const first = begin.getFirstToken();
71002
- let end = sub.findDirectStatements(e)[0].findFirstExpression(Expressions.NamespaceSimpleName);
71007
+ let end = endStatement.findFirstExpression(Expressions.NamespaceSimpleName);
71003
71008
  if (end === undefined) {
71004
- end = sub.findDirectStatements(e)[0].findFirstExpression(Expressions.DefinitionName);
71009
+ end = endStatement.findFirstExpression(Expressions.DefinitionName);
71005
71010
  }
71006
71011
  if (end === undefined) {
71007
71012
  continue;
@@ -78213,7 +78218,7 @@ ${indentation} output = ${uniqueName}.\n`;
78213
78218
  }
78214
78219
  }
78215
78220
  }
78216
- if (fix === undefined && high.findAllExpressions(Expressions.NewObject)) {
78221
+ if (fix === undefined) {
78217
78222
  const found = high.findFirstExpression(Expressions.NewObject);
78218
78223
  if (found === undefined) {
78219
78224
  return undefined;
@@ -78387,12 +78392,13 @@ class DynproChecks {
78387
78392
  const ret = [];
78388
78393
  for (let index = 0; index < dynpro.fields.length; index++) {
78389
78394
  const current = dynpro.fields[index];
78390
- if (current.name === undefined || current.type === "FRAME") {
78395
+ if (current.name === undefined || current.type === "FRAME" || this.hasContainerRelativeCoordinates(current)) {
78391
78396
  continue;
78392
78397
  }
78393
78398
  for (let compare = index + 1; compare < dynpro.fields.length; compare++) {
78394
78399
  const other = dynpro.fields[compare];
78395
- if (other.name === undefined || other.type === "FRAME" || this.overlaps(current, other) === false) {
78400
+ if (other.name === undefined || other.type === "FRAME" || this.hasContainerRelativeCoordinates(other)
78401
+ || this.overlaps(current, other) === false) {
78396
78402
  continue;
78397
78403
  }
78398
78404
  const message = `Screen ${dynpro.number}, ${current.type} ${current.name} and ${other.type} ${other.name} are overlapping`;
@@ -78401,6 +78407,9 @@ class DynproChecks {
78401
78407
  }
78402
78408
  return ret;
78403
78409
  }
78410
+ hasContainerRelativeCoordinates(field) {
78411
+ return field.contType === "TABLE_CTRL" || field.contType === "LOOP";
78412
+ }
78404
78413
  overlaps(first, second) {
78405
78414
  if (first.line === 0 || second.line === 0 || first.column === 0 || second.column === 0) {
78406
78415
  return false;
@@ -88010,11 +88019,11 @@ ENDIF.`,
88010
88019
  }
88011
88020
  }
88012
88021
  else {
88013
- const classNameExpression = staNode.findAllExpressions(Expressions.ClassName);
88014
- const methodNameExpression = staNode.findAllExpressions(Expressions.MethodName);
88015
- if (classNameExpression.length !== 0 && methodNameExpression.length !== 0) {
88016
- const className = classNameExpression[0].concatTokens();
88017
- const methodName = methodNameExpression[0].concatTokens();
88022
+ const classNameExpression = staNode.findFirstExpression(Expressions.ClassName);
88023
+ const methodNameExpression = staNode.findFirstExpression(Expressions.MethodName);
88024
+ if (classNameExpression && methodNameExpression) {
88025
+ const className = classNameExpression.concatTokens();
88026
+ const methodName = methodNameExpression.concatTokens();
88018
88027
  if (className === "cl_abap_regex") {
88019
88028
  if (methodName === "create_posix") {
88020
88029
  const issue = issue_1.Issue.atStatement(file, staNode, "create_posix obsolete, use create_pcre", this.getMetadata().key, this.conf.severity);
@@ -92176,12 +92185,12 @@ class ShortCase extends _abap_rule_1.ABAPRule {
92176
92185
  return [];
92177
92186
  }
92178
92187
  for (const c of struc.findAllStructures(Structures.Case)) {
92179
- const clist = c.findDirectStatements(Statements.Case);
92180
- if (clist.length > 0 && this.conf.allow && this.conf.allow.find((e) => { return e === clist[0].getTokens()[1].getStr(); })) {
92188
+ const caseStatement = c.findDirectStatement(Statements.Case);
92189
+ if (caseStatement && this.conf.allow && this.conf.allow.find((e) => { return e === caseStatement.getTokens()[1].getStr(); })) {
92181
92190
  continue;
92182
92191
  }
92183
92192
  if (c.findDirectStructures(Structures.When).length <= this.conf.length) {
92184
- if (c.findAllExpressions(Expressions.Or).length > 0) {
92193
+ if (c.findFirstExpression(Expressions.Or)) {
92185
92194
  continue;
92186
92195
  }
92187
92196
  const issue = issue_1.Issue.atToken(file, c.getFirstToken(), this.getMessage(), this.getMetadata().key, this.conf.severity);
@@ -94005,9 +94014,9 @@ class TryWithoutCatch extends _abap_rule_1.ABAPRule {
94005
94014
  }
94006
94015
  const tries = stru.findAllStructures(structures_1.Try);
94007
94016
  for (const t of tries) {
94008
- const clean = t.findDirectStructures(structures_1.Cleanup);
94009
- const c = t.findDirectStructures(structures_1.Catch);
94010
- if (c.length === 0 && clean.length === 0) {
94017
+ const clean = t.findDirectStructure(structures_1.Cleanup);
94018
+ const c = t.findDirectStructure(structures_1.Catch);
94019
+ if (c === undefined && clean === undefined) {
94011
94020
  const issue = issue_1.Issue.atToken(file, t.getFirstToken(), this.getMessage(), this.getMetadata().key, this.conf.severity);
94012
94021
  issues.push(issue);
94013
94022
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.119.62",
3
+ "version": "2.119.63",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "homepage": "https://abaplint.org",
41
41
  "devDependencies": {
42
- "@abaplint/core": "^2.119.62",
42
+ "@abaplint/core": "^2.119.63",
43
43
  "@types/chai": "^4.3.20",
44
44
  "@types/minimist": "^1.2.5",
45
45
  "@types/mocha": "^10.0.10",