Fix latest staticcheck errors and let travis test it
This commit is contained in:
parent
c80e8fe010
commit
2e49d522ec
|
@ -33,6 +33,7 @@ jobs:
|
||||||
- name: "Golint, go vet, binary builds"
|
- name: "Golint, go vet, binary builds"
|
||||||
script:
|
script:
|
||||||
- go get -u golang.org/x/lint/golint
|
- go get -u golang.org/x/lint/golint
|
||||||
|
- go get honnef.co/go/tools/cmd/staticcheck
|
||||||
- make check
|
- make check
|
||||||
- make service
|
- make service
|
||||||
- make ctl
|
- make ctl
|
||||||
|
|
1
Makefile
1
Makefile
|
@ -30,6 +30,7 @@ follow:
|
||||||
check:
|
check:
|
||||||
go vet ./...
|
go vet ./...
|
||||||
golint -set_exit_status -min_confidence 0.3 ./...
|
golint -set_exit_status -min_confidence 0.3 ./...
|
||||||
|
staticcheck ./...
|
||||||
|
|
||||||
test:
|
test:
|
||||||
go test -v ./...
|
go test -v ./...
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
package pb
|
package pb
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
//lint:ignore SA1019 protobuf generates deprecated imports
|
||||||
proto "github.com/golang/protobuf/proto"
|
proto "github.com/golang/protobuf/proto"
|
||||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
|
|
|
@ -1310,7 +1310,7 @@ func checkPinType(pin *api.Pin) error {
|
||||||
// and set the replication factors and ensure that the pinType matches the
|
// and set the replication factors and ensure that the pinType matches the
|
||||||
// metadata consistently.
|
// metadata consistently.
|
||||||
func (c *Cluster) setupPin(ctx context.Context, pin, existing *api.Pin) error {
|
func (c *Cluster) setupPin(ctx context.Context, pin, existing *api.Pin) error {
|
||||||
ctx, span := trace.StartSpan(ctx, "cluster/setupPin")
|
_, span := trace.StartSpan(ctx, "cluster/setupPin")
|
||||||
defer span.End()
|
defer span.End()
|
||||||
|
|
||||||
err := c.setupReplicationFactor(pin)
|
err := c.setupReplicationFactor(pin)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user