Bug 965120 - Use .clang-format to set tree default format; r=gps

This commit is contained in:
Anthony Jones 2014-01-30 14:27:44 +13:00
parent 147a7bcbdb
commit a4c0bcf9b0
3 changed files with 3 additions and 1 deletions

1
.clang-format Normal file
View File

@ -0,0 +1 @@
BasedOnStyle: Mozilla

View File

@ -1,2 +1,3 @@
\mfbt/
\js/
\media/

View File

@ -356,7 +356,7 @@ class FormatProvider(MachCommandBase):
from subprocess import Popen, PIPE
p1 = Popen(["hg", "diff", "-U0", "-r", "tip^", "--include", "glob:**.c", "--include", "glob:**.cpp",
"--include", "glob:**.h", "--exclude", "listfile:.clang-format-ignore"], stdout=PIPE)
args = [sys.executable, clang_format_diff, "-p1", "-style=Mozilla"]
args = [sys.executable, clang_format_diff, "-p1"]
if not show:
args.append("-i")
p2 = Popen(args, stdin=p1.stdout)