aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/distrib/check_copyright.py
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2017-06-07 06:44:47 +0200
committerGravatar Jan Tattermusch <jtattermusch@google.com>2017-06-08 11:22:40 +0200
commit312ea4a1874acebc056f142fc65ac434165de0a4 (patch)
tree121bec5ed687da0374a0f58a11ac9e1826222e09 /tools/distrib/check_copyright.py
parent6b19d3b408903a9a91727d1dfd4cd1704433cfe7 (diff)
change LICENSE, add AUTHORS
Diffstat (limited to 'tools/distrib/check_copyright.py')
-rwxr-xr-xtools/distrib/check_copyright.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/distrib/check_copyright.py b/tools/distrib/check_copyright.py
index 0a58adf2f0..888d973d85 100755
--- a/tools/distrib/check_copyright.py
+++ b/tools/distrib/check_copyright.py
@@ -63,8 +63,9 @@ argp.add_argument('--precommit',
args = argp.parse_args()
# open the license text
-with open('LICENSE') as f:
- LICENSE = f.read().splitlines()
+with open('NOTICE.txt') as f:
+ LICENSE_NOTICE = f.read().splitlines()
+
# license format by file extension
# key is the file extension, value is a format string
@@ -89,7 +90,7 @@ LICENSE_PREFIX = {
'.mak': r'#\s*',
'Makefile': r'#\s*',
'Dockerfile': r'#\s*',
- 'LICENSE': '',
+ 'LICENSE': r'\s*',
'BUILD': r'#\s*',
}
@@ -118,12 +119,12 @@ _EXEMPT = frozenset((
))
-RE_YEAR = r'Copyright (?P<first_year>[0-9]+\-)?(?P<last_year>[0-9]+), Google Inc\.'
+RE_YEAR = r'Copyright (?P<first_year>[0-9]+\-)?(?P<last_year>[0-9]+) gRPC authors.'
RE_LICENSE = dict(
(k, r'\n'.join(
LICENSE_PREFIX[k] +
(RE_YEAR if re.search(RE_YEAR, line) else re.escape(line))
- for line in LICENSE))
+ for line in LICENSE_NOTICE))
for k, v in LICENSE_PREFIX.iteritems())
if args.precommit: