Mikes_IDEA_extensions icon indicating copy to clipboard operation
Mikes_IDEA_extensions copied to clipboard

Request: add inspection of suggesting to add annotations of WorkerThread/UiThread/AnyThread based on usage

Open AndroidDeveloperLB opened this issue 2 years ago • 2 comments

If in all calls of a function "foo", we call it from the UI-thread, it could suggest us to add the UiThread annotation. Same for WorkerThread. If it's mixed, suggest to add "AnyThread" annotation.

You can also add a setting of how far to suggest, because if a function is private, it's safer to use the quick-fix than when it's public. That's especially important for the case of library-modules.

AndroidDeveloperLB avatar Jul 06 '22 09:07 AndroidDeveloperLB

Sounds useful, I'd accept a contribution.

Miha-x64 avatar Sep 02 '22 16:09 Miha-x64

@Miha-x64 Hopefully someone could offer it. For now I've also requested this on the issue tracker: https://issuetracker.google.com/issues/244694784

AndroidDeveloperLB avatar Sep 02 '22 18:09 AndroidDeveloperLB