From 1a49bc85b8d7c2f7c478703d82227513a2a87406 Mon Sep 17 00:00:00 2001 From: link2xt Date: Sat, 11 Feb 2023 11:55:00 +0000 Subject: [PATCH] Add scripts/clippy.sh The script makes it easier to manually check REPL and benchmark code with clippy without the need to copy-paste all the flags. --- .github/workflows/ci.yml | 2 +- scripts/README.md | 2 ++ scripts/clippy.sh | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100755 scripts/clippy.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9942addf3..20c35c127 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: override: true - name: Cache rust cargo artifacts uses: swatinem/rust-cache@v2 - - run: cargo clippy --workspace --tests --examples --benches -- -D warnings + - run: scripts/clippy.sh docs: name: Rust doc comments diff --git a/scripts/README.md b/scripts/README.md index 2036d9fc7..9523e257c 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -6,6 +6,8 @@ and an own build machine. ## Description of scripts +- `clippy.sh` runs `cargo clippy` for all Rust code in the project. + - `../.github/workflows` contains jobs run by GitHub Actions. - `remote_tests_python.sh` rsyncs to a build machine and runs diff --git a/scripts/clippy.sh b/scripts/clippy.sh new file mode 100755 index 000000000..d9cfcd5de --- /dev/null +++ b/scripts/clippy.sh @@ -0,0 +1,3 @@ +#!/bin/sh +# Run clippy for all Rust code in the project. +cargo clippy --workspace --tests --examples --benches -- -D warnings