From 655b77b4ddc8982c3c747f5553abb83801b09a0b Mon Sep 17 00:00:00 2001 From: Luis Schwab Date: Fri, 16 May 2025 11:12:34 -0300 Subject: [PATCH] chore: create rustfmt.toml, update CI to use nightly for fmt job --- .github/pull_request_template.md | 2 +- .github/workflows/cont_integration.yml | 5 ++--- rustfmt.toml | 3 +++ 3 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 rustfmt.toml diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 42afd7e3..ace7e2cf 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -20,7 +20,7 @@ of the PR were done in a specific way --> * [ ] I've signed all my commits * [ ] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) -* [ ] I ran `cargo fmt` and `cargo clippy` before committing +* [ ] I ran `cargo +nightly fmt` and `cargo clippy` before committing #### New Features: diff --git a/.github/workflows/cont_integration.yml b/.github/workflows/cont_integration.yml index f4ad6114..3d2943d7 100644 --- a/.github/workflows/cont_integration.yml +++ b/.github/workflows/cont_integration.yml @@ -126,7 +126,6 @@ jobs: run: cargo check --target wasm32-unknown-unknown --no-default-features --features bdk_core/hashbrown,async fmt: - needs: prepare name: Rust fmt runs-on: ubuntu-latest steps: @@ -137,12 +136,12 @@ jobs: - name: Install Rust toolchain uses: actions-rs/toolchain@v1 with: - toolchain: ${{ needs.prepare.outputs.rust_version }} + toolchain: nightly override: true profile: minimal components: rustfmt - name: Check fmt - run: cargo fmt --all -- --config format_code_in_doc_comments=true --check + run: cargo fmt --all --check clippy_check: needs: prepare diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 00000000..505d959b --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1,3 @@ +comment_width = 100 +format_code_in_doc_comments = true +wrap_comments = true -- 2.49.0