forked from lightningnetwork/lightning-onion
-
Notifications
You must be signed in to change notification settings - Fork 3
/
goclean.sh
executable file
·27 lines (23 loc) · 862 Bytes
/
goclean.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
# The script does automatic checking on a Go package and its sub-packages, including:
# 1. gofmt (http://golang.org/cmd/gofmt/)
# 2. golint (https://github.com/golang/lint)
# 3. go vet (http://golang.org/cmd/vet)
# 4. gosimple (https://github.com/dominikh/go-simple)
# 5. unconvert (https://github.com/mdempsky/unconvert)
# 6. race detector (http://blog.golang.org/race-detector)
# 7. test coverage (http://blog.golang.org/cover)
set -ex
# run tests
env GORACE="halt_on_error=1" go test -race ./...
# golangci-lint (github.com/golangci/golangci-lint) is used to run each each
# static checker.
# check linters
golangci-lint run --disable-all --deadline=10m \
--out-format=github-actions \
--enable=gofmt \
--enable=golint \
--enable=vet \
--enable=gosimple \
--enable=unconvert \
--enable=ineffassign