duaraghav8 / Ethlint

(Formerly Solium) Code quality & Security Linter for Solidity
https://ethlint.readthedocs.io/en/latest/
MIT License
927 stars 128 forks source link

Support abstract contracts. #281

Open juharris opened 4 years ago

juharris commented 4 years ago

Description Solidity 0.6 introduces the abstract keyword for abstract contracts: https://solidity.readthedocs.io/en/v0.6.0/contracts.html#abstract-contracts

Works:

// Test.sol
pragma solidity ^0.6;

contract Test {
    uint a = 1;
}

Does not work:

// Test.sol
pragma solidity ^0.6;

abstract contract Test {
    uint a = 1;
}
$ npx solium --file Test.sol

Test.sol
  3:1    error    Syntax error: unexpected token a

✖ 1 error found.
gorgos commented 4 years ago

Likewise the new override keyword.

elenadimitrova commented 4 years ago

Likewise the new receive and fallback functions :) In general support the 0.6 syntax changes.

quezak commented 4 years ago

Is there a workaround? Or maybe a fork that already has Solidity 0.6 syntax support?

gorgos commented 4 years ago

@quezak You can ignore those files or use https://github.com/protofire/solhint.

quezak commented 4 years ago

I can't ignore all my contract files :D I'll try out if solhint works better, thanks