-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathcheck.sh
executable file
·35 lines (26 loc) · 1.03 KB
/
check.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env bash
# This scripts runs various CI-like checks in a convenient way.
set -eu
script_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
cd "$script_path/.."
set -x
# Checks all tests, lints etc.
# Basically does what the CI does.
cargo +1.81 install --quiet typos-cli
export RUSTFLAGS="-D warnings"
export RUSTDOCFLAGS="-D warnings" # https://github.com/emilk/egui/pull/1454
# Fast checks first:
typos
./scripts/lint.py
cargo fmt --all -- --check
cargo deny check
cargo doc --quiet --lib --no-deps --all-features
cargo doc --quiet --document-private-items --no-deps --all-features
cargo clippy --quiet --all-targets --all-features -- -D warnings
CLIPPY_CONF_DIR="scripts/clippy_wasm" cargo clippy --quiet --target wasm32-unknown-unknown --lib -- -D warnings
cargo check --quiet --all-targets
cargo check --quiet --all-targets --no-default-features
cargo check --quiet --all-targets --all-features
cargo test --quiet --all-targets --all-features
cargo test --quiet --doc # slow - checks all doc-tests
echo "All checks passed."