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

HACK: Use my fork of auguwu/clippy-action to support "features" input.
  • Loading branch information
Techcable committed Sep 23, 2024
1 parent 6fa18aa commit d33debc
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,19 +116,9 @@ 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' }}
# TODO: Use actual auguwu/clippy-action action instead of my fork
uses: Techcable/clippy-action@input/features
with:
check-args: --all-targets
features: "${{ matrix.features }}"
token: ${{secrets.GITHUB_TOKEN}}

0 comments on commit d33debc

Please sign in to comment.