Skip to content

Commit

Permalink
Fix an offenses when using RuboCop 0.81.0
Browse files Browse the repository at this point in the history
RuboCop 0.81 has been released.
https://github.com/rubocop-hq/rubocop/releases/tag/v0.81.0

This PR fixes the following offenses when using RuboCop 0.81.0.

```console
% cd path/to/rubocop-rspec
% bundle exec rake internal_investigation
(snip)

Offenses:

lib/rubocop/cop/rspec/cop.rb:4:14: W: Lint/RedundantCopDisableDirective:
Unnecessary disabling of Style/Documentation.
module Cop # rubocop:disable Style/Documentation
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/rubocop/cop/rspec_cops.rb:12:18: W: Lint/RedundantCopDisableDirective:
Unnecessary disabling of Lint/SuppressedException.
rescue LoadError # rubocop:disable Lint/SuppressedException
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

202 files inspected, 2 offenses detected
rake aborted!
Command failed with status (1): [bundle exec rubocop --require
rubocop-rspe...]
/Users/koic/src/github.com/rubocop-hq/rubocop-rspec/Rakefile:32:in
`block in <top (required)>'
/Users/koic/.rbenv/versions/2.7.1/bin/bundle:23:in `load'
/Users/koic/.rbenv/versions/2.7.1/bin/bundle:23:in `<main>'
Tasks: TOP => internal_investigation
(See full trace by running task with --trace)
```

https://circleci.com/gh/rubocop-hq/rubocop-rspec/11350
  • Loading branch information
koic committed Apr 1, 2020
1 parent 84cca39 commit 478ab25
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/rubocop/cop/rspec/cop.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

module RuboCop
module Cop # rubocop:disable Style/Documentation
module Cop
WorkaroundCop = Cop.dup

# Clone of the the normal RuboCop::Cop::Cop class so we can rewrite
Expand Down
2 changes: 1 addition & 1 deletion lib/rubocop/cop/rspec_cops.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

begin
require_relative 'rspec/rails/http_status'
rescue LoadError # rubocop:disable Lint/SuppressedException
rescue LoadError
# Rails/HttpStatus cannot be loaded if rack/utils is unavailable.
end

Expand Down

0 comments on commit 478ab25

Please sign in to comment.