@abaplint/cli 2.119.62 → 2.119.64

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 +35 -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
  }
@@ -34190,6 +34190,9 @@ class Source {
34190
34190
  if (context instanceof basic_1.FloatType && found instanceof basic_1.IntegerType) {
34191
34191
  return context;
34192
34192
  }
34193
+ else if (context instanceof basic_1.IntegerType && found instanceof basic_1.HexType) {
34194
+ return context;
34195
+ }
34193
34196
  else if ((context instanceof basic_1.IntegerType || context instanceof basic_1.FloatType) && (found === null || found === void 0 ? void 0 : found.isGeneric())) {
34194
34197
  return context;
34195
34198
  }
@@ -59639,6 +59642,7 @@ function parseDynpros(parsed) {
59639
59642
  fields.push({
59640
59643
  name: f.NAME,
59641
59644
  type: f.TYPE,
59645
+ contType: f.CONT_TYPE,
59642
59646
  length: parseNumber(f.LENGTH),
59643
59647
  vislength: parseNumber(f.VISLENGTH),
59644
59648
  line: parseNumber(f.LINE),
@@ -61526,9 +61530,8 @@ class DataDefinition extends _abstract_object_1.AbstractObject {
61526
61530
  }
61527
61531
  if (found === undefined) {
61528
61532
  // 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];
61533
+ if (e.findDirectTokenByText("VIRTUAL") !== undefined) {
61534
+ found = e.findFirstExpression(expressions_1.CDSName);
61532
61535
  }
61533
61536
  }
61534
61537
  if (found === undefined) {
@@ -68820,7 +68823,7 @@ class Registry {
68820
68823
  }
68821
68824
  static abaplintVersion() {
68822
68825
  // magic, see build script "version.js"
68823
- return "2.119.62";
68826
+ return "2.119.64";
68824
68827
  }
68825
68828
  getDDICReferences() {
68826
68829
  return this.ddicReferences;
@@ -70991,17 +70994,22 @@ class BeginEndNames extends _abap_rule_1.ABAPRule {
70991
70994
  test(stru, type, b, e, file) {
70992
70995
  const output = [];
70993
70996
  for (const sub of stru.findAllStructuresRecursive(type)) {
70994
- let begin = sub.findDirectStatements(b)[0].findFirstExpression(Expressions.NamespaceSimpleName);
70997
+ const beginStatement = sub.findDirectStatement(b);
70998
+ const endStatement = sub.findDirectStatement(e);
70999
+ if (beginStatement === undefined || endStatement === undefined) {
71000
+ continue;
71001
+ }
71002
+ let begin = beginStatement.findFirstExpression(Expressions.NamespaceSimpleName);
70995
71003
  if (begin === undefined) {
70996
- begin = sub.findDirectStatements(b)[0].findFirstExpression(Expressions.DefinitionName);
71004
+ begin = beginStatement.findFirstExpression(Expressions.DefinitionName);
70997
71005
  }
70998
71006
  if (begin === undefined) {
70999
71007
  continue;
71000
71008
  }
71001
71009
  const first = begin.getFirstToken();
71002
- let end = sub.findDirectStatements(e)[0].findFirstExpression(Expressions.NamespaceSimpleName);
71010
+ let end = endStatement.findFirstExpression(Expressions.NamespaceSimpleName);
71003
71011
  if (end === undefined) {
71004
- end = sub.findDirectStatements(e)[0].findFirstExpression(Expressions.DefinitionName);
71012
+ end = endStatement.findFirstExpression(Expressions.DefinitionName);
71005
71013
  }
71006
71014
  if (end === undefined) {
71007
71015
  continue;
@@ -78213,7 +78221,7 @@ ${indentation} output = ${uniqueName}.\n`;
78213
78221
  }
78214
78222
  }
78215
78223
  }
78216
- if (fix === undefined && high.findAllExpressions(Expressions.NewObject)) {
78224
+ if (fix === undefined) {
78217
78225
  const found = high.findFirstExpression(Expressions.NewObject);
78218
78226
  if (found === undefined) {
78219
78227
  return undefined;
@@ -78387,12 +78395,13 @@ class DynproChecks {
78387
78395
  const ret = [];
78388
78396
  for (let index = 0; index < dynpro.fields.length; index++) {
78389
78397
  const current = dynpro.fields[index];
78390
- if (current.name === undefined || current.type === "FRAME") {
78398
+ if (current.name === undefined || current.type === "FRAME" || this.hasContainerRelativeCoordinates(current)) {
78391
78399
  continue;
78392
78400
  }
78393
78401
  for (let compare = index + 1; compare < dynpro.fields.length; compare++) {
78394
78402
  const other = dynpro.fields[compare];
78395
- if (other.name === undefined || other.type === "FRAME" || this.overlaps(current, other) === false) {
78403
+ if (other.name === undefined || other.type === "FRAME" || this.hasContainerRelativeCoordinates(other)
78404
+ || this.overlaps(current, other) === false) {
78396
78405
  continue;
78397
78406
  }
78398
78407
  const message = `Screen ${dynpro.number}, ${current.type} ${current.name} and ${other.type} ${other.name} are overlapping`;
@@ -78401,6 +78410,9 @@ class DynproChecks {
78401
78410
  }
78402
78411
  return ret;
78403
78412
  }
78413
+ hasContainerRelativeCoordinates(field) {
78414
+ return field.contType === "TABLE_CTRL" || field.contType === "LOOP" || field.contType === "STRIP_CTRL";
78415
+ }
78404
78416
  overlaps(first, second) {
78405
78417
  if (first.line === 0 || second.line === 0 || first.column === 0 || second.column === 0) {
78406
78418
  return false;
@@ -88010,11 +88022,11 @@ ENDIF.`,
88010
88022
  }
88011
88023
  }
88012
88024
  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();
88025
+ const classNameExpression = staNode.findFirstExpression(Expressions.ClassName);
88026
+ const methodNameExpression = staNode.findFirstExpression(Expressions.MethodName);
88027
+ if (classNameExpression && methodNameExpression) {
88028
+ const className = classNameExpression.concatTokens();
88029
+ const methodName = methodNameExpression.concatTokens();
88018
88030
  if (className === "cl_abap_regex") {
88019
88031
  if (methodName === "create_posix") {
88020
88032
  const issue = issue_1.Issue.atStatement(file, staNode, "create_posix obsolete, use create_pcre", this.getMetadata().key, this.conf.severity);
@@ -92176,12 +92188,12 @@ class ShortCase extends _abap_rule_1.ABAPRule {
92176
92188
  return [];
92177
92189
  }
92178
92190
  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(); })) {
92191
+ const caseStatement = c.findDirectStatement(Statements.Case);
92192
+ if (caseStatement && this.conf.allow && this.conf.allow.find((e) => { return e === caseStatement.getTokens()[1].getStr(); })) {
92181
92193
  continue;
92182
92194
  }
92183
92195
  if (c.findDirectStructures(Structures.When).length <= this.conf.length) {
92184
- if (c.findAllExpressions(Expressions.Or).length > 0) {
92196
+ if (c.findFirstExpression(Expressions.Or)) {
92185
92197
  continue;
92186
92198
  }
92187
92199
  const issue = issue_1.Issue.atToken(file, c.getFirstToken(), this.getMessage(), this.getMetadata().key, this.conf.severity);
@@ -94005,9 +94017,9 @@ class TryWithoutCatch extends _abap_rule_1.ABAPRule {
94005
94017
  }
94006
94018
  const tries = stru.findAllStructures(structures_1.Try);
94007
94019
  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) {
94020
+ const clean = t.findDirectStructure(structures_1.Cleanup);
94021
+ const c = t.findDirectStructure(structures_1.Catch);
94022
+ if (c === undefined && clean === undefined) {
94011
94023
  const issue = issue_1.Issue.atToken(file, t.getFirstToken(), this.getMessage(), this.getMetadata().key, this.conf.severity);
94012
94024
  issues.push(issue);
94013
94025
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.119.62",
3
+ "version": "2.119.64",
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.64",
43
43
  "@types/chai": "^4.3.20",
44
44
  "@types/minimist": "^1.2.5",
45
45
  "@types/mocha": "^10.0.10",