File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,32 @@ language: cpp
33jobs :
44 include :
55
6+ - stage : Linter + Doxygen + non-debug Ubuntu/gcc-5 test
7+ env : NAME="clang-format"
8+ addons :
9+ apt :
10+ packages :
11+ - clang-format-3.8
12+ install :
13+ script : |
14+ # Apparently update-alternatives doesn't work in Travis containers
15+ mkdir -p priority-symlinks
16+ ln -s /usr/bin/clang-format-3.8 priority-symlinks/clang-format
17+ export PATH=${PWD}/priority-symlinks:${PATH}
18+
19+ # Now we can do the formatting pass
20+ clang-format --version
21+ git-clang-format-3.8 "${TRAVIS_BRANCH}"
22+ git diff --color > formatted.diff
23+ if [[ -s formatted.diff ]] ; then
24+ echo 'Formatting error! Apply the following diff and resubmit:'
25+ cat formatted.diff
26+ exit 1
27+ fi
28+ echo 'No formatting errors found'
29+ exit 0
30+ before_cache :
31+
632 - &linter-stage
733 stage : Linter + Doxygen + non-debug Ubuntu/gcc-5 test
834 env : NAME="CPP-LINT"
You can’t perform that action at this time.
0 commit comments