Install rubocop-rspec

Why not enforce more consistency in our specs also?

Some of them generated way too many violations, so I relaxed them a bit.
This commit is contained in:
David Cook
2023-09-06 12:26:14 +10:00
parent 715e8253ff
commit 0091a60a6e
5 changed files with 22 additions and 2 deletions

View File

@@ -18,7 +18,9 @@ jobs:
uses: reviewdog/action-rubocop@v2
with:
rubocop_version: gemfile
rubocop_extensions: rubocop-rails:gemfile
rubocop_extensions:
- rubocop-rails:gemfile
- rubocop-rspec:gemfile
reporter: github-pr-check
level: error
fail_on_error: true

View File

@@ -4,7 +4,9 @@
#
# The configuration is split into three files. Look into those files for more details.
#
require: rubocop-rails
require:
- rubocop-rails
- rubocop-rspec
inherit_from:
# The automatically generated todo list to ignore all current violations.

View File

@@ -125,6 +125,12 @@ Rails/SkipsModelValidations:
- update_column
- update_columns
RSpec/MultipleExpectations:
Max: 5 # Default 1
RSpec/MultipleMemoizedHelpers:
Max: 10 # Default 5
Style/Documentation:
Enabled: false

View File

@@ -186,6 +186,7 @@ group :development do
gem 'rails-erd'
gem 'rubocop'
gem 'rubocop-rails'
gem 'rubocop-rspec'
gem 'spring'
gem 'spring-commands-rspec'
gem 'spring-commands-rubocop'

View File

@@ -655,11 +655,19 @@ GEM
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.30.0)
parser (>= 3.2.1.0)
rubocop-capybara (2.18.0)
rubocop (~> 1.41)
rubocop-factory_bot (2.23.1)
rubocop (~> 1.33)
rubocop-rails (2.23.1)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
rubocop-rspec (2.23.2)
rubocop (~> 1.33)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
ruby-graphviz (1.2.5)
rexml
ruby-progressbar (1.13.0)
@@ -918,6 +926,7 @@ DEPENDENCIES
rswag-ui
rubocop
rubocop-rails
rubocop-rspec
sd_notify
select2-rails!
shoulda-matchers