Clippy #7824
Workflow file for this run
This file contains hidden or 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
| name: Clippy | |
| on: | |
| pull_request: | |
| merge_group: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| toolchains: | |
| name: Determine toolchains | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| toolchains: ${{ steps.toolchains.outputs.toolchains }} | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| persist-credentials: false | |
| - id: toolchains | |
| uses: mozilla/actions/toolchains@7cca521fd0ace71bc6ee830c4a98297023e3402b # v1.1.18 | |
| clippy: | |
| name: cargo clippy | |
| needs: toolchains | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-24.04, macos-15, windows-2025] | |
| rust-toolchain: ${{ fromJSON(needs.toolchains.outputs.toolchains) }} | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| persist-credentials: false | |
| - uses: mozilla/actions/rust@7cca521fd0ace71bc6ee830c4a98297023e3402b # v1.1.18 | |
| with: | |
| version: ${{ matrix.rust-toolchain }} | |
| components: clippy | |
| tools: cargo-hack | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - id: nss-version | |
| uses: ./.github/actions/minimum-version | |
| with: | |
| directory: . | |
| - uses: mozilla/actions/nss@7cca521fd0ace71bc6ee830c4a98297023e3402b # v1.1.18 | |
| with: | |
| minimum-version: ${{ steps.nss-version.outputs.minimum }} | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| # Run clippy and tests across all meaningful feature combinations. Using | |
| # --all-targets (not --no-dev-deps) ensures test code is also compiled | |
| # and linted for each combination. Excluded features are either empty | |
| # (ci, test-fixture, gecko), benchmarking-only (bench), or have their | |
| # own dedicated workflow (build-fuzzing-corpus). | |
| - run: cargo hack clippy --locked --feature-powerset --all-targets --exclude-features gecko,ci,bench,build-fuzzing-corpus,test-fixture --mutually-exclusive-features blapi,disable-encryption,default -- -D warnings | |
| - run: cargo doc --locked --workspace --no-deps --document-private-items | |
| env: | |
| RUSTDOCFLAGS: "--deny rustdoc::broken_intra_doc_links --deny warnings" |