@abaplint/cli 2.102.70 → 2.103.1

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 +110 -7
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -37191,13 +37191,14 @@ class ClassDefinition extends _identifier_1.Identifier {
37191
37191
  while (sup !== undefined) {
37192
37192
  const cdef = scope.findClassDefinition(sup);
37193
37193
  for (const m of ((_a = cdef === null || cdef === void 0 ? void 0 : cdef.getMethodDefinitions()) === null || _a === void 0 ? void 0 : _a.getAll()) || []) {
37194
+ const name = m.getName().toUpperCase();
37194
37195
  if (m.getVisibility() === visibility_1.Visibility.Private) {
37195
37196
  continue;
37196
37197
  }
37197
- else if (m.getName().toUpperCase() === "CONSTRUCTOR") {
37198
+ else if (name === "CONSTRUCTOR" || name === "CLASS_CONSTRUCTOR") {
37198
37199
  continue;
37199
37200
  }
37200
- names.add(m.getName().toUpperCase());
37201
+ names.add(name);
37201
37202
  }
37202
37203
  for (const a of (cdef === null || cdef === void 0 ? void 0 : cdef.getAliases().getAll()) || []) {
37203
37204
  names.add(a.getName().toUpperCase());
@@ -47327,6 +47328,7 @@ exports.PersonalizationObject = PersonalizationObject;
47327
47328
  Object.defineProperty(exports, "__esModule", ({ value: true }));
47328
47329
  exports.Program = void 0;
47329
47330
  const _abap_object_1 = __webpack_require__(/*! ./_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
47331
+ const xml_utils_1 = __webpack_require__(/*! ../xml_utils */ "./node_modules/@abaplint/core/build/src/xml_utils.js");
47330
47332
  class Program extends _abap_object_1.ABAPObject {
47331
47333
  getType() {
47332
47334
  return "PROG";
@@ -47360,14 +47362,49 @@ class Program extends _abap_object_1.ABAPObject {
47360
47362
  this.parseXML();
47361
47363
  return this.parsedXML.isModulePool;
47362
47364
  }
47365
+ getDynpros() {
47366
+ this.parseXML();
47367
+ return this.parsedXML.dynpros;
47368
+ }
47369
+ ////////////////////////////
47363
47370
  parseXML() {
47364
- if (this.parsedXML === undefined) {
47365
- const file = this.getXMLFile();
47371
+ var _a, _b, _c, _d;
47372
+ if (this.parsedXML !== undefined) {
47373
+ return;
47374
+ }
47375
+ const file = this.getXMLFile();
47376
+ const parsed = this.parseRaw2();
47377
+ if (parsed === undefined) {
47366
47378
  this.parsedXML = {
47367
- isInclude: file ? file.getRaw().includes("<SUBC>I</SUBC>") : false,
47368
- isModulePool: file ? file.getRaw().includes("<SUBC>M</SUBC>") : false,
47379
+ isInclude: false,
47380
+ isModulePool: false,
47381
+ dynpros: [],
47369
47382
  };
47383
+ return;
47384
+ }
47385
+ const dynpros = [];
47386
+ 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;
47387
+ if (xmlDynpros !== undefined) {
47388
+ for (const d of (0, xml_utils_1.xmlToArray)(xmlDynpros.item)) {
47389
+ const fields = [];
47390
+ for (const f of (0, xml_utils_1.xmlToArray)((_d = d.FIELDS) === null || _d === void 0 ? void 0 : _d.RPY_DYFATC)) {
47391
+ fields.push({
47392
+ name: f.NAME,
47393
+ type: f.TYPE,
47394
+ length: f.LENGTH,
47395
+ });
47396
+ }
47397
+ dynpros.push({
47398
+ number: d.HEADER.SCREEN,
47399
+ fields: fields,
47400
+ });
47401
+ }
47370
47402
  }
47403
+ this.parsedXML = {
47404
+ isInclude: file ? file.getRaw().includes("<SUBC>I</SUBC>") : false,
47405
+ isModulePool: file ? file.getRaw().includes("<SUBC>M</SUBC>") : false,
47406
+ dynpros: dynpros,
47407
+ };
47371
47408
  }
47372
47409
  }
47373
47410
  exports.Program = Program;
@@ -50698,7 +50735,7 @@ class Registry {
50698
50735
  }
50699
50736
  static abaplintVersion() {
50700
50737
  // magic, see build script "version.sh"
50701
- return "2.102.70";
50738
+ return "2.103.1";
50702
50739
  }
50703
50740
  getDDICReferences() {
50704
50741
  return this.ddicReferences;
@@ -58207,6 +58244,71 @@ exports.Downport = Downport;
58207
58244
 
58208
58245
  /***/ }),
58209
58246
 
58247
+ /***/ "./node_modules/@abaplint/core/build/src/rules/dynpro_checks.js":
58248
+ /*!**********************************************************************!*\
58249
+ !*** ./node_modules/@abaplint/core/build/src/rules/dynpro_checks.js ***!
58250
+ \**********************************************************************/
58251
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
58252
+
58253
+ "use strict";
58254
+
58255
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
58256
+ exports.DynproChecks = exports.DynproChecksConf = void 0;
58257
+ const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
58258
+ const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
58259
+ const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
58260
+ const objects_1 = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
58261
+ const position_1 = __webpack_require__(/*! ../position */ "./node_modules/@abaplint/core/build/src/position.js");
58262
+ class DynproChecksConf extends _basic_rule_config_1.BasicRuleConfig {
58263
+ }
58264
+ exports.DynproChecksConf = DynproChecksConf;
58265
+ class DynproChecks {
58266
+ constructor() {
58267
+ this.conf = new DynproChecksConf();
58268
+ }
58269
+ getMetadata() {
58270
+ return {
58271
+ key: "dynpro_checks",
58272
+ title: "Dynpro Checks",
58273
+ shortDescription: `Various Dynpro checks`,
58274
+ extendedInformation: `* Check length of PUSH elements less than 132`,
58275
+ tags: [_irule_1.RuleTag.Syntax],
58276
+ };
58277
+ }
58278
+ initialize(_reg) {
58279
+ return this;
58280
+ }
58281
+ getConfig() {
58282
+ return this.conf;
58283
+ }
58284
+ setConfig(conf) {
58285
+ this.conf = conf;
58286
+ }
58287
+ run(obj) {
58288
+ const ret = [];
58289
+ if (!(obj instanceof objects_1.Program)) {
58290
+ return [];
58291
+ }
58292
+ const file = obj.getXMLFile();
58293
+ if (file === undefined) {
58294
+ return [];
58295
+ }
58296
+ for (const dynpro of obj.getDynpros()) {
58297
+ for (const field of dynpro.fields) {
58298
+ if (field.type === "PUSH" && field.length > 132) {
58299
+ const message = `Screen ${dynpro.number}, field ${field.name} LENGTH longer than 132`;
58300
+ ret.push(issue_1.Issue.atPosition(file, new position_1.Position(1, 1), message, this.getMetadata().key, this.getConfig().severity));
58301
+ }
58302
+ }
58303
+ }
58304
+ return ret;
58305
+ }
58306
+ }
58307
+ exports.DynproChecks = DynproChecks;
58308
+ //# sourceMappingURL=dynpro_checks.js.map
58309
+
58310
+ /***/ }),
58311
+
58210
58312
  /***/ "./node_modules/@abaplint/core/build/src/rules/easy_to_find_messages.js":
58211
58313
  /*!******************************************************************************!*\
58212
58314
  !*** ./node_modules/@abaplint/core/build/src/rules/easy_to_find_messages.js ***!
@@ -60924,6 +61026,7 @@ __exportStar(__webpack_require__(/*! ./definitions_top */ "./node_modules/@abapl
60924
61026
  __exportStar(__webpack_require__(/*! ./description_empty */ "./node_modules/@abaplint/core/build/src/rules/description_empty.js"), exports);
60925
61027
  __exportStar(__webpack_require__(/*! ./double_space */ "./node_modules/@abaplint/core/build/src/rules/double_space.js"), exports);
60926
61028
  __exportStar(__webpack_require__(/*! ./downport */ "./node_modules/@abaplint/core/build/src/rules/downport.js"), exports);
61029
+ __exportStar(__webpack_require__(/*! ./dynpro_checks */ "./node_modules/@abaplint/core/build/src/rules/dynpro_checks.js"), exports);
60927
61030
  __exportStar(__webpack_require__(/*! ./easy_to_find_messages */ "./node_modules/@abaplint/core/build/src/rules/easy_to_find_messages.js"), exports);
60928
61031
  __exportStar(__webpack_require__(/*! ./empty_line_in_statement */ "./node_modules/@abaplint/core/build/src/rules/empty_line_in_statement.js"), exports);
60929
61032
  __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.70",
3
+ "version": "2.103.1",
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.70",
41
+ "@abaplint/core": "^2.103.1",
42
42
  "@types/chai": "^4.3.9",
43
43
  "@types/glob": "^7.2.0",
44
44
  "@types/minimist": "^1.2.4",