From 89ccb03e6e62193b11827b68d4d86dddbb385671 Mon Sep 17 00:00:00 2001 From: Leo Arias Date: Wed, 1 Aug 2018 14:13:41 -0600 Subject: [PATCH] Add an initial document for our code style (#1141) * Add an initial document for our code style * add parameter types --- CODE_STYLE.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 CODE_STYLE.md diff --git a/CODE_STYLE.md b/CODE_STYLE.md new file mode 100644 index 000000000..e2927234c --- /dev/null +++ b/CODE_STYLE.md @@ -0,0 +1,23 @@ +# Code Style + +We value clean code and consistency, and those are prerequisites for us to +include new code in the repository. Before proposing a change, please read this +document and take some time to familiarize yourself with the style of the +existing codebase. + +## Solidity code + +In order to be consistent with all the other Solidity projects, we follow the +[official recommendations documented in the Solidity style guide](http://solidity.readthedocs.io/en/latest/style-guide.html). + +Any exception or additions specific to our project are documented below. + +### Naming + +* Parameters must be prefixed with an underscore. + +``` +function test(uint256 _testParameter1, uint256 _testParameter2) { + ... +} +```