-
Notifications
You must be signed in to change notification settings - Fork 2
[0031] Org-Wide Rust Style Guide #31
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
base: master
Are you sure you want to change the base?
Conversation
Include much of the details from eka's style guide directly in the EEP to be a bit more self-contained.
jonringer
left a comment
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.
I'm not really opinionated, and this looks reasonable.
|
|
||
| # Acknowledgements | ||
|
|
||
| Thanks to the original authors of the `STYLE_GUIDE.md` for establishing a strong foundation for this proposal. Special thanks to @jonringer for his ongoing efforts in eka-ci and in driving ekapkgs forward. |
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.
<3
|
one setting of the rustfmt config in particular that might warrant some further scrutiny is: Tried to strike a balance from the default |
The easiest way to enforce sorting is with LLMs, but without very explicit instructions, they get confused and produced mixed results on the order of various types. For that reason, we shall be very explicit about how to sort types to alleviate this ambiguity and hopefully ease automation.
| Types (`struct`, `enum`, and `type` aliases) must be sorted as a single, interlaced group, alphabetically by their identifier. | ||
|
|
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.
what's next? fascism?
lol
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.
I mean in practice it's never going to be perfect, but it's just a helpful guideline to try to maintain some semblance of organization in large modules.
rendered