Skip to content

Commit

Permalink
Merge pull request #1587 from jonas054/fix_exit_code
Browse files Browse the repository at this point in the history
Exit with exit code 1 if there were errors
  • Loading branch information
bbatsov committed Jan 21, 2015
2 parents 2660440 + df494b1 commit 24a120e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -35,6 +35,7 @@
* [#1527](https://github.com/bbatsov/rubocop/issues/1527): Make autocorrect `BracesAroundHashParameter` leave the correct number of spaces. ([@mattjmcnaughton][])
* [#1547](https://github.com/bbatsov/rubocop/issues/1547): Don't print `[Corrected]` when auto-correction was avoided in `Style/Semicolon`. ([@jonas054][])
* [#1573](https://github.com/bbatsov/rubocop/issues/1573): Fix assignment-related auto-correction for `BlockAlignment`. ([@lumeet][])
* [#1587](https://github.com/bbatsov/rubocop/pull/1587): Exit with exit code 1 if there were errors ("crashing" cops). ([@jonas054][])

## 0.28.0 (10/12/2014)

Expand Down
2 changes: 1 addition & 1 deletion lib/rubocop/cli.rb
Expand Up @@ -24,7 +24,7 @@ def run(args = ARGV)
all_passed = runner.run(paths)
display_error_summary(runner.errors)

all_passed && !runner.aborting? ? 0 : 1
all_passed && !runner.aborting? && runner.errors.empty? ? 0 : 1
rescue Cop::AmbiguousCopName => e
$stderr.puts "Ambiguous cop name #{e.message} needs namespace " \
'qualifier.'
Expand Down

0 comments on commit 24a120e

Please sign in to comment.