-
Notifications
You must be signed in to change notification settings - Fork 40
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
Fix clippy lints and run clippy in CI #29
Changes from 10 commits
d23492c
03b905b
e3640c3
d16e9f2
f2e6269
87c3617
3de03b5
ee40f54
2f562f2
08679d0
a32caee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,22 @@ jobs: | |
- name: Check style | ||
run: cargo fmt -- --check | ||
|
||
clippy-lint: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
# actions/checkout@v2 | ||
- uses: actions/checkout@28c7f3d2b5162b5ddd3dfd9a45aa55eaf396478b | ||
- name: Run Clippy Lints | ||
# TODO: Migrate these options to a config file in the workspace, | ||
# once https://github.com/rust-lang/rust-clippy/issues/6625 is resolved. | ||
# | ||
# - field_reassign_with_default: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this comment just here to remind ourselves in the future that we should drop this exception? If so can you file an issue instead? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, I'll do that now: #32 |
||
# Fixed by https://github.com/rust-lang/rust-clippy/issues/6344 | ||
# Fix exists on nightly, not on stable. | ||
run: > | ||
cargo clippy -- -D warnings | ||
-A clippy::field_reassign_with_default | ||
|
||
build-and-test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my understanding, if people run
cargo clippy
, that won't use the same configuration that the CI check will, right? I see that a config file isn't supported yet, but is there something we can do so that a developer runningcargo clippy
will get the right thing? There seem to be a few options here:rust-lang/rust-clippy#1313
Maybe we can put attributes into particular files or globally in lib.rs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I'll go with the lib.rs route - that seems like a good approach!