From 2e70e683b456c63299dd9aec956d55f0c490c30b Mon Sep 17 00:00:00 2001 From: Julien Odent Date: Mon, 14 May 2018 14:07:27 -0700 Subject: [PATCH] Documentation: Coding style Reviewed By: haoxuany Differential Revision: D7992017 fbshipit-source-id: ddbd92929690fea167ea5cd99602160a8d8a3aa9 --- CONTRIBUTING.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1d267fe2..341ee019 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,6 +23,18 @@ to do this once to work on any of Facebook's open source projects. Complete your CLA here: +## Coding Style + +### Simple heuristic: Look around +Match the style you see used in the rest of the project. This includes formatting and naming things in code. + +### Simple philosophy: Make it 1% better +The code is far from perfectly clean. When the code surrounding your changes is not consistent, go ahead and make it so. However don't clutter your changes with style clean-up; split the pull requests to make the review process easier. + +### Guidelines +- 80-char limit. +- Imports: one block for standard modules and other packages, one block for project modules. Qualified imports at the end of each block, alphabetical ordering. + ## Issues We use GitHub issues to track public bugs. Please ensure your description is clear and has sufficient instructions to be able to reproduce the issue.