duaraghav8 / Ethlint

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

Function selector arguments should be on the same line #257

Closed k06a closed 5 years ago

k06a commented 5 years ago

Description Following solidity 0.5.x code:

bytes4 private constant InterfaceId_ERC721Countable = (
    this.totalAmount().selector ^
    this.tokenAmount(uint256).selector ^
    this.approveAmount(address,uint256,uint256).selector ^
    this.transferFrom(address,address,uint256,uint256).selector ^
    this.safeTransferFrom(address,address,uint256,uint256).selector ^
    this.safeTransferFrom(address,address,uint256,uint256,bytes).selector
);

Gives 3 warnings:

Function "undefined": in case of more than 3 arguments, drop each into its own line.    arg-overflow

Linter version 1.2.2

Priority Medium

duaraghav8 commented 5 years ago

@k06a Can you paste your full solidity code and .soliumrc.json? I think I know why these warnings show up but I need to see the setup to verify

k06a commented 5 years ago

@duaraghav8 sorry, it seems this code it not yet valid for solidity 0.5.3

duaraghav8 commented 5 years ago

ah. But are you saying this code will be valid in a future release? (I haven't read solidity's roadmap, but I can track it to provide support when its finally introduced)

k06a commented 5 years ago

But are you saying this code will be valid in a future release?

Hope so, but can't find it in roadmap