From 556925da1c8ca00081ffd49813e52030ea1bdbc5 Mon Sep 17 00:00:00 2001 From: Anthony Jones Date: Thu, 30 Jan 2014 14:27:44 +1300 Subject: [PATCH] Bug 965120 - Use .clang-format to set tree default format; r=gps --- .clang-format | 1 + .clang-format-ignore | 1 + tools/mach_commands.py | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 00000000000..dc33c722457 --- /dev/null +++ b/.clang-format @@ -0,0 +1 @@ +BasedOnStyle: Mozilla diff --git a/.clang-format-ignore b/.clang-format-ignore index bf61670b313..5863a94d729 100644 --- a/.clang-format-ignore +++ b/.clang-format-ignore @@ -1,2 +1,3 @@ \mfbt/ \js/ +\media/ diff --git a/tools/mach_commands.py b/tools/mach_commands.py index d76a284157d..74229dadb9a 100644 --- a/tools/mach_commands.py +++ b/tools/mach_commands.py @@ -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)