Makefile: enable gometalinter on travis (#537)

This commit is contained in:
Dmitry Vyukov 2018-03-20 13:26:51 +01:00 committed by GitHub
parent 72c33b66ba
commit e20831f6ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 5 deletions

View File

@ -17,11 +17,11 @@ before_install:
- sudo cp clang+llvm-4.0.1-x86_64-linux-gnu-debian8/bin/clang-format /usr/local/bin/
- which clang-format
- clang-format --version
- sudo apt-get install -y -q libc6-dev-i386 lib32stdc++-4.8-dev linux-libc-dev g++-aarch64-linux-gnu g++-powerpc64le-linux-gnu g++-arm-linux-gnueabihf
install: true
script:
- make install_prerequisites
- make presubmit
# If the build fails because some code in not formatted, it's nice to see the diffs after formatting.

View File

@ -189,6 +189,9 @@ tidy:
# Just check for compiler warnings.
$(CC) executor/test_executor.cc -c -o /dev/null -Wparentheses -Wno-unused -Wall
gometalinter:
env CGO_ENABLED=1 gometalinter.v2 ./...
test:
# Executor tests use cgo.
env CGO_ENABLED=1 $(GO) test -short ./...
@ -229,18 +232,21 @@ arch:
presubmit:
$(MAKE) check_links
$(MAKE) generate
$(MAKE) all
$(MAKE) arch
$(MAKE) check_diff
$(MAKE) all
$(MAKE) test
$(MAKE) gometalinter
$(MAKE) arch
echo LGTM
clean:
rm -rf ./bin/
# For a tupical Ubuntu/Debian distribution, requires sudo.
# For a tupical Ubuntu/Debian distribution.
install_prerequisites:
apt-get install libc6-dev-i386 lib32stdc++-4.8-dev linux-libc-dev g++-aarch64-linux-gnu g++-powerpc64le-linux-gnu g++-arm-linux-gnueabihf
sudo apt-get install -y -q libc6-dev-i386 lib32stdc++-4.8-dev linux-libc-dev g++-aarch64-linux-gnu g++-powerpc64le-linux-gnu g++-arm-linux-gnueabihf
go get -u gopkg.in/alecthomas/gometalinter.v2
gometalinter.v2 --install
check_links:
python ./tools/check_links.py $$(pwd) $$(ls ./*.md; find ./docs/ -name '*.md')