diff options
author | Lars Wirzenius <liw@liw.fi> | 2013-04-17 12:48:17 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2013-04-17 12:48:17 +0100 |
commit | a0e631308e5d6caa558c02f1efc1b823d0f36788 (patch) | |
tree | f3371e68398969b8b5105f643ccd0eefc6dfc556 | |
parent | ee5ad3d650942cd6e48d04bea95c0df8c9b4ad62 (diff) | |
download | license-summary-a0e631308e5d6caa558c02f1efc1b823d0f36788.tar.gz |
List files without a summary
-rwxr-xr-x | license-summary | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/license-summary b/license-summary index 9dda1c0..1103f13 100755 --- a/license-summary +++ b/license-summary @@ -33,6 +33,7 @@ class LicenseSummary(cliapp.Application): def setup(self): self.pat = re.compile(r'=\*= [Ll]icen[cs]es?:\s*(?P<summary>\S.*\S)\s*=\*=') self.summaries = {} + self.filenames = set() def cleanup(self): for s in sorted(self.summaries.keys()): @@ -40,8 +41,15 @@ class LicenseSummary(cliapp.Application): self.output.write('%s (%d):\n' % (s, len(ss))) for filename in ss: self.output.write('\t%s\n' % filename) + if filename in self.filenames: + self.filenames.remove(filename) + if self.filenames: + self.output.write('no summary (%d):\n' % len(self.filenames)) + for filename in sorted(self.filenames): + self.output.write('\t%s\n' % filename) def process_input_line(self, filename, line): + self.filenames.add(filename) m = self.pat.search(line) if m: s = m.group('summary') |