@abaplint/core 2.113.10 → 2.113.12
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/src/registry.js
CHANGED
|
@@ -63,6 +63,7 @@ class UnusedMethods {
|
|
|
63
63
|
extendedInformation: `Checks private and protected methods.
|
|
64
64
|
|
|
65
65
|
Unused methods are not reported if the object contains parser or syntax errors.
|
|
66
|
+
Quick fixes only appears for private methods.
|
|
66
67
|
|
|
67
68
|
Skips:
|
|
68
69
|
* methods FOR TESTING
|
|
@@ -154,12 +155,14 @@ Skips:
|
|
|
154
155
|
else if (this.suppressedbyPseudo(statement, file)) {
|
|
155
156
|
continue;
|
|
156
157
|
}
|
|
157
|
-
const implementation = this.findMethodImplementation(i, file);
|
|
158
158
|
let fix = undefined;
|
|
159
|
-
if (
|
|
160
|
-
const
|
|
161
|
-
|
|
162
|
-
|
|
159
|
+
if (i.visibility === visibility_1.Visibility.Private) {
|
|
160
|
+
const implementation = this.findMethodImplementation(i, file);
|
|
161
|
+
if (implementation !== undefined) {
|
|
162
|
+
const fix1 = edit_helper_1.EditHelper.deleteStatement(file, statement);
|
|
163
|
+
const fix2 = edit_helper_1.EditHelper.deleteRange(file, implementation.getFirstToken().getStart(), implementation.getLastToken().getEnd());
|
|
164
|
+
fix = edit_helper_1.EditHelper.merge(fix1, fix2);
|
|
165
|
+
}
|
|
163
166
|
}
|
|
164
167
|
const message = "Method \"" + i.identifier.getName() + "\" not used";
|
|
165
168
|
issues.push(issue_1.Issue.atIdentifier(i.identifier, message, this.getMetadata().key, this.conf.severity, fix));
|