aboutsummaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2020-04-29 17:20:49 +0200
committerDaniel Schadt <kingdread@gmx.de>2020-04-29 17:30:25 +0200
commit611a4b0531c06a4ac7dd5d9ee254baae079aa208 (patch)
tree9b3263435dab3e063f816b20e648e036c2578425 /.gitlab-ci.yml
parentf0e363e15374cc518cdbf3dcec1a94bd5f4db35b (diff)
downloadevtclib-611a4b0531c06a4ac7dd5d9ee254baae079aa208.tar.gz
evtclib-611a4b0531c06a4ac7dd5d9ee254baae079aa208.tar.bz2
evtclib-611a4b0531c06a4ac7dd5d9ee254baae079aa208.zip
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.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml2
1 files changed, 1 insertions, 1 deletions
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