commit | 5b0231b02747eb4319a8597bc74fd0320295ba6d | [log] [tgz] |
---|---|---|
author | Colin Cross <ccross@android.com> | Thu Aug 11 10:12:46 2016 -0700 |
committer | Colin Cross <ccross@android.com> | Thu Aug 11 10:21:37 2016 -0700 |
tree | 72675f8ba63d099f42851eb79183debf9506b320 | |
parent | a028bf49ba0446d3d59a74598b88b09879392576 [diff] [blame] |
Enforce gofmt in travis Run gofmt -l . during travis to catch pull requests that have not had gofmt run on them. Change-Id: Ibfdf988a535d82721f3c4bc328b189f606f12778
diff --git a/.travis.gofmt.sh b/.travis.gofmt.sh new file mode 100755 index 0000000..3aa9374 --- /dev/null +++ b/.travis.gofmt.sh
@@ -0,0 +1,7 @@ +#!/bin/bash + +if [ -n "$(gofmt -l .)" ]; then + echo "Go code is not formatted:" + gofmt -d . + exit 1 +fi