Skip to content

Commit

Permalink
Merge pull request #53 from Comcast/feature/format-enforcement
Browse files Browse the repository at this point in the history
Enable format enforcement.
  • Loading branch information
schmidtw authored Sep 27, 2017
2 parents dd4b7b2 + b225973 commit 68ac7ee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .travis.gofmt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

if [ -n "$(gofmt -s -l .)" ]; then
echo "Go code is not formatted:"
gofmt -s -d -e .
exit 1
fi
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ before_install:
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then docker exec build bash -c "pushd codecovio_build; git fetch origin +refs/pull/${TRAVIS_PULL_REQUEST}/merge && git checkout -qf FETCH_HEAD; popd"; fi'

script:
- docker exec build bash -c "export GOPATH=/codecovio_build && pushd codecovio_build/src && glide install --strip-vendor && cd caduceus && go build caduceus && go test -race -coverprofile=coverage.txt && popd"
- docker exec build bash -c "export GOPATH=/codecovio_build && pushd codecovio_build/src && glide install --strip-vendor && cd caduceus && go build caduceus && go test -race -coverprofile=coverage.txt && ../../.travis.gofmt.sh && popd"
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then docker exec build bash -c "pushd caduceus; ./build_rpm.sh; popd"; fi'

after_success:
Expand Down

0 comments on commit 68ac7ee

Please sign in to comment.