From ebb52038875e4d094cdc5fdaea339b954ec9f4f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ana=20Mar=C3=ADa=20Mart=C3=ADnez=20G=C3=B3mez?= Date: Wed, 21 Dec 2016 11:42:19 +0100 Subject: [PATCH] Exclude conference model from ClassLength cop Exclude conference.rb file from ClassLength Rubocop cop and decrease the max value of this cop to 300, as the following class in number of lines is event.rb with 218. Also, remove unused comments from Conference model class. --- .rubocop.yml | 4 +++- app/models/conference.rb | 4 ---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 497d45e8..6500f653 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -95,7 +95,9 @@ Metrics/BlockNesting: Max: 4 Metrics/ClassLength: - Max: 575 + Max: 300 + Exclude: + - 'app/models/conference.rb' # avoid redundunt curly braces when it is obvious that hash is used Style/BracesAroundHashParameters: diff --git a/app/models/conference.rb b/app/models/conference.rb index c088feef..b5e01a09 100644 --- a/app/models/conference.rb +++ b/app/models/conference.rb @@ -1,6 +1,3 @@ -# rubocop:disable Metrics/ClassLength -## -# This class represents a conference class Conference < ActiveRecord::Base require 'uri' serialize :events_per_week, Hash @@ -1081,4 +1078,3 @@ class Conference < ActiveRecord::Base result end end -# rubocop:enable Metrics/ClassLength