staticcheck no longer runs on Go 1.10 (#92)
* staticcheck no longer runs on Go 1.10, so run it on Go 1.11 in CI * be explicit about default make target in .travis.yml
This commit is contained in:
parent
1bbf8dae71
commit
fe97274a1b
10
.travis.yml
10
.travis.yml
|
|
@ -5,13 +5,17 @@ matrix:
|
||||||
include:
|
include:
|
||||||
- go: "1.9"
|
- go: "1.9"
|
||||||
- go: "1.10"
|
- go: "1.10"
|
||||||
env: VET=1
|
|
||||||
- go: "1.11"
|
- go: "1.11"
|
||||||
env: GO111MODULE=off
|
env:
|
||||||
|
- GO111MODULE=off
|
||||||
|
- VET=1
|
||||||
- go: "1.11"
|
- go: "1.11"
|
||||||
env: GO111MODULE=on
|
env: GO111MODULE=on
|
||||||
- go: "1.12"
|
- go: "1.12"
|
||||||
|
env: GO111MODULE=off
|
||||||
|
- go: "1.12"
|
||||||
|
env: GO111MODULE=on
|
||||||
- go: tip
|
- go: tip
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- if [[ "$VET" = 1 ]]; then make; else make deps test; fi
|
- if [[ "$VET" = 1 ]]; then make ci; else make deps test; fi
|
||||||
|
|
|
||||||
9
Makefile
9
Makefile
|
|
@ -6,7 +6,7 @@ dev_build_version=$(shell git describe --tags --always --dirty)
|
||||||
# they are just too noisy to be a requirement for a CI -- we don't even *want*
|
# they are just too noisy to be a requirement for a CI -- we don't even *want*
|
||||||
# to fix some of the things they consider to be violations.
|
# to fix some of the things they consider to be violations.
|
||||||
.PHONY: ci
|
.PHONY: ci
|
||||||
ci: deps checkgofmt vet staticcheck unused ineffassign predeclared test
|
ci: deps checkgofmt vet staticcheck ineffassign predeclared test
|
||||||
|
|
||||||
.PHONY: deps
|
.PHONY: deps
|
||||||
deps:
|
deps:
|
||||||
|
|
@ -47,12 +47,7 @@ vet:
|
||||||
.PHONY: staticcheck
|
.PHONY: staticcheck
|
||||||
staticcheck:
|
staticcheck:
|
||||||
@go get honnef.co/go/tools/cmd/staticcheck
|
@go get honnef.co/go/tools/cmd/staticcheck
|
||||||
staticcheck -ignore github.com/fullstorydev/grpcurl/tls_settings_test.go:SA1019 ./...
|
staticcheck ./...
|
||||||
|
|
||||||
.PHONY: unused
|
|
||||||
unused:
|
|
||||||
@go get honnef.co/go/tools/cmd/unused
|
|
||||||
unused ./...
|
|
||||||
|
|
||||||
.PHONY: ineffassign
|
.PHONY: ineffassign
|
||||||
ineffassign:
|
ineffassign:
|
||||||
|
|
|
||||||
|
|
@ -285,7 +285,7 @@ func simpleTest(t *testing.T, cc *grpc.ClientConn) {
|
||||||
cl := grpc_testing.NewTestServiceClient(cc)
|
cl := grpc_testing.NewTestServiceClient(cc)
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second)
|
ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
_, err := cl.UnaryCall(ctx, &grpc_testing.SimpleRequest{}, grpc.FailFast(false))
|
_, err := cl.UnaryCall(ctx, &grpc_testing.SimpleRequest{}, grpc.WaitForReady(true))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("simple RPC failed: %v", err)
|
t.Errorf("simple RPC failed: %v", err)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue