mirror of
https://gitee.com/openharmony/third_party_rust_nix
synced 2024-11-27 01:20:41 +00:00
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:
parent
b6df05d63e
commit
8f08a69c28
@ -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
|
@ -33,6 +33,7 @@ status = [
|
||||
"OpenBSD x86_64",
|
||||
"Redox x86_64",
|
||||
"Rust Stable",
|
||||
"Rust Formatter",
|
||||
"iOS aarch64",
|
||||
"iOS x86_64",
|
||||
"Illumos",
|
||||
|
1
rustfmt.toml
Normal file
1
rustfmt.toml
Normal file
@ -0,0 +1 @@
|
||||
max_width = 80
|
Loading…
Reference in New Issue
Block a user