Skip to content

Commit

Permalink
DEV: Honor split RuboCop gems (#31)
Browse files Browse the repository at this point in the history
RuboCop RSpec used to contain departments for Capybara and FactoryBot cops, but those are being split out into rubocop-capybara and rubocop-factory_bot gems respectively. This change updates our gemspec and configuration files to reflect that.
  • Loading branch information
Drenmi committed Feb 12, 2024
1 parent 4264eab commit 30b2930
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 15 deletions.
5 changes: 5 additions & 0 deletions rubocop-capybara.yml
@@ -0,0 +1,5 @@
require:
- rubocop-capybara

Capybara/CurrentPathExpectation:
Enabled: true
2 changes: 2 additions & 0 deletions rubocop-discourse.gemspec
Expand Up @@ -13,6 +13,8 @@ Gem::Specification.new do |s|

s.add_runtime_dependency "rubocop", ">= 1.59.0"
s.add_runtime_dependency "rubocop-rspec", ">= 2.25.0"
s.add_runtime_dependency "rubocop-factory_bot", ">= 2.0.0"
s.add_runtime_dependency "rubocop-capybara", ">= 2.0.0"

s.add_development_dependency "rake", "~> 13.1.0"
s.add_development_dependency "rspec", "~> 3.12.0"
Expand Down
11 changes: 11 additions & 0 deletions rubocop-factory_bot.yml
@@ -0,0 +1,11 @@
require:
- rubocop-factory_bot

FactoryBot/AttributeDefinedStatically:
Enabled: true

FactoryBot/CreateList:
Enabled: true

FactoryBot/FactoryClassName:
Enabled: true
15 changes: 0 additions & 15 deletions rubocop-rspec.yml
Expand Up @@ -223,23 +223,8 @@ RSpec/VoidExpect:
RSpec/Yield:
Enabled: true

Capybara/CurrentPathExpectation:
Enabled: true

RSpec/Capybara/FeatureMethods:
Enabled: true

Capybara/VisibilityMatcher:
Enabled: true

FactoryBot/AttributeDefinedStatically:
Enabled: true

FactoryBot/CreateList:
Enabled: true

FactoryBot/FactoryClassName:
Enabled: true

RSpec/Rails/HttpStatus:
Enabled: true
3 changes: 3 additions & 0 deletions stree-compat.yml
Expand Up @@ -3,10 +3,13 @@ require:

inherit_from:
- ./rubocop-core.yml
- ./rubocop-capybara.yml
- ./rubocop-factory_bot.yml
- ./rubocop-rspec.yml

AllCops:
TargetRubyVersion: 3.2
SuggestExtensions: false
DisabledByDefault: true
Exclude:
- 'db/schema.rb'
Expand Down

0 comments on commit 30b2930

Please sign in to comment.