Skip to content

Commit

Permalink
Use RuboCop RSpec 2.24
Browse files Browse the repository at this point in the history
This commit uses RuboCop RSpec 2.24 and suppress the following new offense:

```console
$ bundle exec rubocop
Inspecting 163 files
(snip)

Offenses:

spec/rubocop/ast/rubocop_compatibility_spec.rb:1:1: C: RSpec/SpecFilePathFormat:
Spec path should end with rubocop/ast/rubo_cop_compatibility*_spec.rb.
# frozen_string_literal: true

spec/rubocop/ast/rubocop_compatibility_spec.rb:3:54: W: [Correctable] Lint/RedundantCopDisableDirective:
Unnecessary disabling of RSpec/FilePath.
RSpec.describe RuboCop::AST::RuboCopCompatibility do # rubocop:disable RSpec/FilePath
                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

163 files inspected, 2 offenses detected, 1 offense autocorrectable
```

https://github.com/rubocop/rubocop-rspec/releases/tag/v2.24.0
  • Loading branch information
koic committed Sep 8, 2023
1 parent f678818 commit 5395638
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .rubocop.yml
Expand Up @@ -120,5 +120,9 @@ RSpec/NestedGroups:
RSpec/MultipleMemoizedHelpers:
Enabled: false

RSpec/SpecFilePathFormat:
CustomTransform:
RuboCopCompatibility: rubocop_compatibility

RSpec/StubbedMock:
Enabled: false
2 changes: 1 addition & 1 deletion spec/rubocop/ast/rubocop_compatibility_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true

RSpec.describe RuboCop::AST::RuboCopCompatibility do # rubocop:disable RSpec/FilePath
RSpec.describe RuboCop::AST::RuboCopCompatibility do
subject(:callback) { RuboCop::AST.rubocop_loaded }

before do
Expand Down

0 comments on commit 5395638

Please sign in to comment.