diff --git a/.cirrus.yml b/.cirrus.yml index ae184f86e4..dfdb466418 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -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 component add rustfmt + test_script: $TOOL +$TOOLCHAIN fmt --all -- --check \ No newline at end of file diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 0000000000..5c8d9318b3 --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1 @@ +max_width = 80 \ No newline at end of file