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

Suppress RuboCop offenses #229

Merged
merged 1 commit into from
Apr 20, 2022
Merged

Conversation

koic
Copy link
Member

@koic koic commented Apr 20, 2022

This PR suppresses the following RuboCop offenses.

% bundle exec rake
(snip)

Offenses:

Gemfile:21:4: C: [Correctable] Style/FetchEnvVar:
Use ENV.fetch('RUBOCOP_VERSION') or ENV.fetch('RUBOCOP_VERSION', nil) instead of ENV['RUBOCOP_VERSION'].
if ENV['RUBOCOP_VERSION'] == 'none'
   ^^^^^^^^^^^^^^^^^^^^^^
Gemfile:28:9: C: [Correctable] Style/FetchEnvVar:
Use ENV.fetch('RUBOCOP_VERSION') or ENV.fetch('RUBOCOP_VERSION', nil) instead of ENV['RUBOCOP_VERSION'].
  elsif ENV['RUBOCOP_VERSION'] == 'master'
        ^^^^^^^^^^^^^^^^^^^^^^
lib/rubocop/ast/traversal.rb:37:39: C: [Correctable] Style/FetchEnvVar:
Use ENV.fetch('RUBOCOP_DEBUG') or ENV.fetch('RUBOCOP_DEBUG', nil) instead of ENV['RUBOCOP_DEBUG'].
                         arity_check: ENV['RUBOCOP_DEBUG'] && self.arity_check(arity),
                                      ^^^^^^^^^^^^^^^^^^^^

162 files inspected, 3 offenses detected, 3 offenses auto-correctable

This PR suppresses the following RuboCop offenses.

```console
% bundle exec rake
(snip)

Offenses:

Gemfile:21:4: C: [Correctable] Style/FetchEnvVar:
Use ENV.fetch('RUBOCOP_VERSION') or ENV.fetch('RUBOCOP_VERSION', nil) instead of ENV['RUBOCOP_VERSION'].
if ENV['RUBOCOP_VERSION'] == 'none'
   ^^^^^^^^^^^^^^^^^^^^^^
Gemfile:28:9: C: [Correctable] Style/FetchEnvVar:
Use ENV.fetch('RUBOCOP_VERSION') or ENV.fetch('RUBOCOP_VERSION', nil) instead of ENV['RUBOCOP_VERSION'].
  elsif ENV['RUBOCOP_VERSION'] == 'master'
        ^^^^^^^^^^^^^^^^^^^^^^
lib/rubocop/ast/traversal.rb:37:39: C: [Correctable] Style/FetchEnvVar:
Use ENV.fetch('RUBOCOP_DEBUG') or ENV.fetch('RUBOCOP_DEBUG', nil) instead of ENV['RUBOCOP_DEBUG'].
                         arity_check: ENV['RUBOCOP_DEBUG'] && self.arity_check(arity),
                                      ^^^^^^^^^^^^^^^^^^^^

162 files inspected, 3 offenses detected, 3 offenses auto-correctable
```
@koic koic merged commit 016a2a0 into rubocop:master Apr 20, 2022
@koic koic deleted the suppress_rubocop_offenses branch April 20, 2022 08:59
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.

1 participant