diff --git a/check_source/check_header_duplicate.py b/check_source/check_header_duplicate.py index 02217d5f70759f9c068ccecc3507ea98f92d9dba..1394f69fe92405b654a938763ea920c6d4f2696c 100755 --- a/check_source/check_header_duplicate.py +++ b/check_source/check_header_duplicate.py @@ -73,10 +73,8 @@ def scan_source_recursive(dirpath, is_restore): def source_list(path, filename_check=None): for dirpath, dirnames, filenames in os.walk(path): - - # skip '.svn' - if dirpath.startswith("."): - continue + # skip '.git' + dirnames[:] = [d for d in dirnames if not d.startswith(".")] for filename in filenames: filepath = join(dirpath, filename) diff --git a/check_source/check_spelling.py b/check_source/check_spelling.py index 20700a210671f05f5bee065bb40ef7732f924c6c..40577419d8f7c2e670271c6ab0f30b1962b82730 100755 --- a/check_source/check_spelling.py +++ b/check_source/check_spelling.py @@ -331,10 +331,8 @@ def spell_check_comments_recursive(dirpath): def source_list(path, filename_check=None): for dirpath, dirnames, filenames in os.walk(path): - # skip '.git' - if dirpath.startswith("."): - continue + dirnames[:] = [d for d in dirnames if not d.startswith(".")] for filename in filenames: filepath = join(dirpath, filename) diff --git a/check_source/check_style_c.py b/check_source/check_style_c.py index 0c48f92b38c693b9c18989e0466d0b72c63fb0d4..286cba17cf11029d7c2bffa5d27208e6057b1710 100755 --- a/check_source/check_style_c.py +++ b/check_source/check_style_c.py @@ -1300,10 +1300,8 @@ def scan_source_recursive(dirpath, args): def source_list(path, filename_check=None): for dirpath, dirnames, filenames in os.walk(path): - - # skip '.svn' - if dirpath.startswith("."): - continue + # skip '.git' + dirnames[:] = [d for d in dirnames if not d.startswith(".")] for filename in filenames: filepath = join(dirpath, filename)