@abaplint/cli 2.107.4 → 2.108.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 +108 -3
  2. package/package.json +3 -3
package/build/cli.js CHANGED
@@ -11884,9 +11884,9 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
11884
11884
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
11885
11885
  class EditorCall {
11886
11886
  getMatcher() {
11887
- const title = (0, combi_1.seq)("TITLE", expressions_1.Source);
11887
+ const title = (0, combi_1.seq)("TITLE", expressions_1.SimpleSource3);
11888
11888
  const options = (0, combi_1.per)("DISPLAY-MODE", title);
11889
- const ret = (0, combi_1.seq)("EDITOR-CALL FOR", (0, combi_1.opt)("REPORT"), expressions_1.Source, (0, combi_1.opt)(options));
11889
+ const ret = (0, combi_1.seq)("EDITOR-CALL FOR", (0, combi_1.optPrio)("REPORT"), expressions_1.Source, (0, combi_1.optPrio)(options));
11890
11890
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
11891
11891
  }
11892
11892
  }
@@ -29900,6 +29900,33 @@ exports.Do = Do;
29900
29900
 
29901
29901
  /***/ }),
29902
29902
 
29903
+ /***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/editor_call.js":
29904
+ /*!***************************************************************************************!*\
29905
+ !*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/editor_call.js ***!
29906
+ \***************************************************************************************/
29907
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
29908
+
29909
+ "use strict";
29910
+
29911
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
29912
+ exports.EditorCall = void 0;
29913
+ const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
29914
+ const source_1 = __webpack_require__(/*! ../expressions/source */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js");
29915
+ class EditorCall {
29916
+ runSyntax(node, scope, filename) {
29917
+ for (const s of node.findDirectExpressions(Expressions.Source)) {
29918
+ new source_1.Source().runSyntax(s, scope, filename);
29919
+ }
29920
+ for (const t of node.findDirectExpressions(Expressions.SimpleSource3)) {
29921
+ new source_1.Source().runSyntax(t, scope, filename);
29922
+ }
29923
+ }
29924
+ }
29925
+ exports.EditorCall = EditorCall;
29926
+ //# sourceMappingURL=editor_call.js.map
29927
+
29928
+ /***/ }),
29929
+
29903
29930
  /***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/else_if.js":
29904
29931
  /*!***********************************************************************************!*\
29905
29932
  !*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/else_if.js ***!
@@ -33713,6 +33740,7 @@ const close_dataset_1 = __webpack_require__(/*! ./statements/close_dataset */ ".
33713
33740
  const get_run_time_1 = __webpack_require__(/*! ./statements/get_run_time */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_run_time.js");
33714
33741
  const update_database_1 = __webpack_require__(/*! ./statements/update_database */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/update_database.js");
33715
33742
  const add_1 = __webpack_require__(/*! ./statements/add */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/add.js");
33743
+ const editor_call_1 = __webpack_require__(/*! ./statements/editor_call */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/editor_call.js");
33716
33744
  const subtract_1 = __webpack_require__(/*! ./statements/subtract */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/subtract.js");
33717
33745
  const add_corresponding_1 = __webpack_require__(/*! ./statements/add_corresponding */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/add_corresponding.js");
33718
33746
  const subtract_corresponding_1 = __webpack_require__(/*! ./statements/subtract_corresponding */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/subtract_corresponding.js");
@@ -33888,6 +33916,7 @@ if (Object.keys(map).length === 0) {
33888
33916
  addToMap(new translate_1.Translate());
33889
33917
  addToMap(new modify_internal_1.ModifyInternal());
33890
33918
  addToMap(new read_textpool_1.ReadTextpool());
33919
+ addToMap(new editor_call_1.EditorCall());
33891
33920
  }
33892
33921
  // -----------------------------------
33893
33922
  class SyntaxLogic {
@@ -51453,7 +51482,7 @@ class Registry {
51453
51482
  }
51454
51483
  static abaplintVersion() {
51455
51484
  // magic, see build script "version.sh"
51456
- return "2.107.4";
51485
+ return "2.108.0";
51457
51486
  }
51458
51487
  getDDICReferences() {
51459
51488
  return this.ddicReferences;
@@ -52473,6 +52502,81 @@ exports.AlignParameters = AlignParameters;
52473
52502
 
52474
52503
  /***/ }),
52475
52504
 
52505
+ /***/ "./node_modules/@abaplint/core/build/src/rules/align_pseudo_comments.js":
52506
+ /*!******************************************************************************!*\
52507
+ !*** ./node_modules/@abaplint/core/build/src/rules/align_pseudo_comments.js ***!
52508
+ \******************************************************************************/
52509
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
52510
+
52511
+ "use strict";
52512
+
52513
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
52514
+ exports.AlignPseudoComments = exports.AlignPseudoCommentsConf = void 0;
52515
+ const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@abaplint/core/build/src/rules/_abap_rule.js");
52516
+ const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
52517
+ const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
52518
+ const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
52519
+ const _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js");
52520
+ class AlignPseudoCommentsConf extends _basic_rule_config_1.BasicRuleConfig {
52521
+ }
52522
+ exports.AlignPseudoCommentsConf = AlignPseudoCommentsConf;
52523
+ class AlignPseudoComments extends _abap_rule_1.ABAPRule {
52524
+ constructor() {
52525
+ super(...arguments);
52526
+ this.conf = new AlignPseudoCommentsConf();
52527
+ }
52528
+ getMetadata() {
52529
+ return {
52530
+ key: "align_pseudo_comments",
52531
+ title: "Align pseudo comments",
52532
+ shortDescription: `Align code inspector pseudo comments in statements`,
52533
+ tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace],
52534
+ badExample: `WRITE 'sdf'. "#EC sdf`,
52535
+ goodExample: `WRITE 'sdf'. "#EC sdf`,
52536
+ };
52537
+ }
52538
+ getConfig() {
52539
+ return this.conf;
52540
+ }
52541
+ setConfig(conf) {
52542
+ this.conf = conf;
52543
+ }
52544
+ runParsed(file) {
52545
+ const issues = [];
52546
+ let previousEnd = undefined;
52547
+ for (const statement of file.getStatements()) {
52548
+ if (!(statement.get() instanceof _statement_1.Comment)) {
52549
+ previousEnd = statement.getLastToken().getEnd();
52550
+ continue;
52551
+ }
52552
+ const commentLength = statement.concatTokens().length;
52553
+ const firstCommentToken = statement.getFirstToken();
52554
+ if (firstCommentToken.getStr().startsWith(`"#`) === false) {
52555
+ continue;
52556
+ }
52557
+ else if (previousEnd === undefined) {
52558
+ continue;
52559
+ }
52560
+ else if (commentLength > 10) {
52561
+ const expectedColumn = 72 - commentLength + 1;
52562
+ if (previousEnd.getCol() < expectedColumn && firstCommentToken.getStart().getCol() !== expectedColumn) {
52563
+ const message = "Align pseudo comment to column " + expectedColumn;
52564
+ issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity));
52565
+ }
52566
+ }
52567
+ else if (previousEnd.getCol() < 62 && firstCommentToken.getStart().getCol() !== 62) {
52568
+ const message = "Align pseudo comment to column 62";
52569
+ issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity));
52570
+ }
52571
+ }
52572
+ return issues;
52573
+ }
52574
+ }
52575
+ exports.AlignPseudoComments = AlignPseudoComments;
52576
+ //# sourceMappingURL=align_pseudo_comments.js.map
52577
+
52578
+ /***/ }),
52579
+
52476
52580
  /***/ "./node_modules/@abaplint/core/build/src/rules/align_type_expressions.js":
