From a4c0bcf9b0e77b74ff84829b581d5d68cd1530ea 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 000000000000..dc33c722457c --- /dev/null +++ b/.clang-format @@ -0,0 +1 @@ +BasedOnStyle: Mozilla diff --git a/.clang-format-ignore b/.clang-format-ignore index bf61670b3137..5863a94d729b 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 d76a284157d4..74229dadb9a7 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)