Skip to content

Commit

Permalink
feat(.github): run cargo clippy on each crate individually
Browse files Browse the repository at this point in the history
> Use cargo-hack to run clippy on each crate individually with its
> respective default features only. Can reveal warnings otherwise
> hidden given that a plain cargo clippy combines all features of the
> workspace. See e.g. #1695.
  • Loading branch information
mxinden committed Feb 29, 2024
1 parent ad027cf commit cde3814
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,13 @@ jobs:
if: success() || failure()

- name: Clippy
run: cargo +${{ matrix.rust-toolchain }} clippy --all-targets -- -D warnings || ${{ matrix.rust-toolchain == 'nightly' }}
run: |
# Use cargo-hack to run clippy on each crate individually with its
# respective default features only. Can reveal warnings otherwise
# hidden given that a plain cargo clippy combines all features of the
# workspace. See e.g. https://github.com/mozilla/neqo/pull/1695.
cargo +${{ matrix.rust-toolchain }} install cargo-hack
cargo +${{ matrix.rust-toolchain }} hack clippy --all-targets -- -D warnings || ${{ matrix.rust-toolchain == 'nightly' }}
if: success() || failure()

- name: Check rustdoc links
Expand Down

0 comments on commit cde3814

Please sign in to comment.