Merge pull request #964 from tendermint/fix-gometa-makefile
fix gometalinter.v2 automatically
This commit is contained in:
commit
ac2d0edb2f
16
Makefile
16
Makefile
|
@ -58,27 +58,31 @@ get_vendor_deps:
|
|||
@hash glide 2>/dev/null || go get github.com/Masterminds/glide
|
||||
@rm -rf vendor/
|
||||
@echo "--> Running glide install"
|
||||
@$(GOPATH)/bin/glide install
|
||||
@glide install
|
||||
@make check_tools
|
||||
|
||||
update_vendor_deps:
|
||||
@$(GOPATH)/bin/glide update
|
||||
@glide update
|
||||
|
||||
update_tools:
|
||||
@echo "--> Updating tools"
|
||||
@go get -u $(GOTOOLS)
|
||||
|
||||
check_tools:
|
||||
which gox || make tools
|
||||
|
||||
tools:
|
||||
@echo "--> Installing tools"
|
||||
@go get $(GOTOOLS)
|
||||
$(GOPATH)/bin/gometalinter.v2 --install
|
||||
@gometalinter.v2 --install
|
||||
|
||||
### Formatting, linting, and vetting
|
||||
|
||||
metalinter:
|
||||
$(GOPATH)/bin/gometalinter.v2 --vendor --deadline=600s --enable-all --disable=lll ./...
|
||||
gometalinter.v2 --vendor --deadline=600s --enable-all --disable=lll ./...
|
||||
|
||||
metalinter_test:
|
||||
$(GOPATH)/bin/gometalinter.v2 --vendor --deadline=600s --disable-all \
|
||||
gometalinter.v2 --vendor --deadline=600s --disable-all \
|
||||
--enable=deadcode \
|
||||
--enable=gosimple \
|
||||
--enable=misspell \
|
||||
|
@ -106,4 +110,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 build build_race check_tools dist test test_race test_integrations test100 draw_deps get_vendor_deps update_vendor_deps update_tools tools test_release
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue