From bb5ba377365fbb5818c974f5ebaa4716154bb21f Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Tue, 9 May 2017 01:34:14 +0200 Subject: Detect trailing whitespace --- .travis.yml | 1 + whitespace.sh | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100755 whitespace.sh diff --git a/.travis.yml b/.travis.yml index 693b6bf69..ca2b5a12a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,6 +21,7 @@ install: - cd agbcc && ./build.sh && ./install.sh $TRAVIS_BUILD_DIR script: - cd $TRAVIS_BUILD_DIR + - ./whitespace.sh - ./build_tools.sh - make -j2 compare_ruby - make -j2 compare_ruby_rev1 diff --git a/whitespace.sh b/whitespace.sh new file mode 100755 index 000000000..7075fbd4e --- /dev/null +++ b/whitespace.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +if grep -Enr "\s+\$" src; then + # Trailing whitespace detected + exit 1 +fi -- cgit v1.2.3