@abaplint/core 2.82.15 → 2.82.16

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.
@@ -68,7 +68,7 @@ class Registry {
68
68
  }
69
69
  static abaplintVersion() {
70
70
  // magic, see build script "version.sh"
71
- return "2.82.15";
71
+ return "2.82.16";
72
72
  }
73
73
  getDDICReferences() {
74
74
  return this.references;
@@ -4,6 +4,7 @@ exports.ImplementMethods = exports.ImplementMethodsConf = void 0;
4
4
  const issue_1 = require("../issue");
5
5
  const _abap_rule_1 = require("./_abap_rule");
6
6
  const _basic_rule_config_1 = require("./_basic_rule_config");
7
+ const objects_1 = require("../objects");
7
8
  const Statements = require("../abap/2_statements/statements");
8
9
  const Expressions = require("../abap/2_statements/expressions");
9
10
  const _irule_1 = require("./_irule");
@@ -22,6 +23,7 @@ class ImplementMethods extends _abap_rule_1.ABAPRule {
22
23
  key: "implement_methods",
23
24
  title: "Implement methods",
24
25
  shortDescription: `Checks for abstract methods and methods from interfaces which need implementing.`,
26
+ extendedInformation: `INCLUDE programs are only checked in connection with their main programs.`,
25
27
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Quickfix],
26
28
  };
27
29
  }
@@ -36,6 +38,9 @@ class ImplementMethods extends _abap_rule_1.ABAPRule {
36
38
  if (file.getStructure() === undefined) {
37
39
  return [];
38
40
  }
41
+ else if (obj instanceof objects_1.Program && obj.isInclude() === true) {
42
+ return [];
43
+ }
39
44
  this.obj = obj;
40
45
  for (const classDefinition of file.getInfo().listClassDefinitions()) {
41
46
  const classImplementation = this.lookupImplementationInObject(classDefinition.name, obj);
@@ -63,6 +63,8 @@ class ObsoleteStatementConf extends _basic_rule_config_1.BasicRuleConfig {
63
63
  this.callTransformation = true;
64
64
  /** Check for POSIX REGEX usage */
65
65
  this.regex = true;
66
+ /** Check for OCCURENCES vs OCCURRENCES usage */
67
+ this.occurences = true;
66
68
  }
67
69
  }
68
70
  exports.ObsoleteStatementConf = ObsoleteStatementConf;
@@ -113,7 +115,9 @@ SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_
113
115
 
114
116
  CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
115
117
 
116
- POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm`,
118
+ POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
119
+
120
+ OCCURENCES: check for OCCURENCES vs OCCURRENCES`,
117
121
  };
118
122
  }
119
123
  getConfig() {
@@ -270,6 +274,13 @@ POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.ht
270
274
  issues.push(issue);
271
275
  }
272
276
  }
277
+ if (this.conf.occurences && sta instanceof Statements.Replace) {
278
+ const concat = staNode.concatTokens().toUpperCase();
279
+ if (concat.includes(" OCCURENCES ")) {
280
+ const issue = issue_1.Issue.atStatement(file, staNode, "Use \"OCCURRENCES\"", this.getMetadata().key, this.conf.severity);
281
+ issues.push(issue);
282
+ }
283
+ }
273
284
  if (configVersion >= version_1.Version.v756 && this.conf.regex) {
274
285
  if (sta instanceof Statements.Find || sta instanceof Statements.Replace) {
275
286
  if ((_c = staNode.findFirstExpression(Expressions.FindType)) === null || _c === void 0 ? void 0 : _c.concatTokens().includes("REGEX")) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.82.15",
3
+ "version": "2.82.16",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -45,8 +45,8 @@
45
45
  },
46
46
  "homepage": "https://abaplint.org",
47
47
  "devDependencies": {
48
- "@microsoft/api-extractor": "^7.18.21",
49
- "@types/chai": "^4.2.22",
48
+ "@microsoft/api-extractor": "^7.19.2",
49
+ "@types/chai": "^4.3.0",
50
50
  "@types/mocha": "^9.0.0",
51
51
  "@types/node": "^16.11.12",
52
52
  "chai": "^4.3.4",
@@ -55,7 +55,7 @@
55
55
  "c8": "^7.10.0",
56
56
  "source-map-support": "^0.5.21",
57
57
  "ts-json-schema-generator": "^0.97.0",
58
- "typescript": "^4.5.2"
58
+ "typescript": "^4.5.3"
59
59
  },
60
60
  "dependencies": {
61
61
  "fast-xml-parser": "^3.21.1",