diff options
Diffstat (limited to 'license-summary')
-rwxr-xr-x | license-summary | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/license-summary b/license-summary index bc2494a..22b7181 100755 --- a/license-summary +++ b/license-summary @@ -23,6 +23,7 @@ import cliapp import re +import sys __version__ = '0.0' @@ -55,6 +56,17 @@ class LicenseSummary(cliapp.Application): if without_summary: self.report_group('no summary', without_summary) + if self.settings['check']: + error = 0 + if without_summary: + sys.stderr.write( + 'ERROR: The following files have no license summary:\n') + for filename in sorted(without_summary): + sys.stderr.write(' %s\n' % filename) + error = 1 + + sys.exit(error) + def report_group(self, summary, filenames): self.output.write('%s (%d):\n' % (summary, len(filenames))) for filename in sorted(filenames): |