move gofmt into a separate script
This commit is contained in:
parent
4dcd6c1f9d
commit
6bfb34e0ab
14
gofmt.sh
Executable file
14
gofmt.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
RETVAL=0
|
||||
|
||||
for file in $(find . -name '*.go' -not -path './vendor/*')
|
||||
do
|
||||
if [ -n "$(gofmt -l $file)" ]
|
||||
then
|
||||
echo "$file does not conform to gofmt rules. Run: gofmt -s -w $file" >&2
|
||||
RETVAL=1
|
||||
fi
|
||||
done
|
||||
|
||||
exit $RETVAL
|
15
test.sh
15
test.sh
@ -4,17 +4,4 @@ set -eux
|
||||
|
||||
export PACKER_ACC=1
|
||||
|
||||
RETVAL=0
|
||||
|
||||
for file in $(find ./ -type f ! -path "./vendor/*" -name '*.go' -print)
|
||||
do
|
||||
if [[ -n "$(gofmt -l "$file")" ]]
|
||||
then
|
||||
echo -e "$file does not conform to gofmt rules. Run: gofmt -s -w $file"
|
||||
RETVAL=1
|
||||
fi
|
||||
done
|
||||
|
||||
exit $RETVAL
|
||||
|
||||
go test -v -count 1 -timeout 20m ./driver ./iso ./clone
|
||||
go test -v -count 1 -timeout 20m ./driver ./iso ./clone
|
||||
|
Loading…
x
Reference in New Issue
Block a user