-
Hello, Here is a part of my settings. json file:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Just in case this is a duplicate of user request on StackOverflow -
P/S/ |
Beta Was this translation helpful? Give feedback.
-
We need more details on your setup (i.e. is there a lint error that you expected? did you open the file? what is the code layout?). But if what you want is to run lint for all packages in the workspace, can you try to run "Go: Lint Workspace" (not with gopls's staticcheck, but with the default settings)? Or set I heard gopls does not report lint errors for unopened files/packages - that's too expensive. Another downside of |
Beta Was this translation helpful? Give feedback.
We need more details on your setup (i.e. is there a lint error that you expected? did you open the file? what is the code layout?). But if what you want is to run lint for all packages in the workspace, can you try to run "Go: Lint Workspace" (not with gopls's staticcheck, but with the default settings)? Or set
"go.lintOnSave": "workspace"
and save a file to trigger lint.I heard gopls does not report lint errors for unopened files/packages - that's too expensive.
In the legacy lint tool mode (not gopls mode), the default linting works on the current 'package'.
Another downside of
staticcheck
option offered bygopls
is currently there is no configuration option.