Skip to content

Commit 812cad9

Browse files
committed
docs: add section about typecheck
1 parent a303529 commit 812cad9

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/src/docs/usage/faq.mdx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,20 @@ The same as the Go team (the 2 last minor versions)
3232

3333
Because the first run caches type information. All subsequent runs will be fast.
3434
Usually this options is used during development on local machine and compilation was already performed.
35+
36+
## Why do you have `typecheck` errors?
37+
38+
`typecheck` is like the front-end of a Go compiler, parses and type-checks Go code, it manages compilation errors.
39+
40+
It cannot be disabled because of that.
41+
42+
`typecheck` is not a real linter, it's just a way to parse compiling errors (produced by the `types.Checker`) and some linter errors.
43+
44+
A linter that reports `typecheck` errors is not able to report other issues for a package because that kind of error doesn't allow it to perform its own analysis.
45+
46+
How to troubleshoot:
47+
48+
- [ ] Ensure the version of `golangci-lint` is built with a compatible version of Go.
49+
- [ ] Ensure dependencies are up-to-date with `go mod tidy`.
50+
- [ ] Ensure building works with `go run ./...`/`go build ./...` - whole package.
51+
- [ ] If using CGO, ensure all C dependencies are installed.

0 commit comments

Comments
 (0)