Skip to content

Commit

Permalink
Test files in this repository for correct formatting during CI build
Browse files Browse the repository at this point in the history
Build fails from:
- Trailing whitespace
- True tabs
- No newline at end of file
  • Loading branch information
per1234 committed Jan 24, 2018
1 parent dd203c1 commit 7cdc050
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ before_install:
# Check for issues in the script
- bash -c 'shopt -s globstar; shellcheck arduino-ci-script.sh'

# Check for trailing whitespace in all files in the repository
- "if grep --line-number --recursive --exclude-dir=.git '[[:blank:]]$' .; then echo 'Trailing whitespace found.'; false; fi"
# Check for tabs in all files in the repository
- "if grep --line-number --recursive --exclude-dir=.git $'\t' .; then echo 'Tab found.'; false; fi"
# Check if all files in the repository end in a newline (https://stackoverflow.com/a/25686825)
- find . -path ./.git -prune -o -type f -print0 | xargs -0 -L1 bash -c 'if test "$(tail --bytes=1 "$0")"; then echo "No new line at end of $0"; false; fi'

- source "${TRAVIS_BUILD_DIR}/arduino-ci-script.sh"

- set_script_verbosity "$VERBOSITY_LEVEL"
Expand Down

2 comments on commit 7cdc050

@arduino-ci-script-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arduino-ci-script-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once completed, the job reports for Travis CI build 605 will be found at:
https://github.com/per1234/CI-reports/tree/arduino-ci-script/build_00605

Please sign in to comment.