@abaplint/cli 2.114.10 → 2.115.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 +157 -1
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -31175,6 +31175,11 @@ class Concatenate {
31175
31175
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
31176
31176
  return;
31177
31177
  }
31178
+ if (linesMode === true && byteMode === true && type instanceof basic_1.TableType && type.getRowType() instanceof basic_1.StructureType) {
31179
+ const message = "Source row type must not be a structure in BYTE mode";
31180
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
31181
+ return;
31182
+ }
31178
31183
  }
31179
31184
  }
31180
31185
  for (const s of node.findDirectExpressions(Expressions.SimpleSource3)) {
@@ -53460,6 +53465,10 @@ class Table extends _abstract_object_1.AbstractObject {
53460
53465
  && this.parsedData.dataClass === "USER3") {
53461
53466
  return new Types.UnknownType("Data class = USER3 not allowed in cloud");
53462
53467
  }
53468
+ if (this.getTableCategory() === TableCategory.Transparent
53469
+ && this.listKeys(reg).length === 0) {
53470
+ return new Types.UnknownType("Table " + this.getName() + " has no key fields");
53471
+ }
53463
53472
  if (this.parsedType) {
53464
53473
  return this.parsedType;
53465
53474
  }
@@ -55065,7 +55074,7 @@ class Registry {
55065
55074
  }
55066
55075
  static abaplintVersion() {
55067
55076
  // magic, see build script "version.sh"
55068
- return "2.114.10";
55077
+ return "2.115.0";
55069
55078
  }
55070
55079
  getDDICReferences() {
55071
55080
  return this.ddicReferences;
@@ -65509,6 +65518,76 @@ exports.IdenticalFormNames = IdenticalFormNames;
65509
65518
 
65510
65519
  /***/ }),
65511
65520
 
65521
+ /***/ "./node_modules/@abaplint/core/build/src/rules/identical_move.js":
65522
+ /*!***********************************************************************!*\
65523
+ !*** ./node_modules/@abaplint/core/build/src/rules/identical_move.js ***!
65524
+ \***********************************************************************/
65525
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
65526
+
65527
+ "use strict";
65528
+
65529
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
65530
+ exports.IdenticalMove = exports.IdenticalMoveConf = void 0;
65531
+ const Statements = __webpack_require__(/*! ../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
65532
+ const Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
65533
+ const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
65534
+ const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@abaplint/core/build/src/rules/_abap_rule.js");
65535
+ const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
65536
+ const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
65537
+ const objects_1 = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
65538
+ class IdenticalMoveConf extends _basic_rule_config_1.BasicRuleConfig {
65539
+ }
65540
+ exports.IdenticalMoveConf = IdenticalMoveConf;
65541
+ class IdenticalMove extends _abap_rule_1.ABAPRule {
65542
+ constructor() {
65543
+ super(...arguments);
65544
+ this.conf = new IdenticalMoveConf();
65545
+ }
65546
+ getMetadata() {
65547
+ return {
65548
+ key: "identical_move",
65549
+ title: "Identical move",
65550
+ shortDescription: `Moving the same value from left to right or right to left is redundant.`,
65551
+ tags: [_irule_1.RuleTag.SingleFile],
65552
+ badExample: `DATA lv_value TYPE i.
65553
+ lv_value = lv_value.`,
65554
+ goodExample: `DATA lv_value TYPE i.
65555
+ lv_value = 5.`,
65556
+ };
65557
+ }
65558
+ getConfig() {
65559
+ return this.conf;
65560
+ }
65561
+ setConfig(conf) {
65562
+ this.conf = conf;
65563
+ }
65564
+ runParsed(file, obj) {
65565
+ var _a, _b;
65566
+ const issues = [];
65567
+ if (!(obj instanceof objects_1.Class)) {
65568
+ return [];
65569
+ }
65570
+ else if (file !== obj.getMainABAPFile()) {
65571
+ return [];
65572
+ }
65573
+ for (const statement of file.getStatements()) {
65574
+ const statementType = statement.get();
65575
+ if (statementType instanceof Statements.Move) {
65576
+ const source = (_a = statement.findDirectExpression(Expressions.Source)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();
65577
+ const target = (_b = statement.findDirectExpression(Expressions.Target)) === null || _b === void 0 ? void 0 : _b.concatTokens().toUpperCase();
65578
+ if (source === target && source !== undefined) {
65579
+ issues.push(issue_1.Issue.atStatement(file, statement, "Comment between methods in global class implementation", this.getMetadata().key, this.conf.severity));
65580
+ }
65581
+ }
65582
+ }
65583
+ return issues;
65584
+ }
65585
+ }
65586
+ exports.IdenticalMove = IdenticalMove;
65587
+ //# sourceMappingURL=identical_move.js.map
65588
+
65589
+ /***/ }),
65590
+
65512
65591
  /***/ "./node_modules/@abaplint/core/build/src/rules/if_in_if.js":
