Skip to content

Commit

Permalink
Only check trailing spaces for dart and don't check for CRLF (flutter…
Browse files Browse the repository at this point in the history
  • Loading branch information
liyuqian committed Jul 26, 2018
1 parent 9f8285a commit 76e9f79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions travis/format.sh
Expand Up @@ -61,10 +61,10 @@ if [[ $FAILED_CHECKS -ne 0 ]]; then
exit 1
fi

FILETYPES="*.c *.cc *.cpp *.h *.m *.mm *.dart"
FILETYPES="*.dart"

set +e
TRAILING_SPACES=$(git diff $DIFF_OPTS $BASE_SHA..HEAD -- $FILETYPES | xargs grep --line-number --with-filename '\s\+$')
TRAILING_SPACES=$(git diff $DIFF_OPTS $BASE_SHA..HEAD -- $FILETYPES | xargs grep --line-number --with-filename '[[:blank:]]\+$')
set -e

if [[ ! -z "$TRAILING_SPACES" ]]; then
Expand Down

0 comments on commit 76e9f79

Please sign in to comment.