@abaplint/cli 2.107.5 → 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 +77 -1
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -51482,7 +51482,7 @@ class Registry {
51482
51482
  }
51483
51483
  static abaplintVersion() {
51484
51484
  // magic, see build script "version.sh"
51485
- return "2.107.5";
51485
+ return "2.108.0";
51486
51486
  }
51487
51487
  getDDICReferences() {
51488
51488
  return this.ddicReferences;
@@ -52502,6 +52502,81 @@ exports.AlignParameters = AlignParameters;
52502
52502
 
52503
52503
  /***/ }),
52504
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
+
52505
52580
  /***/ "./node_modules/@abaplint/core/build/src/rules/align_type_expressions.js":
52506
52581
  /*!*******************************************************************************!*\
52507
52582
  !*** ./node_modules/@abaplint/core/build/src/rules/align_type_expressions.js ***!
@@ -62063,6 +62138,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
62063
62138
  __exportStar(__webpack_require__(/*! ./7bit_ascii */ "./node_modules/@abaplint/core/build/src/rules/7bit_ascii.js"), exports);
62064
62139
  __exportStar(__webpack_require__(/*! ./abapdoc */ "./node_modules/@abaplint/core/build/src/rules/abapdoc.js"), exports);
62065
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);
62066
62142
  __exportStar(__webpack_require__(/*! ./align_type_expressions */ "./node_modules/@abaplint/core/build/src/rules/align_type_expressions.js"), exports);
62067
62143
  __exportStar(__webpack_require__(/*! ./allowed_object_naming */ "./node_modules/@abaplint/core/build/src/rules/allowed_object_naming.js"), exports);
62068
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.5",
3
+ "version": "2.108.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.107.5",
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",