mirror of
https://github.com/bevyengine/bevy
synced 2024-11-25 22:20:20 +00:00
d59fc076e8
[**RENDERED**](https://github.com/alice-i-cecile/bevy/blob/better-contributing/CONTRIBUTING.md) Improves #910. As discussed in #1309, we'll need to synchronize content between this and the Bevy website in some way (and clean up the .github file perhaps?). I think doing it as a root-directory file is nicer for discovery, but that's a conversation I'm interested in having. This document is intended to be helpful to beginners to open source and Bevy, and captures what I've learned about our informal practices and values. Reviewers: I'm particularly interested in: - opinions on the items **What we're trying to build**, where I discuss some of the project's high-level values and goals - more relevant details on the `bevy` subcrates for **Getting oriented** - useful tricks and best practices that I missed - better guidance on how to contribute to the Bevy book from @cart <3
858 B
858 B
Style guide: Engine
For more advice on contributing to the engine, see the relevant section of CONTRIBUTING.md.
- Prefer granular imports over glob imports of
bevy::prelude::*
andbevy::sub_crate::*
. - Use a consistent comment style:
///
doc comments belong above#[derive(Trait)]
invocations.//
comments should generally go above the line in question, rather than in-line.- Avoid
/* */
block comments, even when writing long comments. - Use `variable_name` code blocks in comments to signify that you're referring to specific types and variables.
- Start comments with capital letters. End them with a period if they are sentence-like.
- Use comments to organize long and complex stretches of code that can't sensibly be refactored into separate functions.