Improve RemoveAnnotationVisitor to remove unused imports from annotation parameters#980
Conversation
RemoveAnnotationVisitor to remove unused types from annotation parametersRemoveAnnotationVisitor to remove unused imports from annotation parameters
|
I also submitted a PR to fix OpenRewrite: openrewrite/rewrite#3638 |
fabapp2
left a comment
There was a problem hiding this comment.
Thank you for this contribution @ammachado 🚀
I was looking at the tests but couldn't see any tests that proves that the change in RemoveAnnotationVisitor is required.
Could you provide a test that proves your change?
Thank you for improving the quality of the code.
I hope you keep contributing. Could you provide future cleanups in a separate PR (or at least commit), that makes it easier to follow and understand the changes.
(I know I am not a role model here) ;)
|
|
||
| public void requiresNewFromType() {} | ||
|
|
||
| \s |
There was a problem hiding this comment.
Can you also remove these \ss, please?
| } | ||
|
|
||
| assertThat(result.print()).isEqualTo(expected); | ||
| assertThat(result.print()).isEqualToNormalizingNewlines(expected); |
There was a problem hiding this comment.
Please reset this after removing \s.
| String expected = """ | ||
| import org.mockito.junit.jupiter.MockitoExtension; | ||
| import org.junit.jupiter.api.Disabled; | ||
|
|
There was a problem hiding this comment.
Now that this is getting cleaned up a bit, could you remove the blank line too?
No description provided.