Browse Source

Merge pull request #53 from roylee17/makefile

Makefile: add fmt and lint targets
pull/1780/head
Jae Kwon 8 years ago
committed by GitHub
parent
commit
6efadac330
20 changed files with 40 additions and 28 deletions
  1. +20
    -8
      Makefile
  2. +1
    -1
      client/client.go
  3. +1
    -1
      client/grpc_client.go
  4. +1
    -1
      client/local_client.go
  5. +1
    -1
      client/socket_client.go
  6. +1
    -1
      cmd/counter/main.go
  7. +1
    -1
      cmd/dummy/main.go
  8. +1
    -1
      example/chain_aware/chain_aware_app.go
  9. +1
    -1
      example/chain_aware/chain_aware_test.go
  10. +1
    -1
      example/counter/counter.go
  11. +1
    -1
      example/dummy/dummy_test.go
  12. +1
    -1
      example/dummy/persistent_dummy.go
  13. +1
    -1
      example/example_test.go
  14. +1
    -1
      server/grpc_server.go
  15. +1
    -1
      server/server.go
  16. +1
    -1
      server/socket_server.go
  17. +1
    -1
      tests/benchmarks/parallel/parallel.go
  18. +1
    -1
      tests/benchmarks/simple/simple.go
  19. +2
    -2
      tests/test_app/app.go
  20. +1
    -1
      testutil/messages.go

+ 20
- 8
Makefile View File

