Open wighawag opened 5 years ago
I use
this mi .solhint.json :
{
"extends": ["solhint:recommended"],
"rules": {
"avoid-throw": false,
"avoid-suicide": "error",
"avoid-sha3": "warn",
"no-empty-blocks": false
}
}
@wighawag thanks for reporting this, did you change enabledSolium to false, as this may cause an issue. https://github.com/juanfranblanco/vscode-solidity/blob/master/src/server.ts#L252
I tried setting it to false and leaving it undefined and it was not working either way
I believe this is due to this extension not handling "extends": ["solhint:recommended"]
properly. Any warning / error in a rule
works as expected but not the recommended set.
@justinjmoses thanks for that, ill put that in the next release. The expectation is to have just the rules: https://github.com/juanfranblanco/vscode-solidity/blob/master/src/linter/solhint.ts#L66-L71
Hmmm - I'm on 0.0.72 now and the plugin is still not adhering to solhint:recommended
items... For instance if you checkout our code (https://github.com/Synthetixio/synthetix), npm install
, then lookup contracts/LimitedSetup.sol
in VSCode say, you won't see warnings. Yet if you run npx solhint contracts/*.sol
you'll see state-visibility
warnings. If you add "state-visibility": "warn"
to .solhint.json
then the warnings come up in vscode as expected.
Is there a work around for this? I'm not seeing any linting errors n VScode
{ "extends": ["solhint:recommended"], "rules": { "avoid-throw": false, "avoid-suicide": "error", "avoid-sha3": "warn", "no-empty-blocks": false } }
You are a genius. This setup finally got my solhint to work. thank you much
I wanted to switch to solhint for linting my code but vscode-solidity does not show any error or warning when I configure solhint via "solidity.linter" : "solhint" config.
When I run solhint via
it shows a lot of warning and errors
Also when I use solium, it shows the error correctly
What can be wrong ?