Skip to content

Commit

Permalink
Merge pull request #89 from nventuro/patch-3
Browse files Browse the repository at this point in the history
Have --max-warnings better reflect its name
  • Loading branch information
Franco Victorio authored Dec 20, 2018
2 parents d809263 + 77e1f68 commit f389547
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions solhint.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function init() {
.option('-f, --formatter [name]', 'report formatter name (stylish, table, tap, unix)')
.option(
'-w, --max-warnings [maxWarningsNumber]',
'number of warnings to trigger nonzero exit code'
'number of allowed warnings'
)
.option('-c, --config [file_name]', 'file to use as your .solhint.json')
.option('-q, --quiet', 'report errors only - default: false')
Expand Down Expand Up @@ -57,7 +57,7 @@ function execMainAction() {
const reportLists = program.args.filter(_.isString).map(processPath)
const reports = _.flatten(reportLists)
const warningsNumberExceeded =
program.maxWarnings >= 0 && reports[0].warningCount >= program.maxWarnings
program.maxWarnings >= 0 && reports[0].warningCount > program.maxWarnings

if (program.quiet) {
// filter the list of reports, to set errors only.
Expand Down

0 comments on commit f389547

Please sign in to comment.