-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Implement module formatting using JoinNodesBuilder #4808
Conversation
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
PR Check ResultsEcosystem✅ ecosystem check detected no changes. BenchmarkLinux
Windows
|
f.join_nodes(NodeLevel::TopLevel) | ||
.nodes(&item.body) | ||
.finish()?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this use item.body.format().with_options(SuiteLevel::TopLevel)
(The Suite
formatting) so that it inserts the right amount of new lines before and after classes and functions?
The JoinNodesBuilder
only maintains the same number of empty lines (up to 1 or 2) as in the source. The Vec<Stmt>
formatting ensures that each function and class has an empty line before and after
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
f5521f0
to
d113ea6
Compare
d113ea6
to
530cb36
Compare
This uses JoinNodesBuilder to implement module formatting for #4800 See the snapshots for the changed behaviour. See one PR up for a CLI that i used to verify the trailing new line behaviour
* Implement module formatting using JoinNodesBuilder This uses JoinNodesBuilder to implement module formatting for #4800 See the snapshots for the changed behaviour. See one PR up for a CLI that i used to verify the trailing new line behaviour
This uses JoinNodesBuilder to implement module formatting for #4800
See the snapshots for the changed behaviour. See one PR up for a CLI that i used to verify the trailing new line behaviour