Skip to content

Commit daec22b

Browse files
committed
Add Travis CI check for whitespace at the ends of lines.
1 parent 2c7c506 commit daec22b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.travis.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ env:
77
- BUILD_TYPE=make # build using Makefile
88
- BUILD_TYPE=manual # build manually
99
- BUILD_TYPE=complete # build manually and regenerate figures, grammer, and cross-references
10+
- BUILD_TYPE=check-whitespace # check for whitespace at the ends of lines
1011

1112
script:
1213
# Build std.pdf
@@ -35,6 +36,14 @@ script:
3536
pdflatex std;
3637
fi
3738
- popd
39+
# Fail if there is whitespace at the ends of any lines
40+
- if [ "$BUILD_TYPE" = "check-whitespace" ]; then
41+
export TEST_STATUS=0;
42+
grep '\s$' source/*.tex && export TEST_STATUS=1;
43+
fi;
44+
if [ "0$TEST_STATUS" != "00" ]; then
45+
false;
46+
fi;
3847
# Check to see if generated files are out-dated
3948
- pushd source
4049
- for FIGURE in *.dot; do

0 commit comments

Comments
 (0)