From 01badea65c2e5140b996a916e1c48db1b1bc2487 Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Fri, 2 Dec 2022 08:26:03 -0600 Subject: [PATCH] github-ci: fail if cargo clippy --fix creates a changes Previously this was doing fixups and only warning, not erroring. Which could made the following clippy command pass. --- .github/workflows/rust.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 60f5ab2bcf..70c72cbb13 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -71,7 +71,8 @@ jobs: - run: | diff=$(git diff) if [ "${diff}" ]; then - echo "::warning ::Clippy --fix made changes, please fix" + echo "::error ::Clippy --fix made changes, please fix" + exit 1 fi - run: cargo clippy --all-features working-directory: rust -- 2.47.2