kdnotify/tool/fmtck.sh
Paul Stemmet 0049df847d
tool/fmtck: gofmt err exit wrapper
The go devs in their infinite wisdom have decided that extending gofmt /
go fmt to error on exit is simply too complicated, so we have to script
away their inadequacies for them.
2022-12-09 18:07:23 +00:00

9 lines
150 B
Bash
Executable file

#!/bin/bash
if test -n "$(gofmt -l "$@")";
then
echo "[ERROR]: gofmt check errors"
gofmt -l "$@" | xargs -n1 printf ' > %s\n'
exit 1
fi