Readd current version of rubocop
This commit is contained in:
parent
cded88425e
commit
0baa7901b2
|
|
@ -0,0 +1,49 @@
|
|||
require:
|
||||
- rubocop-performance
|
||||
- rubocop-rails
|
||||
|
||||
# Stolen from https://gist.github.com/jhass/a5ae80d87f18e53e7b56
|
||||
AllCops:
|
||||
Exclude:
|
||||
- "bin/**/*"
|
||||
- "db/schema.rb"
|
||||
|
||||
# Enable Rails
|
||||
Rails:
|
||||
Enabled: true
|
||||
|
||||
# Commonly used screens these days easily fit more than 80 characters.
|
||||
Metrics/LineLength:
|
||||
Max: 120
|
||||
|
||||
# Too short methods lead to extraction of single-use methods, which can make
|
||||
# the code easier to read (by naming things), but can also clutter the class
|
||||
Metrics/MethodLength:
|
||||
Exclude:
|
||||
- "db/migrate/*"
|
||||
Max: 50
|
||||
|
||||
# The guiding principle of classes is SRP, SRP can't be accurately measured by LoC
|
||||
Metrics/ClassLength:
|
||||
Max: 1500
|
||||
Metrics/ModuleLength:
|
||||
Max: 1500
|
||||
|
||||
# Raise AbcSize from 15 to 20
|
||||
Metrics/AbcSize:
|
||||
Exclude:
|
||||
- "db/migrate/*"
|
||||
Max: 50
|
||||
|
||||
Metrics/BlockLength:
|
||||
ExcludedMethods:
|
||||
- "namespace"
|
||||
- "create_table"
|
||||
Exclude:
|
||||
- "config/**/*.rb"
|
||||
- "spec/**/*.rb"
|
||||
|
||||
# Disable documentation checks for now
|
||||
# should be done with yard instead
|
||||
Style/Documentation:
|
||||
Enabled: false
|
||||
3
Gemfile
3
Gemfile
|
|
@ -56,6 +56,9 @@ group :development do
|
|||
gem 'listen', '>= 3.0.5', '< 3.2'
|
||||
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
|
||||
gem 'railroady'
|
||||
gem 'rubocop'
|
||||
gem 'rubocop-performance'
|
||||
gem 'rubocop-rails'
|
||||
gem 'solargraph'
|
||||
gem 'spring'
|
||||
gem 'spring-watcher-listen', '~> 2.0.0'
|
||||
|
|
|
|||
10
Gemfile.lock
10
Gemfile.lock
|
|
@ -231,6 +231,13 @@ GEM
|
|||
unicode-display_width (>= 1.4.0, < 3.0)
|
||||
rubocop-ast (1.10.0)
|
||||
parser (>= 3.0.1.1)
|
||||
rubocop-performance (1.11.4)
|
||||
rubocop (>= 1.7.0, < 2.0)
|
||||
rubocop-ast (>= 0.4.0)
|
||||
rubocop-rails (2.11.3)
|
||||
activesupport (>= 4.2.0)
|
||||
rack (>= 1.1)
|
||||
rubocop (>= 1.7.0, < 2.0)
|
||||
ruby-progressbar (1.11.0)
|
||||
ruby_dep (1.5.0)
|
||||
shoulda-matchers (5.0.0)
|
||||
|
|
@ -311,6 +318,9 @@ DEPENDENCIES
|
|||
railroady
|
||||
rails (~> 6.0.3)
|
||||
rspec-rails
|
||||
rubocop
|
||||
rubocop-performance
|
||||
rubocop-rails
|
||||
shoulda-matchers
|
||||
solargraph
|
||||
spring
|
||||
|
|
|
|||
Loading…
Reference in New Issue