65513
65592
  /*!*****************************************************************!*\
65514
65593
  !*** ./node_modules/@abaplint/core/build/src/rules/if_in_if.js ***!
@@ -66442,6 +66521,7 @@ __exportStar(__webpack_require__(/*! ./intf_referencing_clas */ "./node_modules/
66442
66521
  __exportStar(__webpack_require__(/*! ./invalid_table_index */ "./node_modules/@abaplint/core/build/src/rules/invalid_table_index.js"), exports);
66443
66522
  __exportStar(__webpack_require__(/*! ./keep_single_parameter_on_one_line */ "./node_modules/@abaplint/core/build/src/rules/keep_single_parameter_on_one_line.js"), exports);
66444
66523
  __exportStar(__webpack_require__(/*! ./keyword_case */ "./node_modules/@abaplint/core/build/src/rules/keyword_case.js"), exports);
66524
+ __exportStar(__webpack_require__(/*! ./identical_move */ "./node_modules/@abaplint/core/build/src/rules/identical_move.js"), exports);
66445
66525
  __exportStar(__webpack_require__(/*! ./line_break_multiple_parameters */ "./node_modules/@abaplint/core/build/src/rules/line_break_multiple_parameters.js"), exports);
66446
66526
  __exportStar(__webpack_require__(/*! ./line_break_style */ "./node_modules/@abaplint/core/build/src/rules/line_break_style.js"), exports);
66447
66527
  __exportStar(__webpack_require__(/*! ./line_length */ "./node_modules/@abaplint/core/build/src/rules/line_length.js"), exports);
@@ -66467,6 +66547,7 @@ __exportStar(__webpack_require__(/*! ./nesting */ "./node_modules/@abaplint/core
66467
66547
  __exportStar(__webpack_require__(/*! ./newline_between_methods */ "./node_modules/@abaplint/core/build/src/rules/newline_between_methods.js"), exports);
66468
66548
  __exportStar(__webpack_require__(/*! ./no_aliases */ "./node_modules/@abaplint/core/build/src/rules/no_aliases.js"), exports);
66469
66549
  __exportStar(__webpack_require__(/*! ./no_chained_assignment */ "./node_modules/@abaplint/core/build/src/rules/no_chained_assignment.js"), exports);
66550
+ __exportStar(__webpack_require__(/*! ./no_comments_between_methods */ "./node_modules/@abaplint/core/build/src/rules/no_comments_between_methods.js"), exports);
66470
66551
  __exportStar(__webpack_require__(/*! ./no_external_form_calls */ "./node_modules/@abaplint/core/build/src/rules/no_external_form_calls.js"), exports);
66471
66552
  __exportStar(__webpack_require__(/*! ./no_inline_in_optional_branches */ "./node_modules/@abaplint/core/build/src/rules/no_inline_in_optional_branches.js"), exports);
66472
66553
  __exportStar(__webpack_require__(/*! ./no_prefixes */ "./node_modules/@abaplint/core/build/src/rules/no_prefixes.js"), exports);
@@ -69796,6 +69877,81 @@ exports.NoChainedAssignment = NoChainedAssignment;
69796
69877
 
69797
69878
  /***/ }),
