diff options
author | Yuchen Zeng <zyc@google.com> | 2017-01-18 18:49:07 -0800 |
---|---|---|
committer | Yuchen Zeng <zyc@google.com> | 2017-01-18 18:49:07 -0800 |
commit | 04ec4701e303b8b41d90d5ce6861689c7f0fab7f (patch) | |
tree | b37a55fead11bb07956718671aa1b1ed1bbb3991 /tools/distrib/check_copyright.py | |
parent | b0023d25dc783ba77164c03a39bb7dcc7e446fe8 (diff) | |
parent | 6da1dc87aa3384594e9ab6218b1e0886573108de (diff) |
Merge remote-tracking branch 'upstream/master' into cares_buildin
Diffstat (limited to 'tools/distrib/check_copyright.py')
-rwxr-xr-x | tools/distrib/check_copyright.py | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/tools/distrib/check_copyright.py b/tools/distrib/check_copyright.py index cb0bc38238..6218e7c4d4 100755 --- a/tools/distrib/check_copyright.py +++ b/tools/distrib/check_copyright.py @@ -90,11 +90,26 @@ LICENSE_PREFIX = { 'Makefile': r'#\s*', 'Dockerfile': r'#\s*', 'LICENSE': '', + 'BUILD': r'#\s*', } -KNOWN_BAD = set([ +_EXEMPT = frozenset(( + # Generated protocol compiler output. + 'examples/python/helloworld/helloworld_pb2.py', + 'examples/python/helloworld/helloworld_pb2_grpc.py', + 'examples/python/multiplex/helloworld_pb2.py', + 'examples/python/multiplex/helloworld_pb2_grpc.py', + 'examples/python/multiplex/route_guide_pb2.py', + 'examples/python/multiplex/route_guide_pb2_grpc.py', + 'examples/python/route_guide/route_guide_pb2.py', + 'examples/python/route_guide/route_guide_pb2_grpc.py', + + 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h', + 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c', + + # An older file originally from outside gRPC. 'src/php/tests/bootstrap.php', -]) +)) RE_YEAR = r'Copyright (?P<first_year>[0-9]+\-)?(?P<last_year>[0-9]+), Google Inc\.' @@ -142,7 +157,8 @@ except subprocess.CalledProcessError: sys.exit(0) for filename in filename_list: - if filename in KNOWN_BAD: continue + if filename in _EXEMPT: + continue ext = os.path.splitext(filename)[1] base = os.path.basename(filename) if ext in RE_LICENSE: |