@ -1,24 +1,36 @@
.PHONY: all test get_deps
.PHONY: all build test fmt lint get_deps
all: protoc install test all: protoc install test
NOVENDOR = go list github.com/tendermint/abci/... | grep -v /vendor/ NOVENDOR = go list github.com/tendermint/abci/... | grep -v /vendor/
protoc: protoc:
protoc --go_out=plugins=grpc:. types/*.proto
@ protoc --go_out=plugins=grpc:. types/*.proto
install: install:
go install github.com/tendermint/abci/cmd/...
@ go install github.com/tendermint/abci/cmd/...
build:
@ go build -i github.com/tendermint/abci/cmd/...
test: test:
go test `${NOVENDOR}`
bash tests/test.sh
@ go test `${NOVENDOR}`
@ bash tests/test.sh
fmt:
@ go fmt ./...
lint:
@ go get -u github.com/golang/lint/golint
@ for file in $$(find "." -name '*.go' | grep -v '/vendor/' | grep -v '\.pb\.go'); do \
golint -set_exit_status $${file}; \
done;
test_integrations: get_vendor_deps install test test_integrations: get_vendor_deps install test
get_deps: get_deps:
go get -d `${NOVENDOR}`
@ go get -d `${NOVENDOR}`
get_vendor_deps: get_vendor_deps:
go get github.com/Masterminds/glide
glide install
@ go get github.com/Masterminds/glide
@ glide install

+ 1
- 1
client/client.go View File

@ -4,8 +4,8 @@ import (
"fmt" "fmt"
"sync" "sync"
. "github.com/tendermint/go-common"
"github.com/tendermint/abci/types" "github.com/tendermint/abci/types"
. "github.com/tendermint/go-common"
) )
type Client interface { type Client interface {


+ 1
- 1
client/grpc_client.go View File

@ -8,8 +8,8 @@ import (
context "golang.org/x/net/context" context "golang.org/x/net/context"
grpc "google.golang.org/grpc" grpc "google.golang.org/grpc"
. "github.com/tendermint/go-common"
"github.com/tendermint/abci/types" "github.com/tendermint/abci/types"
. "github.com/tendermint/go-common"
) )
// A stripped copy of the remoteClient that makes // A stripped copy of the remoteClient that makes


+ 1
- 1
client/local_client.go View File

@ -3,8 +3,8 @@ package abcicli
import ( import (
"sync" "sync"
. "github.com/tendermint/go-common"
types "github.com/tendermint/abci/types" types "github.com/tendermint/abci/types"
. "github.com/tendermint/go-common"
) )
type localClient struct { type localClient struct {


+ 1
- 1
client/socket_client.go View File

@ -10,8 +10,8 @@ import (
"sync" "sync"
"time" "time"
. "github.com/tendermint/go-common"
"github.com/tendermint/abci/types" "github.com/tendermint/abci/types"
. "github.com/tendermint/go-common"
) )
const ( const (


+ 1
- 1
cmd/counter/main.go View File

@ -3,9 +3,9 @@ package main
import ( import (
"flag" "flag"
. "github.com/tendermint/go-common"
"github.com/tendermint/abci/example/counter" "github.com/tendermint/abci/example/counter"
"github.com/tendermint/abci/server" "github.com/tendermint/abci/server"
. "github.com/tendermint/go-common"
) )
func main() { func main() {


+ 1
- 1
cmd/dummy/main.go View File

@ -3,10 +3,10 @@ package main
import ( import (
"flag" "flag"
. "github.com/tendermint/go-common"
"github.com/tendermint/abci/example/dummy" "github.com/tendermint/abci/example/dummy"
"github.com/tendermint/abci/server" "github.com/tendermint/abci/server"
"github.com/tendermint/abci/types" "github.com/tendermint/abci/types"
. "github.com/tendermint/go-common"
) )
func main() { func main() {


+ 1
- 1
example/chain_aware/chain_aware_app.go View File

@ -3,9 +3,9 @@ package main
import ( import (
"flag" "flag"
. "github.com/tendermint/go-common"
"github.com/tendermint/abci/server" "github.com/tendermint/abci/server"
"github.com/tendermint/abci/types" "github.com/tendermint/abci/types"
. "github.com/tendermint/go-common"
) )
func main() { func main() {


+ 1
- 1
example/chain_aware/chain_aware_test.go View File

@ -5,10 +5,10 @@ import (
"strings" "strings"
"testing" "testing"
. "github.com/tendermint/go-common"
"github.com/tendermint/abci/client" "github.com/tendermint/abci/client"
"github.com/tendermint/abci/server" "github.com/tendermint/abci/server"
"github.com/tendermint/abci/types" "github.com/tendermint/abci/types"
. "github.com/tendermint/go-common"
) )
func TestChainAware(t *testing.T) { func TestChainAware(t *testing.T) {


+ 1
- 1
example/counter/counter.go View File

@ -3,8 +3,8 @@ package counter
import ( import (
"encoding/binary" "encoding/binary"
. "github.com/tendermint/go-common"
"github.com/tendermint/abci/types" "github.com/tendermint/abci/types"
. "github.com/tendermint/go-common"
) )
type CounterApplication struct { type CounterApplication struct {


+ 1
- 1
example/dummy/dummy_test.go View File

@ -6,10 +6,10 @@ import (
"sort" "sort"
"testing" "testing"
"github.com/tendermint/abci/types"
. "github.com/tendermint/go-common" . "github.com/tendermint/go-common"
"github.com/tendermint/go-crypto" "github.com/tendermint/go-crypto"
"github.com/tendermint/go-wire" "github.com/tendermint/go-wire"
"github.com/tendermint/abci/types"
) )
func testDummy(t *testing.T, dummy types.Application, tx []byte, key, value string) { func testDummy(t *testing.T, dummy types.Application, tx []byte, key, value string) {


+ 1
- 1
example/dummy/persistent_dummy.go View File

@ -6,11 +6,11 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/tendermint/abci/types"
. "github.com/tendermint/go-common" . "github.com/tendermint/go-common"
dbm "github.com/tendermint/go-db" dbm "github.com/tendermint/go-db"
"github.com/tendermint/go-merkle" "github.com/tendermint/go-merkle"
"github.com/tendermint/go-wire" "github.com/tendermint/go-wire"
"github.com/tendermint/abci/types"
) )
const ( const (


+ 1
- 1
example/example_test.go View File

@ -10,12 +10,12 @@ import (
"golang.org/x/net/context" "golang.org/x/net/context"
"google.golang.org/grpc" "google.golang.org/grpc"
. "github.com/tendermint/go-common"
"github.com/tendermint/abci/client" "github.com/tendermint/abci/client"
"github.com/tendermint/abci/example/dummy" "github.com/tendermint/abci/example/dummy"
nilapp "github.com/tendermint/abci/example/nil" nilapp "github.com/tendermint/abci/example/nil"
"github.com/tendermint/abci/server" "github.com/tendermint/abci/server"
"github.com/tendermint/abci/types" "github.com/tendermint/abci/types"
. "github.com/tendermint/go-common"
) )
func TestDummy(t *testing.T) { func TestDummy(t *testing.T) {


+ 1
- 1
server/grpc_server.go View File

@ -6,8 +6,8 @@ import (
"google.golang.org/grpc" "google.golang.org/grpc"
. "github.com/tendermint/go-common"
"github.com/tendermint/abci/types" "github.com/tendermint/abci/types"
. "github.com/tendermint/go-common"
) )
// var maxNumberConnections = 2 // var maxNumberConnections = 2


+ 1
- 1
server/server.go View File

@ -3,8 +3,8 @@ package server
import ( import (
"fmt" "fmt"
. "github.com/tendermint/go-common"
"github.com/tendermint/abci/types" "github.com/tendermint/abci/types"
. "github.com/tendermint/go-common"
) )
func NewServer(protoAddr, transport string, app types.Application) (Service, error) { func NewServer(protoAddr, transport string, app types.Application) (Service, error) {


+ 1
- 1
server/socket_server.go View File

@ -8,8 +8,8 @@ import (
"strings" "strings"
"sync" "sync"
. "github.com/tendermint/go-common"
"github.com/tendermint/abci/types" "github.com/tendermint/abci/types"
. "github.com/tendermint/go-common"
) )
// var maxNumberConnections = 2 // var maxNumberConnections = 2


+ 1
- 1
tests/benchmarks/parallel/parallel.go View File

@ -5,8 +5,8 @@ import (
"fmt" "fmt"
//"encoding/hex" //"encoding/hex"
. "github.com/tendermint/go-common"
"github.com/tendermint/abci/types" "github.com/tendermint/abci/types"
. "github.com/tendermint/go-common"
) )
func main() { func main() {


+ 1
- 1
tests/benchmarks/simple/simple.go View File

@ -8,8 +8,8 @@ import (
"reflect" "reflect"
//"encoding/hex" //"encoding/hex"
. "github.com/tendermint/go-common"
"github.com/tendermint/abci/types" "github.com/tendermint/abci/types"
. "github.com/tendermint/go-common"
) )
func main() { func main() {


+ 2
- 2
tests/test_app/app.go View File

@ -5,10 +5,10 @@ import (
"os" "os"
"time" "time"
. "github.com/tendermint/go-common"
"github.com/tendermint/go-process"
"github.com/tendermint/abci/client" "github.com/tendermint/abci/client"
"github.com/tendermint/abci/types" "github.com/tendermint/abci/types"
. "github.com/tendermint/go-common"
"github.com/tendermint/go-process"
) )
//---------------------------------------- //----------------------------------------


+ 1
- 1
testutil/messages.go View File

@ -1,8 +1,8 @@
package testutil package testutil
import ( import (
"github.com/tendermint/go-crypto"
"github.com/tendermint/abci/types" "github.com/tendermint/abci/types"
"github.com/tendermint/go-crypto"
) )
//---------------------------------------- //----------------------------------------


Loading…
Cancel
Save