Add format test to CI

To enforce uniformity for all PRs, the CI checks if the code
is formatted rigth using `cargo fmt` tool.

Signed-off-by: Costin-Robert Sin <sin.costinrobert@gmail.com>
This commit is contained in:
Costin-Robert Sin
2022-06-19 15:28:40 +03:00
parent cf677b335f
commit 8012ad379b
3 changed files with 10 additions and 0 deletions
+8
View File
@@ -320,3 +320,11 @@ task:
check_script:
- cargo check
before_cache_script: rm -rf $CARGO_HOME/registry/index
# Tasks that checks if the code is formatted right using `cargo fmt` tool
task:
name: Rust Formatter
container:
image: rust:latest
setup_script: rustup +$TOOLCHAIN component add rustfmt
test_script: $TOOL +$TOOLCHAIN fmt --all -- --check
+1
View File
@@ -33,6 +33,7 @@ status = [
"OpenBSD x86_64",
"Redox x86_64",
"Rust Stable",
"Rust Formatter",
"iOS aarch64",
"iOS x86_64",
"Illumos",
+1
View File
@@ -0,0 +1 @@
max_width = 80