diff --git a/.golangci.yaml b/.golangci.yaml new file mode 100644 index 0000000..be4f413 --- /dev/null +++ b/.golangci.yaml @@ -0,0 +1,32 @@ +run: + # timeout for analysis, e.g. 30s, 5m, default is 1m + deadline: 90s + +linters-settings: + gocyclo: + # minimal code complexity to report, 30 by default (but we recommend 10-20) + min-complexity: 25 + depguard: + list-type: blacklist + packages: + - golang.org/x/net/context + - github.com/gogo/protobuf/proto + +linters: + disable-all: true + enable: + - deadcode + - depguard + - gocyclo + - gofmt + - goimports + - govet + - ineffassign + - megacheck + - misspell + - revive + - varcheck + +issues: + # Don't turn off any checks by default. We can do this explicitly if needed. + exclude-use-default: false diff --git a/proof/verify_test.go b/proof/verify_test.go index 027a97a..d62931b 100644 --- a/proof/verify_test.go +++ b/proof/verify_test.go @@ -403,10 +403,3 @@ func dh(h string, expLen int) []byte { } return r } - -func shortHash(hash []byte) string { - if len(hash) == 0 { - return "" - } - return fmt.Sprintf("%x...", hash[:4]) -}