From 2954485f93b21c83071bc9937664a58b778bcacc Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Thu, 7 May 2015 16:19:45 +0200 Subject: [PATCH] Corrected with rubocop cop 'Lint/UnreachableCode'. --- .rubocop.yml | 2 -- app/controllers/import_otrs_controller.rb | 1 - lib/rss.rb | 1 - 3 files changed, 4 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 7d3996c96..9a58c0b0f 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -208,7 +208,5 @@ Style/SpaceBeforeComment: Enabled: false Lint/UselessAssignment: Enabled: false -Lint/UnreachableCode: - Enabled: false Lint/ShadowingOuterLocalVariable: Enabled: false diff --git a/app/controllers/import_otrs_controller.rb b/app/controllers/import_otrs_controller.rb index d7bba4483..d163c900c 100644 --- a/app/controllers/import_otrs_controller.rb +++ b/app/controllers/import_otrs_controller.rb @@ -104,7 +104,6 @@ class ImportOtrsController < ApplicationController private def setup_done - return false count = User.all.count() done = true if count <= 2 diff --git a/lib/rss.rb b/lib/rss.rb index 819ac02e5..ec90fdcb4 100644 --- a/lib/rss.rb +++ b/lib/rss.rb @@ -10,7 +10,6 @@ module Rss response = UserAgent.request(url) if !response.success? fail "Can't fetch '#{url}', http code: #{response.code}" - return end rss = SimpleRSS.parse response.body items = []