diff --git a/scripts/test.sh b/scripts/test.sh index e353d943..d4473a34 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -31,7 +31,7 @@ function check_versions_match() { # Ensures there are no tabs in any file. function ensure_tab_free() { local tab=$(printf '\t') - local matches=$(grep -I -R "${tab}" "${ROOT_DIR}" | egrep -v '/target|/.git|LICENSE') + local matches=$(git grep -E -I "${tab}" "${ROOT_DIR}" | egrep -v 'LICENSE') if ! [ -z "${matches}" ]; then echo "Tab characters were found in the following:" echo "${matches}" @@ -41,7 +41,7 @@ function ensure_tab_free() { # Ensures there are no files with trailing whitespace. function ensure_trailing_whitespace_free() { - local matches=$(egrep -I -R " +$" "${ROOT_DIR}" | egrep -v "/target|/.git") + local matches=$(git grep -E -I "\s+$" "${ROOT_DIR}") if ! [ -z "${matches}" ]; then echo "Trailing whitespace was found in the following:" echo "${matches}"