Browse Source

fix: solium errors - whitespace related

Matt Condon 7 years ago
parent
commit
3b48a671fd

+ 3 - 1
.soliumrc.json

@@ -5,6 +5,8 @@
     "quotes": ["error", "double"],
     "quotes": ["error", "double"],
     "indentation": ["error", 2],
     "indentation": ["error", 2],
     "arg-overflow": ["warning", 3],
     "arg-overflow": ["warning", 3],
-    "security/enforce-explicit-visibility": ["error"]
+    "security/enforce-explicit-visibility": ["error"],
+    "security/no-block-members": ["warning"],
+    "security/no-inline-assembly": ["warning"]
   }
   }
 }
 }

+ 3 - 1
contracts/MerkleProof.sol

@@ -16,7 +16,9 @@ library MerkleProof {
    */
    */
   function verifyProof(bytes _proof, bytes32 _root, bytes32 _leaf) public pure returns (bool) {
   function verifyProof(bytes _proof, bytes32 _root, bytes32 _leaf) public pure returns (bool) {
     // Check if proof length is a multiple of 32
     // Check if proof length is a multiple of 32
-    if (_proof.length % 32 != 0) return false;
+    if (_proof.length % 32 != 0) {
+      return false;
+    }
 
 
     bytes32 proofElement;
     bytes32 proofElement;
     bytes32 computedHash = _leaf;
     bytes32 computedHash = _leaf;

+ 1 - 1
contracts/lifecycle/TokenDestructible.sol

@@ -24,7 +24,7 @@ contract TokenDestructible is Ownable {
   function destroy(address[] tokens) onlyOwner public {
   function destroy(address[] tokens) onlyOwner public {
 
 
     // Transfer tokens to owner
     // Transfer tokens to owner
-    for(uint256 i = 0; i < tokens.length; i++) {
+    for (uint256 i = 0; i < tokens.length; i++) {
       ERC20Basic token = ERC20Basic(tokens[i]);
       ERC20Basic token = ERC20Basic(tokens[i]);
       uint256 balance = token.balanceOf(this);
       uint256 balance = token.balanceOf(this);
       token.transfer(owner, balance);
       token.transfer(owner, balance);

+ 1 - 1
contracts/mocks/ERC23TokenMock.sol

@@ -25,7 +25,7 @@ contract ERC23TokenMock is BasicToken {
     assembly {
     assembly {
       is_contract := not(iszero(extcodesize(_to)))
       is_contract := not(iszero(extcodesize(_to)))
     }
     }
-    if(is_contract) {
+    if (is_contract) {
       ERC23ContractInterface receiver = ERC23ContractInterface(_to);
       ERC23ContractInterface receiver = ERC23ContractInterface(_to);
       receiver.tokenFallback(msg.sender, _value, _data);
       receiver.tokenFallback(msg.sender, _value, _data);
     }
     }

+ 1 - 1
contracts/mocks/ForceEther.sol

@@ -6,7 +6,7 @@ pragma solidity ^0.4.18;
 // if the contract is not payable.
 // if the contract is not payable.
 // @notice To use, construct the contract with the target as argument.
 // @notice To use, construct the contract with the target as argument.
 // @author Remco Bloemen <remco@neufund.org>
 // @author Remco Bloemen <remco@neufund.org>
-contract ForceEther  {
+contract ForceEther {
 
 
   function ForceEther() public payable { }
   function ForceEther() public payable { }
 
 

+ 1 - 1
contracts/mocks/InsecureTargetBounty.sol

@@ -4,7 +4,7 @@ import {Bounty, Target} from "../../contracts/Bounty.sol";
 
 
 
 
 contract InsecureTargetMock is Target {
 contract InsecureTargetMock is Target {
-  function checkInvariant() public returns(bool){
+  function checkInvariant() public returns(bool) {
     return false;
     return false;
   }
   }
 }
 }

+ 2 - 2
contracts/mocks/ReentrancyMock.sol

@@ -17,7 +17,7 @@ contract ReentrancyMock is ReentrancyGuard {
   }
   }
 
 
   function countLocalRecursive(uint256 n) public nonReentrant {
   function countLocalRecursive(uint256 n) public nonReentrant {
-    if(n > 0) {
+    if (n > 0) {
       count();
       count();
       countLocalRecursive(n - 1);
       countLocalRecursive(n - 1);
     }
     }
@@ -25,7 +25,7 @@ contract ReentrancyMock is ReentrancyGuard {
 
 
   function countThisRecursive(uint256 n) public nonReentrant {
   function countThisRecursive(uint256 n) public nonReentrant {
     bytes4 func = bytes4(keccak256("countThisRecursive(uint256)"));
     bytes4 func = bytes4(keccak256("countThisRecursive(uint256)"));
-    if(n > 0) {
+    if (n > 0) {
       count();
       count();
       bool result = this.call(func, n - 1);
       bool result = this.call(func, n - 1);
       require(result == true);
       require(result == true);

+ 1 - 1
contracts/ownership/Contactable.sol

@@ -8,7 +8,7 @@ import "./Ownable.sol";
  * @dev Basic version of a contactable contract, allowing the owner to provide a string with their
  * @dev Basic version of a contactable contract, allowing the owner to provide a string with their
  * contact information.
  * contact information.
  */
  */
-contract Contactable is Ownable{
+contract Contactable is Ownable {
 
 
   string public contactInformation;
   string public contactInformation;