mirror of
https://github.com/git/git.git
synced 2026-01-10 10:13:33 +00:00
ci: check for common Rust mistakes via Clippy
Introduce a CI check that uses Clippy to perform checks for common mistakes and suggested code improvements. Clippy is the official static analyser of the Rust project and thus the de-facto standard. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
03f3900fb2
commit
4b44c46432
@@ -129,7 +129,7 @@ StaticAnalysis)
|
|||||||
RustAnalysis)
|
RustAnalysis)
|
||||||
sudo apt-get -q -y install rustup
|
sudo apt-get -q -y install rustup
|
||||||
rustup default stable
|
rustup default stable
|
||||||
rustup component add rustfmt
|
rustup component add clippy rustfmt
|
||||||
;;
|
;;
|
||||||
sparse)
|
sparse)
|
||||||
sudo apt-get -q -y install libssl-dev libcurl4-openssl-dev \
|
sudo apt-get -q -y install libssl-dev libcurl4-openssl-dev \
|
||||||
|
|||||||
@@ -9,4 +9,9 @@ then
|
|||||||
RET=1
|
RET=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ! group "Check for common Rust mistakes" cargo clippy --all-targets --all-features -- -Dwarnings
|
||||||
|
then
|
||||||
|
RET=1
|
||||||
|
fi
|
||||||
|
|
||||||
exit $RET
|
exit $RET
|
||||||
|
|||||||
Reference in New Issue
Block a user