Skip to content

Commit

Permalink
Merge pull request #4296 from DFE-Digital/fix-rubocop-namespace
Browse files Browse the repository at this point in the history
Rubocop changes
  • Loading branch information
inulty-dfe authored Jun 21, 2024
2 parents 52f20f4 + 47a5516 commit f1d9f9d
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 7 deletions.
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
require:
- rubocop-rails
- rubocop-rspec
- rubocop-rspec_rails
- rubocop-capybara
- rubocop-factory_bot

Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ group :development, :test do
gem 'rubocop-factory_bot'
gem 'rubocop-rails'
gem 'rubocop-rspec'
gem 'rubocop-rspec_rails'

# run specs in parallel
gem 'parallel_tests'
Expand Down
4 changes: 4 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,9 @@ GEM
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rspec (3.0.1)
rubocop (~> 1.61)
rubocop-rspec_rails (2.30.0)
rubocop (~> 1.61)
rubocop-rspec (~> 3, >= 3.0.1)
ruby-graphviz (1.2.5)
rexml
ruby-progressbar (1.13.0)
Expand Down Expand Up @@ -858,6 +861,7 @@ DEPENDENCIES
rubocop-factory_bot
rubocop-rails
rubocop-rspec
rubocop-rspec_rails
rubypants
schema_to_scaffold
sentry-rails
Expand Down
7 changes: 2 additions & 5 deletions config/rubocop/naming.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,9 @@ Naming/MethodName:
Exclude:
- 'app/models/accrediting_provider_enrichment.rb'

# Allow numbers in variable names
Naming/VariableNumber:
Exclude:
- 'app/serializers/api/public/v1/serializable_location.rb'
- 'app/serializers/api/public/v1/serializable_provider.rb'
- 'spec/serializers/api/public/v1/serializable_location_spec.rb'
- 'spec/serializers/api/public/v1/serializable_provider_spec.rb'
Enabled: false

Naming/PredicateName:
Exclude:
Expand Down
13 changes: 11 additions & 2 deletions config/rubocop/rspec.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# https://docs.rubocop.org/rubocop-rspec/cops_rspec.html

require: rubocop-rspec

RSpec/ExampleLength:
Enabled: false

Expand Down Expand Up @@ -207,8 +205,19 @@ RSpec/InstanceVariable:
RSpec/PredicateMatcher:
Enabled: false

RSpecRails/HaveHttpStatus:
Exclude:
- 'spec/smoke/api/v1/courses_spec.rb'
- 'spec/smoke/api/v1/healthcheck_spec.rb'
- 'spec/smoke/api/v1/providers_spec.rb'

RSpec/DescribeClass:
Enabled: false

RSpec/NamedSubject:
Enabled: false

RSpec/Dialect:
PreferredMethods:
- "scenario"
- "feature"

0 comments on commit f1d9f9d

Please sign in to comment.