feat: explain typecheck and remove it from the linter list ()

This commit is contained in:
Ludovic Fernandez 2023-06-29 22:40:59 +02:00 committed by GitHub
parent a303529ad3
commit 79c78d6f6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 96 additions and 19 deletions
docs/src/docs/usage

View file

@ -32,3 +32,22 @@ The same as the Go team (the 2 last minor versions)
Because the first run caches type information. All subsequent runs will be fast.
Usually this options is used during development on local machine and compilation was already performed.
## Why do you have `typecheck` errors?
`typecheck` is like the front-end of a Go compiler, parses and type-checks Go code, it manages compilation errors.
It cannot be disabled because of that.
Of course, this is just as good as the compiler itself and a lot of compilation issues will not properly show where in the code your error lies.
`typecheck` is not a real linter, it's just a way to parse compiling errors (produced by the `types.Checker`) and some linter errors.
If there are `typecheck` errors, golangci-lint will not able to produce other reports because that kind of error doesn't allow it to perform analysis.
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 building works with `go run ./...`/`go build ./...` - whole package.
- [ ] If using CGO, ensure all require system libraries are installed.