52477
52581
  /*!*******************************************************************************!*\
52478
52582
  !*** ./node_modules/@abaplint/core/build/src/rules/align_type_expressions.js ***!
@@ -62034,6 +62138,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
62034
62138
  __exportStar(__webpack_require__(/*! ./7bit_ascii */ "./node_modules/@abaplint/core/build/src/rules/7bit_ascii.js"), exports);
62035
62139
  __exportStar(__webpack_require__(/*! ./abapdoc */ "./node_modules/@abaplint/core/build/src/rules/abapdoc.js"), exports);
62036
62140
  __exportStar(__webpack_require__(/*! ./align_parameters */ "./node_modules/@abaplint/core/build/src/rules/align_parameters.js"), exports);
62141
+ __exportStar(__webpack_require__(/*! ./align_pseudo_comments */ "./node_modules/@abaplint/core/build/src/rules/align_pseudo_comments.js"), exports);
62037
62142
  __exportStar(__webpack_require__(/*! ./align_type_expressions */ "./node_modules/@abaplint/core/build/src/rules/align_type_expressions.js"), exports);
62038
62143
  __exportStar(__webpack_require__(/*! ./allowed_object_naming */ "./node_modules/@abaplint/core/build/src/rules/allowed_object_naming.js"), exports);
62039
62144
  __exportStar(__webpack_require__(/*! ./allowed_object_types */ "./node_modules/@abaplint/core/build/src/rules/allowed_object_types.js"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.107.4",
3
+ "version": "2.108.0",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,12 +38,12 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.107.4",
41
+ "@abaplint/core": "^2.108.0",
42
42
  "@types/chai": "^4.3.16",
43
43
  "@types/glob": "^8.1.0",
44
44
  "@types/minimist": "^1.2.5",
45
45
  "@types/mocha": "^10.0.6",
46
- "@types/node": "^20.12.9",
46
+ "@types/node": "^20.12.10",
47
47
  "@types/progress": "^2.0.7",
48
48
  "chai": "^4.4.1",
49
49
  "chalk": "^5.3.0",