Set some stricter Rubocop rules
This commit is contained in:
parent
04177cc135
commit
d1b4c5f6c9
32
.rubocop.yml
32
.rubocop.yml
|
@ -1,23 +1,43 @@
|
||||||
|
require:
|
||||||
|
- rt_rubocop_defaults
|
||||||
|
- rubocop-rails
|
||||||
AllCops:
|
AllCops:
|
||||||
NewCops: enable
|
TargetRubyVersion: 2.5
|
||||||
Exclude:
|
Exclude:
|
||||||
|
- 'config/**/*'
|
||||||
- 'vendor/**/*'
|
- 'vendor/**/*'
|
||||||
- 'db/schema.rb'
|
- 'db/schema.rb'
|
||||||
|
- 'db/seeds.rb'
|
||||||
|
- 'bin/**/*'
|
||||||
|
- 'node_modules/**/*'
|
||||||
|
|
||||||
Metrics/ClassLength:
|
Rails:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
|
Rails/InverseOf:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
|
Metrics/AbcSize:
|
||||||
|
Max: 20
|
||||||
|
Exclude:
|
||||||
|
- 'db/**/*'
|
||||||
|
|
||||||
Layout/LineLength:
|
Layout/LineLength:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
Metrics/MethodLength:
|
Metrics/MethodLength:
|
||||||
Enabled: false
|
Max: 15
|
||||||
|
Exclude:
|
||||||
Metrics/ModuleLength:
|
- 'db/migrate/*.rb'
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/ClassAndModuleChildren:
|
Style/ClassAndModuleChildren:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
Style/Documentation:
|
Style/Documentation:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
|
Style/RescueStandardError:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
Style/Encoding:
|
||||||
|
Enabled: false
|
2
Gemfile
2
Gemfile
|
@ -94,6 +94,8 @@ group :development, :test do
|
||||||
gem 'timecop'
|
gem 'timecop'
|
||||||
gem 'rails-controller-testing'
|
gem 'rails-controller-testing'
|
||||||
gem 'haml_lint', require: false
|
gem 'haml_lint', require: false
|
||||||
|
gem 'rubocop-rails', '~> 2.13', '>= 2.13.1'
|
||||||
|
gem 'rt_rubocop_defaults', '~> 2.3', '>= 2.3.1'
|
||||||
end
|
end
|
||||||
|
|
||||||
gem "webpacker", "~> 5.2"
|
gem "webpacker", "~> 5.2"
|
||||||
|
|
|
@ -474,6 +474,8 @@ GEM
|
||||||
rspec-core (~> 3.0, >= 3.0.0)
|
rspec-core (~> 3.0, >= 3.0.0)
|
||||||
sidekiq (>= 2.4.0)
|
sidekiq (>= 2.4.0)
|
||||||
rspec-support (3.10.3)
|
rspec-support (3.10.3)
|
||||||
|
rt_rubocop_defaults (2.3.1)
|
||||||
|
rubocop (~> 1.5)
|
||||||
rubocop (1.24.1)
|
rubocop (1.24.1)
|
||||||
parallel (~> 1.10)
|
parallel (~> 1.10)
|
||||||
parser (>= 3.0.0.0)
|
parser (>= 3.0.0.0)
|
||||||
|
@ -485,6 +487,10 @@ GEM
|
||||||
unicode-display_width (>= 1.4.0, < 3.0)
|
unicode-display_width (>= 1.4.0, < 3.0)
|
||||||
rubocop-ast (1.15.1)
|
rubocop-ast (1.15.1)
|
||||||
parser (>= 3.0.1.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-progressbar (1.11.0)
|
||||||
ruby-vips (2.1.4)
|
ruby-vips (2.1.4)
|
||||||
ffi (~> 1.12)
|
ffi (~> 1.12)
|
||||||
|
@ -658,6 +664,8 @@ DEPENDENCIES
|
||||||
rspec-mocks
|
rspec-mocks
|
||||||
rspec-rails (~> 4.0)
|
rspec-rails (~> 4.0)
|
||||||
rspec-sidekiq (~> 3.0)
|
rspec-sidekiq (~> 3.0)
|
||||||
|
rt_rubocop_defaults (~> 2.3, >= 2.3.1)
|
||||||
|
rubocop-rails (~> 2.13, >= 2.13.1)
|
||||||
ruby-progressbar
|
ruby-progressbar
|
||||||
sanitize
|
sanitize
|
||||||
sass-rails (~> 5.0)
|
sass-rails (~> 5.0)
|
||||||
|
|
Loading…
Reference in New Issue