Browse Source

fix: solium linting errors (#1113)

* fix: solium linting errors, fixes #1092

* fix: remove uppercase requirement
Matt Condon 7 years ago
parent
commit
4c6575bf2f

+ 1 - 0
.soliumrc.json

@@ -4,6 +4,7 @@
   "rules": {
     "quotes": ["error", "double"],
     "no-empty-blocks": "off",
+    "uppercase": "off",
     "indentation": ["error", 2],
     "max-len": ["warning", 79],
     "no-constant": ["error"],

+ 2 - 3
contracts/examples/SampleCrowdsale.sol

@@ -13,10 +13,9 @@ import "../token/ERC20/MintableToken.sol";
  */
 contract SampleCrowdsaleToken is MintableToken {
 
-  // solium-disable-next-line uppercase
   string public constant name = "Sample Crowdsale Token";
-  string public constant symbol = "SCT"; // solium-disable-line uppercase
-  uint8 public constant decimals = 18; // solium-disable-line uppercase
+  string public constant symbol = "SCT";
+  uint8 public constant decimals = 18;
 
 }
 

+ 3 - 3
contracts/examples/SimpleToken.sol

@@ -12,9 +12,9 @@ import "../token/ERC20/StandardToken.sol";
  */
 contract SimpleToken is StandardToken {
 
-  string public constant name = "SimpleToken"; // solium-disable-line uppercase
-  string public constant symbol = "SIM"; // solium-disable-line uppercase
-  uint8 public constant decimals = 18; // solium-disable-line uppercase
+  string public constant name = "SimpleToken";
+  string public constant symbol = "SIM";
+  uint8 public constant decimals = 18;
 
   uint256 public constant INITIAL_SUPPLY = 10000 * (10 ** uint256(decimals));
 

+ 1 - 0
contracts/introspection/SupportsInterfaceWithLookup.sol

@@ -9,6 +9,7 @@ import "./ERC165.sol";
  * @dev Implements ERC165 using a lookup table.
  */
 contract SupportsInterfaceWithLookup is ERC165 {
+
   bytes4 public constant InterfaceId_ERC165 = 0x01ffc9a7;
   /**
    * 0x01ffc9a7 ===

+ 9 - 1
contracts/token/ERC721/ERC721Holder.sol

@@ -4,7 +4,15 @@ import "./ERC721Receiver.sol";
 
 
 contract ERC721Holder is ERC721Receiver {
-  function onERC721Received(address, address, uint256, bytes) public returns(bytes4) {
+  function onERC721Received(
+    address,
+    address,
+    uint256,
+    bytes
+  )
+    public
+    returns(bytes4)
+  {
     return ERC721_RECEIVED;
   }
 }

+ 2 - 1
contracts/token/ERC721/ERC721Token.sol

@@ -147,7 +147,8 @@ contract ERC721Token is SupportsInterfaceWithLookup, ERC721BasicToken, ERC721 {
     uint256 lastToken = ownedTokens[_from][lastTokenIndex];
 
     ownedTokens[_from][tokenIndex] = lastToken;
-    ownedTokens[_from].length--; // This also deletes the contents at the last position of the array
+    ownedTokens[_from].length--;
+    // ^ This also deletes the contents at the last position of the array
 
     // Note that this will handle single-element arrays. In that case, both tokenIndex and lastTokenIndex are going to
     // be zero. Then we can make sure that we will remove _tokenId from the ownedTokens list since we are first swapping