mirror of
https://github.com/k8snetworkplumbingwg/whereabouts.git
synced 2025-06-03 06:42:26 +00:00
build, tests: replace golint w/ go vet + staticcheck
Goling is deprecated, as per their page [0]; its readme says that tools such as `go vet` and `staticcheck` should be used instead. As such, this patch replaces golint with the suggested tools. [0] - https://github.com/golang/lint Signed-off-by: Miguel Duarte Barroso <mdbarroso@redhat.com>
This commit is contained in:
parent
65e2f8b549
commit
cd93d29352
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
@ -36,8 +36,8 @@ jobs:
|
||||
- name: Run go vet
|
||||
run: go vet ./...
|
||||
|
||||
- name: Install golint
|
||||
run: GO111MODULE=off GOBIN=$(pwd)/bin go get golang.org/x/lint/golint
|
||||
- name: Install static check
|
||||
run: go install honnef.co/go/tools/cmd/staticcheck@latest
|
||||
|
||||
- name: Test
|
||||
run: sudo PATH=${PATH}:./bin ./hack/test-go.sh
|
||||
|
@ -2,7 +2,11 @@
|
||||
# single test: go test -v ./pkg/storage/
|
||||
# without cache: go test -count=1 -v ./pkg/storage/
|
||||
set -e -x
|
||||
echo "Linting go code..."
|
||||
golint ./cmd ./pkg
|
||||
echo "Running go vet ..."
|
||||
go vet ./cmd/... ./pkg/...
|
||||
|
||||
echo "Running golang staticcheck ..."
|
||||
staticcheck ./...
|
||||
|
||||
echo "Running go tests..."
|
||||
KUBEBUILDER_ASSETS="$(pwd)/bin" go test -v -covermode=count -coverprofile=coverage.out ./...
|
||||
|
Loading…
Reference in New Issue
Block a user