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:
parent
cb737354f0
commit
7eb72b6346
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user