@abaplint/core 2.113.108 → 2.113.110

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.
@@ -192,6 +192,15 @@ declare class Append implements IStatement {
192
192
  getMatcher(): IStatementRunnable;
193
193
  }
194
194
 
195
+ declare class ApplicationDescriptorsFiori extends AbstractObject {
196
+ getType(): string;
197
+ getAllowedNaming(): {
198
+ maxLength: number;
199
+ allowNamespace: boolean;
200
+ };
201
+ getDescription(): string | undefined;
202
+ }
203
+
195
204
  declare class ApplicationJobCatalogEntry extends AbstractObject {
196
205
  getType(): string;
197
206
  getAllowedNaming(): {
@@ -545,6 +554,15 @@ declare class BreakId implements IStatement {
545
554
  getMatcher(): IStatementRunnable;
546
555
  }
547
556
 
557
+ declare class BRFPlusSystemApplication extends AbstractObject {
558
+ getType(): string;
559
+ getAllowedNaming(): {
560
+ maxLength: number;
561
+ allowNamespace: boolean;
562
+ };
563
+ getDescription(): string | undefined;
564
+ }
565
+
548
566
  declare class BSPApplication extends AbstractObject {
549
567
  getType(): string;
550
568
  getAllowedNaming(): {
@@ -4875,11 +4893,13 @@ declare namespace Objects {
4875
4893
  ATCCheckObject,
4876
4894
  ATCCheckVariant,
4877
4895
  AuthorizationCheckField,
4896
+ ApplicationDescriptorsFiori,
4878
4897
  AuthorizationGroup,
4879
4898
  AuthorizationObjectClass,
4880
4899
  AuthorizationObjectExtension,
4881
4900
  AuthorizationObject,
4882
4901
  BehaviorDefinition,
4902
+ BRFPlusSystemApplication,
4883
4903
  BSPApplication,
4884
4904
  BusinessAddInImplementation,
4885
4905
  BusinessCatalogAppAssignment,
@@ -4,7 +4,7 @@ exports.NamespaceSimpleName = void 0;
4
4
  const combi_1 = require("../combi");
5
5
  class NamespaceSimpleName extends combi_1.Expression {
6
6
  getRunnable() {
7
- return (0, combi_1.regex)(/^((\w*\/\w+\/)|(\w*\/\w+\/)?[\w\*$%#]+)$/);
7
+ return (0, combi_1.regex)(/^!?((\w*\/\w+\/)|(\w*\/\w+\/)?[\w\*$%#]+)$/);
8
8
  }
9
9
  }
10
10
  exports.NamespaceSimpleName = NamespaceSimpleName;
@@ -110,7 +110,9 @@ class ClassDefinition extends _identifier_1.Identifier {
110
110
  if (m.getVisibility() === visibility_1.Visibility.Private) {
111
111
  continue;
112
112
  }
113
- else if (name === "CONSTRUCTOR" || name === "CLASS_CONSTRUCTOR") {
113
+ else if (name === "CONSTRUCTOR"
114
+ || name === "DESTRUCTOR"
115
+ || name === "CLASS_CONSTRUCTOR") {
114
116
  continue;
115
117
  }
116
118
  names.add(name);
@@ -121,7 +123,8 @@ class ClassDefinition extends _identifier_1.Identifier {
121
123
  sup = cdef === null || cdef === void 0 ? void 0 : cdef.getSuperClass();
122
124
  }
123
125
  for (const m of this.getMethodDefinitions().getAll()) {
124
- if (names.has(m.getName().toUpperCase()) && m.isRedefinition() === false) {
126
+ if (names.has(m.getName().toUpperCase())
127
+ && m.isRedefinition() === false) {
125
128
  throw new Error(`${m.getName().toUpperCase()} already declared in superclass`);
126
129
  }
127
130
  }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ApplicationDescriptorsFiori = void 0;
4
+ const _abstract_object_1 = require("./_abstract_object");
5
+ class ApplicationDescriptorsFiori extends _abstract_object_1.AbstractObject {
6
+ getType() {
7
+ return "UIAD";
8
+ }
9
+ getAllowedNaming() {
10
+ return {
11
+ maxLength: 60, // todo
12
+ allowNamespace: true,
13
+ };
14
+ }
15
+ getDescription() {
16
+ // todo
17
+ return undefined;
18
+ }
19
+ }
20
+ exports.ApplicationDescriptorsFiori = ApplicationDescriptorsFiori;
21
+ //# sourceMappingURL=application_descriptors_fiori.js.map
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BRFPlusSystemApplication = void 0;
4
+ const _abstract_object_1 = require("./_abstract_object");
5
+ class BRFPlusSystemApplication extends _abstract_object_1.AbstractObject {
6
+ getType() {
7
+ return "FDT0";
8
+ }
9
+ getAllowedNaming() {
10
+ return {
11
+ maxLength: 30,
12
+ allowNamespace: true,
13
+ };
14
+ }
15
+ getDescription() {
16
+ // todo
17
+ return undefined;
18
+ }
19
+ }
20
+ exports.BRFPlusSystemApplication = BRFPlusSystemApplication;
21
+ //# sourceMappingURL=brf_plus_system_application.js.map
@@ -26,11 +26,13 @@ __exportStar(require("./atc_check_category"), exports);
26
26
  __exportStar(require("./atc_check_object"), exports);
27
27
  __exportStar(require("./atc_check_variant"), exports);
28
28
  __exportStar(require("./authorization_check_field"), exports);
29
+ __exportStar(require("./application_descriptors_fiori"), exports);
29
30
  __exportStar(require("./authorization_group"), exports);
30
31
  __exportStar(require("./authorization_object_class"), exports);
31
32
  __exportStar(require("./authorization_object_extension"), exports);
32
33
  __exportStar(require("./authorization_object"), exports);
33
34
  __exportStar(require("./behavior_definition"), exports);
35
+ __exportStar(require("./brf_plus_system_application"), exports);
34
36
  __exportStar(require("./bsp_application"), exports);
35
37
  __exportStar(require("./business_add_in_implementation"), exports);
36
38
  __exportStar(require("./business_catalog_app_assignment"), exports);
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.113.108";
70
+ return "2.113.110";
71
71
  }
72
72
  getDDICReferences() {
73
73
  return this.ddicReferences;
@@ -38,8 +38,10 @@ class CloudTypes {
38
38
  static isCloud(obj) {
39
39
  return obj instanceof Objects.ApplicationJobCatalogEntry
40
40
  || obj instanceof Objects.ApplicationJobTemplate
41
+ || obj instanceof Objects.APIReleaseState
41
42
  || obj instanceof Objects.AssignmentServiceToAuthorizationGroup
42
43
  || obj instanceof Objects.ATCCheckCategory
44
+ || obj instanceof Objects.ApplicationDescriptorsFiori
43
45
  || obj instanceof Objects.ATCCheckObject
44
46
  || obj instanceof Objects.ATCCheckVariant
45
47
  || obj instanceof Objects.AuthorizationCheckField
@@ -7,6 +7,7 @@ const issue_1 = require("../issue");
7
7
  const _abap_rule_1 = require("./_abap_rule");
8
8
  const _basic_rule_config_1 = require("./_basic_rule_config");
9
9
  const _irule_1 = require("./_irule");
10
+ const edit_helper_1 = require("../edit_helper");
10
11
  class NoChainedAssignmentConf extends _basic_rule_config_1.BasicRuleConfig {
11
12
  }
12
13
  exports.NoChainedAssignmentConf = NoChainedAssignmentConf;
@@ -21,7 +22,7 @@ class NoChainedAssignment extends _abap_rule_1.ABAPRule {
21
22
  title: "No chained assignment",
22
23
  shortDescription: `Find chained assingments and reports issues`,
23
24
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-chain-assignments`,
24
- tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
25
+ tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
25
26
  badExample: `var1 = var2 = var3.`,
26
27
  goodExample: `var2 = var3.
27
28
  var1 = var2.`,
@@ -41,12 +42,23 @@ var1 = var2.`,
41
42
  }
42
43
  if (s.findDirectExpressions(Expressions.Target).length >= 2) {
43
44
  const message = "No chained assignment";
44
- const issue = issue_1.Issue.atStatement(file, s, message, this.getMetadata().key);
45
+ const fix = this.buildFix(file, s);
46
+ const issue = issue_1.Issue.atStatement(file, s, message, this.getMetadata().key, this.getConfig().severity, fix);
45
47
  issues.push(issue);
46
48
  }
47
49
  }
48
50
  return issues;
49
51
  }
52
+ buildFix(file, node) {
53
+ // window of 3 expressions
54
+ const children = node.getChildren();
55
+ let res = "";
56
+ for (let i = children.length - 4; i >= 0; i = i - 2) {
57
+ const concat = children[i].concatTokens() + " " + children[i + 1].concatTokens() + " " + children[i + 2].concatTokens();
58
+ res += concat + ".\n";
59
+ }
60
+ return edit_helper_1.EditHelper.replaceRange(file, node.getStart(), node.getEnd(), res.trimEnd());
61
+ }
50
62
  }
51
63
  exports.NoChainedAssignment = NoChainedAssignment;
52
64
  //# sourceMappingURL=no_chained_assignment.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.113.108",
3
+ "version": "2.113.110",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -50,20 +50,20 @@
50
50
  },
51
51
  "homepage": "https://abaplint.org",
52
52
  "devDependencies": {
53
- "@microsoft/api-extractor": "^7.52.1",
53
+ "@microsoft/api-extractor": "^7.52.4",
54
54
  "@types/chai": "^4.3.20",
55
55
  "@types/mocha": "^10.0.10",
56
- "@types/node": "^22.13.10",
56
+ "@types/node": "^22.14.1",
57
57
  "chai": "^4.5.0",
58
- "eslint": "^9.22.0",
58
+ "eslint": "^9.24.0",
59
59
  "mocha": "^11.1.0",
60
60
  "c8": "^10.1.3",
61
61
  "source-map-support": "^0.5.21",
62
- "ts-json-schema-generator": "^2.3.0",
63
- "typescript": "^5.8.2"
62
+ "ts-json-schema-generator": "^2.4.0",
63
+ "typescript": "^5.8.3"
64
64
  },
65
65
  "dependencies": {
66
- "fast-xml-parser": "^5.0.9",
66
+ "fast-xml-parser": "^5.2.0",
67
67
  "json5": "^2.2.3",
68
68
  "vscode-languageserver-types": "^3.17.5"
69
69
  }