@abaplint/cli 2.102.69 → 2.103.0

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 +111 -6
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -37199,11 +37199,14 @@ class ClassDefinition extends _identifier_1.Identifier {
37199
37199
  }
37200
37200
  names.add(m.getName().toUpperCase());
37201
37201
  }
37202
+ for (const a of (cdef === null || cdef === void 0 ? void 0 : cdef.getAliases().getAll()) || []) {
37203
+ names.add(a.getName().toUpperCase());
37204
+ }
37202
37205
  sup = cdef === null || cdef === void 0 ? void 0 : cdef.getSuperClass();
37203
37206
  }
37204
37207
  for (const m of this.getMethodDefinitions().getAll()) {
37205
37208
  if (names.has(m.getName().toUpperCase()) && m.isRedefinition() === false) {
37206
- throw new Error(`Method ${m.getName().toUpperCase()} already declared in superclass`);
37209
+ throw new Error(`${m.getName().toUpperCase()} already declared in superclass`);
37207
37210
  }
37208
37211
  }
37209
37212
  }
@@ -47324,6 +47327,7 @@ exports.PersonalizationObject = PersonalizationObject;
47324
47327
  Object.defineProperty(exports, "__esModule", ({ value: true }));
47325
47328
  exports.Program = void 0;
47326
47329
  const _abap_object_1 = __webpack_require__(/*! ./_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
47330
+ const xml_utils_1 = __webpack_require__(/*! ../xml_utils */ "./node_modules/@abaplint/core/build/src/xml_utils.js");
47327
47331
  class Program extends _abap_object_1.ABAPObject {
47328
47332
  getType() {
47329
47333
  return "PROG";
@@ -47357,14 +47361,49 @@ class Program extends _abap_object_1.ABAPObject {
47357
47361
  this.parseXML();
47358
47362
  return this.parsedXML.isModulePool;
47359
47363
  }
47364
+ getDynpros() {
47365
+ this.parseXML();
47366
+ return this.parsedXML.dynpros;
47367
+ }
47368
+ ////////////////////////////
47360
47369
  parseXML() {
47361
- if (this.parsedXML === undefined) {
47362
- const file = this.getXMLFile();
47370
+ var _a, _b, _c, _d;
47371
+ if (this.parsedXML !== undefined) {
47372
+ return;
47373
+ }
47374
+ const file = this.getXMLFile();
47375
+ const parsed = this.parseRaw2();
47376
+ if (parsed === undefined) {
47363
47377
  this.parsedXML = {
47364
- isInclude: file ? file.getRaw().includes("<SUBC>I</SUBC>") : false,
47365
- isModulePool: file ? file.getRaw().includes("<SUBC>M</SUBC>") : false,
47378
+ isInclude: false,
47379
+ isModulePool: false,
47380
+ dynpros: [],
47366
47381
  };
47382
+ return;
47383
+ }
47384
+ const dynpros = [];
47385
+ const xmlDynpros = (_c = (_b = (_a = parsed.abapGit) === null || _a === void 0 ? void 0 : _a["asx:abap"]) === null || _b === void 0 ? void 0 : _b["asx:values"]) === null || _c === void 0 ? void 0 : _c.DYNPROS;
47386
+ if (xmlDynpros !== undefined) {
47387
+ for (const d of (0, xml_utils_1.xmlToArray)(xmlDynpros.item)) {
47388
+ const fields = [];
47389
+ for (const f of (0, xml_utils_1.xmlToArray)((_d = d.FIELDS) === null || _d === void 0 ? void 0 : _d.RPY_DYFATC)) {
47390
+ fields.push({
47391
+ name: f.NAME,
47392
+ type: f.TYPE,
47393
+ length: f.LENGTH,
47394
+ });
47395
+ }
47396
+ dynpros.push({
47397
+ number: d.HEADER.SCREEN,
47398
+ fields: fields,
47399
+ });
47400
+ }
47367
47401
  }
47402
+ this.parsedXML = {
47403
+ isInclude: file ? file.getRaw().includes("<SUBC>I</SUBC>") : false,
47404
+ isModulePool: file ? file.getRaw().includes("<SUBC>M</SUBC>") : false,
47405
+ dynpros: dynpros,
47406
+ };
47368
47407
  }
47369
47408
  }
47370
47409
  exports.Program = Program;
@@ -50695,7 +50734,7 @@ class Registry {
50695
50734
  }
50696
50735
  static abaplintVersion() {
50697
50736
  // magic, see build script "version.sh"
50698
- return "2.102.69";
50737
+ return "2.103.0";
50699
50738
  }
50700
50739
  getDDICReferences() {
50701
50740
  return this.ddicReferences;
@@ -58204,6 +58243,71 @@ exports.Downport = Downport;
58204
58243
 
58205
58244
  /***/ }),
58206
58245
 
58246
+ /***/ "./node_modules/@abaplint/core/build/src/rules/dynpro_checks.js":
58247
+ /*!**********************************************************************!*\
58248
+ !*** ./node_modules/@abaplint/core/build/src/rules/dynpro_checks.js ***!
58249
+ \**********************************************************************/
58250
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
58251
+
58252
+ "use strict";
58253
+
58254
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
58255
+ exports.DynproChecks = exports.DynproChecksConf = void 0;
58256
+ const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
58257
+ const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
58258
+ const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
58259
+ const objects_1 = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
58260
+ const position_1 = __webpack_require__(/*! ../position */ "./node_modules/@abaplint/core/build/src/position.js");
58261
+ class DynproChecksConf extends _basic_rule_config_1.BasicRuleConfig {
58262
+ }
58263
+ exports.DynproChecksConf = DynproChecksConf;
58264
+ class DynproChecks {
58265
+ constructor() {
58266
+ this.conf = new DynproChecksConf();
58267
+ }
58268
+ getMetadata() {
58269
+ return {
58270
+ key: "dynpro_checks",
58271
+ title: "Dynpro Checks",
58272
+ shortDescription: `Various Dynpro checks`,
58273
+ extendedInformation: `* Check length of PUSH elements less than 132`,
58274
+ tags: [_irule_1.RuleTag.Syntax],
58275
+ };
58276
+ }
58277
+ initialize(_reg) {
58278
+ return this;
58279
+ }
58280
+ getConfig() {
58281
+ return this.conf;
58282
+ }
58283
+ setConfig(conf) {
58284
+ this.conf = conf;
58285
+ }
58286
+ run(obj) {
58287
+ const ret = [];
58288
+ if (!(obj instanceof objects_1.Program)) {
58289
+ return [];
58290
+ }
58291
+ const file = obj.getXMLFile();
58292
+ if (file === undefined) {
58293
+ return [];
58294
+ }
58295
+ for (const dynpro of obj.getDynpros()) {
58296
+ for (const field of dynpro.fields) {
58297
+ if (field.type === "PUSH" && field.length > 132) {
58298
+ const message = `Screen ${dynpro.number}, field ${field.name} LENGTH longer than 132`;
58299
+ ret.push(issue_1.Issue.atPosition(file, new position_1.Position(1, 1), message, this.getMetadata().key, this.getConfig().severity));
58300
+ }
58301
+ }
58302
+ }
58303
+ return ret;
58304
+ }
58305
+ }
58306
+ exports.DynproChecks = DynproChecks;
58307
+ //# sourceMappingURL=dynpro_checks.js.map
58308
+
58309
+ /***/ }),
58310
+
58207
58311
  /***/ "./node_modules/@abaplint/core/build/src/rules/easy_to_find_messages.js":
