From 0cc9e16609e3ad2911b759170c912044594f5a32 Mon Sep 17 00:00:00 2001 From: GladOSkar Date: Mon, 10 Jul 2017 15:04:45 +0200 Subject: [PATCH] made rubocop happy by simplifying init_contents and increasing class length limit --- .rubocop.yml | 4 ++-- lib/colorls/core.rb | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 450a1ef..88b050c 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -45,7 +45,7 @@ Metrics/ModuleLength: Max: 200 Metrics/ClassLength: - Max: 200 + Max: 250 Metrics/ParameterLists: Max: 10 @@ -91,4 +91,4 @@ Metrics/CyclomaticComplexity: # TODO ----------------------------------------------------------------- Style/Documentation: - Enabled: false \ No newline at end of file + Enabled: false diff --git a/lib/colorls/core.rb b/lib/colorls/core.rb index 3a73510..56955e2 100644 --- a/lib/colorls/core.rb +++ b/lib/colorls/core.rb @@ -46,8 +46,9 @@ module ColorLS @total_content_length = @contents.length - init_user_lengths if @long - init_group_lengths if @long + return unless @long + init_user_lengths + init_group_lengths end def init_user_lengths