69798
69879
 
69880
+ /***/ "./node_modules/@abaplint/core/build/src/rules/no_comments_between_methods.js":
69881
+ /*!************************************************************************************!*\
69882
+ !*** ./node_modules/@abaplint/core/build/src/rules/no_comments_between_methods.js ***!
69883
+ \************************************************************************************/
69884
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
69885
+
69886
+ "use strict";
69887
+
69888
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
69889
+ exports.NoCommentsBetweenMethods = exports.NoCommentsBetweenMethodsConf = void 0;
69890
+ const Statements = __webpack_require__(/*! ../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
69891
+ const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
69892
+ const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@abaplint/core/build/src/rules/_abap_rule.js");
69893
+ const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
69894
+ const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
69895
+ const objects_1 = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
69896
+ const _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js");
69897
+ class NoCommentsBetweenMethodsConf extends _basic_rule_config_1.BasicRuleConfig {
69898
+ }
69899
+ exports.NoCommentsBetweenMethodsConf = NoCommentsBetweenMethodsConf;
69900
+ class NoCommentsBetweenMethods extends _abap_rule_1.ABAPRule {
69901
+ constructor() {
69902
+ super(...arguments);
69903
+ this.conf = new NoCommentsBetweenMethodsConf();
69904
+ }
69905
+ getMetadata() {
69906
+ return {
69907
+ key: "no_comments_between_methods",
69908
+ title: "No comments between methods in global classes",
69909
+ shortDescription: `Its not possible to have comments between methods in global classes.`,
69910
+ tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Syntax],
69911
+ };
69912
+ }
69913
+ getConfig() {
69914
+ return this.conf;
69915
+ }
69916
+ setConfig(conf) {
69917
+ this.conf = conf;
69918
+ }
69919
+ runParsed(file, obj) {
69920
+ const issues = [];
69921
+ if (!(obj instanceof objects_1.Class)) {
69922
+ return [];
69923
+ }
69924
+ else if (file !== obj.getMainABAPFile()) {
69925
+ return [];
69926
+ }
69927
+ let inMethod = false;
69928
+ let inClassImpl = false;
69929
+ for (const statement of file.getStatements()) {
69930
+ const statementType = statement.get();
69931
+ if (statementType instanceof Statements.ClassImplementation) {
69932
+ inClassImpl = true;
69933
+ }
69934
+ else if (statementType instanceof Statements.EndClass) {
69935
+ inClassImpl = false;
69936
+ }
69937
+ else if (statementType instanceof Statements.MethodImplementation) {
69938
+ inMethod = true;
69939
+ }
69940
+ else if (statementType instanceof Statements.EndMethod) {
69941
+ inMethod = false;
69942
+ }
69943
+ else if (inClassImpl === true && inMethod === false && statementType instanceof _statement_1.Comment) {
69944
+ issues.push(issue_1.Issue.atStatement(file, statement, "Comment between methods in global class implementation", this.getMetadata().key, this.conf.severity));
69945
+ }
69946
+ }
69947
+ return issues;
69948
+ }
69949
+ }
69950
+ exports.NoCommentsBetweenMethods = NoCommentsBetweenMethods;
69951
+ //# sourceMappingURL=no_comments_between_methods.js.map
69952
+
69953
+ /***/ }),
69954
+
69799
69955
  /***/ "./node_modules/@abaplint/core/build/src/rules/no_external_form_calls.js":
69800
69956
  /*!*******************************************************************************!*\
69801
69957
  !*** ./node_modules/@abaplint/core/build/src/rules/no_external_form_calls.js ***!
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.114.10",
3
+ "version": "2.115.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.114.10",
41
+ "@abaplint/core": "^2.115.0",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/minimist": "^1.2.5",
44
44
  "@types/mocha": "^10.0.10",