From 14f6e9070ec2c1d4dad6afe32928133eaa0f3f67 Mon Sep 17 00:00:00 2001 From: Daniel Mueller Date: Mon, 17 Dec 2018 18:34:46 -0800 Subject: Enable rustfmt in the CI pipeline This change enables automated code format checking by means of the rustfmt program in the Gitlab CI pipeline. The check is performed in a third job in the hope that this helps identify problems more easily: users can see which of the jobs failed and focus on them in isolation, as opposed to having a single log file or, worse, just the results of the stages up to the first failure. This patch resolves issue #17. --- nitrocli/ci/gitlab-ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'nitrocli/ci') diff --git a/nitrocli/ci/gitlab-ci.yml b/nitrocli/ci/gitlab-ci.yml index d2301a3..c51a6bd 100644 --- a/nitrocli/ci/gitlab-ci.yml +++ b/nitrocli/ci/gitlab-ci.yml @@ -27,3 +27,9 @@ lint:clippy: -A warnings -A clippy::float_cmp -A clippy::cast_ptr_alignment - cargo clean --package=nitrocli - cargo clippy --all-targets --all-features -- -D warnings + +format:rustfmt: + script: + - rustup component add rustfmt + - cd nitrocli + - cargo fmt --all -- --check -- cgit v1.2.1