From 966634f677af417e310512e547c1d5f7d05c7bbd Mon Sep 17 00:00:00 2001 From: Adam Coldrick Date: Tue, 24 Mar 2015 12:10:22 +0000 Subject: 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 --- scripts/check-copyright-year | 4 ++++ 1 file changed, 4 insertions(+) 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[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 -- cgit v1.2.1