Commit 0680c697 authored by nick@chromium.org's avatar nick@chromium.org

git_cl format: allow WebKit style to be picked up from .clang-format

BUG=240309
TEST='git cl format' and 'git cl format --full' indent by 4 when run inside of third_party/WebKit
TBR=iannucci@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@245694 0039d316-1c4b-4281-b951-d872f2087c98
parent c8270632
...@@ -2358,7 +2358,7 @@ def CMDformat(parser, args): ...@@ -2358,7 +2358,7 @@ def CMDformat(parser, args):
if not files: if not files:
print "Nothing to format." print "Nothing to format."
return 0 return 0
RunCommand([clang_format_tool, '-i', '-style', 'Chromium'] + files, RunCommand([clang_format_tool, '-i'] + files,
cwd=top_dir) cwd=top_dir)
else: else:
env = os.environ.copy() env = os.environ.copy()
...@@ -2370,7 +2370,7 @@ def CMDformat(parser, args): ...@@ -2370,7 +2370,7 @@ def CMDformat(parser, args):
except clang_format.NotFoundError, e: except clang_format.NotFoundError, e:
DieWithError(e) DieWithError(e)
cmd = [sys.executable, script, '-p0', '-style', 'Chromium', '-i'] cmd = [sys.executable, script, '-p0', '-i']
RunCommand(cmd, stdin=diff_output, cwd=top_dir, env=env) RunCommand(cmd, stdin=diff_output, cwd=top_dir, env=env)
......
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