Skip to content

Linter: upgrade to v1 #555

Closed
Closed
@duaraghav8

Description

@duaraghav8

Hi @maraoz ,
Its been quite a while since Solium v1 was released. It comes with significant improvements including automatic code fixing, new security checks for contract code and ability to configure rule behavior (like 2 spaces instead of 4).

I'm raising this issue to simply make you aware, since v1 will significantly improve your workflow.

Adoption is pretty simple:

npm i -g solium

Going by your current .soliumrc.json, your new .soliumrc.json would look like:

{
  "extends": "solium:all",
  "plugins": ["security"],
  "rules": {
    "mixedcase": "off"
  }
}

(Although I should inform you that the mixedcase rule's bugs have been resolved)

If, for eg, you'd like to disable a security rule you don't agree with, simply add "security/rule-name": "off" inside rules object.

Run normally using solium -d contracts/ or solium -d contracts/ --fix to apply code fixes (wherever possible).

Usage docs
List of Security Rules

Please do not hesitate in closing this issue if you feel its not currently a priority. However, I do recommend that you upgrade to further improve contract security. Feel free to ask me anything!

(I can make a PR for this, but a dev must update their solium version on workstation too)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions