aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2018-12-17 18:34:46 -0800
committerDaniel Mueller <deso@posteo.net>2018-12-17 18:34:46 -0800
commit14f6e9070ec2c1d4dad6afe32928133eaa0f3f67 (patch)
tree50f3e09ef35e4343c42185caf72f47b5bfda18d0
parent97accf1ddd79bb69dfb74742a0518c40830657e4 (diff)
downloadnitrocli-14f6e9070ec2c1d4dad6afe32928133eaa0f3f67.tar.gz
nitrocli-14f6e9070ec2c1d4dad6afe32928133eaa0f3f67.tar.bz2
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.
-rw-r--r--nitrocli/CHANGELOG.md4
-rw-r--r--nitrocli/ci/gitlab-ci.yml6
2 files changed, 10 insertions, 0 deletions
diff --git a/nitrocli/CHANGELOG.md b/nitrocli/CHANGELOG.md
index 6ed2a1d..6eda412 100644
--- a/nitrocli/CHANGELOG.md
+++ b/nitrocli/CHANGELOG.md
@@ -6,6 +6,10 @@ Unreleased
`nitrokey-sys` version `3.4.1` as well as `rand` version `0.4.3` as
indirect dependencies
- Removed the `hid`, `hidapi-sys` and `pkg-config` dependencies
+- Enabled CI pipeline comprising code style conformance checks, linting,
+ and building of the project
+- Added badges indicating pipeline status, current `crates.io` published
+ version of the crate, and minimum version of `rustc` required
0.1.3
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