Rename check_no_unwrap.sh to check_no_panic.sh

This commit is contained in:
6br 2016-04-30 13:45:06 +09:00
parent e4fcc066d1
commit 81f2faeb96
3 changed files with 3 additions and 4 deletions

26
etc/ci/check_no_panic.sh Executable file
View file

@ -0,0 +1,26 @@
#!/usr/bin/env bash
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Make sure listed files do not use unwrap() or panic!()
set -o errexit
set -o nounset
set -o pipefail
# cd into repo root to make sure paths work in any case
cd "$(git rev-parse --show-toplevel)"
FILES=("components/compositing/compositor.rs"
"components/constellation/constellation.rs"
"components/constellation/pipeline.rs"
"ports/glutin/lib.rs"
"ports/glutin/window.rs")
# make sure the files exist
ls -1 "${FILES[@]}"
# make sure the files do not contain "unwrap" or "panic!"
! grep --line-number --with-filename "unwrap(\|panic!(" "${FILES[@]}"