From eec93a0b19db3d48757a1c29d4e90becdbaa5d1c Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Mon, 3 Oct 2016 07:50:42 +0200 Subject: [PATCH] travis: add gofmt checking Print a diff and fail the check if any code is not gofmt-ed. `go test -v ./...` is the [default test script](https://docs.travis-ci.com/user/languages/go#Default-Test-Script), so that goes first. --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index cc8049f..2ae25f2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,3 +7,8 @@ notifications: email: recipients: - team@onionscan.org + +script: + - go test -v ./... + - GOFMT=$(gofmt -d .) && echo "$GOFMT" + - test -z "$GOFMT"