-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup Makefile, Travis config, and Linting (#13)
* Cleanup Makefile, Travis config, and Linting * Create bin directory in GOPATH
- Loading branch information
Showing
9 changed files
with
94 additions
and
150 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,3 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
data_sparse_backup | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# IDEA files | ||
.idea | ||
runtime.iml | ||
.DS_Store | ||
|
||
# Emacs Rulz! (false) | ||
*~ | ||
|
||
# Vim Rulz! (true) | ||
*.swp | ||
vendor | ||
vendor | ||
cover.* |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
sudo: required | ||
language: go | ||
go: 1.7.1 | ||
go: | ||
- 1.7.4 | ||
- 1.8.2 | ||
|
||
install: make bootstrap | ||
script: make compile-test | ||
before_install: mkdir -p $GOPATH/bin | ||
install: make install | ||
script: make lint test |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,35 @@ | ||
.PHONY: bootstrap | ||
bootstrap: | ||
script/install-glide | ||
# the name of this package | ||
PKG := $(shell go list .) | ||
|
||
.PHONY: install | ||
install: glide #download dependencies (including test deps) for the package | ||
glide install | ||
|
||
.PHONY: update | ||
update: | ||
glide up | ||
glide install | ||
update: glide #updates dependencies used by the package and installs them | ||
glide update | ||
|
||
.PHONY: glide | ||
glide: # ensure the glide package tool is installed | ||
which glide || (curl https://glide.sh/get | sh) | ||
|
||
.PHONY: lint | ||
lint: #lints the package for common code smells | ||
which golint || go get -u github.com/golang/lint/golint | ||
test -z "$(gofmt -d -s ./*.go)" || (gofmt -d -s ./*.go && exit 1) | ||
golint -set_exit_status | ||
go tool vet -all -shadow -shadowstrict *.go | ||
|
||
.PHONY: test | ||
test: # runs all tests against the package with race detection and coverage percentage | ||
go test -race -cover | ||
|
||
.PHONY: quick | ||
quick: # runs all tests without coverage or the race detector | ||
go test | ||
|
||
.PHONY: compile-test | ||
compile-test: | ||
go test -cover -race $(shell glide nv) | ||
gofmt -l . | ||
go tool vet *.go | ||
.PHONY: cover | ||
cover: # runs all tests against the package, generating a coverage report and opening it in the default browser | ||
go test -race -covermode=atomic -coverprofile=cover.out | ||
go tool cover -html cover.out -o cover.html | ||
open cover.html |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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