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

Document which comments are excluded from wrapping #5637

Merged
merged 3 commits into from
Jan 28, 2023

Conversation

krtab
Copy link
Contributor

@krtab krtab commented Dec 23, 2022

Cf: #5634

Copy link
Contributor

@ytmimi ytmimi left a comment

Choose a reason for hiding this comment

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

Thank you for your first contribution to rustfmt 🎉

I really appreciate you taking the initiative to help improve the docs! Just a few notes on how we could provide even more clarity with this update.

Comment on lines +3004 to +3007
Note that no wrapping will happen if:
1. The comment is the start of a markdown header doc comment
2. An URL was found in the comment

Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you for updating the docs! I think it would be best to add this note to the description above. So right after "Break comments to fit on the line". I think we could maybe elaborate on the descriptions a little bit as well, but just having this is a huge step in the right direction.

It would also be great to include examples of these cases into the false and true cases listed bellow so users can visually see the difference! If you wouldn't mind tracking down examples from the issues (or their respective PRs) that I mentioned in #5634 (comment) that would be fantastic!

Comment on lines +804 to +805
// If this changes, the documentation in ../Configurations.md#wrap_comments
// should be changed accordingly.
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️ great little note!

Copy link
Contributor

@ytmimi ytmimi left a comment

Choose a reason for hiding this comment

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

Thanks again for your help improving the docs. We'll hold off on merging this until after we sync the rustfmt codebase with the upstream rust-lang/rust repo, but I think we're good to go here!

Copy link
Member

@calebcartwright calebcartwright left a comment

Choose a reason for hiding this comment

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

Thanks!

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.

3 participants