CodingStyle checking tool directory:

- Don't crash when a [.svn] cache directory is missing
- Ignores the cache directories of the main VCS : bazaar, git, mercurial, svn

Signed-off-by: Adrien Destugues <[email protected]>

Fixes #11532.
This commit is contained in:
Stéphane Aulery
2016-02-14 14:34:38 +01:00
committed by Adrien Destugues
parent 632e56d8e5
commit 006a34e40e
+8 -1
View File
@@ -38,7 +38,14 @@ def run(fileSet, rules, outputFileName):
def visit(result, dir, names):
extensions = [".cpp", ".h"]
names.remove(".git")
vcsCacheDirectory = [".bzr", ".git", ".hg", ".svn"]
for name in reversed(names):
for vcd in vcsCacheDirectory:
if name == vcd:
print(vcd + " cache directory has been ignored")
names.remove(vcd)
for name in names:
path = os.path.join(dir, name)
if os.path.isfile(path) and os.path.splitext(name)[1] in extensions: