-
Notifications
You must be signed in to change notification settings - Fork 797
Lint/Format On Save is broken and violates POLA #1231
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
Comments
Digging through some searching, it appears that this is a common issue when people inadvertently turn this on: microsoft/vscode#53988 This is a common enough issue that it's been answered a few times on StackOverflow: (it should be noted that the top answer is incomplete and that the following is required to actually achieve a "Don't mess with my code" result:
This is non-obvious) This is mentioned as a distinct thing in a Chinese-language overview of the VS Code extension: |
Glad to hear that you figured it out how to disable them from the editor. They can be customized with the general editor settings.
Organizing imports and format on save by default is working as intended. FYI you will not need |
As a learner, this makes no sense. When I save, I expect the content of the buffer to be written to disk. I do not expect save to change the content of the buffer. This default is broken. |
Update on this? While I get the appeal of format on save, it's very confusing default behavior when you (like me) don't usually use it, and it would've been even more so for someone who didn't know that formatting on save was a possibility. And I had to dig through quite a few search results before finding this issue. It should at least be easier to turn off. |
What version of Go, VS Code & VS Code Go extension are you using?
go version
to get version of Go from the VS Code integrated terminal.gopls -v version
to get version of Gopls from the VS Code integrated terminal.code -v
orcode-insiders -v
to get version of VS Code or VS Code Insiders.Go: Locate Configured Go Tools
command.Share the Go related settings you have added/edited
Describe the bug
A clear and concise description of what the bug.
The document changes.
A clear and concise description of what you expected to happen.
I expect the document to not change.
Steps to reproduce the behavior:
^s
Sometimes the following steps follow naturally:
I have Lint On Save turned off, and yet it still does it:
2021-02-16_004057.mp4
As someone learning Go, this behavior
How do I stop this from happening? Who knows! I've restarted VS Code, I've uninstalled and reinstalled the extension, and have come to the conclusion that this is a bug.
The text was updated successfully, but these errors were encountered: