modify check logic

pull/133/head
Minh Doan 6 years ago
parent 8cdd7a048b
commit 650d19cde8
  1. 9
      .travis.gofmt.sh

@ -1,6 +1,13 @@
#!/bin/bash #!/bin/bash
if [ -n "$(gofmt -l .)" -o $(golint ./... | wc | awk '{print $1}') -gt "2" ]; then echo $(golint ./... | wc | awk '{print $1}')
if [ $(golint ./... | wc | awk '{print $1}') -gt 2 ]; then
echo "Go code is not formatted:"
gofmt -d .
exit 1
fi
if [ -n "$(gofmt -l .)" ]; then
echo "Go code is not formatted:" echo "Go code is not formatted:"
gofmt -d . gofmt -d .
exit 1 exit 1

Loading…
Cancel
Save