summaryrefslogtreecommitdiffstats
path: root/bin/find-german-comments
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2016-02-10 15:21:10 +0000
committerMichael Meeks <michael.meeks@collabora.com>2016-02-10 15:49:16 +0000
commit25ff833c14b681c37f397199370188196d81371c (patch)
tree2c2f5c9a7428c81488b3c6bde367ac83d2e4d557 /bin/find-german-comments
parenttdf#46037 clean up Options - LibreOffice - Accessibility page (diff)
downloadcore-25ff833c14b681c37f397199370188196d81371c.tar.gz
core-25ff833c14b681c37f397199370188196d81371c.zip
find-german-comments: misc. cleanups and fixes for altered tree.
Change-Id: I6d6f3488afd71cb782bd83fea9fa11a2e52d0efe
Diffstat (limited to 'bin/find-german-comments')
-rwxr-xr-xbin/find-german-comments21
1 files changed, 17 insertions, 4 deletions
diff --git a/bin/find-german-comments b/bin/find-german-comments
index ead5851d97b4..054f00a86b24 100755
--- a/bin/find-german-comments
+++ b/bin/find-german-comments
@@ -224,6 +224,7 @@ class Parser:
"""
checks each _tracked_ file in a directory recursively
"""
+ # FIXME: eventually should scan .c .mm etc. too ...
sock = os.popen(r"git ls-files '%s' |egrep '\.(c|h)xx$'" % directory)
lines = sock.readlines()
sock.close()
@@ -280,7 +281,9 @@ class Parser:
"javaunohelper" : 1,
"jvmaccess" : 1,
"jvmfwk" : 1,
+ "jurt" : 1,
"l10ntools" : 1,
+ "libreofficekit" : 1,
"lingucomponent" : 1,
"linguistic" : 1,
"lotuswordpro" : 1,
@@ -288,6 +291,8 @@ class Parser:
"o3tl" : 1,
"odk" : 1,
"officecfg" : 1,
+ "onlineupdate" : 1,
+ "opencl" : 1,
"oox" : 1,
"package" : 1,
"postprocess" : 1,
@@ -347,8 +352,10 @@ class Parser:
"xmlscript" : 1,
}
- if not directory is '.':
- sys.stderr.write("Warning: pass an absolute path to the top-level in order to use the faster white-list search\n")
+ if directory is '.':
+ sys.stderr.write("Overriding the white-list for the current directory - pass an absolute path to the top-level for faster global white-list searches.\n")
+
+ num_checked = 0
for path in lines:
baseDir = self.first_elem(path)
@@ -357,10 +364,16 @@ class Parser:
if directory is '.':
self.check_file(path.strip())
elif not baseDir in directory_whitelist:
- print ("Missing path %s " % baseDir)
+ sys.stderr.write ("\n - Error: Missing path %s -\n\n" % baseDir)
+ sys.exit(1)
elif directory_whitelist[baseDir] is 0:
-# print ("Scan path %s " % baseDir)
self.check_file(path.strip())
+ num_checked = num_checked + 1
+ elif directory_whitelist[baseDir] is 1:
+ sys.stderr.write ("Skipping whitelisted directory %s\n" % baseDir)
+ directory_whitelist[baseDir] = 2
+
+ sys.stderr.write ("Scanned %s files\n" % num_checked)
try:
Parser()