parent
734d2106b0
commit
47056552dc
@ -1,9 +1,9 @@ |
|||||||
#!/bin/bash |
#!/bin/bash |
||||||
|
|
||||||
if [ -n "$(gofmt -l .)" ]; then |
if [ -n "$(gofmt -l .)" -o $(golint ./... | wc | awk '{print $1}') -gt "2" ]; then |
||||||
echo "Go code is not formatted:" |
echo "Go code is not formatted:" |
||||||
gofmt -d . |
gofmt -d . |
||||||
exit 1 |
exit 1 |
||||||
else |
else |
||||||
echo "Go code is well formatted ;)" |
echo "Go code is well formatted ;)" |
||||||
fi |
fi |
||||||
|
Loading…
Reference in new issue