File tree Expand file tree Collapse file tree 2 files changed +60
-1
lines changed
Expand file tree Collapse file tree 2 files changed +60
-1
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ BraceWrapping:
3333 BeforeCatch : false
3434 BeforeElse : false
3535 IndentBraces : false
36- BreakBeforeBinaryOperators : None
36+ BreakBeforeBinaryOperators : false
3737BreakBeforeBraces : Custom
3838BreakBeforeTernaryOperators : true
3939BreakConstructorInitializersBeforeComma : false
Original file line number Diff line number Diff line change 1+ sudo : false
2+
3+ language : cpp
4+
5+ addons : &addons
6+ apt :
7+ packages : timeout
8+ sources : &sources
9+ - ubuntu-toolchain-r-test
10+ - llvm-toolchain-precise-3.9
11+
12+ cache :
13+ apt : true
14+ ccache : true
15+
16+ # Do not build our sync branch.
17+ branches :
18+ only :
19+ - master
20+
21+ matrix :
22+ # Abort all builds on a single failing matrix entry.
23+ fast_finish : true
24+
25+ include :
26+ # There seems to be a hard limit to how many machines a Travis build will
27+ # across all platforms. By interleaving OS X, the hope is to get in the
28+ # queue faster while not blocking Linux builds from occuring.
29+ - os : linux
30+ addons :
31+ apt :
32+ sources : *sources
33+ packages : ['clang-format-3.9']
34+ compiler : clang
35+
36+ script :
37+ - |
38+ if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
39+ BASE_COMMIT=$(git rev-parse $TRAVIS_BRANCH)
40+ echo "Running clang-format-3.9 against branch $TRAVIS_BRANCH, with hash $BASE_COMMIT"
41+ RESULT_OUTPUT="$(git-clang-format-3.9 --commit $BASE_COMMIT --diff --binary `which clang-format-3.9`)"
42+
43+ if [ "$RESULT_OUTPUT" == "no modified files to format" ] \
44+ || [ "$RESULT_OUTPUT" == "clang-format did not modify any files" ] ; then
45+
46+ echo "clang-format passed."
47+ exit 0
48+ else
49+ echo "clang-format failed:"
50+ echo "To reproduce it locally please run git-clang-format-3.9 --commit $BASE_COMMIT --diff --binary \`which clang-format-3.9\`"
51+ echo "$RESULT_OUTPUT"
52+ exit 1
53+ fi
54+ fi
55+
56+ on_failure :
57+ -|
58+ echo "Showing current directory contents"
59+ ls -la
You can’t perform that action at this time.
0 commit comments