From 611a4b0531c06a4ac7dd5d9ee254baae079aa208 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Wed, 29 Apr 2020 17:20:49 +0200 Subject: force clippy to fail on warnings There is "cargo clippy -- -D warnings", but that stops after the first warning - and it displays them as an error. Not really the best solution. The hacky workaround here is to make the script have a non-zero return status when it found warnings, but still display them as warnings only. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 88cdb4e..e7c755f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,4 +14,4 @@ clippy: before_script: - rustup component add clippy script: - - cargo clippy + - if cargo clippy 2>&1 | tee /dev/stderr | egrep "^(warning|error):" >/dev/null ; then exit 1 ; else exit 0 ; fi -- cgit v1.2.3