travis: add and run script which checks if listed files contain "unwrap". Should fix #10446.

This commit is contained in:
Matthias Krüger 2016-04-08 20:11:08 +02:00
parent a026e86267
commit dc4fe7e337
2 changed files with 16 additions and 0 deletions

View file

@ -16,6 +16,7 @@ matrix:
- ./mach test-compiletest
- bash etc/ci/lockfile_changed.sh
- bash etc/ci/manifest_changed.sh
- bash etc/ci/check_no_unwrap.sh
cache:
directories:
- .cargo

15
etc/ci/check_no_unwrap.sh Executable file
View file

@ -0,0 +1,15 @@
#!/bin/bash
#
# Make sure listed files do not contain "unwrap"
set -o errexit
set -o nounset
set -o pipefail
cd $(git rev-parse --show-toplevel) # cd into repo root so make sure paths works in any case
# files that should not contain "unwrap"
FILES=("components/compositing/compositor.rs"
"components/compositing/pipeline.rs"
"components/compositing/constellation.rs")
! grep -n "unwrap(" "${FILES[@]}"