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

state-visibility rule gives incorrect output when using fallback() #313

Closed
outdoteth opened this issue Sep 24, 2021 · 1 comment
Closed

Comments

@outdoteth
Copy link

outdoteth commented Sep 24, 2021

To reproduce:

Test.sol

fallback() external payable {
}

.solhint.json

{
    "extends": "solhint:recommended",
    "rules": {
        "func-visibility": ["warn", { "ignoreConstructors": true }],
    }
}

output:

/Users/t/Test.sol
  4:5  warning  Explicitly mark visibility of state  state-visibility

Expected no warnings because visibility is given by external keyword. It might be that the issue is the parser can't handle the fallback() function because it doesn't have the function keyword prefix (just a guess).

@dbale-altoros
Copy link
Collaborator

This issue is fixed when upgrading to the last solidity parser version (0.14.5)
#378

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants