diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2016-02-10 15:21:10 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2016-02-10 15:49:16 +0000 |
commit | 25ff833c14b681c37f397199370188196d81371c (patch) | |
tree | 2c2f5c9a7428c81488b3c6bde367ac83d2e4d557 /bin | |
parent | 76d34bbc2696fdcfe9719f6fa70c4ef81af0c2be (diff) |
find-german-comments: misc. cleanups and fixes for altered tree.
Change-Id: I6d6f3488afd71cb782bd83fea9fa11a2e52d0efe
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/find-german-comments | 21 |
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() |