From bdf3aab53ad12924d74bd13c5ffdd95d269ac5f6 Mon Sep 17 00:00:00 2001
From: Ben Nemec <bnemec@redhat.com>
Date: Fri, 15 Apr 2016 10:29:48 -0500
Subject: [PATCH] Don't stop dib-lint on first flake8 failure

It's better to report all of the failures in one shot, so we should
make sure a flake8 failure doesn't immediately end the dib-lint
run, and instead just sets the error flag like the other checks.

Change-Id: Ib13fc71bb12a6565888bdd89f33fc6ada89f8d8c
---
 bin/dib-lint | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/dib-lint b/bin/dib-lint
index ad939cbc6..eb925d4fa 100755
--- a/bin/dib-lint
+++ b/bin/dib-lint
@@ -81,7 +81,7 @@ for i in $(find elements -type f   \
 
         # Ensure 4 spaces indent are used
         if [ "$(file -b --mime-type $i)" = "text/x-python" ]; then
-            flake8 $i
+            flake8 $i || error "$i failed flake8"
         else
             if ! excluded indent ; then
                 indent_regex='^\( \{4\}\)* \{1,3\}[^ ]'