From: Luis Schwab Date: Fri, 16 May 2025 14:12:34 +0000 (-0300) Subject: chore: create rustfmt.toml, update CI to use nightly for fmt job X-Git-Tag: core-0.6.0~4^2~1 X-Git-Url: http://internal-gitweb-vhost/script/%22https:/database/scripts/static/struct.CheckPointIter.html?a=commitdiff_plain;h=655b77b4ddc8982c3c747f5553abb83801b09a0b;p=bdk chore: create rustfmt.toml, update CI to use nightly for fmt job --- 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