Reputation: 17762
I have installed Go and the VSCode extensions.
I am using staticcheck as linter but I would like also to run the style checks provided by golint.
When I look for the go.lint settings in VSCode, I see that I can specify either staticcheck or golint as Lint tool.
Even golangci-lint does not seem to run golint style checks.
Any suggestion on how to run both staticcheck AND golint any time a file is saved?
Upvotes: 1
Views: 1427
Reputation: 143
EDIT: due to question changes, no longer answers the question
In VS Code settings, under Go extension, find 'Lint Flags' and add flag:
-checks=all
or you can select which checks to enforce, the list is here: https://staticcheck.io/docs/checks
After saving the source file (depending on your vs code settings, but in most cases, it will trigger the linter), you should be able to see the error
Upvotes: 3