add clippy to CI
This commit is contained in:
parent
5221cef1fc
commit
500c8e0b2c
2 changed files with 18 additions and 2 deletions
|
|
@ -109,6 +109,20 @@ jobs:
|
|||
- uses: actions/checkout@v1
|
||||
with:
|
||||
submodules: true
|
||||
- name: Install Rust
|
||||
run: rustup update stable && rustup default stable && rustup component add rustfmt
|
||||
- name: Install stable `rustfmt`
|
||||
run: rustup set profile minimal && rustup default stable && rustup component add rustfmt
|
||||
- run: cargo fmt -- --check
|
||||
|
||||
clippy:
|
||||
name: Clippy
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
submodules: true
|
||||
# Unlike rustfmt, stable clippy does not work on code with nightly features.
|
||||
# This acquires the most recent nightly with a clippy component.
|
||||
- name: Install nightly `clippy`
|
||||
run: |
|
||||
rustup set profile minimal && rustup default "nightly-$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/clippy)" && rustup component add clippy
|
||||
- run: cargo clippy -- -D clippy::all
|
||||
|
|
|
|||
|
|
@ -210,6 +210,8 @@ macro_rules! int_impl {
|
|||
self
|
||||
}
|
||||
|
||||
// It makes writing macros easier if this is implemented for both signed and unsigned
|
||||
#[allow(clippy::wrong_self_convention)]
|
||||
fn from_unsigned(me: $uty) -> Self {
|
||||
me
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue