]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
github-ci: fail if cargo clippy --fix creates a changes
authorJason Ish <jason.ish@oisf.net>
Fri, 2 Dec 2022 14:26:03 +0000 (08:26 -0600)
committerVictor Julien <vjulien@oisf.net>
Sat, 3 Dec 2022 05:37:47 +0000 (06:37 +0100)
Previously this was doing fixups and only warning, not erroring. Which
could made the following clippy command pass.

.github/workflows/rust.yml

index 60f5ab2bcfbb3106ff37f4f07c30426babea3e11..70c72cbb13933a6e0a5e1ae0bf0d2fb36c6302b0 100644 (file)
@@ -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