presubmit: add bypass-check-license instruction in the failure message

https://crrev.com/c/6842238 added the bypass instructions to
the presubmit failure messages, but it missed one place.

Bug: 435696543
Change-Id: Ic48b4cd3ba0f9797b48ff7e54f7a25b8c83a686b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6858267
Auto-Submit: Scott Lee <ddoman@chromium.org>
Commit-Queue: Scott Lee <ddoman@chromium.org>
Reviewed-by: Brian Egizi <begizi@google.com>
changes/67/6858267/2
Scott Lee 3 months ago committed by LUCI CQ
parent 57f57b0960
commit 18fc4e5507

@ -852,8 +852,12 @@ def CheckLicense(input_api,
if bad_new_files:
if license_re_param:
error_message = ('License on new files must match:\n\n%s\n' %
license_re_param)
error_message = (
'License on new files must match:\n\n{lp}\n\n'
'To bypass this check, add {k}: <reason> in the description.\n'
'If this check fails for non-exceptional cases, consider '
'tuning the PRESUBMIT.py instead.').format(
lp=license_re_param, k=_BYPASS_CHECK_LICENSE_FOOTER)
else:
# Verbatim text that can be copy-pasted into new files (possibly
# adjusting the leading comment delimiter).

Loading…
Cancel
Save