@abaplint/cli 2.107.5 → 2.108.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.
- package/build/cli.js +78 -1
- package/package.json +3 -3
package/build/cli.js
CHANGED
|
@@ -1594,6 +1594,7 @@ class LexerStream {
|
|
|
1594
1594
|
this.row = this.row + 1;
|
|
1595
1595
|
}
|
|
1596
1596
|
if (this.offset === this.raw.length) {
|
|
1597
|
+
this.col = this.col - 1;
|
|
1597
1598
|
return false;
|
|
1598
1599
|
}
|
|
1599
1600
|
this.col = this.col + 1;
|
|
@@ -51482,7 +51483,7 @@ class Registry {
|
|
|
51482
51483
|
}
|
|
51483
51484
|
static abaplintVersion() {
|
|
51484
51485
|
// magic, see build script "version.sh"
|
|
51485
|
-
return "2.
|
|
51486
|
+
return "2.108.1";
|
|
51486
51487
|
}
|
|
51487
51488
|
getDDICReferences() {
|
|
51488
51489
|
return this.ddicReferences;
|
|
@@ -52502,6 +52503,81 @@ exports.AlignParameters = AlignParameters;
|
|
|
52502
52503
|
|
|
52503
52504
|
/***/ }),
|
|
52504
52505
|
|
|
52506
|
+
/***/ "./node_modules/@abaplint/core/build/src/rules/align_pseudo_comments.js":
|
|
52507
|
+
/*!******************************************************************************!*\
|
|
52508
|
+
!*** ./node_modules/@abaplint/core/build/src/rules/align_pseudo_comments.js ***!
|
|
52509
|
+
\******************************************************************************/
|
|
52510
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
52511
|
+
|
|
52512
|
+
"use strict";
|
|
52513
|
+
|
|
52514
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
52515
|
+
exports.AlignPseudoComments = exports.AlignPseudoCommentsConf = void 0;
|
|
52516
|
+
const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@abaplint/core/build/src/rules/_abap_rule.js");
|
|
52517
|
+
const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
|
|
52518
|
+
const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
|
|
52519
|
+
const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
|
|
52520
|
+
const _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js");
|
|
52521
|
+
class AlignPseudoCommentsConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
52522
|
+
}
|
|
52523
|
+
exports.AlignPseudoCommentsConf = AlignPseudoCommentsConf;
|
|
52524
|
+
class AlignPseudoComments extends _abap_rule_1.ABAPRule {
|
|
52525
|
+
constructor() {
|
|
52526
|
+
super(...arguments);
|
|
52527
|
+
this.conf = new AlignPseudoCommentsConf();
|
|
52528
|
+
}
|
|
52529
|
+
getMetadata() {
|
|
52530
|
+
return {
|
|
52531
|
+
key: "align_pseudo_comments",
|
|
52532
|
+
title: "Align pseudo comments",
|
|
52533
|
+
shortDescription: `Align code inspector pseudo comments in statements`,
|
|
52534
|
+
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace],
|
|
52535
|
+
badExample: `WRITE 'sdf'. "#EC sdf`,
|
|
52536
|
+
goodExample: `WRITE 'sdf'. "#EC sdf`,
|
|
52537
|
+
};
|
|
52538
|
+
}
|
|
52539
|
+
getConfig() {
|
|
52540
|
+
return this.conf;
|
|
52541
|
+
}
|
|
52542
|
+
setConfig(conf) {
|
|
52543
|
+
this.conf = conf;
|
|
52544
|
+
}
|
|
52545
|
+
runParsed(file) {
|
|
52546
|
+
const issues = [];
|
|
52547
|
+
let previousEnd = undefined;
|
|
52548
|
+
for (const statement of file.getStatements()) {
|
|
52549
|
+
if (!(statement.get() instanceof _statement_1.Comment)) {
|
|
52550
|
+
previousEnd = statement.getLastToken().getEnd();
|
|
52551
|
+
continue;
|
|
52552
|
+
}
|
|
52553
|
+
const commentLength = statement.concatTokens().length;
|
|
52554
|
+
const firstCommentToken = statement.getFirstToken();
|
|
52555
|
+
if (firstCommentToken.getStr().startsWith(`"#`) === false) {
|
|
52556
|
+
continue;
|
|
52557
|
+
}
|
|
52558
|
+
else if (previousEnd === undefined) {
|
|
52559
|
+
continue;
|
|
52560
|
+
}
|
|
52561
|
+
else if (commentLength > 10) {
|
|
52562
|
+
const expectedColumn = 72 - commentLength;
|
|
52563
|
+
if (previousEnd.getCol() < expectedColumn && firstCommentToken.getStart().getCol() !== expectedColumn) {
|
|
52564
|
+
const message = "Align pseudo comment to column " + expectedColumn;
|
|
52565
|
+
issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity));
|
|
52566
|
+
}
|
|
52567
|
+
}
|
|
52568
|
+
else if (previousEnd.getCol() < 61 && firstCommentToken.getStart().getCol() !== 61) {
|
|
52569
|
+
const message = "Align pseudo comment to column 61";
|
|
52570
|
+
issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity));
|
|
52571
|
+
}
|
|
52572
|
+
}
|
|
52573
|
+
return issues;
|
|
52574
|
+
}
|
|
52575
|
+
}
|
|
52576
|
+
exports.AlignPseudoComments = AlignPseudoComments;
|
|
52577
|
+
//# sourceMappingURL=align_pseudo_comments.js.map
|
|
52578
|
+
|
|
52579
|
+
/***/ }),
|
|
52580
|
+
|
|
52505
52581
|
/***/ "./node_modules/@abaplint/core/build/src/rules/align_type_expressions.js":
|
|
52506
52582
|
/*!*******************************************************************************!*\
|
|
52507
52583
|
!*** ./node_modules/@abaplint/core/build/src/rules/align_type_expressions.js ***!
|
|
@@ -62063,6 +62139,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
62063
62139
|
__exportStar(__webpack_require__(/*! ./7bit_ascii */ "./node_modules/@abaplint/core/build/src/rules/7bit_ascii.js"), exports);
|
|
62064
62140
|
__exportStar(__webpack_require__(/*! ./abapdoc */ "./node_modules/@abaplint/core/build/src/rules/abapdoc.js"), exports);
|
|
62065
62141
|
__exportStar(__webpack_require__(/*! ./align_parameters */ "./node_modules/@abaplint/core/build/src/rules/align_parameters.js"), exports);
|
|
62142
|
+
__exportStar(__webpack_require__(/*! ./align_pseudo_comments */ "./node_modules/@abaplint/core/build/src/rules/align_pseudo_comments.js"), exports);
|
|
62066
62143
|
__exportStar(__webpack_require__(/*! ./align_type_expressions */ "./node_modules/@abaplint/core/build/src/rules/align_type_expressions.js"), exports);
|
|
62067
62144
|
__exportStar(__webpack_require__(/*! ./allowed_object_naming */ "./node_modules/@abaplint/core/build/src/rules/allowed_object_naming.js"), exports);
|
|
62068
62145
|
__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.
|
|
3
|
+
"version": "2.108.1",
|
|
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.
|
|
41
|
+
"@abaplint/core": "^2.108.1",
|
|
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.
|
|
46
|
+
"@types/node": "^20.12.11",
|
|
47
47
|
"@types/progress": "^2.0.7",
|
|
48
48
|
"chai": "^4.4.1",
|
|
49
49
|
"chalk": "^5.3.0",
|