Add .rubocop.yml

This commit is contained in:
Thor77 2018-11-10 15:48:59 +01:00
parent c5f0c70dad
commit f8099a625c
1 changed files with 32 additions and 0 deletions

32
.rubocop.yml Normal file
View File

@ -0,0 +1,32 @@
# 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: 20
# 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: 20