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

Formatter removes //! comments at the top of the file #5058

Closed
sdankel opened this issue Aug 30, 2023 · 4 comments · Fixed by #5101
Closed

Formatter removes //! comments at the top of the file #5058

sdankel opened this issue Aug 30, 2023 · 4 comments · Fixed by #5101
Assignees
Labels
bug Something isn't working formatter

Comments

@sdankel
Copy link
Member

sdankel commented Aug 30, 2023

Related #5052

@sdankel sdankel self-assigned this Aug 30, 2023
@sdankel
Copy link
Member Author

sdankel commented Sep 4, 2023

@eureka-cpu You said you fixed this before, do you want to take a look at why this regressed?

@sdankel sdankel added the bug Something isn't working label Sep 6, 2023
@cr-fuel cr-fuel self-assigned this Sep 7, 2023
@eureka-cpu
Copy link
Contributor

eureka-cpu commented Sep 8, 2023

If @cr-fuel or @andrewvious are keen to take it on that's fine w me

To give some context, I implemented the module level doc comments in the compiler to be able to get documentation working for forc-doc and somewhere along the way before then they were just treated as regular comments.

@eureka-cpu
Copy link
Contributor

eureka-cpu commented Sep 8, 2023

Here are the relevant PRs that added in module level doc comments: #4081 #4113
Here is the file where I was testing the inner doc comment formatting: https://github.com/FuelLabs/sway/pull/4081/files#diff-1f22ed7929aa55dd3839a9661721934181afa002d417d5c834314413cf620952
Here is where you will likely need to begin tracking the bug down: https://github.com/FuelLabs/sway/blob/master/swayfmt/src/utils/language/attribute.rs#L82

Hope that helps, let me know if you have any questions

@andrewvious
Copy link
Contributor

I've got it fixed, opening a PR now.

eureka-cpu pushed a commit that referenced this issue Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working formatter
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants