Replace 'egrep' with 'git grep' in testing script.

This commit is contained in:
Sergio Benitez 2017-12-27 20:29:36 -08:00
parent 92b2c3ddb7
commit acdfa75e80
1 changed files with 2 additions and 2 deletions

View File

@ -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}"