From e10a1b031b243482371c0673ee17aa3c0f53637a Mon Sep 17 00:00:00 2001
From: Campbell Barton <ideasman42@gmail.com>
Date: Sat, 18 Nov 2017 17:07:20 +1100
Subject: [PATCH] check_style_c: skip dotfiles

---
 check_source/check_style_c.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/check_source/check_style_c.py b/check_source/check_style_c.py
index 4cbb65b..ad05a38 100755
--- a/check_source/check_style_c.py
+++ b/check_source/check_style_c.py
@@ -1347,9 +1347,11 @@ def scan_source_recursive(dirpath, args):
             dirnames[:] = [d for d in dirnames if not d.startswith(".")]
 
             for filename in filenames:
-                filepath = join(dirpath, filename)
-                if filename_check is None or filename_check(filepath):
-                    yield filepath
+                # avoid scanning backup files
+                if not filename.startswith("."):
+                    filepath = join(dirpath, filename)
+                    if filename_check is None or filename_check(filepath):
+                        yield filepath
 
     def is_source(filename):
         # skip temp files
-- 
GitLab