mirror of
https://github.com/syncthing/syncthing.git
synced 2024-11-16 10:28:49 -07:00
Run vet and lint during build
This commit is contained in:
parent
665b4506e7
commit
0c9f1efc75
8
build.sh
8
build.sh
@ -2,7 +2,7 @@
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
DOCKERIMGV=1.4-1
|
||||
DOCKERIMGV=1.4-2
|
||||
|
||||
case "${1:-default}" in
|
||||
default)
|
||||
@ -113,7 +113,11 @@ case "${1:-default}" in
|
||||
-v $(pwd):/go/src/github.com/syncthing/syncthing \
|
||||
-w /go/src/github.com/syncthing/syncthing \
|
||||
syncthing/build:$DOCKERIMGV \
|
||||
sh -c './build.sh clean && ./build.sh all && STTRACE=all ./build.sh test-cov'
|
||||
sh -c './build.sh clean \
|
||||
&& go vet ./cmd/... ./internal/... \
|
||||
&& ( golint ./cmd/... ; golint ./internal/... ) | egrep -v "comment on exported|should have comment" \
|
||||
&& ./build.sh all \
|
||||
&& STTRACE=all ./build.sh test-cov'
|
||||
;;
|
||||
|
||||
docker-test)
|
||||
|
@ -51,6 +51,11 @@ RUN go get github.com/tools/godep \
|
||||
&& go get github.com/axw/gocov/gocov \
|
||||
&& go get github.com/AlekSi/gocov-xml
|
||||
|
||||
# Install tools "go vet" and "golint"
|
||||
|
||||
RUN go get golang.org/x/tools/cmd/vet \
|
||||
&& go get github.com/golang/lint/golint
|
||||
|
||||
# Build standard library for race
|
||||
|
||||
RUN go install -race std
|
||||
|
Loading…
Reference in New Issue
Block a user