duaraghav8 / solium-plugin-security

The Official Security Plugin for Ethlint (formerly Solium)
http://npmjs.com/package/solium-plugin-security
MIT License
44 stars 12 forks source link

Question concerning rules to enable #34

Closed Cycl0pe closed 5 years ago

Cycl0pe commented 5 years ago

Hi,

I was wondering how you specify that you want to activate all the security rules (enabled and disabled rules by default) in .soliumrc.json file?

Cycl0pe

duaraghav8 commented 5 years ago

If I understand correctly, you're looking for a single flag which you could toggle in your configuration to enable/disable all rules, without having to specify them individually. Is that right?

If yes, then currently it is not possible. I thought of enabling all security rules in the solium-all ruleset, but that forces enabling all style rules too.

You're welcome to share how you imagine this could work in the configuration? you can add to the discussion on https://github.com/duaraghav8/Ethlint/issues/252

Cycl0pe commented 5 years ago

Well, I was looking for a way to enable one or all rules disabled by default but I do not know how to do it in the configuration file.

Cycl0pe

duaraghav8 commented 5 years ago

To clarify, you cannot to that at the moment. You will have to specify all rules as enabled separately in your soliumrc. The issue I've pointed you to is for allowing people to give ideas on how this can be improved.

Cycl0pe commented 5 years ago

I do understand that but how do you enable one specific rule in .soliumrc.json? I did not find any documentation about it.

Thanks

duaraghav8 commented 5 years ago

The documentation is under Plugins https://ethlint.readthedocs.io/en/latest/user-guide.html#plugins eg

{
  "plugins": ["security"],
  "rules": {
    "security/rule-name": "error"
  }
}
Cycl0pe commented 5 years ago

Thanks for your help. I was missing the keyword "security".