Reuse .gitignore in whitespace linter

Everyhing ignored by git should also be ignored by the whitespace
linter, so this prevents having to duplicate this list of files.
If we need the whitespace linter to ignore files outside of
.gitignore in the future that should be easy to add.

Change-Id: I096e5cee7f1874f9db85c2f76ad2f0c709decf50
This commit is contained in:
Sean Eagan 2018-10-17 10:48:55 -05:00
parent cb737354f0
commit 7eb72b6346
1 changed files with 2 additions and 10 deletions

View File

@ -1,15 +1,7 @@
#!/usr/bin/env bash
set -xe
set -x
RES=$(find . \
-not -path "*/\.*" \
-not -path "*/*.egg-info/*" \
-not -path "*/releasenotes/build/*" \
-not -path "*/doc/build/*" \
-not -name "*.tgz" \
-not -name "*.html" \
-not -name "*.pyc" \
-type f -exec egrep -l " +$" {} \;)
RES=$(git grep -E -l " +$")
if [[ -n $RES ]]; then
exit 1