From 0101d8bf3af15923096243ce110168256f27c979 Mon Sep 17 00:00:00 2001 From: Sergio Benitez Date: Wed, 27 Dec 2017 20:29:36 -0800 Subject: [PATCH] Replace 'egrep' with 'git grep' in testing script. --- scripts/test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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}"