From e342c5a06ad24a1bfd600ea2a61a2c19bdeb8a45 Mon Sep 17 00:00:00 2001 From: James Shubin Date: Mon, 8 Feb 2016 11:57:37 -0500 Subject: [PATCH] Only format check tracked files --- test/test-gofmt.sh | 7 +------ test/test-yamlfmt.sh | 8 +------- 2 files changed, 2 insertions(+), 13 deletions(-) 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=$(