Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1004)

Unified Diff: presubmit_canned_checks.py

Issue 143903006: Support passing files/directories to git cl format (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Change canned check to only check directory Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« git_cl.py ('K') | « git_cl.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: presubmit_canned_checks.py
diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py
index d52ad9582df3a2c2e81809054a903f0754694ca6..bc8c3934d6a6630e30587d71098eba8b2f54c497 100644
--- a/presubmit_canned_checks.py
+++ b/presubmit_canned_checks.py
@@ -1045,8 +1045,8 @@ def PanProjectChecks(input_api, output_api,
def CheckPatchFormatted(input_api, output_api):
import git_cl
- code, _ = git_cl.RunGitWithCode(['cl', 'format', '--dry-run'],
- suppress_stderr=True)
+ cmd = ['cl', 'format', '--dry-run', input_api.PresubmitLocalPath()]
+ code, _ = git_cl.RunGitWithCode(cmd, suppress_stderr=True)
if code == 2:
return [output_api.PresubmitPromptWarning(
'Your patch is not formatted, please run git cl format.')]
« git_cl.py ('K') | « git_cl.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698