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
This commit is contained in:
fischman@webrtc.org 2014-05-23 17:27:18 +00:00
parent 546961a9d3
commit 18f41b8eb4
2 changed files with 3 additions and 2 deletions

View File

@ -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'

View File

@ -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'