diff --git a/test/test-gofmt.sh b/test/test-gofmt.sh index aacf9a3c..d2abcf3c 100755 --- a/test/test-gofmt.sh +++ b/test/test-gofmt.sh @@ -17,12 +17,7 @@ fi cd "${ROOT}" find_files() { - find . -not \( \ - \( \ - -wholename './old' \ - -o -wholename './tmp' \ - \) -prune \ - \) -name '*.go' + git ls-files | grep '\.go$' } GOFMT="gofmt" # we prefer to not use the -s flag, which is pretty annoying... diff --git a/test/test-yamlfmt.sh b/test/test-yamlfmt.sh index bd419d8e..3001c3e9 100755 --- a/test/test-yamlfmt.sh +++ b/test/test-yamlfmt.sh @@ -26,13 +26,7 @@ $RUBY -e "require 'yaml'" 2>/dev/null || ( cd "${ROOT}" find_files() { - find . -not \( \ - \( \ - -wholename './old' \ - -o -wholename './tmp' \ - -o -wholename './omv.yaml' \ - \) -prune \ - \) -name '*.yaml' + git ls-files | grep '\.yaml$' } bad_files=$(