Skip to content

Replace rustfmt_excluded_files with rustfmt_skip cfg attribute #3802

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

Merged
merged 1 commit into from
May 28, 2025

Conversation

joostjager
Copy link
Contributor

@joostjager joostjager commented May 26, 2025

This change removes the custom rustfmt_excluded_files mechanism and instead uses an attribute at the top of each excluded file.

No functional changes are introduced. This simplifies formatting workflows by enabling standard cargo fmt and editor format-on-save features without custom scripts.

The older rustfmt cfg attribute is used because newer formatting directives only support code blocks, which would require more effort to apply consistently. This commit focuses on improving developer experience by streamlining formatting setup, while more granular or comprehensive formatting can be addressed later.

@ldk-reviews-bot
Copy link

ldk-reviews-bot commented May 26, 2025

👋 Thanks for assigning @tnull as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

@joostjager joostjager marked this pull request as ready for review May 26, 2025 14:29
Copy link
Contributor

@valentinewallace valentinewallace left a comment

Choose a reason for hiding this comment

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

Thanks, this looks great and works in my text editor!

@@ -526,6 +541,14 @@ pub fn test_update_fee_that_funder_cannot_afford() {
check_closed_event!(nodes[1], 1, reason, [node_a_id], channel_value);
}

#[xtest(feature = "_externalize_tests")]
Copy link
Contributor

Choose a reason for hiding this comment

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

Are the update_fee_test and channel.rs changes intentional? It seems like they could use their own commit if so

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have really no idea how that slipped through. Reverted.

@joostjager joostjager force-pushed the rustfmt-skip branch 3 times, most recently from 1176fc2 to e7af289 Compare May 27, 2025 07:34
@valentinewallace valentinewallace requested a review from tnull May 27, 2025 18:09
@valentinewallace
Copy link
Contributor

Requested @tnull's review since @TheBlueMatt is off review this week, so hopefully we can land.

Copy link
Contributor

@tnull tnull left a comment

Choose a reason for hiding this comment

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

Sure, why not. One comment, otherwise LGTM.

This change removes the custom `rustfmt_excluded_files` mechanism and
instead uses the an attribute at the top of each excluded file.

No functional changes are introduced. This simplifies formatting
workflows by enabling standard `cargo fmt` and editor format-on-save
features without custom scripts.

The older `rustfmt` cfg attribute is used because newer formatting
directives only support code blocks, which would require more effort to
apply consistently. This commit focuses on improving developer
experience by streamlining formatting setup, while more granular or
comprehensive formatting can be addressed later.
Copy link
Contributor

@tnull tnull left a comment

Choose a reason for hiding this comment

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

LGTM

Landing this as the changes since Val's ACK are minimal.

@tnull tnull merged commit 5688166 into lightningdevkit:main May 28, 2025
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants