fix spelling and makefile gometalinter.v2

This commit is contained in:
Petabyte Storage 2017-12-11 20:48:15 -08:00
parent 2c14488b93
commit 8be708fe5b
3 changed files with 9 additions and 6 deletions

View File

@ -14,6 +14,9 @@ all: get_vendor_deps install test
install:
go install $(BUILD_FLAGS) ./cmd/tendermint
install_metalinter_v2:
which gometalinter.v2 || make tools
build:
go build $(BUILD_FLAGS) -o build/tendermint ./cmd/tendermint/
@ -74,10 +77,10 @@ tools:
### Formatting, linting, and vetting
metalinter:
metalinter: install_metalinter_v2
$(GOPATH)/bin/gometalinter.v2 --vendor --deadline=600s --enable-all --disable=lll ./...
metalinter_test:
metalinter_test: install_metalinter_v2
$(GOPATH)/bin/gometalinter.v2 --vendor --deadline=600s --disable-all \
--enable=deadcode \
--enable=gosimple \
@ -106,4 +109,4 @@ metalinter_test:
#--enable=vet \
#--enable=vetshadow \
.PHONY: install build build_race dist test test_race test_integrations test100 draw_deps get_vendor_deps update_vendor_deps update_tools tools test_release
.PHONY: install install_metalinter_v2 build build_race dist test test_race test_integrations test100 draw_deps get_vendor_deps update_vendor_deps update_tools tools test_release

View File

@ -19,7 +19,7 @@ var ProbeUpnpCmd = &cobra.Command{
func probeUpnp(cmd *cobra.Command, args []string) error {
capabilities, err := upnp.Probe(logger)
if err != nil {
fmt.Println("Probe failed: %v", err)
fmt.Println("Probe failed: ", err)
} else {
fmt.Println("Probe success!")
jsonBytes, err := json.Marshal(capabilities)

View File

@ -22,7 +22,7 @@ const (
numBatchMsgPackets = 10
minReadBufferSize = 1024
minWriteBufferSize = 65536
updateState = 2 * time.Second
updateStats = 2 * time.Second
pingTimeout = 40 * time.Second
// some of these defaults are written in the user config
@ -169,7 +169,7 @@ func (c *MConnection) OnStart() error {
c.quit = make(chan struct{})
c.flushTimer = cmn.NewThrottleTimer("flush", c.config.flushThrottle)
c.pingTimer = cmn.NewRepeatTimer("ping", pingTimeout)
c.chStatsTimer = cmn.NewRepeatTimer("chStats", updateState)
c.chStatsTimer = cmn.NewRepeatTimer("chStats", updateStats)
go c.sendRoutine()
go c.recvRoutine()
return nil