diff --git a/Makefile b/Makefile index 7848e478..8c9c5214 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,8 @@ GOTOOLS = \ github.com/mitchellh/gox \ - github.com/Masterminds/glide + github.com/Masterminds/glide \ + honnef.co/go/tools/cmd/megacheck + PACKAGES=$(shell go list ./... | grep -v '/vendor/') BUILD_TAGS?=tendermint TMHOME = $${TMHOME:-$$HOME/.tendermint} @@ -72,5 +74,10 @@ tools: ensure_tools: go get $(GOTOOLS) +### Formatting, linting, and vetting + +megacheck: + @for pkg in ${PACKAGES}; do megacheck "$$pkg"; done + .PHONY: install build build_race dist test test_race test_integrations test100 draw_deps list_deps get_deps get_vendor_deps update_deps revision tools diff --git a/cmd/tendermint/commands/root.go b/cmd/tendermint/commands/root.go index 3565f3bb..a10ff3fc 100644 --- a/cmd/tendermint/commands/root.go +++ b/cmd/tendermint/commands/root.go @@ -31,9 +31,6 @@ var RootCmd = &cobra.Command{ config.SetRoot(config.RootDir) cfg.EnsureRoot(config.RootDir) logger, err = tmflags.ParseLogLevel(config.LogLevel, logger) - if err != nil { - return err - } - return nil + return err }, } diff --git a/consensus/byzantine_test.go b/consensus/byzantine_test.go index e779d617..3a68a2f5 100644 --- a/consensus/byzantine_test.go +++ b/consensus/byzantine_test.go @@ -117,10 +117,7 @@ func TestByzantine(t *testing.T) { p2p.Connect2Switches(switches, ind1, ind2) // wait for someone in the big partition to make a block - - select { - case <-eventChans[ind2]: - } + <-eventChans[ind2] t.Log("A block has been committed. Healing partition")