Kaydet (Commit) 294c78fd authored tarafından Michael Meeks's avatar Michael Meeks

German comment finding - simplify top-level detection.

Change-Id: Ic75b4fbb84687a86f7eca52f82dd337244339c42
Reviewed-on: https://gerrit.libreoffice.org/33595Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMichael Meeks <michael.meeks@collabora.com>
üst 38b3df0f
......@@ -226,15 +226,13 @@ class Parser:
"""
checks each _tracked_ file in a directory recursively
"""
# top-level project directory -> use whitelist.
globalscan = False
if re.match(r'.*/core$', os.getcwd()) and directory == '.':
if os.path.exists(directory + "/.git/config"):
globalscan = True
# Change into the given dir, so "git ls-tree" does work.
# If we want to scan the current dir, we must not do so as we are already there.
if not globalscan and directory != '.':
currentdir = os.getcwd()
os.chdir(currentdir.split("core", 1)[0] + "core/")
os.chdir(directory)
sock = os.popen(r"git ls-tree -r HEAD --name-only |egrep '\.(c|cc|cpp|cxx|h|hxx|mm)$'")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment