2020-10-29 22:03:07 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
if [[ -z "${CI}" ]]; then
|
|
|
|
FEAT="use-compiled-tools"
|
|
|
|
else
|
|
|
|
FEAT="use-installed-tools"
|
|
|
|
fi
|
|
|
|
|
|
|
|
function clippy() {
|
|
|
|
echo ::group::"$1"
|
|
|
|
cargo clippy \
|
|
|
|
--manifest-path "$1/Cargo.toml" \
|
|
|
|
--no-default-features \
|
|
|
|
--features "$FEAT" \
|
|
|
|
--all-targets \
|
|
|
|
-- -D warnings
|
|
|
|
echo ::endgroup::
|
|
|
|
}
|
|
|
|
|
|
|
|
function clippy_no_features() {
|
|
|
|
echo ::group::"$1"
|
|
|
|
cargo clippy \
|
|
|
|
--manifest-path "$1/Cargo.toml" \
|
|
|
|
--all-targets \
|
|
|
|
-- -D warnings
|
|
|
|
echo ::endgroup::
|
|
|
|
}
|
|
|
|
|
|
|
|
# Core crates
|
2020-11-02 10:26:10 +00:00
|
|
|
clippy crates/rustc_codegen_spirv
|
|
|
|
clippy crates/spirv-builder
|
2020-10-29 22:03:07 +00:00
|
|
|
|
|
|
|
# Examples
|
2020-10-30 13:58:38 +00:00
|
|
|
|
2020-10-30 18:38:47 +00:00
|
|
|
clippy examples/runners/ash
|
|
|
|
clippy examples/runners/wgpu
|
2020-10-30 13:58:38 +00:00
|
|
|
|
2020-10-30 18:38:47 +00:00
|
|
|
clippy_no_features examples/runners/cpu
|
|
|
|
clippy_no_features examples/shaders/sky-shader
|
|
|
|
clippy_no_features examples/shaders/simplest-shader
|