From f8099a625cefcd6c17f11c97d84c6f05a50e7aba Mon Sep 17 00:00:00 2001 From: Thor77 Date: Sat, 10 Nov 2018 15:48:59 +0100 Subject: [PATCH] Add .rubocop.yml --- .rubocop.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .rubocop.yml 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