mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
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:
4
.github/workflows/linters.yml
vendored
4
.github/workflows/linters.yml
vendored
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
1
Gemfile
1
Gemfile
@@ -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'
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user