Skip to content

Commit ebc55fa

Browse files
committed
Checking for lint during builds, fixed cpplint imports
1 parent 2d1879b commit ebc55fa

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ addons:
1313
- clang-3.8
1414
- cmake-data
1515
- cmake
16+
before_install:
17+
- wget https://raw.githubusercontent.com/cpplint/cpplint/master/cpplint.py
1618
script:
17-
- ./scripts.sh lint
19+
- ./scripts.sh lintci
1820
- ./scripts.sh install
1921
- ./scripts.sh build

scripts.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ function lint() {
1818
cpplint --linelength=120 main.cpp tutorials/*/*/**
1919
}
2020

21+
function lintci() {
22+
python cpplint.py --linelength=120 main.cpp tutorials/*/*/**
23+
}
24+
2125
if [ $1 = "install" ]
2226
then
2327
install
@@ -27,4 +31,7 @@ then
2731
elif [ $1 = "lint" ]
2832
then
2933
lint
34+
elif [ $1 = "lintci" ]
35+
then
36+
lintci
3037
fi

0 commit comments

Comments
 (0)