Solhint Project

Donate with Ethereum

Gitter chat Build Status NPM version Coverage Status MIT licensed dependencies Status devDependencies Status

This is an open source project for linting solidity code. This project provide both security and style guide validations.


You can install Solhint using npm:

npm install -g solhint

# verify that it was installed correctly
solhint -V


For linting Solidity files you need to run Solhint with one or more Globs as arguments. For example, to lint all files inside contracts directory, you can do:

solhint "contracts/**/*.sol"

To lint a single file:

solhint contracts/MyToken.sol

Solhint command description:

Usage: solhint [options] <file> [...other_files]

Linter for Solidity programming language


  -V, --version                              output the version number
  -f, --formatter [name]                     report formatter name (stylish, table, tap, unix)
  -w, --max-warnings [maxWarningsNumber]     number of warnings to trigger nonzero
  -q --quiet                                 report errors only - default: false
  --ignore-path [file_name]                  file to use as your .solhintignore
  -h, --help                                 output usage information


  stdin [options]         put source code to stdin of this utility
  init-config             create sample solhint config in current folder

You can use any of the following formatters supported by ESLint. See EsLint docs about formatters here.


Table of Contents

IDE Integrations



Back Us

Solhint is free to use and open-sourced. If you value our effort and feel like helping us to keep pushing this tool forward, you can send us a small donation. We’ll highly appreciate it :)

Donate with Ethereum