Skip to content

Commit 8f08a69

Browse files
committed
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>
1 parent b6df05d commit 8f08a69

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

.cirrus.yml

+8
Original file line numberDiff line numberDiff line change
@@ -320,3 +320,11 @@ task:
320320
check_script:
321321
- cargo check
322322
before_cache_script: rm -rf $CARGO_HOME/registry/index
323+
324+
# Tasks that checks if the code is formatted right using `cargo fmt` tool
325+
task:
326+
name: Rust Formatter
327+
container:
328+
image: rust:latest
329+
setup_script: rustup +$TOOLCHAIN component add rustfmt
330+
test_script: $TOOL +$TOOLCHAIN fmt --all -- --check

bors.toml

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ status = [
3333
"OpenBSD x86_64",
3434
"Redox x86_64",
3535
"Rust Stable",
36+
"Rust Formatter",
3637
"iOS aarch64",
3738
"iOS x86_64",
3839
"Illumos",

rustfmt.toml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
max_width = 80

0 commit comments

Comments
 (0)