Socket
Socket
Sign inDemoInstall

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 flexible, stand-alone linter for Ethereum Solidity


Version published
Weekly downloads
1.5K
increased by20.27%
Maintainers
1
Weekly downloads
 
Created
Source

Solium

Solium is a linter for Solidity which uses Abstract Syntax Trees and allows the user to enable/disable existing rules and add their own ones!

#Install

npm install -g solium

#Usage In the root directory of your DApp, run the following once:

solium --init

This create .soliumrc inside your root directory, which has the configuration for the enabled rules.

You can disable a particular rule by setting its value to false

In order to lint a specific file, use:

solium --file foobar.sol

To run the linter over your entire project, use the following command in your root directory:

solium

#Integrate Solium in your app To access Solium's API, first install it:

npm install --save solium

##Usage

let Solium = require ('solium'),
  sourceCode = 'contract fOO_bar { function HELLO_WORLD () {} }';
    
let errorObjects = Solium.lint (sourceCode, {
  rules: {
    camelcase: true,
    mixedcase: true
  }
});

errorObjects.forEach ( (err) => {
  console.log (err);
});

For a list of all available rules, see solium.json.

Keywords

FAQs

Package last updated on 06 Aug 2016

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