Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

tool to move declaration @Nullable annotations to the right spot for type-use annotations?

37 views
Skip to first unread message

Manu Sridharan

unread,
Jul 19, 2024, 12:44:26 AM7/19/24
to jspecify-discuss
Hi, I was working on migrating the NullAway source code itself to JSpecify 1.0.0 annotations from JSR 305 and was wondering if there is any tooling to help with this:

Optionally, move other annotations to comply with style guidelines, but this is not required by the language.

We have many JSR-305 @Nullable annotations written as declaration annotations before modifiers and I’d like to move them to be next to the type once we switch to JSpecify.  Is there any tooling out there to help with this?  Thanks!

Best,
Manu


Liam Miller-Cushon

unread,
Jul 19, 2024, 1:03:41 AM7/19/24
to Manu Sridharan, jspecify-discuss
There's an Error Prone check that will move annotations to the right position [1], which can be run as a refactoring [2].


--
You received this message because you are subscribed to the Google Groups "jspecify-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jspecify-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jspecify-discuss/CAFXXopNCHrXQrqV_6AzcE%2Bezwxr1Me%2BOo9DG8FnQe94oXyrXaA%40mail.gmail.com.

Manu Sridharan

unread,
Jul 19, 2024, 1:38:38 AM7/19/24
to Liam Miller-Cushon, jspecify-discuss
Thanks!  I opened a PR to mention this option in the docs.

Best,
Manu
Reply all
Reply to author
Forward
0 new messages