Along with supporting more specific node locations (#2550) it would be very useful to have the ability to suggest replacement code for nodes. This is something that can be done with Android Lint, but for KSP processors that need to do validation of user code and report errors it would be extremely valuable to not have to rely on an external tool when the processor itself has the information it needs to suggest a fix.
KSP doesn't model the whole syntax tree so I would't expect it to be able to do every kind of suggested fix one might want, but I believe there are still many things that could be done through KSP.
I have a use-case, for example, where I need to prevent use of specific annotations, but for each I could suggest a different annotation to replace it with. Right now I can report an error with a message that suggests the replacement, but that isn't something tools could provide a way of automatically applying.
Along with supporting more specific node locations (#2550) it would be very useful to have the ability to suggest replacement code for nodes. This is something that can be done with Android Lint, but for KSP processors that need to do validation of user code and report errors it would be extremely valuable to not have to rely on an external tool when the processor itself has the information it needs to suggest a fix.
KSP doesn't model the whole syntax tree so I would't expect it to be able to do every kind of suggested fix one might want, but I believe there are still many things that could be done through KSP.
I have a use-case, for example, where I need to prevent use of specific annotations, but for each I could suggest a different annotation to replace it with. Right now I can report an error with a message that suggests the replacement, but that isn't something tools could provide a way of automatically applying.