Skip to content

Commit

Permalink
ci: Use auguwu/clippy-action@1.4.0 to run clippy
Browse files Browse the repository at this point in the history
Makes clippy warnings trigger warnings instead of hard errors,
fixing issue slog-rs#338
  • Loading branch information
Techcable committed Sep 23, 2024
1 parent 6fa18aa commit ca29a9e
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,19 +116,7 @@ jobs:
continue-on-error: false

- name: Clippy
# With the exception of nightly, we use --deny warnings to treat warnings on errors.
run: |
cargo clippy --all-targets --verbose --features "${{ matrix.features }}" -- --deny "${{ matrix.rust != 'nightly' && 'warnings' || 'clippy::correctness' }}"
# Clippy is required to succeed on hardcoded versions, and may not give any warnings.
#
# However, on automatically updated versions of rust (both stable & nightly) we allow clippy to fail.
# This is in case automatic updates have introduced new lints that would give warnings/errors
# about code that was previously allowed.
#
# This is the main reason that we have a 'hardcoded recent stable' version.
# We want as many lints from recent stable possible
# but don't want the surprises of automatic updates to our stable rust.
#
# Also, include an explicit exception for Rust 1.56.
# We don't want to deal with the fact clippy changed the names of some lints.
continue-on-error: ${{ !contains(matrix.rust, '1.') || matrix.rust == '1.56' }}
uses: auguwu/clippy-action@1.4.0
with:
check-args: --features "${{ matrix.features }}" --all-targets
token: ${{secrets.GITHUB_TOKEN}}

0 comments on commit ca29a9e

Please sign in to comment.