Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Truffle and Solium #1105

Merged

Conversation

vittominacori
Copy link
Contributor

@vittominacori vittominacori commented Jul 22, 2018

🚀 Description

This PR is to force update to Truffle 4.1.13 and Solium 1.1.8.

I solved all warnings regarding visibility-first and max-len.

There are many warnings regarding missing require message (error-reason) that everyone should address.

I'm having a linebreak-style issue with RBACCappedTokenMock.
But I think it is a solium issue so I can't resolve it. Travis test.

  • 📘 I've reviewed the OpenZeppelin Contributor Guidelines
  • ✅ I've added tests where applicable to test my new functionality.
  • 📖 I've made sure that my contracts are well-documented.
  • 🎨 I've run the JS/Solidity linters and fixed any issues (npm run lint:all:fix).

@nventuro
Copy link
Contributor

I don't think we want to commit to error messages in OpenZeppelin yet (see #888 and #917 for some discussion on that), we should probably disable that warning for now.

@nventuro nventuro added kind:improvement automation Tests and coverage running. Docsite publishing. labels Jul 25, 2018
Copy link
Contributor

@nventuro nventuro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, thanks @vittominacori! I left some nitpicking comments, will see if I can figure out the linebreak thing.

@@ -52,8 +52,8 @@ contract Whitelist is Ownable, RBAC {
* false if all addresses were already in the whitelist
*/
function addAddressesToWhitelist(address[] _operators)
onlyOwner
public
public
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't there an indentation missing here? @ElOpio you experimented a bit with Solium, any ideas on why it didn't catch this?

@@ -45,7 +45,7 @@ contract('HasNoEther', function (accounts) {
const ownerFinalBalance = await ethGetBalance(accounts[0]);
const finalBalance = await ethGetBalance(hasNoEther.address);
assert.equal(finalBalance, 0);
assert.isAbove(ownerFinalBalance, ownerStartBalance);
assert.isTrue(ownerFinalBalance.greaterThan(ownerStartBalance));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a separate issue (#1091) for this, try to only commit relevant changes :)

uint256,
bytes)
public
returns(bytes4)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing indentation?

@nventuro
Copy link
Contributor

Turns out that file had Windows-style line endings, which Solium caught. I changed them to Unix-style (same as the rest of the project).

@nventuro nventuro self-assigned this Jul 28, 2018
…idity into feature/update-truffle-and-solium

# Conflicts:
#	contracts/access/rbac/Roles.sol
#	contracts/examples/RBACWithAdmin.sol
#	contracts/lifecycle/TokenDestructible.sol
#	contracts/ownership/Contactable.sol
#	contracts/token/ERC20/RBACMintableToken.sol
#	contracts/token/ERC721/ERC721Holder.sol
#	contracts/token/ERC721/ERC721Token.sol
#	package-lock.json
@vittominacori
Copy link
Contributor Author

@nventuro I merged again from master.
If we don't accept this PR we will have conflicts forever and ever because of people are not using the visibility-first rule.

@nventuro
Copy link
Contributor

nventuro commented Aug 1, 2018

Agreed, these big PRs are better not left open for too long. Thanks once again @vittominacori!

@nventuro nventuro merged commit ca9e317 into OpenZeppelin:master Aug 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation Tests and coverage running. Docsite publishing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants