Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run the formatter in CI #526

Merged
merged 3 commits into from Nov 22, 2022
Merged

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
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.

None yet

2 participants