diff options
author | chriseth <c@ethdev.com> | 2016-05-07 01:03:28 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2016-05-07 01:03:28 +0800 |
commit | 9e36bdda8a9552f1885e0a63a85db588623b39b2 (patch) | |
tree | 212d5c4d91481ead4d223eb6f7bfc4df1c7e8d02 /docs/style-guide.rst | |
parent | 1b7e2d3068a8870b6d5ebb231cb611d01b4adfc8 (diff) | |
parent | 7f940e498e99346e7d9afa47e773dcd7ea9ebd18 (diff) | |
download | dexon-solidity-9e36bdda8a9552f1885e0a63a85db588623b39b2.tar.gz dexon-solidity-9e36bdda8a9552f1885e0a63a85db588623b39b2.tar.zst dexon-solidity-9e36bdda8a9552f1885e0a63a85db588623b39b2.zip |
Merge pull request #541 from Denton-L/develop
Minor Documentation Changes
Diffstat (limited to 'docs/style-guide.rst')
-rw-r--r-- | docs/style-guide.rst | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/docs/style-guide.rst b/docs/style-guide.rst index c36efe2c..bc32f891 100644 --- a/docs/style-guide.rst +++ b/docs/style-guide.rst @@ -25,7 +25,7 @@ solidity code. The goal of this guide is *consistency*. A quote from python's captures this concept well. A style guide is about consistency. Consistency with this style guide is important. Consistency within a project is more important. Consistency within one module or function is most important. - But most importantly: know when to be inconsistent -- sometimes the style guide just doesn't apply. When in doubt, use your best judgment. Look at other examples and decide what looks best. And don't hesitate to ask! + But most importantly: know when to be inconsistent -- sometimes the style guide just doesn't apply. When in doubt, use your best judgment. Look at other examples and decide what looks best. And don't hesitate to ask! *********** @@ -155,19 +155,27 @@ Whitespace in Expressions Avoid extraneous whitespace in the following situations: -* Immediately inside parenthesis, brackets or braces. +Immediately inside parenthesis, brackets or braces. -Yes: `spam(ham[1], Coin({name: "ham"}));` +Yes:: + + spam(ham[1], Coin({name: "ham"})); + +No:: -No: `spam( ham[ 1 ], Coin( { name: "ham" } ) );` + spam( ham[ 1 ], Coin( { name: "ham" } ) );` -* Immediately before a comma, semicolon: +Immediately before a comma, semicolon: -Yes: `function spam(uint i, Coin coin);` +Yes:: + + function spam(uint i, Coin coin); + +No:: -No: `function spam(uint i , Coin coin) ;` + function spam(uint i , Coin coin) ; -* More than one space around an assignment or other operator to align with +More than one space around an assignment or other operator to align with another: Yes:: |