servo/etc/ci/check_no_unwrap.sh
2016-04-29 11:10:33 -05:00

15 lines
429 B
Bash
Executable file

#!/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(\|panic!(" "${FILES[@]}"