Skip to content

Commit a45e9f8

Browse files
bors[bot]costinsin
andauthored
Merge #1748
1748: Add format test to CI r=rtzoeller a=costinsin To enforce uniformity for all PRs, the CI checks if the code is formatted right using `cargo fmt` tool. Results after implementing the format test in CicleCI, but before fixing the format errors: https://cirrus-ci.com/build/4684991404703744 Results after fixing the format errors: https://cirrus-ci.com/build/5423803479097344 Solves #770 Co-authored-by: Costin-Robert Sin <sin.costinrobert@gmail.com>
2 parents 2c7bb2a + 3e6cb63 commit a45e9f8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+4358
-2961
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)