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: Josip Sokcevic <sokcevic@google.com>
Auto-Submit: Avi Drissman <avi@chromium.org>
changes/26/3876526/2
Avi Drissman 3 years ago committed by LUCI CQ
parent 600fdf58c9
commit 863438746a

@ -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'
) % {

Loading…
Cancel
Save