[depot_tools] Clarify error message for license headers.

The license header check error message can't distinguish between new and
moved files.  We don't want to update the year for moved files, so
clarify instructions for that case.

Bug: 1457007
Change-Id: I47471e56a5d9889b7315d9ad6dd8a5dd5cfe956f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4641350
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Mark Foltz <mfoltz@chromium.org>
changes/50/4641350/3
mark a. foltz 2 years ago committed by LUCI CQ
parent 98d3bb27f0
commit 90fed30866

@ -765,8 +765,10 @@ def CheckLicense(input_api, output_api, license_re_param=None,
}
error_message = (
'License on new files must be:\n\n%s\n' % new_license_text +
'(adjusting the comment delimiter accordingly).\n\n')
error_message += 'Found a bad license header in these new files:'
'(adjusting the comment delimiter accordingly).\n\n' +
'If this is a moved file, then update the license but do not ' +
'update the year.\n\n')
error_message += 'Found a bad license header in these new or moved files:'
results.append(output_api.PresubmitError(error_message,
items=bad_new_files))
if wrong_year_new_files:

Loading…
Cancel
Save