Skip to content

Commit

Permalink
Merge 0c22245 into 00432e0
Browse files Browse the repository at this point in the history
  • Loading branch information
zabawaba99 committed Feb 6, 2016
2 parents 00432e0 + 0c22245 commit 284881c
Show file tree
Hide file tree
Showing 237 changed files with 112,988 additions and 11 deletions.
29 changes: 18 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,42 @@
language: go

go:
- 1.4
- 1.5
- tip

env:
- GO15VENDOREXPERIMENT=1

before_install:
- go get github.com/golang/lint/golint
- go get golang.org/x/tools/cmd/vet
- go get github.com/fzipp/gocyclo
- go get github.com/mattn/goveralls

# get our dependencies
- go get -t ./...

install:
# make sure stuff actually builds
- go build

script:
# define our own packages so that go does not
# try and build our vendored deps
- |
pkgs=()
while read -r line; do
pkgs+=("$line")
done <<< "$(go list ./... | grep -v 'vendor')"
# ensure everything is formatted all pretty like
- gofmt -l -s .
- if gofmt -l -s . | grep -v 'vendor/'; then exit 1; fi
# vet out possible issues
- go vet ./...
- go vet ${pkgs[@]}
# run tests
- go test ./... -v -race
- go test ${pkgs[@]} -v -race

after_success:
- |
echo "mode: count" > profile.cov
for dir in $(find . -maxdepth 10 -not -path './.git*' -not -path '*/_*' -type d);
for dir in $(find . -maxdepth 10 -not -path 'vendor' -not -path './.git*' -not -path '*/_*' -type d);
do
if ls $dir/*.go &> /dev/null; then
go test -short -covermode=count -coverprofile=$dir/profile.tmp $dir
Expand All @@ -45,9 +52,9 @@ after_success:
after_script:
# check possible styling errors
- golint ./...
# check for potentially complex functions but don't false build
- gocyclo -over 15 . || true
- for pkg in ${pkgs[@]}; do; golint $pkg; done
# check for potentially complex functions but don't fail build
- gocyclo -over 15 . | grep -v 'vendor/' || true
# refresh godocs in case there were api changes
- |
if [[ "$TRAVIS_PULL_REQUEST" == "false" ]] && [[ "$TRAVIS_BRANCH" == "master" ]]; then
Expand Down
53 changes: 53 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Contributing

We're always open to new issues or pull requests.

## Find a bug?

Create a [new issue](https://github.com/Tonkpils/snag/issues/new) with
a brief explanation of the problem. Please include your snag file and logs
to help us best diagnose the issue.

## Have a feature request?

Snag is ever evolving and we want to make sure everyone
can get as much use out of the tool as we did. If there
is something you'd like snag to be able to do create a
[new issue](https://github.com/Tonkpils/snag/issues/new)
with a description of the feature you're looking for.

## Writing code

### Setting up your environment

In order to build and test snag properly, you need to use go1.5+
with the `GO15VENDOREXPERIMENT` environment variable set to `1`.


#### Optional

Before you start writing code, we suggest that you
build a version of snag with all the changes in the
master branch that you can use to test your changes with:

```bash
go build -o snagMaster
```

Afterward just run `./snagMaster` and develop away!

### Creating a Pull Request

We *highly* recommend using snag to build, lint and test
your code before submitting a pull request since our snag file
is very similar to our travis file. We will try to at least comment
on pull requests within a couple of days. We may suggest
some changes or improvements or alternatives.

Some things that will increase the chance that your pull request is accepted:

* Write tests.
* Format your code.
* Write a [good commit message][commit].

[commit]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
49 changes: 49 additions & 0 deletions Godeps/Godeps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Godeps/Readme

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions vendor/github.com/fatih/color/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions vendor/github.com/fatih/color/LICENSE.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

151 changes: 151 additions & 0 deletions vendor/github.com/fatih/color/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 284881c

Please sign in to comment.