diff options
-rw-r--r-- | NEWS | 3 | ||||
-rwxr-xr-x | deheader | 12 |
2 files changed, 10 insertions, 5 deletions
@@ -1,5 +1,8 @@ deheader project news +0.6 + Add the return-status macros from sys/wait.h to the portability list. + 0.5 @ 2010-12-22 Source is now checked against all SuS portability requrements. There is an option to exclude files by pattern. @@ -1220,8 +1220,6 @@ class InclusionMap: return filename.endswith(".c") or filename.endswith(".cpp") def __init__(self, roots, ignore, excludes, verbosity): "Build the initial inclusion map." - if excludes: - excludes = re.compile(excludes) self.verbosity = verbosity self.files = [] compiled = [] @@ -1441,7 +1439,7 @@ class Summary: result.unneeded = self.unneeded + other.unneeded return result def __repr__(self): - return "%d files, %d includes, %d removed" % \ + return "%d files, %d includes, %d removable" % \ (len(self.filenames), len(self.includes), len(self.unneeded)) if __name__ == "__main__": @@ -1452,7 +1450,7 @@ if __name__ == "__main__": verbose = 0 remove = False ignores = [] - excludes = None + excludes = [] for (switch, val) in options: if switch in ('-h', '--help'): sys.stderr.write(__doc__) @@ -1469,11 +1467,15 @@ if __name__ == "__main__": print "deheader", version raise SystemExit, 0 elif switch in ('-x', '--exclude'): - excludes = val + excludes.append(val) if not ignores: ignore = None else: ignore = re.compile("|".join(ignores)) + if not excludes: + excludes = None + else: + excludes = re.compile("|".join(excludes)) if not arguments: arguments = ["."] |