Skip to content

chore: create and apply rustfmt.toml #1946

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

luisschwab
Copy link
Member

@luisschwab luisschwab commented Apr 22, 2025

This PR adds basic formatting configuration for uniform comments. Note that the nightly toolchain is necessary.

Changelog:

  • Create rustfmt.toml with this config:
comment_width = 100
format_code_in_doc_comments = true
wrap_comments = true
  • Apply rustfmt.toml.
  • Update the fmt CI job to use the nightly toolchain.
  • Update PR template to use nightly toolchain.

Note: I had to add #[rustfmt::skip] to test_extract_satisfaction_timelock() because the base64 PSBT would get wrapped due to the slashes.

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

@notmandatory notmandatory moved this to In Progress in BDK Chain Apr 23, 2025
@notmandatory notmandatory moved this from In Progress to Needs Review in BDK Chain Apr 23, 2025
@GideonBature
Copy link

tACK #1946

Can you please squash all three commit messages as a single commit?

Copy link
Contributor

@oleonardolima oleonardolima left a comment

Choose a reason for hiding this comment

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

cACK 396fff8

@evanlinjin
Copy link
Member

Is it some sort of standard to have comment_width = 140?

Currently, most of the documentation is kept within 100.

@luisschwab
Copy link
Member Author

Is it some sort of standard to have comment_width = 140?

Not really,. Either one is fine for me.

@evanlinjin
Copy link
Member

In that case, I would prefer to stick with 100. It means you can see more if you use a split screen.

@luisschwab luisschwab force-pushed the chore/add-rustfmt branch 2 times, most recently from 9f63ded to 0ab5ef4 Compare May 16, 2025 17:44
@luisschwab
Copy link
Member Author

I made an identical PR on bdk_wallet, once this get's merged I'll update it.

@luisschwab luisschwab requested a review from notmandatory May 16, 2025 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Needs Review
Development

Successfully merging this pull request may close these issues.

5 participants