@abaplint/cli 2.119.2 → 2.119.4

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 +74 -4
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -23531,6 +23531,8 @@ var ScopeType;
23531
23531
  (function (ScopeType) {
23532
23532
  ScopeType["BuiltIn"] = "_builtin";
23533
23533
  ScopeType["Dummy"] = "_dummy";
23534
+ // definitions inside this one are local
23535
+ ScopeType["SelectionEvent"] = "selection_event";
23534
23536
  ScopeType["Global"] = "_global";
23535
23537
  ScopeType["Program"] = "_program";
23536
23538
  ScopeType["TypePool"] = "_type_pool";
@@ -32802,6 +32804,42 @@ exports.GetParameter = GetParameter;
32802
32804
 
32803
32805
  /***/ },
32804
32806
 
32807
+ /***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_pf_status.js"
32808
+ /*!*****************************************************************************************!*\
32809
+ !*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_pf_status.js ***!
32810
+ \*****************************************************************************************/
32811
+ (__unused_webpack_module, exports, __webpack_require__) {
32812
+
32813
+ "use strict";
32814
+
32815
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
32816
+ exports.GetPFStatus = void 0;
32817
+ const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
32818
+ const source_1 = __webpack_require__(/*! ../expressions/source */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js");
32819
+ const target_1 = __webpack_require__(/*! ../expressions/target */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js");
32820
+ const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
32821
+ const inline_data_1 = __webpack_require__(/*! ../expressions/inline_data */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/inline_data.js");
32822
+ class GetPFStatus {
32823
+ runSyntax(node, input) {
32824
+ for (const s of node.findDirectExpressions(Expressions.Source)) {
32825
+ source_1.Source.runSyntax(s, input);
32826
+ }
32827
+ for (const t of node.findDirectExpressions(Expressions.Target)) {
32828
+ const inline = t === null || t === void 0 ? void 0 : t.findDirectExpression(Expressions.InlineData);
32829
+ if (inline) {
32830
+ inline_data_1.InlineData.runSyntax(inline, input, basic_1.VoidType.get("GET_PF_STATUS"));
32831
+ }
32832
+ else {
32833
+ target_1.Target.runSyntax(t, input);
32834
+ }
32835
+ }
32836
+ }
32837
+ }
32838
+ exports.GetPFStatus = GetPFStatus;
32839
+ //# sourceMappingURL=get_pf_status.js.map
32840
+
32841
+ /***/ },
32842
+
32805
32843
  /***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_reference.js"
32806
32844
  /*!*****************************************************************************************!*\
32807
32845
  !*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_reference.js ***!
@@ -36619,6 +36657,7 @@ const read_report_1 = __webpack_require__(/*! ./statements/read_report */ "./nod
36619
36657
  const authority_check_1 = __webpack_require__(/*! ./statements/authority_check */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/authority_check.js");
36620
36658
  const insert_report_1 = __webpack_require__(/*! ./statements/insert_report */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/insert_report.js");
36621
36659
  const get_reference_1 = __webpack_require__(/*! ./statements/get_reference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_reference.js");
36660
+ const get_pf_status_1 = __webpack_require__(/*! ./statements/get_pf_status */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_pf_status.js");
36622
36661
  const insert_database_1 = __webpack_require__(/*! ./statements/insert_database */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/insert_database.js");
36623
36662
  const delete_database_1 = __webpack_require__(/*! ./statements/delete_database */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/delete_database.js");
36624
36663
  const import_dynpro_1 = __webpack_require__(/*! ./statements/import_dynpro */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/import_dynpro.js");
@@ -36687,6 +36726,7 @@ const commit_entities_1 = __webpack_require__(/*! ./statements/commit_entities *
36687
36726
  const _syntax_input_1 = __webpack_require__(/*! ./_syntax_input */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_syntax_input.js");
36688
36727
  const assert_error_1 = __webpack_require__(/*! ./assert_error */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/assert_error.js");
36689
36728
  const field_group_1 = __webpack_require__(/*! ./statements/field_group */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/field_group.js");
36729
+ const stuff_1 = __webpack_require__(/*! ../../stuff */ "./node_modules/@abaplint/core/build/src/stuff.js");
36690
36730
  // -----------------------------------
36691
36731
  const map = {};
36692
36732
  function addToMap(handler) {
@@ -36772,6 +36812,7 @@ if (Object.keys(map).length === 0) {
36772
36812
  addToMap(new if_1.If());
36773
36813
  addToMap(new log_point_1.LogPoint());
36774
36814
  addToMap(new while_1.While());
36815
+ addToMap(new get_pf_status_1.GetPFStatus());
36775
36816
  addToMap(new with_1.With());
36776
36817
  addToMap(new with_loop_1.WithLoop());
36777
36818
  addToMap(new call_transformation_1.CallTransformation());
@@ -36940,6 +36981,9 @@ class SyntaxLogic {
36940
36981
  updateScopeStructure(node) {
36941
36982
  const filename = this.currentFile.getFilename();
36942
36983
  const stru = node.get();
36984
+ if (this.scope.getType() === _scope_type_1.ScopeType.SelectionEvent && this.isSelectionEventBoundaryStructure(stru)) {
36985
+ this.scope.pop(node.getFirstToken().getStart());
36986
+ }
36943
36987
  const input = {
36944
36988
  scope: this.scope,
36945
36989
  filename,
@@ -36979,6 +37023,7 @@ class SyntaxLogic {
36979
37023
  updateScopeStatement(node) {
36980
37024
  const filename = this.currentFile.getFilename();
36981
37025
  const s = node.get();
37026
+ this.updateSelectionEventScope(node);
36982
37027
  const input = {
36983
37028
  scope: this.scope,
36984
37029
  filename,
@@ -37024,6 +37069,27 @@ class SyntaxLogic {
37024
37069
  }
37025
37070
  }
37026
37071
  }
37072
+ updateSelectionEventScope(node) {
37073
+ const statement = node.get();
37074
+ if (this.scope.getType() === _scope_type_1.ScopeType.SelectionEvent && this.isSelectionEventBoundary(statement)) {
37075
+ this.scope.pop(node.getFirstToken().getStart());
37076
+ }
37077
+ if (this.opensSelectionEventScope(statement)) {
37078
+ this.scope.push(_scope_type_1.ScopeType.SelectionEvent, statement.constructor.name, node.getFirstToken().getStart(), this.currentFile.getFilename());
37079
+ }
37080
+ }
37081
+ opensSelectionEventScope(statement) {
37082
+ return statement instanceof Statements.AtSelectionScreen;
37083
+ }
37084
+ isSelectionEventBoundary(statement) {
37085
+ return stuff_1.SELECTION_EVENTS.some(event => statement instanceof event)
37086
+ || statement instanceof Statements.Form
37087
+ || statement instanceof Statements.FunctionModule;
37088
+ }
37089
+ isSelectionEventBoundaryStructure(structure) {
37090
+ return structure instanceof Structures.ClassDefinition
37091
+ || structure instanceof Structures.Interface;
37092
+ }
37027
37093
  }
37028
37094
  exports.SyntaxLogic = SyntaxLogic;
37029
37095
  //# sourceMappingURL=syntax.js.map
@@ -40348,7 +40414,7 @@ class ClassDefinition extends _identifier_1.Identifier {
40348
40414
  input.scope.addReference(token, undefined, _reference_1.ReferenceType.ObjectOrientedVoidReference, input.filename);
40349
40415
  }
40350
40416
  else {
40351
- input.issues.push((0, _syntax_input_1.syntaxIssue)(input, token, name.toUpperCase() + " does not exist"));
40417
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, token, "Friend class " + name.toUpperCase() + " does not exist"));
40352
40418
  }
40353
40419
  result.push(name);
40354
40420
  }
@@ -56149,7 +56215,7 @@ class Registry {
56149
56215
  }
56150
56216
  static abaplintVersion() {
56151
56217
  // magic, see build script "version.sh"
56152
- return "2.119.2";
56218
+ return "2.119.4";
56153
56219
  }
56154
56220
  getDDICReferences() {
56155
56221
  return this.ddicReferences;
@@ -68685,6 +68751,7 @@ const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./
68685
68751
  const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@abaplint/core/build/src/rules/_abap_rule.js");
68686
68752
  const Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
68687
68753
  const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
68754
+ const edit_helper_1 = __webpack_require__(/*! ../edit_helper */ "./node_modules/@abaplint/core/build/src/edit_helper.js");
68688
68755
  class KeepSingleParameterCallsOnOneLineConf extends _basic_rule_config_1.BasicRuleConfig {
68689
68756
  constructor() {
68690
68757
  super(...arguments);
@@ -68704,7 +68771,7 @@ class KeepSingleParameterCallsOnOneLine extends _abap_rule_1.ABAPRule {
68704
68771
  title: "Keep single parameters on one line",
68705
68772
  shortDescription: `Keep single parameter calls on one line`,
68706
68773
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-single-parameter-calls-on-one-line`,
68707
- tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
68774
+ tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
68708
68775
  badExample: `call_method(\n 2 ).`,
68709
68776
  goodExample: `call_method( 2 ).`,
68710
68777
  };
@@ -68780,7 +68847,8 @@ class KeepSingleParameterCallsOnOneLine extends _abap_rule_1.ABAPRule {
68780
68847
  }
68781
68848
  }
68782
68849
  const message = "Keep single parameter on one line";
68783
- return [issue_1.Issue.atToken(file, c.getFirstToken(), message, this.getMetadata().key, this.conf.severity)];
68850
+ const fix = edit_helper_1.EditHelper.replaceRange(file, c.getFirstToken().getStart(), c.getLastToken().getEnd(), c.concatTokens());
68851
+ return [issue_1.Issue.atToken(file, c.getFirstToken(), message, this.getMetadata().key, this.conf.severity, fix)];
68784
68852
  }
68785
68853
  return [];
68786
68854
  }
@@ -69871,6 +69939,7 @@ const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/co
69871
69939
  const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
69872
69940
  const Objects = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
69873
69941
  const _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
69942
+ const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
69874
69943
  const Statements = __webpack_require__(/*! ../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
69875
69944
  const Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
69876
69945
  const position_1 = __webpack_require__(/*! ../position */ "./node_modules/@abaplint/core/build/src/position.js");
@@ -69888,6 +69957,7 @@ class MainFileContents {
69888
69957
  key: "main_file_contents",
69889
69958
  title: "Main file contents",
69890
69959
  shortDescription: `Checks related to report declarations.`,
69960
+ tags: [_irule_1.RuleTag.Syntax],
69891
69961
  extendedInformation: `Does not run if the target version is Cloud
69892
69962
 
69893
69963
  * PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.119.2",
3
+ "version": "2.119.4",
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.119.2",
41
+ "@abaplint/core": "^2.119.4",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/minimist": "^1.2.5",
44
44
  "@types/mocha": "^10.0.10",