Commit 86343874 authored by Avi Drissman's avatar Avi Drissman Committed by LUCI CQ

Adjust copyright regex

As per the lawyers, the preferred style has no period after "Authors"
when the "all rights" sentence is dropped. Adjust the regex to not
match a period when there is no "all rights" sentence.

Bug: 1098010
Change-Id: Ib4103c09f9d02d58b9294643bbedd72fc895bbe2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3876526
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: 's avatarJosip Sokcevic <sokcevic@google.com>
Auto-Submit: Avi Drissman <avi@chromium.org>
parent 600fdf58
......@@ -656,8 +656,8 @@ def CheckLicense(input_api, output_api, license_re=None, project_name=None,
# "All rights reserved" is also deprecated, but tolerate it until it's
# removed from all files.
license_re = (
r'.*? Copyright (\(c\) )?%(year)s The %(project)s Authors\.'
r'( All rights reserved\.)?\r?\n'
r'.*? Copyright (\(c\) )?%(year)s The %(project)s Authors'
r'(\. All rights reserved\.)?\r?\n'
r'.*? %(key_line)s\r?\n'
r'.*? found in the LICENSE file\.(?: \*/)?\r?\n'
) % {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment