Skip to content

Commit

Permalink
Merge #1748
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
bors[bot] and costinsin authored Jun 24, 2022
2 parents 2c7bb2a + 3e6cb63 commit a45e9f8
Show file tree
Hide file tree
Showing 51 changed files with 4,358 additions and 2,961 deletions.
8 changes: 8 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 change: 1 addition & 0 deletions bors.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ status = [
"OpenBSD x86_64",
"Redox x86_64",
"Rust Stable",
"Rust Formatter",
"iOS aarch64",
"iOS x86_64",
"Illumos",
Expand Down
1 change: 1 addition & 0 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
max_width = 80
Loading

0 comments on commit a45e9f8

Please sign in to comment.