Files
athens/scripts/check_gofmt.sh
Carolyn Van Slyck 21cd7239db Make it easier to run all the same commands that Travis does (#362)
* Make it easier to run all the same commands that Travis does

* Add target to install dev tools

* Dirty a temp directory instead of the repo root

* Explain our new make targets

* Set a TMPDIR on travis

* Fix comment
2018-07-30 13:27:40 -07:00

9 lines
255 B
Bash
Executable File

#!/bin/bash
# check_gofmt.sh
# Fail if a .go file hasn't been formatted with gofmt
set -euo pipefail
GO_FILES=$(find . -iname '*.go' -type f | grep -v /vendor/) # All the .go files, excluding vendor/
test -z $(gofmt -s -l $GO_FILES | tee /dev/stderr)