Skip to content

Commit 24e96b5

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 32e6fe8 commit 24e96b5

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
@@ -587,10 +587,12 @@ jobs:
587587
uses: ./.github/actions/setup-builder
588588
with:
589589
rust-version: stable
590-
- name: Run
590+
- name: Setup nightly Rust toolchain
591+
run: rustup toolchain install nightly --component rustfmt
592+
- name: Run cargo fmt check (including doc comments)
591593
run: |
592594
echo '' > datafusion/proto/src/generated/datafusion.rs
593-
ci/scripts/rust_fmt.sh
595+
cargo +nightly fmt --all -- --check --config format_code_in_doc_comments=true
594596
595597
# Coverage job disabled due to
596598
# https://github.com/apache/datafusion/issues/3678

0 commit comments

Comments
 (0)