Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix undefined method `status' for #<RuboCop::ConfigNotFoundError> (NoMethodError) #5651

Merged
merged 1 commit into from
Mar 9, 2018

Conversation

onk
Copy link
Contributor

@onk onk commented Mar 8, 2018

$ rubocop -c file_that_does_not_exist.yml foo.rb
Configuration file not found: /Users/onaka/src/github.com/bbatsov/rubocop/file_that_does_not_exist.yml
Traceback (most recent call last):
        6: from /Users/onaka/.gem/ruby/2.6.0/bin/rubocop:23:in `<main>'
        5: from /Users/onaka/.gem/ruby/2.6.0/bin/rubocop:23:in `load'
        4: from /Users/onaka/.gem/ruby/2.6.0/gems/rubocop-0.53.0/bin/rubocop:12:in `<top (required)>'
        3: from /opt/rubies/2.6.0-dev/lib/ruby/2.6.0/benchmark.rb:308:in `realtime'
        2: from /Users/onaka/.gem/ruby/2.6.0/gems/rubocop-0.53.0/bin/rubocop:13:in `block in <top (required)>'
        1: from /Users/onaka/.gem/ruby/2.6.0/gems/rubocop-0.53.0/lib/rubocop/cli.rb:36:in `run'
/Users/onaka/.gem/ruby/2.6.0/gems/rubocop-0.53.0/lib/rubocop/cli.rb:44:in `rescue in run': undefined method `status' for #<RuboCop::ConfigNotFoundError:0x00007fd0b808e040> (NoMethodError)

Replace this text with a summary of the changes in your PR.
The more detailed you are, the better.


Before submitting the PR make sure the following are checked:

  • Wrote good commit messages.
  • Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Added an entry to the Changelog if the new code introduces user-observable changes. See changelog entry format.
  • The PR relates to only one subject with a clear title
    and description in grammatically correct, complete sentences.
  • Run rake default or rake parallel. It executes all tests and RuboCop for itself, and generates the documentation.

@bbatsov
Copy link
Collaborator

bbatsov commented Mar 9, 2018

Please, add a changelog entry for the bugfix.

@onk onk force-pushed the error_status branch 2 times, most recently from 458508b to 6d01239 Compare March 9, 2018 04:16
…MethodError)

```
$ rubocop -c file_that_does_not_exist.yml foo.rb
Configuration file not found: /Users/onaka/src/github.com/bbatsov/rubocop/file_that_does_not_exist.yml
Traceback (most recent call last):
        6: from /Users/onaka/.gem/ruby/2.6.0/bin/rubocop:23:in `<main>'
        5: from /Users/onaka/.gem/ruby/2.6.0/bin/rubocop:23:in `load'
        4: from /Users/onaka/.gem/ruby/2.6.0/gems/rubocop-0.53.0/bin/rubocop:12:in `<top (required)>'
        3: from /opt/rubies/2.6.0-dev/lib/ruby/2.6.0/benchmark.rb:308:in `realtime'
        2: from /Users/onaka/.gem/ruby/2.6.0/gems/rubocop-0.53.0/bin/rubocop:13:in `block in <top (required)>'
        1: from /Users/onaka/.gem/ruby/2.6.0/gems/rubocop-0.53.0/lib/rubocop/cli.rb:36:in `run'
/Users/onaka/.gem/ruby/2.6.0/gems/rubocop-0.53.0/lib/rubocop/cli.rb:44:in `rescue in run': undefined method `status' for #<RuboCop::ConfigNotFoundError:0x00007fd0b808e040> (NoMethodError)
```
@bbatsov bbatsov merged commit 88fac0e into rubocop:master Mar 9, 2018
@bbatsov
Copy link
Collaborator

bbatsov commented Mar 9, 2018

👍

This was referenced Mar 21, 2018
This was referenced Mar 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants