Skip to content

Commit 4d329d3

Browse files
committed
Merge branch 'travis'
2 parents e0297c4 + 0073fb4 commit 4d329d3

File tree

3 files changed

+26
-10
lines changed

3 files changed

+26
-10
lines changed

.travis.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
11
language: ruby
22
rvm:
33
- 1.9.3
4-
script: rake ci
54
env:
6-
- CLANG_VERSION="3.4"
7-
- CLANG_VERSION="3.5"
5+
- CLANG_VERSION="3.7"
6+
- CLANG_VERSION="3.8"
7+
88
install:
9-
- sudo sh -c "echo 'deb http://llvm.org/apt/precise/ llvm-toolchain-precise-${CLANG_VERSION} main' >> /etc/apt/sources.list"
10-
- wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
11-
- sudo apt-get -qq update
12-
- sudo apt-get -qq --force-yes install clang-format-${CLANG_VERSION}
139
- bundle install
1410
- clang-format-${CLANG_VERSION} -version || true
11+
12+
script:
13+
- CLANG_FORMAT=clang-format-${CLANG_VERSION} rake ci
14+
15+
addons:
16+
apt:
17+
sources:
18+
- llvm-toolchain-precise
19+
- llvm-toolchain-precise-3.7
20+
- ubuntu-toolchain-r-test
21+
packages:
22+
- g++-4.9
23+
- clang-format-3.7
24+
- clang-format-3.8

t/clang_format_spec.vim

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@
44
" helpers "{{{
55
" clang-format detection
66
function! s:detect_clang_format()
7-
for candidate in ['clang-format-3.4', 'clang-format', 'clang-format-HEAD', 'clang-format-3.5']
8-
if executable(candidate)
9-
return candidate
7+
if $CLANG_FORMAT !=# '' && executable($CLANG_FORMAT)
8+
return $CLANG_FORMAT
9+
endif
10+
11+
for suffix in ['-HEAD', '-3.8', '-3.7', '-3.6', '-3.5', '-3.4', '']
12+
let c = 'clang-format' . suffix
13+
if executable(c)
14+
return c
1015
endif
1116
endfor
1217
throw 'not ok because detect clang-format could not be found in $PATH'

t/test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
function(){console.log('this');console.log('is');console.log('test')}

0 commit comments

Comments
 (0)