Commit 7b7b5b2e authored by enne@chromium.org's avatar enne@chromium.org

Fix clang-format canned check warning text

input_api.basename is a function, so printing it out yields:
"The <function basename at 0x7fccd3735410> directory requires..>"

Instead, use it to resolve the local presubmit path that has
requested clang formatting.

R=dpranke@chromium.org
BUG=422332

Review URL: https://codereview.chromium.org/665493002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292491 0039d316-1c4b-4281-b951-d872f2087c98
parent 4593f47b
......@@ -1107,7 +1107,9 @@ def CheckPatchFormatted(input_api, output_api):
if code == 2:
return [output_api.PresubmitPromptWarning(
'The %s directory requires clang-formatting. '
'Please run git cl format %s' % (input_api.basename, input_api.basename))]
'Please run git cl format %s' %
(input_api.basename(input_api.PresubmitLocalPath()),
input_api.basename(input_api.PresubmitLocalPath())))]
# As this is just a warning, ignore all other errors if the user
# happens to have a broken clang-format, doesn't use git, etc etc.
return []
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