Files
athens/scripts/check_gofmt.sh
Aaron Schlesinger 054edde824 Removing gofmt vendor ignores (#1321)
* Removing gofmt vendor ignores

We don't have a vendor directory anymore 😄 🎉

* wrapping env var in quotes

Thanks @chriscoffee for the suggestion!
2019-08-22 20:51:36 +02:00

9 lines
219 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) # All the .go files
test -z $(gofmt -s -d "$GO_FILES" | tee /dev/stderr)