diff --git a/script/check_formatting.sh b/script/check_formatting.sh index c93d65e..d9e0706 100755 --- a/script/check_formatting.sh +++ b/script/check_formatting.sh @@ -1,11 +1,13 @@ #!/bin/bash +# Run the fmt on bindata so it does not trigger failure +go fmt ./pkg/data/bindata.go > /dev/null + +# Get list of offending files files="$(go fmt ./pkg/...)" -ignore="pkg/data/bindata.go" -files=${files[@]/$ignore} if [ -n "$files" ]; then - echo "Go code is not formatted: $files" + echo "Go code is not formatted:" for file in $files; do echo "----> $file" done