github.com/palcoin-project/palcd@v1.0.0/goclean.sh (about)

     1  #!/bin/bash
     2  # The script does automatic checking on a Go package and its sub-packages, including:
     3  # 1. gofmt         (http://golang.org/cmd/gofmt/)
     4  # 3. go vet        (http://golang.org/cmd/vet)
     5  # 4. gosimple      (https://github.com/dominikh/go-simple)
     6  # 5. unconvert     (https://github.com/mdempsky/unconvert)
     7  # 6. race detector (http://blog.golang.org/race-detector)
     8  # 7. test coverage (http://blog.golang.org/cover)
     9  
    10  set -ex
    11  
    12  env GORACE="halt_on_error=1" go test -race -tags="rpctest" -covermode atomic -coverprofile=profile.cov ./...
    13  
    14  # Automatic checks
    15  golangci-lint run --deadline=10m --disable-all \
    16  --enable=gofmt \
    17  --enable=vet \
    18  --enable=gosimple \
    19  --enable=unconvert