mirror of
https://github.com/scratchfoundation/golangci-lint.git
synced 2025-08-01 17:09:18 -04:00
feat: explain typecheck and remove it from the linter list (#3929)
This commit is contained in:
parent
a303529ad3
commit
79c78d6f6f
13 changed files with 96 additions and 19 deletions
docs/src/docs/usage
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue