From 7a3d335065e890a496f1ed6b34d23c3e9a1af85b Mon Sep 17 00:00:00 2001 From: Alexander Meindl Date: Sun, 15 Oct 2017 09:33:41 +0200 Subject: [PATCH] Updated, rails optimized common rubocop configuration --- .rubocop.yml | 52 ++++++++++++++++++++++++---------------------------- 1 file changed, 24 insertions(+), 28 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index d4c6742..b1ee6d8 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,43 +1,39 @@ Rails: Enabled: true -Rails/ApplicationRecord: - Enabled: false - AllCops: TargetRubyVersion: 2.1 + TargetRailsVersion: 4.2 -Metrics/LineLength: - Max: 140 - -# Offense count: 34 -# Configuration parameters: CountComments. -Metrics/MethodLength: - Max: 60 - -# Offense count: 11 -Metrics/CyclomaticComplexity: - Max: 13 - -# Offense count: 10 -Metrics/PerceivedComplexity: - Max: 14 - -# Offense count: 15 Metrics/AbcSize: Max: 65 -Metrics/ModuleLength: - Max: 300 +Metrics/BlockLength: + Max: 50 Metrics/ClassLength: Max: 300 +Metrics/CyclomaticComplexity: + Max: 13 + +Metrics/LineLength: + Max: 140 + +Metrics/MethodLength: + Max: 60 + +Metrics/ModuleLength: + Max: 300 + +Metrics/PerceivedComplexity: + Max: 14 + +Rails/SkipsModelValidations: + Enabled: false + +Style/AutoResourceCleanup: + Enabled: true + Style/Documentation: Enabled: false - -Rails/HttpPositionalArguments: - Enabled: false - -Metrics/BlockLength: - Max: 50