Skip to content

fix formatting of attributes on modules#2734

Open
V1dV1d wants to merge 2 commits intocasey:masterfrom
V1dV1d:fmt-mod-attributes
Open

fix formatting of attributes on modules#2734
V1dV1d wants to merge 2 commits intocasey:masterfrom
V1dV1d:fmt-mod-attributes

Conversation

@V1dV1d
Copy link
Copy Markdown

@V1dV1d V1dV1d commented May 14, 2025

First off, love the tool and that it comes with a formatter built in :)

However, I found that while setting attributes on mod statements works perfectly, the formatter apparently is not aware of this feature.
I just added a fairly naive implementation adding the two currently allowed attributes to the module impl Display. Also comes with a simple integration test.

I know that the formatter is an unstable feature and not the highest priority, but I personally use it and would love to see this fixed. Let me know if any of this needs fixing up, I'll happily do it :)

@V1dV1d V1dV1d force-pushed the fmt-mod-attributes branch from eda3618 to e43c0c2 Compare May 14, 2025 12:28
Copy link
Copy Markdown
Owner

@casey casey left a comment

Choose a reason for hiding this comment

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

Modules may have multiple groups, so we should print them all, not just the first. See comment!

@V1dV1d V1dV1d force-pushed the fmt-mod-attributes branch from e43c0c2 to cf34244 Compare June 25, 2025 09:00
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