Skip to content
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

Apply all available code fixes in the document #7964

Open
amylnikau opened this issue Feb 5, 2025 · 1 comment
Open

Apply all available code fixes in the document #7964

amylnikau opened this issue Feb 5, 2025 · 1 comment

Comments

@amylnikau
Copy link

amylnikau commented Feb 5, 2025

I didn't found a way to fix all issues reported by code analyzers using one VS Code command. At the moment you need to manually navigate to each issue in the document, open "Quick Fix" menu and select the fix from there.

It would be great to add a new feature flag or add support for editor.action.fixAll command. This extension would iterate over all issues of the open document and apply a default fix if it's available. Similar to how dotnet format analyzers command work. Honestly, I don't know how easy it can be implemented but I got used to such functionality in Rider(C#)\VS Code(typescript,javascript) and I think it really improves dev experience.

Current behavior:
Image
Image

P.S. Suggested 'Fix all' command is different from the one implemented in #6310. so you can fix all occurences of a single issue, not all occurences of all issues in the document

@act185947
Copy link

I believe this would also make is possible to fix all on save, using editor.codeActionsOnSave.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants