forked from tmc/pqstream
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lint
executable file
·31 lines (29 loc) · 853 Bytes
/
lint
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
28
29
30
31
#!/bin/bash
set -euo pipefail
command -v gometalinter > /dev/null || go get github.com/alecthomas/gometalinter
command -v revgrep > /dev/null || go get github.com/bradleyfalzon/revgrep/cmd/revgrep
set +o pipefail
command -v errcheck > /dev/null || gometalinter -i
gometalinter -t --vendored-linters --cyclo-over=15 --deadline=2m --disable-all \
--enable=errcheck \
--enable=vet \
--enable=vetshadow \
--enable=gotype \
--enable=deadcode \
--enable=gocyclo \
--enable=golint \
--enable=varcheck \
--enable=structcheck \
--enable=aligncheck \
--enable=megacheck \
--enable=dupl \
--enable=ineffassign \
--enable=interfacer \
--enable=unconvert \
--enable=goconst \
--enable=gas \
--enable=misspell \
"$@" 2>&1 | tee lint.out
set -o pipefail
# only error on newly introduced lint issues
cat lint.out| revgrep master