2

I am using Juan Blanco's Solidity extension for VSC. I am noticing it is showing just too many warnings everywhere, including the OpenZeppelin contracts in the node_modules folder. Is there any alternative to it? Or any way to suppress all the unnecessary warnings? Having a bunch of yellow underlines and red highlighted folders everywhere is kind of distracting.

1

One feature of the extension that you are using is that it enables Solium (now Ethlint). This is a linter that checks your code for errors and warnings, such as no-trailing-whitespace: Line contains trailing whitespace.

The best solution is to fix these warnings in your code, since the warnings are suggestions to follow best practices when writing Solidity. Code that follows the Solidity style guide should have no warnings like this.

If you want to remove some of these warnings without changing the code, you will need to edit your settings.json in VS Code. Within this file you can add the following line:

"solidity.soliumRules": {
}

In here, you can add rules that you want to ignore. For example, if you want to ignore the trailing whitespace warning, your settings.json file should look as follows:

"solidity.soliumRules": {
    "no-trailing-whitespace": "off"
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.