Introduces rubocop-rspec
Also regenerating the config. Most stuff in there didn't really make sense. Time to go through .rubocop_todo.yml people :-)
This commit is contained in:
parent
272690fa21
commit
5fc867a8fc
4 changed files with 583 additions and 135 deletions
42
.rubocop.yml
42
.rubocop.yml
|
|
@ -1,41 +1,17 @@
|
|||
# Inherit style from another configuration
|
||||
require: rubocop-rspec
|
||||
|
||||
inherit_from: .rubocop_todo.yml
|
||||
|
||||
# Apply rule to all cops
|
||||
AllCops:
|
||||
Include:
|
||||
- '**/Rakefile'
|
||||
- '**/config.ru'
|
||||
Exclude:
|
||||
- 'db/schema.rb'
|
||||
- 'vendor/bundle/**/*'
|
||||
- 'bundle/**/*'
|
||||
- 'config/**/*'
|
||||
- 'bin/*'
|
||||
TargetRubyVersion: 2.4
|
||||
UseCache: true
|
||||
CacheRootDirectory: tmp/rubocop_cache_rails_dir
|
||||
MaxFilesInCache: 4000
|
||||
|
||||
#################### Metrics ###############################
|
||||
#################### Style ###########################
|
||||
|
||||
# Start with cops for Ruby >= 2.3 disabled
|
||||
Style/NumericPredicate:
|
||||
Enabled: false
|
||||
##################### Metrics ##################################
|
||||
|
||||
##################### Rails ##################################
|
||||
|
||||
Rails:
|
||||
Enabled: true
|
||||
|
||||
# Avoid deep blocks nesting
|
||||
Metrics/BlockNesting:
|
||||
Max: 4
|
||||
|
||||
# Avoid writing classes that are more than 300 lines
|
||||
Metrics/ClassLength:
|
||||
Max: 300
|
||||
Exclude:
|
||||
- 'app/models/conference.rb'
|
||||
|
||||
Metrics/BlockLength:
|
||||
Exclude:
|
||||
- 'spec/models/conference_spec.rb'
|
||||
- 'spec/features/ability_spec.rb'
|
||||
- 'spec/models/ability_spec.rb'
|
||||
- 'spec/models/admin_ability_spec.rb'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue