File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -109,6 +109,21 @@ jobs:
109109 - uses : actions/checkout@v1
110110 with :
111111 submodules : true
112- - name : Install Rust
113- run : rustup update stable && rustup default stable && rustup component add rustfmt
112+ - name : Install stable `rustfmt`
113+ run : rustup set profile minimal && rustup default stable && rustup component add rustfmt
114114 - run : cargo fmt -- --check
115+
116+ clippy :
117+ name : Clippy
118+ runs-on : ubuntu-latest
119+ steps :
120+ - uses : actions/checkout@v1
121+ with :
122+ submodules : true
123+ # Unlike rustfmt, stable clippy does not work on code with nightly features.
124+ # This acquires the most recent nightly with a clippy component.
125+ - name : Install nightly `clippy`
126+ run : |
127+ $CLIPPY_NIGHTLY="nightly-$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/clippy)"
128+ rustup set profile minimal && rustup default "$CLIPPY_NIGHTLY" && rustup component add clippy
129+ - run : cargo clippy -- -D clippy::all
Original file line number Diff line number Diff line change @@ -59,6 +59,9 @@ pub trait Int:
5959 const FUZZ_NUM : usize ;
6060
6161 fn unsigned ( self ) -> Self :: UnsignedInt ;
62+
63+ // It makes writing macros easier if this is implemented for both signed and unsigned
64+ #[ allow( clippy:: wrong_self_convention) ]
6265 fn from_unsigned ( unsigned : Self :: UnsignedInt ) -> Self ;
6366
6467 fn from_bool ( b : bool ) -> Self ;
You can’t perform that action at this time.
0 commit comments