Pull request: upd-go

Merge in DNS/adguard-home from upd-go to master

Squashed commit of the following:

commit 1282e3d956baed869b0cc64dcf6dd0261adf1ca2
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Tue Sep 6 20:06:17 2022 +0300

    all: upd go; add govulncheck
This commit is contained in:
Ainar Garipov
2022-09-07 14:01:03 +03:00
parent ab02c829ea
commit da1ae33805
10 changed files with 64 additions and 680 deletions

View File

@@ -219,6 +219,8 @@ exit_on_output gofumpt --extra -e -l .
"$GO" vet ./...
govulncheck ./...
# Apply more lax standards to the code we haven't properly refactored yet.
gocyclo --over 17 ./internal/querylog/
gocyclo --over 15 ./internal/home/ ./internal/dhcpd

View File

@@ -32,10 +32,13 @@ readonly go
# prevent the "cannot install cross-compiled binaries when GOBIN is set" error.
env\
GOARCH=""\
GOOS=""\
GOBIN="${PWD}/bin"\
"$go" install --modfile=./internal/tools/go.mod\
$v_flags $x_flags\
GOOS=""\
GOWORK='off'\
"$go" install\
--modfile=./internal/tools/go.mod\
$v_flags\
$x_flags\
github.com/fzipp/gocyclo/cmd/gocyclo\
github.com/golangci/misspell/cmd/misspell\
github.com/gordonklaus/ineffassign\
@@ -44,6 +47,7 @@ env\
github.com/securego/gosec/v2/cmd/gosec\
golang.org/x/tools/go/analysis/passes/nilness/cmd/nilness\
golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow\
golang.org/x/vuln/cmd/govulncheck\
honnef.co/go/tools/cmd/staticcheck\
mvdan.cc/gofumpt\
mvdan.cc/unparam\