not fmt, clippy linter
This commit is contained in:
@@ -18,13 +18,13 @@ jobs:
|
|||||||
git \
|
git \
|
||||||
cargo \
|
cargo \
|
||||||
rust \
|
rust \
|
||||||
rustfmt
|
rust-clippy
|
||||||
|
|
||||||
- name: Rustfmt
|
- name: Clippy
|
||||||
run: |
|
run: |
|
||||||
if [ -n "$(find . -name "Cargo.toml" -print -quit)" ]; then
|
if [ -n "$(find . -name "Cargo.toml" -print -quit)" ]; then
|
||||||
find . -name "Cargo.toml" -print0 | while IFS= read -r -d '' manifest; do
|
find . -name "Cargo.toml" -print0 | while IFS= read -r -d '' manifest; do
|
||||||
cargo fmt --check --manifest-path "$manifest"
|
cargo clippy --manifest-path "$manifest" -- -D warnings
|
||||||
done
|
done
|
||||||
elif [ -n "$(find . -name "*.rs" -print -quit)" ]; then
|
elif [ -n "$(find . -name "*.rs" -print -quit)" ]; then
|
||||||
echo "Rust files found but no Cargo.toml"
|
echo "Rust files found but no Cargo.toml"
|
||||||
|
|||||||
Reference in New Issue
Block a user