mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
travis: add and run script which checks if listed files contain "unwrap". Should fix #10446.
This commit is contained in:
parent
a026e86267
commit
dc4fe7e337
2 changed files with 16 additions and 0 deletions
|
@ -16,6 +16,7 @@ matrix:
|
||||||
- ./mach test-compiletest
|
- ./mach test-compiletest
|
||||||
- bash etc/ci/lockfile_changed.sh
|
- bash etc/ci/lockfile_changed.sh
|
||||||
- bash etc/ci/manifest_changed.sh
|
- bash etc/ci/manifest_changed.sh
|
||||||
|
- bash etc/ci/check_no_unwrap.sh
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- .cargo
|
- .cargo
|
||||||
|
|
15
etc/ci/check_no_unwrap.sh
Executable file
15
etc/ci/check_no_unwrap.sh
Executable 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[@]}"
|
Loading…
Add table
Add a link
Reference in a new issue