From daec22b7dd840cda78dd0216b8c41b13dc0f40f8 Mon Sep 17 00:00:00 2001 From: "Kevin M. Godby" Date: Sat, 18 Feb 2017 13:47:59 -0600 Subject: [PATCH 1/2] Add Travis CI check for whitespace at the ends of lines. --- .travis.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.travis.yml b/.travis.yml index cc9df4af03..26e3887e75 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ env: - BUILD_TYPE=make # build using Makefile - BUILD_TYPE=manual # build manually - BUILD_TYPE=complete # build manually and regenerate figures, grammer, and cross-references + - BUILD_TYPE=check-whitespace # check for whitespace at the ends of lines script: # Build std.pdf @@ -35,6 +36,14 @@ script: pdflatex std; fi - popd + # Fail if there is whitespace at the ends of any lines + - if [ "$BUILD_TYPE" = "check-whitespace" ]; then + export TEST_STATUS=0; + grep '\s$' source/*.tex && export TEST_STATUS=1; + fi; + if [ "0$TEST_STATUS" != "00" ]; then + false; + fi; # Check to see if generated files are out-dated - pushd source - for FIGURE in *.dot; do From e054ed0436e425ce7468e755b3053047b114a50c Mon Sep 17 00:00:00 2001 From: "Kevin M. Godby" Date: Sat, 18 Feb 2017 16:45:50 -0600 Subject: [PATCH 2/2] Travis CI: Simplify whitespace test. --- .travis.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 26e3887e75..2c99e00e4f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,12 +38,8 @@ script: - popd # Fail if there is whitespace at the ends of any lines - if [ "$BUILD_TYPE" = "check-whitespace" ]; then - export TEST_STATUS=0; - grep '\s$' source/*.tex && export TEST_STATUS=1; - fi; - if [ "0$TEST_STATUS" != "00" ]; then - false; - fi; + ! grep '\s$' source/*.tex; + fi # Check to see if generated files are out-dated - pushd source - for FIGURE in *.dot; do