mirror of https://github.com/etcd-io/bbolt.git
Makefile: Move to golangci-lint
parent
fd5535f71f
commit
fd6c0aa81a
15
Makefile
15
Makefile
|
@ -10,17 +10,8 @@ race:
|
||||||
fmt:
|
fmt:
|
||||||
!(gofmt -l -s -d $(shell find . -name \*.go) | grep '[a-z]')
|
!(gofmt -l -s -d $(shell find . -name \*.go) | grep '[a-z]')
|
||||||
|
|
||||||
# go get honnef.co/go/tools/simple
|
lint:
|
||||||
gosimple:
|
golangci-lint run ./...
|
||||||
gosimple ./...
|
|
||||||
|
|
||||||
# go get honnef.co/go/tools/unused
|
|
||||||
unused:
|
|
||||||
unused ./...
|
|
||||||
|
|
||||||
# go get github.com/kisielk/errcheck
|
|
||||||
errcheck:
|
|
||||||
@errcheck -ignorepkg=bytes -ignore=os:Remove go.etcd.io/bbolt
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
TEST_FREELIST_TYPE=hashmap go test -timeout 20m -v -coverprofile cover.out -covermode atomic
|
TEST_FREELIST_TYPE=hashmap go test -timeout 20m -v -coverprofile cover.out -covermode atomic
|
||||||
|
@ -33,4 +24,4 @@ test:
|
||||||
# Note: gets "program not an importable package" in out of path builds
|
# Note: gets "program not an importable package" in out of path builds
|
||||||
@TEST_FREELIST_TYPE=array go test -v ./cmd/bbolt
|
@TEST_FREELIST_TYPE=array go test -v ./cmd/bbolt
|
||||||
|
|
||||||
.PHONY: race fmt errcheck test gosimple unused
|
.PHONY: race fmt test lint
|
||||||
|
|
|
@ -30,7 +30,7 @@ const pageHeaderSize = 16
|
||||||
|
|
||||||
// meta represents a simplified version of a database meta page for testing.
|
// meta represents a simplified version of a database meta page for testing.
|
||||||
type meta struct {
|
type meta struct {
|
||||||
magic uint32
|
_ uint32
|
||||||
version uint32
|
version uint32
|
||||||
_ uint32
|
_ uint32
|
||||||
_ uint32
|
_ uint32
|
||||||
|
@ -38,7 +38,7 @@ type meta struct {
|
||||||
_ uint64
|
_ uint64
|
||||||
pgid uint64
|
pgid uint64
|
||||||
_ uint64
|
_ uint64
|
||||||
checksum uint64
|
_ uint64
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure that a database can be opened without error.
|
// Ensure that a database can be opened without error.
|
||||||
|
|
Loading…
Reference in New Issue