From 9e4abbce2c6b6998ac2200015d89d0089e461175 Mon Sep 17 00:00:00 2001 From: Brian Swetland Date: Wed, 15 Jun 2016 18:43:07 -0700 Subject: [PATCH] [build] enforce specific version of clang format And ajust .clang-format options to work with the version we fetch. Change-Id: I58c6d99160eb7820652c68d5d86d864e75f45e3d --- .clang-format | 3 +++ scripts/clang-fmt | 8 ++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.clang-format b/.clang-format index adecd81da..e53befcd4 100644 --- a/.clang-format +++ b/.clang-format @@ -2,6 +2,9 @@ Language: Cpp ColumnLimit: 0 UseTab: Never IndentWidth: 4 +IndentCaseLabels: false +AlignAfterOpenBracket: Align +SpacesBeforeTrailingComments: 1 BreakBeforeBraces: Attach AccessModifierOffset: -4 DerivePointerAlignment: false diff --git a/scripts/clang-fmt b/scripts/clang-fmt index ce5c2ec9f..5c46c20f3 100755 --- a/scripts/clang-fmt +++ b/scripts/clang-fmt @@ -14,14 +14,10 @@ fi # There might be more than one clang-format tool, specially if chromium's # depot tools are in the path. Try to use the system one. -CLANGFMT=/usr/bin/clang-format +CLANGFMT=./clang-format if [ ! -f $CLANGFMT ]; then - # try local dir - CLANGFMT=./clang-format -fi -if [ ! -f $CLANGFMT ]; then - echo "$CLANGFMT not found. Go to http://llvm.org/releases/ to get it." + echo "$CLANGFMT not found. Run scripts/fetch-clang-fmt to get it." exit 0 fi