aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/common-patterns.rst14
-rw-r--r--docs/contracts.rst6
-rw-r--r--docs/index.rst3
-rw-r--r--docs/solidity-by-example.rst4
-rw-r--r--docs/style-guide.rst2
5 files changed, 16 insertions, 13 deletions
diff --git a/docs/common-patterns.rst b/docs/common-patterns.rst
index 531a94ad..0894aae2 100644
--- a/docs/common-patterns.rst
+++ b/docs/common-patterns.rst
@@ -148,10 +148,10 @@ restrictions highly readable.
{
if (msg.sender != _account)
throw;
- // Do not forget the "_"! It will
+ // Do not forget the "_;"! It will
// be replaced by the actual function
// body when the modifier is invoked.
- _
+ _;
}
/// Make `_newOwner` the new owner of this
@@ -164,7 +164,7 @@ restrictions highly readable.
modifier onlyAfter(uint _time) {
if (now < _time) throw;
- _
+ _;
}
/// Erase ownership information.
@@ -187,7 +187,7 @@ restrictions highly readable.
modifier costs(uint _amount) {
if (msg.value < _amount)
throw;
- _
+ _;
if (msg.value > _amount)
msg.sender.send(msg.value - _amount);
}
@@ -286,7 +286,7 @@ function finishes.
modifier atStage(Stages _stage) {
if (stage != _stage) throw;
- _
+ _;
}
function nextStage() internal {
@@ -304,7 +304,7 @@ function finishes.
now >= creationTime + 12 days)
nextStage();
// The other stages transition by transaction
- _
+ _;
}
// Order of the modifiers matters here!
@@ -328,7 +328,7 @@ function finishes.
// automatically.
modifier transitionNext()
{
- _
+ _;
nextStage();
}
diff --git a/docs/contracts.rst b/docs/contracts.rst
index a22a3544..dfa79e79 100644
--- a/docs/contracts.rst
+++ b/docs/contracts.rst
@@ -321,7 +321,7 @@ inheritable properties of contracts and may be overridden by derived contracts.
modifier onlyOwner {
if (msg.sender != owner)
throw;
- _
+ _;
}
}
@@ -341,7 +341,7 @@ inheritable properties of contracts and may be overridden by derived contracts.
// Modifiers can receive arguments:
modifier costs(uint price) {
if (msg.value >= price) {
- _
+ _;
}
}
}
@@ -367,7 +367,7 @@ inheritable properties of contracts and may be overridden by derived contracts.
modifier noReentrancy() {
if (locked) throw;
locked = true;
- _
+ _;
locked = false;
}
diff --git a/docs/index.rst b/docs/index.rst
index a5ab3f86..4e90dd43 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -46,6 +46,9 @@ Available Solidity Integrations
* `Atom Solidity Linter <https://atom.io/packages/linter-solidity>`_
Plugin for the Atom editor that provides Solidity linting.
+
+* `Solium <https://github.com/duaraghav8/Solium/>`_
+ A commandline linter for Solidity which strictly follows the rules prescribed by the `Solidity Style Guide <http://solidity.readthedocs.io/en/latest/style-guide.html>`_.
* `Visual Studio Code extension <http://juan.blanco.ws/solidity-contracts-in-visual-studio-code/>`_
Solidity plugin for Microsoft Visual Studio Code that includes syntax highlighting and the Solidity compiler.
diff --git a/docs/solidity-by-example.rst b/docs/solidity-by-example.rst
index 8e23dafd..b8fa4a73 100644
--- a/docs/solidity-by-example.rst
+++ b/docs/solidity-by-example.rst
@@ -403,8 +403,8 @@ high or low invalid bids.
/// functions. `onlyBefore` is applied to `bid` below:
/// The new function body is the modifier's body where
/// `_` is replaced by the old function body.
- modifier onlyBefore(uint _time) { if (now >= _time) throw; _ }
- modifier onlyAfter(uint _time) { if (now <= _time) throw; _ }
+ modifier onlyBefore(uint _time) { if (now >= _time) throw; _; }
+ modifier onlyAfter(uint _time) { if (now <= _time) throw; _; }
function BlindAuction(
uint _biddingTime,
diff --git a/docs/style-guide.rst b/docs/style-guide.rst
index f4b419c0..d2d922df 100644
--- a/docs/style-guide.rst
+++ b/docs/style-guide.rst
@@ -355,7 +355,7 @@ No::
selfdestruct(owner);
}
-For long function declarations, it is recommended to drop each arguent onto
+For long function declarations, it is recommended to drop each argument onto
it's own line at the same indentation level as the function body. The closing
parenthesis and opening bracket should be placed on their own line as well at
the same indentation level as the function declaration.