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:
committed by
Adrien Destugues
parent
632e56d8e5
commit
006a34e40e
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user