Set some stricter Rubocop rules

This commit is contained in:
Andreas Nedbal 2022-01-15 01:39:35 +01:00 committed by Andreas Nedbal
parent 04177cc135
commit d1b4c5f6c9
3 changed files with 36 additions and 6 deletions

View File

@ -1,23 +1,43 @@
require:
- rt_rubocop_defaults
- rubocop-rails
AllCops:
NewCops: enable
TargetRubyVersion: 2.5
Exclude:
- 'config/**/*'
- 'vendor/**/*'
- 'db/schema.rb'
- 'db/seeds.rb'
- 'bin/**/*'
- 'node_modules/**/*'
Metrics/ClassLength:
Rails:
Enabled: true
Rails/InverseOf:
Enabled: false
Metrics/AbcSize:
Max: 20
Exclude:
- 'db/**/*'
Layout/LineLength:
Enabled: false
Metrics/MethodLength:
Enabled: false
Metrics/ModuleLength:
Enabled: false
Max: 15
Exclude:
- 'db/migrate/*.rb'
Style/ClassAndModuleChildren:
Enabled: false
Style/Documentation:
Enabled: false
Style/RescueStandardError:
Enabled: false
Style/Encoding:
Enabled: false

View File

@ -94,6 +94,8 @@ group :development, :test do
gem 'timecop'
gem 'rails-controller-testing'
gem 'haml_lint', require: false
gem 'rubocop-rails', '~> 2.13', '>= 2.13.1'
gem 'rt_rubocop_defaults', '~> 2.3', '>= 2.3.1'
end
gem "webpacker", "~> 5.2"

View File

@ -474,6 +474,8 @@ GEM
rspec-core (~> 3.0, >= 3.0.0)
sidekiq (>= 2.4.0)
rspec-support (3.10.3)
rt_rubocop_defaults (2.3.1)
rubocop (~> 1.5)
rubocop (1.24.1)
parallel (~> 1.10)
parser (>= 3.0.0.0)
@ -485,6 +487,10 @@ GEM
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.15.1)
parser (>= 3.0.1.1)
rubocop-rails (2.13.1)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.7.0, < 2.0)
ruby-progressbar (1.11.0)
ruby-vips (2.1.4)
ffi (~> 1.12)
@ -658,6 +664,8 @@ DEPENDENCIES
rspec-mocks
rspec-rails (~> 4.0)
rspec-sidekiq (~> 3.0)
rt_rubocop_defaults (~> 2.3, >= 2.3.1)
rubocop-rails (~> 2.13, >= 2.13.1)
ruby-progressbar
sanitize
sass-rails (~> 5.0)