-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Stylecheck's ST1000 is not enabled (or no way to enable it) #980
Comments
I believe the staticcheck version is relatively old: https://github.com/golangci/golangci-lint/blob/master/go.mod#L49 |
Seems like after |
This does not appear fixed to me. Perhaps I'm doing something wrong, but checking out golangci-lint master, then running in the repo root: make build
./golangci-lint cache clean
./golangci-lint run ./pkg/commands reports no errors, but
shows no godoc (nor does inspecting the source). Additionally, I still see no option to explicitly enable ST1000 (if it's intentionally disabled by default). |
It looks like staticcheck-in-the-context-of-golangci-lint reads the staticcheck.conf file, so it might work to just make one of those. It's not great to have two config files (.golangci.yml and staticcheck.conf) but it's better than nothing. |
I ran into this recently. What fixed it for me (and I suspect that this option was added in a newer release) was adding the following to my issues:
include:
- EXC0011 |
It seems like golangci-lint does not run stylecheck's ST1000 (which complains about missing or malformed package comments) even if stylecheck is enabled. Stylecheck disables it by default; it's not clear to me if golangci-lint intends to do so as well, but if so it has no way to enable it.
For example, run
golangci-lint
on its own codebase, which enables stylecheck. (Say on./pkg/commands
, which has no package doc.) No errors are reported. (Same applies to a package doc that doesn't start "Package packagename ...".)Is it possible to enable this, either by default or in configuration?
Please include the following information:
Version of golangci-lint
Config file
(running on golangci/golangci-lint itself)
Go environment
Verbose output of running
The text was updated successfully, but these errors were encountered: