In the test code of the deleted BugChecker there is an edge case where it shouldn't propose a fix in the abstract class BugChecker { itself. However, to be honest, I don't think we need to take this case into account.
We might need to introduce a new Refaster rule collection for this Refaster rule or list it under AssortedRules.
I looked into this a few months ago, but for some reason this doesn't seem to work with Refaster as one would expect. My code is here; perhaps I overlooked something? (I did not yet attach a debugger.)
Problem
In commit https://github.com/google/error-prone/commit/570f0bf23af457aa323b0efcd8e1ba182eddbb13 the
DescribeMatch
BugChecker
got removed from Error Prone with the explanation that it got ported to Refaster. As we cannot see these kind of changes, we have to write these Refaster rules ourselves 😄.Description of the proposed new feature
I would like to rewrite the following code:
to:
Considerations
In the test code of the deleted
BugChecker
there is an edge case where it shouldn't propose a fix in theabstract class BugChecker {
itself. However, to be honest, I don't think we need to take this case into account.We might need to introduce a new Refaster rule collection for this Refaster rule or list it under
AssortedRules
.