зеркало из https://github.com/golang/pkgsite.git
all.bash: run go vet -all
Add `go vet -all` to our standard checks. It checks some things that staticcheck doesn't. Notably, closing over loop variables. Currently none of the checks are false positives, so might as well run them all (it takes about 2s). If we later find one we disagree with, we can disable it. Change-Id: Ie11b5d8fd7250f8b55b474a662fe78f139f23a6e Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/241797 Reviewed-by: Julie Qiu <julie@golang.org>
This commit is contained in:
Родитель
5f3d1516c2
Коммит
3aae7e77f9
6
all.bash
6
all.bash
|
@ -92,6 +92,11 @@ check_unparam() {
|
|||
runcmd unparam ./...
|
||||
}
|
||||
|
||||
# check_vet runs go vet on source files.
|
||||
check_vet() {
|
||||
runcmd go vet -all ./...
|
||||
}
|
||||
|
||||
# check_staticcheck runs staticcheck on source files.
|
||||
check_staticcheck() {
|
||||
ensure_go_binary honnef.co/go/tools/cmd/staticcheck
|
||||
|
@ -134,6 +139,7 @@ run_prettier() {
|
|||
standard_linters() {
|
||||
check_headers
|
||||
check_bad_migrations
|
||||
check_vet
|
||||
check_staticcheck
|
||||
check_misspell
|
||||
check_unparam
|
||||
|
|
Загрузка…
Ссылка в новой задаче