58208
58312
  /*!******************************************************************************!*\
58209
58313
  !*** ./node_modules/@abaplint/core/build/src/rules/easy_to_find_messages.js ***!
@@ -60921,6 +61025,7 @@ __exportStar(__webpack_require__(/*! ./definitions_top */ "./node_modules/@abapl
60921
61025
  __exportStar(__webpack_require__(/*! ./description_empty */ "./node_modules/@abaplint/core/build/src/rules/description_empty.js"), exports);
60922
61026
  __exportStar(__webpack_require__(/*! ./double_space */ "./node_modules/@abaplint/core/build/src/rules/double_space.js"), exports);
60923
61027
  __exportStar(__webpack_require__(/*! ./downport */ "./node_modules/@abaplint/core/build/src/rules/downport.js"), exports);
61028
+ __exportStar(__webpack_require__(/*! ./dynpro_checks */ "./node_modules/@abaplint/core/build/src/rules/dynpro_checks.js"), exports);
60924
61029
  __exportStar(__webpack_require__(/*! ./easy_to_find_messages */ "./node_modules/@abaplint/core/build/src/rules/easy_to_find_messages.js"), exports);
60925
61030
  __exportStar(__webpack_require__(/*! ./empty_line_in_statement */ "./node_modules/@abaplint/core/build/src/rules/empty_line_in_statement.js"), exports);
60926
61031
  __exportStar(__webpack_require__(/*! ./empty_statement */ "./node_modules/@abaplint/core/build/src/rules/empty_statement.js"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.102.69",
3
+ "version": "2.103.0",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.102.69",
41
+ "@abaplint/core": "^2.103.0",
42
42
  "@types/chai": "^4.3.9",
43
43
  "@types/glob": "^7.2.0",
44
44
  "@types/minimist": "^1.2.4",