-
Notifications
You must be signed in to change notification settings - Fork 721
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
Please add an option to disable warnings from simplifycompositelit #227
Comments
@rajatsingh25aug Please share your go related settings. If you are using the Go language server (
See https://github.com/golang/tools/blob/master/gopls/doc/settings.md#analyses-mapstringbool Even though I hope the default set of diagnostics can help writing more readable code,
|
@hyangah My
|
Thanks @rajatsingh25aug for sharing the settings. You are using the language server ( We plan to improve the discoverability of the settings. (#197) |
Just to add one more note here - you can configure your editor to automatically fix all of those errors on save by adding the following to your settings: "[go]": {
"editor.codeActionsOnSave": {
"source.fixAll": true,
}
} |
@hyangah The settings that you provided didn't work. :/ Am I doing something wrong?. |
@rajatsingh25aug That "unknown configuration setting" error is fine - that's working as intended and Is the settings.json file saved? From my quick testing, it should work. |
@hyangah So I have applied the settings again and restarted the vscode again. Killed all the running process related to vscode from the background and it worked. 💯 I was facing this issue for a long time. Thank you for being so prompt for helping out. 👍 |
@rajatsingh25aug good to hear that the problem solved. Ideally Enjoy Go programming! |
If you have a question, please ask it on the
#vscode
or#vscode-go
channels in Gophers Slack](https://invite.slack.golangbridge.org/messages/vscode).Is your feature request related to a problem? Please describe.
I keep on getting warnings like this
redundant type from array, slice, or map composite literal simplifycompositelit.
I don't know how to disable this warning.
Describe the solution you'd like
Please write a feature so that I can disable the warnings like above from the VScode's
settings.json
.Describe alternatives you've considered
There is no fix to this problem AFAIK.
Additional context
There is no issue in the code's logic or any other error whatsoever. These warnings are pretty distracting.
The text was updated successfully, but these errors were encountered: