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 an error when ocurring cop error #8911

Merged
merged 1 commit into from Oct 21, 2020

Commits on Oct 21, 2020

  1. Fix an error when ocurring cop error

    Follow rubocop#8908.
    
    This PR fixes the following error when ocurring cop error.
    
    ```console
    % bundle exec rubocop
    (snip)
    
    1 file inspected, no offenses detected
    
    1 error occurred:
    An error occurred while Layout/ExtraSpacing cop was inspecting
    /Users/koic/src/github.com/koic/rubocop-issues/43/example.rb.
    undefined method `config_store' for nil:NilClass
    /Users/koic/src/github.com/rubocop-hq/rubocop/lib/rubocop/version.rb:35:in
    `extension_versions'
    /Users/koic/src/github.com/rubocop-hq/rubocop/lib/rubocop/version.rb:21:in
    `version'
    /Users/koic/src/github.com/rubocop-hq/rubocop/lib/rubocop/cli/command/execute_runner.rb:62:in
    `display_error_summary'
    /Users/koic/src/github.com/rubocop-hq/rubocop/lib/rubocop/cli/command/execute_runner.rb:27:in
    `execute_runner'
    /Users/koic/src/github.com/rubocop-hq/rubocop/lib/rubocop/cli/command/execute_runner.rb:17:in
    `run'
    ```
    
    It suppresses unexpected `undefined method `config_store' for nil:NilClass`.
    koic committed Oct 21, 2020
    Copy the full SHA
    98e1021 View commit details
    Browse the repository at this point in the history