diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 0000000..5d48bb2 --- /dev/null +++ b/.rubocop.yml @@ -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