Skip to content

Commit

Permalink
travis: add and run script which checks if listed files contain "unwr…
Browse files Browse the repository at this point in the history
…ap". Should fix #10446.
  • Loading branch information
matthiaskrgr committed Apr 8, 2016
1 parent a026e86 commit dc4fe7e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -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
Expand Down
15 changes: 15 additions & 0 deletions etc/ci/check_no_unwrap.sh
@@ -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[@]}"

0 comments on commit dc4fe7e

Please sign in to comment.