mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
Merge forbidden panic check into test-tidy
This cleans up the GitHub actions yaml a bit and ensures that developers are running this check locally before submitting changes. In addition, it allows adding tests for this check. Finally, this change fixes the tidy tests by upgrading voluptuous for Python 3.10 as well as by reverting an inadvertent change for NixOS compatibility on one of the dummy testing files.
This commit is contained in:
parent
259ccff491
commit
ec9cbeefd8
8 changed files with 26 additions and 40 deletions
|
@ -1,34 +0,0 @@
|
|||
#!/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 https://mozilla.org/MPL/2.0/.
|
||||
|
||||
# Make sure listed paths 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)"
|
||||
|
||||
# Each path can be either a single file or a directory
|
||||
PATHS=(
|
||||
"components/compositing/compositor.rs"
|
||||
"components/constellation/"
|
||||
"ports/winit/headed_window.rs"
|
||||
"ports/winit/headless_window.rs"
|
||||
"ports/winit/embedder.rs"
|
||||
)
|
||||
|
||||
# Make sure the paths exist
|
||||
ls -1 "${PATHS[@]}"
|
||||
|
||||
# Make sure the files do not contain "unwrap" or "panic!"
|
||||
! grep \
|
||||
--dereference-recursive \
|
||||
--line-number \
|
||||
--with-filename \
|
||||
"unwrap(\|panic!(" \
|
||||
"${PATHS[@]}"
|
Loading…
Add table
Add a link
Reference in a new issue