Skip to content

Conversation

@tcharding
Copy link
Member

@tcharding tcharding commented Nov 21, 2022

We recently introduced rustfmt to the codebase but I forgot to turn it on in CI.

  • Patch 1: Preparatory formatting fixes, introduced since we merged the formatting PR
  • Patch 2: Enable formatting in CI
  • Patch 3: Add formatting to the pre-commit hook

Currently we are not running the formatter in CI, in preparation for
doing so run `cargo +nightly fmt` to clear all current formatting
issues.

No manual changes.
Add code to the CI script, guarded on env var `DO_FMT` to run the
formatter.

Add a formatting job to the nightly CI job as a separate step, in a
similar fashion to how the other nightly steps are done.
To save devs getting frustrated by CI; add a call to `cargo +nightly
fmt` to our git pre-commit hook.
Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 75f3886

@apoelstra apoelstra merged commit ba47a25 into rust-bitcoin:master Nov 22, 2022
@tcharding tcharding deleted the 11-22-rustfmt-in-ci branch November 23, 2022 18:30
chain-forgexcr45 added a commit to chain-forgexcr45/rust-secp256k1 that referenced this pull request Sep 28, 2025
75f3886812a70aa7821d3de38bf2e8c94cfd9ef4 Add cargo fmt to pre-commit githook (Tobin C. Harding)
0516ddeb8d62e88b3943406969a7665a5f123999 Add formatting check to CI (Tobin C. Harding)
c7807dff9c2e772179c97f396be60ef37b2d7ba2 Run the formatter (Tobin C. Harding)

Pull request description:

  We recently introduced `rustfmt` to the codebase but I forgot to turn it on in CI.

  - Patch 1: Preparatory formatting fixes, introduced since we merged the [formatting PR](rust-bitcoin/rust-secp256k1#499)
  - Patch 2: Enable formatting in CI
  - Patch 3: Add formatting to the pre-commit hook

ACKs for top commit:
  apoelstra:
    ACK 75f3886812a70aa7821d3de38bf2e8c94cfd9ef4

Tree-SHA512: 5ac4ab4015a9728ef890e0c4fe90afcb5e45ab7665da5a8ee289dc877c1ea5c6236e54b68b7122841597864b04606c8bfae7dec86c4b6be74d32437299057b5f
william2332-limf added a commit to william2332-limf/rust-secp256k1 that referenced this pull request Oct 2, 2025
75f3886812a70aa7821d3de38bf2e8c94cfd9ef4 Add cargo fmt to pre-commit githook (Tobin C. Harding)
0516ddeb8d62e88b3943406969a7665a5f123999 Add formatting check to CI (Tobin C. Harding)
c7807dff9c2e772179c97f396be60ef37b2d7ba2 Run the formatter (Tobin C. Harding)

Pull request description:

  We recently introduced `rustfmt` to the codebase but I forgot to turn it on in CI.

  - Patch 1: Preparatory formatting fixes, introduced since we merged the [formatting PR](rust-bitcoin/rust-secp256k1#499)
  - Patch 2: Enable formatting in CI
  - Patch 3: Add formatting to the pre-commit hook

ACKs for top commit:
  apoelstra:
    ACK 75f3886812a70aa7821d3de38bf2e8c94cfd9ef4

Tree-SHA512: 5ac4ab4015a9728ef890e0c4fe90afcb5e45ab7665da5a8ee289dc877c1ea5c6236e54b68b7122841597864b04606c8bfae7dec86c4b6be74d32437299057b5f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants