@abaplint/transpiler-cli 2.12.33 → 2.12.34

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/bundle.js +55 -11
  2. package/package.json +3 -3
package/build/bundle.js CHANGED
@@ -7709,9 +7709,10 @@ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/co
7709
7709
  const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
7710
7710
  const wparen_leftw_1 = __webpack_require__(/*! ../../1_lexer/tokens/wparen_leftw */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/wparen_leftw.js");
7711
7711
  const wparen_left_1 = __webpack_require__(/*! ../../1_lexer/tokens/wparen_left */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/wparen_left.js");
7712
+ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
7712
7713
  class SQLIntoList extends combi_1.Expression {
7713
7714
  getRunnable() {
7714
- const intoList = (0, combi_1.seq)((0, combi_1.altPrio)((0, combi_1.tok)(wparen_left_1.WParenLeft), (0, combi_1.tok)(wparen_leftw_1.WParenLeftW)), (0, combi_1.starPrio)((0, combi_1.seq)(_1.SQLTarget, ",")), _1.SQLTarget, ")");
7715
+ const intoList = (0, combi_1.seq)((0, combi_1.altPrio)((0, combi_1.tok)(wparen_left_1.WParenLeft), (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.tok)(wparen_leftw_1.WParenLeftW))), (0, combi_1.starPrio)((0, combi_1.seq)(_1.SQLTarget, ",")), _1.SQLTarget, ")");
7715
7716
  return (0, combi_1.seq)("INTO", intoList);
7716
7717
  }
7717
7718
  }
@@ -27922,36 +27923,36 @@ class SQLCompare {
27922
27923
  if (sqlin) {
27923
27924
  sql_in_1.SQLIn.runSyntax(sqlin, input);
27924
27925
  }
27925
- const fieldName = (_b = node.findDirectExpression(Expressions.SQLFieldName)) === null || _b === void 0 ? void 0 : _b.concatTokens();
27926
+ const fieldName = (_b = node.findDirectExpression(Expressions.SQLFieldName)) === null || _b === void 0 ? void 0 : _b.concatTokens().toUpperCase();
27926
27927
  if (fieldName && sourceType && token) {
27927
27928
  // check compatibility for rule sql_value_conversion
27928
27929
  const targetType = this.findType(fieldName, tables, input.scope);
27929
27930
  let message = "";
27930
27931
  if (sourceType instanceof basic_1.IntegerType
27931
27932
  && targetType instanceof basic_1.CharacterType) {
27932
- message = "Integer to CHAR conversion";
27933
+ message = `${fieldName}: Integer to CHAR conversion`;
27933
27934
  }
27934
27935
  else if (sourceType instanceof basic_1.IntegerType
27935
27936
  && targetType instanceof basic_1.NumericType) {
27936
- message = "Integer to NUMC conversion";
27937
+ message = `${fieldName}: Integer to NUMC conversion`;
27937
27938
  }
27938
27939
  else if (sourceType instanceof basic_1.NumericType
27939
27940
  && targetType instanceof basic_1.IntegerType) {
27940
- message = "NUMC to Integer conversion";
27941
+ message = `${fieldName}: NUMC to Integer conversion`;
27941
27942
  }
27942
27943
  else if (sourceType instanceof basic_1.CharacterType
27943
27944
  && targetType instanceof basic_1.IntegerType) {
27944
- message = "CHAR to Integer conversion";
27945
+ message = `${fieldName}: CHAR to Integer conversion`;
27945
27946
  }
27946
27947
  else if (sourceType instanceof basic_1.CharacterType
27947
27948
  && targetType instanceof basic_1.CharacterType
27948
27949
  && sourceType.getLength() > targetType.getLength()) {
27949
- message = "Source field longer than database field, CHAR -> CHAR";
27950
+ message = `${fieldName}: Source field longer than database field, CHAR -> CHAR`;
27950
27951
  }
27951
27952
  else if (sourceType instanceof basic_1.NumericType
27952
27953
  && targetType instanceof basic_1.NumericType
27953
27954
  && sourceType.getLength() > targetType.getLength()) {
27954
- message = "Source field longer than database field, NUMC -> NUMC";
27955
+ message = `${fieldName}: Source field longer than database field, NUMC -> NUMC`;
27955
27956
  }
27956
27957
  if (message !== "") {
27957
27958
  input.scope.addSQLConversion(fieldName, message, token);
@@ -46014,6 +46015,12 @@ exports.AbstractObject = AbstractObject;
46014
46015
  Object.defineProperty(exports, "__esModule", ({ value: true }));
46015
46016
  exports.parseDynpros = parseDynpros;
46016
46017
  const xml_utils_1 = __webpack_require__(/*! ../xml_utils */ "./node_modules/@abaplint/core/build/src/xml_utils.js");
46018
+ function parseNumber(value) {
46019
+ if (value === undefined) {
46020
+ return 0;
46021
+ }
46022
+ return parseInt(value, 10);
46023
+ }
46017
46024
  function parseDynpros(parsed) {
46018
46025
  var _a, _b, _c, _d;
46019
46026
  const dynpros = [];
@@ -46025,7 +46032,10 @@ function parseDynpros(parsed) {
46025
46032
  fields.push({
46026
46033
  name: f.NAME,
46027
46034
  type: f.TYPE,
46028
- length: f.LENGTH,
46035
+ length: parseNumber(f.LENGTH),
46036
+ line: parseNumber(f.LINE),
46037
+ column: parseNumber(f.COLUMN),
46038
+ height: parseNumber(f.HEIGHT),
46029
46039
  });
46030
46040
  }
46031
46041
  dynpros.push({
@@ -54715,7 +54725,7 @@ class Registry {
54715
54725
  }
54716
54726
  static abaplintVersion() {
54717
54727
  // magic, see build script "version.sh"
54718
- return "2.117.0";
54728
+ return "2.117.1";
54719
54729
  }
54720
54730
  getDDICReferences() {
54721
54731
  return this.ddicReferences;
@@ -63019,7 +63029,7 @@ class DynproChecks {
63019
63029
  key: "dynpro_checks",
63020
63030
  title: "Dynpro Checks",
63021
63031
  shortDescription: `Various Dynpro checks`,
63022
- extendedInformation: `* Check length of PUSH elements less than 132`,
63032
+ extendedInformation: `* Check length of PUSH elements less than 132\n* Check for overlapping screen elements`,
63023
63033
  tags: [_irule_1.RuleTag.Syntax],
63024
63034
  };
63025
63035
  }
@@ -63048,9 +63058,43 @@ class DynproChecks {
63048
63058
  ret.push(issue_1.Issue.atPosition(file, new position_1.Position(1, 1), message, this.getMetadata().key, this.getConfig().severity));
63049
63059
  }
63050
63060
  }
63061
+ ret.push(...this.findOverlappingFields(dynpro, file));
63062
+ }
63063
+ return ret;
63064
+ }
63065
+ findOverlappingFields(dynpro, file) {
63066
+ const ret = [];
63067
+ for (let index = 0; index < dynpro.fields.length; index++) {
63068
+ const current = dynpro.fields[index];
63069
+ if (current.name === undefined) {
63070
+ continue;
63071
+ }
63072
+ for (let compare = index + 1; compare < dynpro.fields.length; compare++) {
63073
+ const other = dynpro.fields[compare];
63074
+ if (other.name === undefined || this.overlaps(current, other) === false) {
63075
+ continue;
63076
+ }
63077
+ const message = `Screen ${dynpro.number}, fields ${current.name} and ${other.name} are overlapping`;
63078
+ ret.push(issue_1.Issue.atPosition(file, new position_1.Position(1, 1), message, this.getMetadata().key, this.getConfig().severity));
63079
+ }
63051
63080
  }
63052
63081
  return ret;
63053
63082
  }
63083
+ overlaps(first, second) {
63084
+ if (first.line === 0 || second.line === 0 || first.column === 0 || second.column === 0) {
63085
+ return false;
63086
+ }
63087
+ const firstHeight = Math.max(first.height, 1);
63088
+ const secondHeight = Math.max(second.height, 1);
63089
+ const firstLastLine = first.line + firstHeight - 1;
63090
+ const secondLastLine = second.line + secondHeight - 1;
63091
+ if (firstLastLine < second.line || secondLastLine < first.line) {
63092
+ return false;
63093
+ }
63094
+ const firstLastColumn = first.column + Math.max(first.length, 1) - 1;
63095
+ const secondLastColumn = second.column + Math.max(second.length, 1) - 1;
63096
+ return first.column <= secondLastColumn && second.column <= firstLastColumn;
63097
+ }
63054
63098
  }
63055
63099
  exports.DynproChecks = DynproChecks;
63056
63100
  //# sourceMappingURL=dynpro_checks.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.12.33",
3
+ "version": "2.12.34",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -27,8 +27,8 @@
27
27
  "author": "abaplint",
28
28
  "license": "MIT",
29
29
  "devDependencies": {
30
- "@abaplint/core": "^2.117.0",
31
- "@abaplint/transpiler": "^2.12.33",
30
+ "@abaplint/core": "^2.117.1",
31
+ "@abaplint/transpiler": "^2.12.34",
32
32
  "@types/glob": "^8.1.0",
33
33
  "@types/node": "^24.12.0",
34
34
  "@types/progress": "^2.0.7",