|
@@ -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
|