summaryrefslogtreecommitdiff
path: root/scripts/check-copyright-year
diff options
context:
space:
mode:
authorAdam Coldrick <adam.coldrick@codethink.co.uk>2015-03-24 12:10:22 +0000
committerAdam Coldrick <adam.coldrick@codethink.co.uk>2015-03-24 12:10:31 +0000
commit966634f677af417e310512e547c1d5f7d05c7bbd (patch)
tree798d05ce07975dfd72e071dd2dac42ee6895fe00 /scripts/check-copyright-year
parent886d17d40c7bf0ee5ef2d8ff68bd0daa2d1215c4 (diff)
downloadmorph-966634f677af417e310512e547c1d5f7d05c7bbd.tar.gz
Ignore files in the copyright check script
Add the ability to ignore files when checking copyright years, and start ignoring the COPYING file. Change-Id: I0cc11456f896e27458357ab0c5729223c71b406e
Diffstat (limited to 'scripts/check-copyright-year')
-rwxr-xr-xscripts/check-copyright-year4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/check-copyright-year b/scripts/check-copyright-year
index 08bee0af..5a458954 100755
--- a/scripts/check-copyright-year
+++ b/scripts/check-copyright-year
@@ -28,6 +28,7 @@ class CheckCopyrightYear(cliapp.Application):
pat = re.compile(r'^[ #/*]*Copyright\s+(\(C\)\s*)'
r'(?P<years>[0-9, -]+)')
+ ignore = ['COPYING']
def add_settings(self):
self.settings.boolean(['verbose', 'v'], 'be more verbose')
@@ -54,6 +55,9 @@ class CheckCopyrightYear(cliapp.Application):
return filenames
def process_input_line(self, filename, line):
+ if filename in self.ignore:
+ return
+
m = self.pat.match(line)
if not m:
return