From 863438746a0657bcb47abe80f2c19dbf9844d25d Mon Sep 17 00:00:00 2001 From: Avi Drissman Date: Wed, 7 Sep 2022 15:27:50 +0000 Subject: [PATCH] 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 Reviewed-by: Josip Sokcevic Auto-Submit: Avi Drissman --- presubmit_canned_checks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py index 0998ddd329..7dfe76ea49 100644 --- a/presubmit_canned_checks.py +++ b/presubmit_canned_checks.py @@ -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' ) % {