-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix diagnostics on save or on format #12960
Comments
According to LSP CodeAction Request, when we request fix(or, CodeAction from LSP perspective) for diagnostic, we will get an array of CodeAction. That is, we can't get the corrsponding fix for a specifcy diagnostic
|
There are some diagnostics which are safe to fix everywhere (like
field-shorthand
oruseless-braces
) and there are some diagnostics which you may not mean to fix some times, but even then, you can recover the previous state easily (unused-imports
are in this category IMO, you can easily import removed things later withauto-import
assist).This issue suggests adding a list of diagnostics, empty by default, which allows r-a to fix them on save (or on format, or on another action, or configurable between them) automatically. We may still not fix all instances of diagnostics (for example, if user puts
auto-import
in that list, we may not fix those with multiple candidates). I think adding this config helps in development speed.The text was updated successfully, but these errors were encountered: