From 07fac10fd40d7b8968febdf2750a560113aa5d49 Mon Sep 17 00:00:00 2001 From: Simon Sawert Date: Sun, 7 Jan 2024 10:54:06 +0100 Subject: [PATCH] Improve `typecheck` docs Add a step in the troubleshooting guide to ensure users are not linting individual files. Even though this _might_ work, it's often the root cause of `typecheck` reports when the package consists of multiple files. --- docs/src/docs/usage/faq.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/src/docs/usage/faq.mdx b/docs/src/docs/usage/faq.mdx index 22a140ffb606..a8f8a31984e6 100644 --- a/docs/src/docs/usage/faq.mdx +++ b/docs/src/docs/usage/faq.mdx @@ -49,5 +49,6 @@ How to troubleshoot: - [ ] Ensure the version of `golangci-lint` is built with a compatible version of Go. - [ ] Ensure dependencies are up-to-date with `go mod tidy`. +- [ ] Ensure you're linting packages and not single files. I.e. `golangci-lint run ./path/to/pkg` (or `./...`), **not** `./path/to/pkg/file.go`. - [ ] Ensure building works with `go run ./...`/`go build ./...` - whole package. - [ ] If using CGO, ensure all require system libraries are installed.