mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
fix: rustcheck not work in CI (#43302)
relate: https://github.com/milvus-io/milvus/issues/42806 Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
This commit is contained in:
parent
b69e601fe1
commit
097f4ce17a
5
Makefile
5
Makefile
@ -145,10 +145,13 @@ cppcheck:
|
||||
@#(env bash ${PWD}/scripts/core_build.sh -l)
|
||||
@(env bash ${PWD}/scripts/check_cpp_fmt.sh)
|
||||
|
||||
rustcheck:
|
||||
rustfmt:
|
||||
@echo "Running cargo format"
|
||||
@env bash ${PWD}/scripts/run_cargo_format.sh ${PWD}/internal/core/thirdparty/tantivy/tantivy-binding/
|
||||
|
||||
rustcheck:
|
||||
@echo "Running cargo check"
|
||||
@env bash ${PWD}/scripts/run_cargo_format.sh ${PWD}/internal/core/thirdparty/tantivy/tantivy-binding/ --check
|
||||
|
||||
fmt:
|
||||
ifdef GO_DIFF_FILES
|
||||
|
||||
@ -1,6 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
(
|
||||
cd $1
|
||||
cargo fmt
|
||||
cd "$1" || exit 1
|
||||
|
||||
if [ "$2" == "--check" ]; then
|
||||
if ! cargo fmt --all -- --check; then
|
||||
echo "Rust code is not properly formatted."
|
||||
exit 1
|
||||
fi
|
||||
echo "Check rust format success"
|
||||
else
|
||||
cargo fmt --all
|
||||
fi
|
||||
|
||||
exit 0
|
||||
)
|
||||
Loading…
x
Reference in New Issue
Block a user