hrev50090 adds 1 changeset to branch 'master'
old head: 632e56d8e514ba6ac41f582ce580e51a3cd8922e
new head: 006a34e40e20edcc8a8230c0c437995b03f7bf6d
overview:
http://cgit.haiku-os.org/haiku/log/?qt=range&q=006a34e40e20+%5E632e56d8e514
----------------------------------------------------------------------------
006a34e40e20: 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 <pulkomandy@xxxxxxxxxxxxx>
Fixes #11532.
[ Stéphane Aulery <saulery@xxxxxxx> ]
----------------------------------------------------------------------------
Revision: hrev50090
Commit: 006a34e40e20edcc8a8230c0c437995b03f7bf6d
URL: http://cgit.haiku-os.org/haiku/commit/?id=006a34e40e20
Author: Stéphane Aulery <saulery@xxxxxxx>
Date: Sat Nov 29 15:42:29 2014 UTC
Committer: Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Commit-Date: Sun Feb 14 13:34:38 2016 UTC
Ticket: https://dev.haiku-os.org/ticket/11532
----------------------------------------------------------------------------
1 file changed, 8 insertions(+), 1 deletion(-)
src/tools/checkstyle/checkstyle.py | 9 ++++++++-
----------------------------------------------------------------------------
diff --git a/src/tools/checkstyle/checkstyle.py
b/src/tools/checkstyle/checkstyle.py
index 7b86341..c9021e3 100755
--- a/src/tools/checkstyle/checkstyle.py
+++ b/src/tools/checkstyle/checkstyle.py
@@ -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: