File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 9
9
set -o pipefail
10
10
11
11
CLANGFORMAT=${CLANGFORMAT:- clang-format-18}
12
+ RUSTFMT=${RUSTFMT:- rustfmt}
12
13
13
14
command -v git > /dev/null 2>&1 || { echo >&2 " git is missing" ; exit 1; }
14
15
command -v xargs > /dev/null 2>&1 || { echo >&2 " xargs is missing" ; exit 1; }
@@ -37,3 +38,9 @@ if git --no-pager diff --diff-filter=d --name-only ${TARGET_BRANCH} HEAD | grep
37
38
git --no-pager diff
38
39
exit 1
39
40
fi
41
+
42
+ RUST_SOURCES=$( git --no-pager diff --diff-filter=d --name-only ${TARGET_BRANCH} HEAD | grep -E " ^src/rust.*\.rs\$ " | grep -v -E " ^src/rust/vendor" || true)
43
+ if [ -n " $RUST_SOURCES " ] ; then
44
+ echo $RUST_SOURCES
45
+ " $RUSTFMT " --check $RUST_SOURCES
46
+ fi
Original file line number Diff line number Diff line change 6
6
# Deny warnings in rust. CI will fail to compile any code with warnings in it.
7
7
export RUSTFLAGS=" -Dwarnings"
8
8
9
- # Check style for C
9
+ # Check style for C and Rust
10
10
./.ci/check-style
11
11
12
12
# Check that we can generate protobuf definitions for python
You can’t perform that action at this time.
0 commit comments