Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

solium

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

solium

A customisable linter to identify & fix patterns in Ethereum Solidity

  • 1.0.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.5K
decreased by-13.69%
Maintainers
1
Weekly downloads
 
Created
Source

solium

Gitter chat Build Status Latest News Snap Status

Solium is a Security & Style focused Linter for your Solidity Smart Contracts.

It provides powerful rules for writing cleaner, more secure contracts, automatic code formatting and simple-to-understand re-distributable configuration files.

Install

npm install -g solium
solium -V

Install from the snap store

In any of the supported Linux distros:

sudo snap install solium --edge

(Note that this is an experimental and unstable release, at the moment)

Usage

In the root directory of your DApp, run the following:

solium --init

This creates 2 files for you:

  • .soliumignore - contains names of files and directories to ignore while linting
  • .soliumrc.json - contains configuration that tells Solium how to lint your project. You should modify this file to configure rules, plugins and sharable configs.

.soliumrc.json looks something like:

{
  "extends": "solium:all",
  "plugins": ["security"],
  "rules": {
    "quotes": ["error", "double"],
    "indentation": ["error", 4],
    "arg-overflow": ["warning", 3]
  }
}

Lint a single Solidity file

solium -f ./contracts/foobar.sol

Lint over a directory

solium -d contracts/

Or over the entire project using solium -d .. Solium lints all the files inside your project with .sol extension.

Additional Options

  1. Use --watch to enable Hot loading (Hot swapping).
  2. Use the --fix flag to apply automatic formatting
  3. Use solium --help to get the full list of options you can supply.

Migrating from v0

If you're currently using Solium v0, we highly recommend you to migrate to v1. v1 is backward compatible and provides you with much greater flexibility to configure rules, powerful security rules and auto code formatting among other features.

Access the complete Documentation

Keywords

FAQs

Package last updated on 15 Nov 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc