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.
This commit is contained in:
parent
5fceb121c9
commit
0049df847d
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if test -n "$(gofmt -l "$@")";
|
||||||
|
then
|
||||||
|
echo "[ERROR]: gofmt check errors"
|
||||||
|
gofmt -l "$@" | xargs -n1 printf ' > %s\n'
|
||||||
|
exit 1
|
||||||
|
fi
|
Loading…
Reference in New Issue