-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
x/tools/gopls: surface a diagnostic when opening a file with a DO NOT EDIT comment #33397
Comments
Change https://golang.org/cl/188766 mentions this issue: |
Is there a way to disable this warning? Running gopls from master, vscode spams notifications. |
By spams, do you mean that more than one notification is being sent? |
That's correct. It seems it happens very frequently when vscode auto-saves on focus or after a timeout, even if I'm just reading the file 😄 |
|
It seems that these only come from gopls, given that the dropdown doesn't have the option to suppress the warning. On a deeper look it seems that this happens when I'm browsing through different generated files. It'd be great to have an option to remove it though, it seems that's not possible today. WDYT? |
Thanks for sharing. One thing I could do is change this diagnostic so that it appears only if a user tries to edit the file, rather than on open. |
That sounds great! I can report back when that change goes on master :) |
@vincepri: Just submitted the change. Sorry about the delay! |
@stamblerre 24h is more than amazing! :D Thank you so much for working on it! I can confirm it's working as expected 😍 🎉 |
Migrated from microsoft/vscode-go#2617.
When opening a file containing this comment anywhere
it should send a diagnostic, so that the LSP client can display a prominent warning to prevent accidental editting.
The text was updated successfully, but these errors were encountered: