Skip to content

Commit 6f7c4fa

Browse files
ci: enforce doc comment code formatting with nightly rustfmt
- Install nightly Rust toolchain with rustfmt component - Use cargo +nightly fmt to check both regular code and doc comments - Replace stable fmt check with nightly to avoid formatting conflicts
1 parent d57e215 commit 6f7c4fa

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/rust.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -624,10 +624,12 @@ jobs:
624624
uses: ./.github/actions/setup-builder
625625
with:
626626
rust-version: stable
627-
- name: Run
627+
- name: Setup nightly Rust toolchain
628+
run: rustup toolchain install nightly --component rustfmt
629+
- name: Run cargo fmt check (including doc comments)
628630
run: |
629631
echo '' > datafusion/proto/src/generated/datafusion.rs
630-
ci/scripts/rust_fmt.sh
632+
cargo +nightly fmt --all -- --check --config format_code_in_doc_comments=true
631633
632634
# Coverage job disabled due to
633635
# https://github.com/apache/datafusion/issues/3678

0 commit comments

Comments
 (0)