From b49851f2b68aad23f005fa64d5db99397f627011 Mon Sep 17 00:00:00 2001 From: Marco Ieni <11428655+MarcoIeni@users.noreply.github.com> Date: Thu, 14 Jan 2021 22:48:24 +0100 Subject: [PATCH] CONTRIBUTING: Add style guide (#201) --- CONTRIBUTING.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9fe25bb..e358431 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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` 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