From 18f41b8eb4da76d6ab4b8c6bf142412dc4a4f4f4 Mon Sep 17 00:00:00 2001 From: "fischman@webrtc.org" Date: Fri, 23 May 2014 17:27:18 +0000 Subject: [PATCH] PRESUBMIT.py: accept variants on the copyright message that are present in the codebase. Example files that this makes ok instead of flagging include: talk/base/signalthread_unittest.cc talk/base/thread_unittest.cc webrtc/base/signalthread_unittest.cc webrtc/base/thread.cc webrtc/base/thread.h webrtc/base/thread_unittest.cc BUG=1027 R=andrew@webrtc.org Review URL: https://webrtc-codereview.appspot.com/19539006 git-svn-id: http://webrtc.googlecode.com/svn/trunk@6235 4adac7df-926f-26a2-2b94-8c16560cd09d --- talk/PRESUBMIT.py | 1 + webrtc/PRESUBMIT.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/talk/PRESUBMIT.py b/talk/PRESUBMIT.py index aa46bb4ae..8e1a2e394 100644 --- a/talk/PRESUBMIT.py +++ b/talk/PRESUBMIT.py @@ -49,6 +49,7 @@ def _LicenseHeader(input_api): current_year = int(input_api.time.strftime('%Y')) allowed_years = (str(s) for s in reversed(xrange(2004, current_year + 1))) years_re = '(' + '|'.join(allowed_years) + ')' + years_re = '%s(--%s)?' % (years_re, years_re) license_header = ( r'.*? libjingle\n' r'.*? Copyright %(year)s,? Google Inc\.\n' diff --git a/webrtc/PRESUBMIT.py b/webrtc/PRESUBMIT.py index c29ffeeb0..4132c1687 100644 --- a/webrtc/PRESUBMIT.py +++ b/webrtc/PRESUBMIT.py @@ -13,8 +13,8 @@ def _LicenseHeader(input_api): allowed_years = (str(s) for s in reversed(xrange(2003, current_year + 1))) years_re = '(' + '|'.join(allowed_years) + ')' license_header = ( - r'.*? Copyright \(c\) %(year)s The WebRTC project authors\. ' - r'All Rights Reserved\.\n' + r'.*? Copyright( \(c\))? %(year)s The WebRTC [Pp]roject [Aa]uthors\. ' + r'All [Rr]ights [Rr]eserved\.\n' r'.*?\n' r'.*? Use of this source code is governed by a BSD-style license\n' r'.*? that can be found in the LICENSE file in the root of the source\n'