Every time I use VS Code to develop Solidity, files I have a lot of this weird warnings saying:

no-trailing-whitespace: Line contains trailing whitespace

I googled a bit and I understand why they are here. Although I would like to make my VS Code ignore them. Any help?

enter image description here


1 Answer 1


The reason they exist is because you are using the VS Code Solidity extension. One feature of this extension 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"
  • 1
    This worked for me! Thank you a lot, sir! Aug 13, 2019 at 17:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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