Skip to content

Commit

Permalink
Remove init-config cmd from cli help
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastinez authored and Sebastian Martinez committed Jul 21, 2020
1 parent 4924180 commit 475a480
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
14 changes: 4 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ solhint --version
First initialize a configuration file, if you don't have one:

```sh
solhint --init
solhint init-config
```

This will create a `.solhint.json` file with the default rules enabled. Then run Solhint with one or more [Globs](https://en.wikipedia.org/wiki/Glob_(programming)) as arguments. For example, to lint all files inside `contracts` directory, you can do:
Expand Down Expand Up @@ -72,7 +72,6 @@ Options:
Commands:
stdin [options] linting of source code data provided to STDIN
init-config create configuration file for solhint
```

## Configuration
Expand All @@ -82,23 +81,18 @@ You can use a `.solhint.json` file to configure Solhint for the whole project.
To generate a new sample `.solhint.json` file in current folder you can do:

```sh
solhint init-config
solhint --init
```

This file has the following
format:


```json
{
"extends": "solhint:recommended",
"plugins": [],
"rules": {
"avoid-suicide": "error",
"avoid-sha3": "warn"
}
"extends": "solhint:default"
}
```

A full list of all supported rules can be found [here](docs/rules.md).

To ignore files that do not require validation you can use a `.solhintignore` file. It supports rules in
Expand Down
2 changes: 1 addition & 1 deletion solhint.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function init() {
.action(processStdin)

program
.command('init-config')
.command('init-config', null, { noHelp:true })
.description('create configuration file for solhint')
.action(writeSampleConfigFile)

Expand Down

0 comments on commit 475a480

Please sign in to comment.