summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorDany Marcoux <dmarcoux@posteo.de>2022-05-23 17:04:25 +0200
committerGitHub <noreply@github.com>2022-05-23 11:04:25 -0400
commitd8d95d572a1723bda4bd32b9fa17ce6dd6a22bb6 (patch)
tree7f7b255585132c67aa7c161befc98eb380e5abb0 /.github
parent1fc9ad1f52f417d74de05f9c7c5a56d329d19561 (diff)
Add GitHub workflow for Clippy (#173)
* Add GitHub workflow for Clippy Closes #158 * Fix errors found by clippy::needless-borrow https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow * Fix errors found by clippy::collapsible-else-if https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if * Fix error found by clippy::single-match https://rust-lang.github.io/rust-clippy/master/index.html#single_match
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/clippy.yml27
1 files changed, 27 insertions, 0 deletions
diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml
new file mode 100644
index 0000000..aee7015
--- /dev/null
+++ b/.github/workflows/clippy.yml
@@ -0,0 +1,27 @@
+name: Clippy - Catch common mistakes and improve your Rust code
+
+on:
+ push:
+ branches: [dev, main]
+ pull_request:
+ branches: [dev, main]
+
+jobs:
+ check:
+ name: Clippy - Catch common mistakes and improve your Rust code
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ rust: [stable]
+ steps:
+ - uses: actions/checkout@v2
+ - name: Install minimal ${{ matrix.rust }} rust
+ uses: actions-rs/toolchain@v1
+ with:
+ override: true
+ profile: minimal
+ components: clippy
+ toolchain: ${{ matrix.rust }}
+ - run: cargo -Vv && rustc -Vv
+ - run: cargo clippy -- --deny clippy::all --warn clippy::cargo
+ if: ${{ matrix.rust == 'stable' }}