Last active
September 15, 2018 10:40
-
-
Save ernado/2df932afab31599e0b07c49ef7988650 to your computer and use it in GitHub Desktop.
Makefile for gb golang project including gometalinter and goling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export GOPATH := $(shell gb env | grep GB_SRC_PATH | sed -r "s/\/(\w+)\/src/\/\1/g" | sed -r "s:GB_SRC_PATH=|\"::g") | |
| all: format check build test info | |
| test: | |
| gb test | |
| format: | |
| go fmt . | |
| goimports -w . | |
| build: | |
| gb build | |
| check: format | |
| gometalinter --deadline 60s --enable lll --enable goimports --disable errcheck --disable gotype --disable golint --disable aligncheck | |
| check-fast: | |
| gometalinter --enable goimports --enable lll --disable errcheck --disable gotype --disable golint --fast | |
| lint: | |
| golint | |
| benhmark: format | |
| gb test -bench Benchmark.+ -run -Benchmark.+ -v | |
| info: format | |
| depscheck -totalonly -tests . | |
| golocc | |
| std-info: format | |
| depscheck -stdlib -v . | |
| install: | |
| go get github.com/warmans/golocc | |
| go get github.com/divan/depscheck | |
| go get github.com/alecthomas/gometalinter | |
| gometalinter --install --update |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment