You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Description
Closes#5008
The panic happened because the formatter was adding two `;`s after a
constant declaration inside of a trait.
I'm working toward the goal of making it so the formatter never panics,
even for sway files that do not compile.
I made it so, when a sway file does not compile, it does not cause the
formatter to panic. Now it prints an error message and returns that it
did not format anything with exit code 0.
I'm checking in this simple bash script that runs the formatter against
every sway project in the repo. Fixing this bug brought the # of panics
from ~35 down to 23.
I verified that the CI step that checks the formatting of sway docs is
still working.
## Checklist
- [x] I have linked to any relevant issues.
- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ] I have added tests that prove my fix is effective or that my
feature works.
- [ ] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [ ] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [ ] I have requested a review from the relevant team or maintainers.
This file builds, so the formatter should definitely be able to format it.
The text was updated successfully, but these errors were encountered: