CONTRIBUTING: Add style guide (#201)

pull/203/head
Marco Ieni 3 years ago committed by GitHub
parent f78e3e3166
commit b49851f2b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -43,6 +43,15 @@ Don't forget to add your new article to the `SUMMARY.md` to let it be rendered t
Please make `Draft Pull requests` early so we can follow your progress and can give early feedback (see the following section).
## Style guide
In order to have a consistent style across the book, we suggest to:
- Follow the official Rust book's [style guide](https://github.com/rust-lang/book/blob/master/style-guide.md).
- Follow [RFC 1574](https://github.com/rust-lang/rfcs/blob/master/text/1574-more-api-documentation-conventions.md#appendix-a-full-conventions-text). Tl;dr:
- Prefer full types name. For example `Option<T>` instead of `Option`.
- Prefer line comments (`//`) over block comments (`/* */`) where applicable.
## Check the article locally
Before submitting the PR launch the commands `mdbook build` to make sure that the book builds and `mdbook test` to make sure that

Loading…
Cancel
Save