-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
43441c8
commit 6b545af
Showing
3 changed files
with
30 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,9 +105,30 @@ jobs: | |
# Keep the name 'udeps' to match original action name, so we don't need to define specific branch | ||
# rules on Github for specific version branches. | ||
udeps: | ||
machete: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Run Machete (detect unused dependencies) | ||
uses: bnjbvr/cargo-machete@main | ||
|
||
|
||
udeps: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@master | ||
name: "Rust Toolchain Setup" | ||
with: | ||
toolchain: nightly-2024-01-12 | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: Noelware/[email protected] | ||
with: | ||
version: ${{env.PROTOC_VERSION}} | ||
|
||
- name: "Download and run cargo-udeps" | ||
run: | | ||
wget -O - -c https://github.com/est31/cargo-udeps/releases/download/v0.1.35/cargo-udeps-v0.1.35-x86_64-unknown-linux-gnu.tar.gz | tar -xz | ||
cargo-udeps-*/cargo-udeps udeps | ||
env: | ||
RUSTUP_TOOLCHAIN: nightly-2024-01-12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -125,44 +125,6 @@ jobs: | |
|
||
- run: cargo +nightly-2024-01-12 fmt --all -- --check | ||
|
||
udeps: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@master | ||
name: "Rust Toolchain Setup" | ||
with: | ||
toolchain: nightly-2024-01-12 | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: Noelware/[email protected] | ||
with: | ||
version: ${{env.PROTOC_VERSION}} | ||
|
||
- name: "Download and run cargo-udeps" | ||
run: | | ||
wget -O - -c https://github.com/est31/cargo-udeps/releases/download/v0.1.35/cargo-udeps-v0.1.35-x86_64-unknown-linux-gnu.tar.gz | tar -xz | ||
cargo-udeps-*/cargo-udeps udeps | ||
env: | ||
RUSTUP_TOOLCHAIN: nightly-2024-01-12 | ||
|
||
clippy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: clippy | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: Noelware/[email protected] | ||
with: | ||
version: ${{env.PROTOC_VERSION}} | ||
|
||
- run: echo "Skipping clippy for now" | ||
- run: > | ||
cargo clippy --workspace --all-targets --all-features -- -D warnings | ||
-D future-incompatible -D nonstandard-style -D rust-2018-idioms -D unused | ||
-D clippy::unwrap_used -A clippy::blocks_in_conditions # This is because of a bug in tracing: https://github.com/tokio-rs/tracing/issues/2876 | ||
doc: | ||
runs-on: ubuntu-latest | ||
env: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
#!/bin/bash | ||
|
||
cargo clippy "$@" --all-targets --all-features | ||
# TODO: Revert clippy::unwrap_used to -D after fixing all the unwraps. | ||
cargo clippy --workspace --all-targets --all-features -- \ | ||
-D future-incompatible \ | ||
-D nonstandard-style \ | ||
-D rust-2018-idioms \ | ||
-D unused \ | ||
-A clippy::unwrap_used \ | ||
-A clippy::blocks_in_conditions # This is because of a bug in tracing: https://github.com/tokio-rs/tracing/issues/2876 |