mirror of
https://github.com/openharmony/third_party_rust_nix.git
synced 2026-06-30 21:27:54 -04: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:
@@ -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",
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
max_width = 80
|
||||
Reference in New Issue
Block a user