Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Use auguwu/clippy-action@1.4.0 to run clippy #339

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 9 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ env:

jobs:
test:
permissions:
# Needed for auguwu/clippy-action
checks: write
# Only run on PRs if the source branch is on someone else's repo
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}

Expand Down Expand Up @@ -116,19 +119,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}}
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

* ci: Make clippy warnings give CI warnings, not errors

### 2.8.0-beta.2 - 2024-01-05

* Add `ErrorRef` wrapper to enable logging error references (PR #327)
Expand Down
Loading