Skip to content

Commit

Permalink
Suppress a RuboCop offense
Browse files Browse the repository at this point in the history
This commit suppresses the following RuboCop offense.

```console
% bundle exec rubocop
(snip)

Offenses:

spec/spec_helper.rb:6:4: C: [Correctable] Style/FetchEnvVar: Use
ENV.fetch('COVERAGE') or ENV.fetch('COVERAGE', nil) instead of ENV['COVERAGE'].
if ENV['COVERAGE'] == 'true'
   ^^^^^^^^^^^^^^^

115 files inspected, 1 offense detected, 1 offense auto-correctable
RuboCop failed!
```
  • Loading branch information
MarttiCheng committed Apr 19, 2022
1 parent 694a26f commit 15c0274
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require 'rubocop-performance'
require 'rubocop/rspec/support'

if ENV['COVERAGE'] == 'true'
if ENV.fetch('COVERAGE', nil) == 'true'
require 'simplecov'
SimpleCov.start
end
Expand Down

0 comments on commit 15c0274

Please sign in to comment.