aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nitrocli/ci/gitlab-ci.yml14
1 files changed, 14 insertions, 0 deletions
diff --git a/nitrocli/ci/gitlab-ci.yml b/nitrocli/ci/gitlab-ci.yml
index 2da774c..d2301a3 100644
--- a/nitrocli/ci/gitlab-ci.yml
+++ b/nitrocli/ci/gitlab-ci.yml
@@ -13,3 +13,17 @@ build:cargo:
- apt-get install --assume-yes libudev-dev libhidapi-dev
- rustc --version && cargo --version
- cd nitrocli && cargo build --all --verbose
+
+lint:clippy:
+ script:
+ - rustup component add clippy
+ # First check and build everything but be very permissive. Then clean
+ # only the nitrocli package artifacts. Lastly check once more, but
+ # with warnings turned to errors. This last run will only recheck
+ # nitrocli (everything else is still up-to-date). That procedure is
+ # necessary because consumed dependencies may emit errors otherwise.
+ - cd nitrocli
+ - cargo clippy --all-targets --all-features --
+ -A warnings -A clippy::float_cmp -A clippy::cast_ptr_alignment
+ - cargo clean --package=nitrocli
+ - cargo clippy --all-targets --all-features -- -D warnings