mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
go vet caught some nifty bugs. so fixed those here, and also made it so that we vet everything from now on since the robots seem to do a better job of vetting than we have managed to. also adds gofmt check to circle. could move this to the test.sh script (didn't want a script calling a script, because $reasons) and it's nice and isolated in its own little land as it is. side note, changed the script so it runs in 100ms instead of 3s, i think find is a lot faster than go list. attempted some minor cleanup of various scripts
13 lines
314 B
Bash
Executable File
13 lines
314 B
Bash
Executable File
#!/bin/sh
|
|
# find and output all Go files that are not correctly formatted
|
|
|
|
set -e
|
|
|
|
# Find all .go files except those under vendor/ or .git, run gofmt -l on them
|
|
OUT=$(find ! \( -path ./vendor -prune \) ! \( -path ./.git -prune \) -name '*.go' -exec gofmt -l {} +)
|
|
|
|
if [ -n "$OUT" ]; then
|
|
echo "$OUT"
|
|
exit 1
|
|
fi
|