summaryrefslogtreecommitdiff
path: root/ci/run-rust-checks.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ci/run-rust-checks.sh')
-rwxr-xr-xci/run-rust-checks.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/ci/run-rust-checks.sh b/ci/run-rust-checks.sh
new file mode 100755
index 0000000000..b5ad9e8dc6
--- /dev/null
+++ b/ci/run-rust-checks.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+. ${0%/*}/lib.sh
+
+set +x
+
+if ! group "Check Rust formatting" cargo fmt --all --check
+then
+ RET=1
+fi
+
+if ! group "Check for common Rust mistakes" cargo clippy --all-targets --all-features -- -Dwarnings
+then
+ RET=1
+fi
+
+if ! group "Check for minimum required Rust version" cargo msrv verify
+then
+ RET=1
+fi
+
+exit $RET