From 87636dccd404a340d75acb1d96301581343f29ca Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Fri, 26 Apr 2019 14:42:40 -0700 Subject: Add clang-format-diff hook (#2057) This adds a commit hook to Travis CI that errors out if incoming PRs' diffs are not clang-formatted. Turns out clang-format is also capable of formatting JavaScript, but we haven't agreed on a style for JS yet, this PR disables JavaScript formatting for now. This also adds clang-format exempt header/footer to a generated source file. --- .clang-format | 6 ++++++ 1 file changed, 6 insertions(+) (limited to '.clang-format') diff --git a/.clang-format b/.clang-format index 9ca4dd982..cedadcbd0 100644 --- a/.clang-format +++ b/.clang-format @@ -1,3 +1,5 @@ +--- +Language: Cpp BasedOnStyle: LLVM PointerAlignment: Left IndentCaseLabels: true @@ -6,3 +8,7 @@ ConstructorInitializerIndentWidth: 2 SpaceAfterTemplateKeyword: false BinPackArguments: false BinPackParameters: false +--- +Language: JavaScript +DisableFormat: true +--- -- cgit v1.2.3