3

Solium treats now require without error message as error that obviously incorrect. I have a lot of require inside my contract and do not want to garbage it with disabling comments. In the same time I cannot find how to disable message error-reason: Provide an error message for require(). completely through .soliumrc.

I added this line to my project's solium config without any results:

"error-reason": {"enabled": false}
2
  • 1
    if solium is a part of bigger tool like Solidity for VS Code it maybe be should be done other way try inline to check if it works Sep 25, 2018 at 16:05
  • 1
    @XaweryWiśniowiecki you are right. I found that adding file to .soliumrc doesn't affects VSCode, it is managed by its own settings file. After adding same switch there damned warning disappeared.
    – Alex G.P.
    Sep 26, 2018 at 9:13

2 Answers 2

1

Documentation for Solidity for VS Code says "...soliumrc.json support will be included in the near future, for specific project linting requirements". At the moment you can configure your linter using VS Code configuration file:

   "solidity.linter": "solium",
   "solidity.soliumRules": {
       "quotes": ["error", "double"],
       "indentation": ["error", 4]
   }
1

Add "error-reason": "off" into .soliumrc.json file.

Example:

{
    "extends": "solium:all",
    "plugins": ["security"],
    "rules": {
        "quotes": [
            "error",
            "double"
        ],
        "indentation": [
            "error",
            4
        ],
        "linebreak-style": [
            "error",
            "unix"
        ],
        "error-reason": "off"
    }
}

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.