From ab05a8b7e21d28a5e4164b74b40816f650ca6e31 Mon Sep 17 00:00:00 2001
From: Ian Wienand <iwienand@redhat.com>
Date: Fri, 29 May 2015 15:39:46 +1000
Subject: [PATCH] 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
---
 bin/dib-lint | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/bin/dib-lint b/bin/dib-lint
index 23949f59d..9e6c37484 100755
--- a/bin/dib-lint
+++ b/bin/dib-lint
@@ -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")