Skip backups and other non-relevant files for dib-lint

I noticed dib-lint was running on my editor backup files and checking
python files (covered by flake8) and RST files

Change-Id: Ide2e8a4c1aa8d619bc4b0326a2cfc5e63c74475f
This commit is contained in:
Ian Wienand 2015-05-29 15:39:46 +10:00
parent 31b0b5a1ca
commit ab05a8b7e2

View File

@ -61,7 +61,11 @@ error() {
rc=0
TMPDIR=$(mktemp -d)
trap "rm -rf $TMPDIR" EXIT
for i in $(find elements -type f); do
for i in $(find elements -type f \
-not -name \*~ \
-not -name \*.rst \
-not -name \*.py \
-not -name \*.pyc); do
exclusions=("$(parse_exclusions $i)")
# Check that files starting with a shebang are +x
firstline=$(head -n 1 "$i")