Fix Style/ReductantReturn rubocop
Exclusions from .rubocop_todo.yml deleted.This cop checks for redundant return expressions. Fixes #1824
This commit is contained in:
parent
c0e4d54415
commit
020dae3d49
5 changed files with 9 additions and 19 deletions
|
|
@ -646,16 +646,6 @@ Style/RedundantParentheses:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'app/controllers/admin/base_controller.rb'
|
- 'app/controllers/admin/base_controller.rb'
|
||||||
|
|
||||||
# Offense count: 9
|
|
||||||
# Cop supports --auto-correct.
|
|
||||||
# Configuration parameters: AllowMultipleReturnValues.
|
|
||||||
Style/RedundantReturn:
|
|
||||||
Exclude:
|
|
||||||
- 'app/helpers/application_helper.rb'
|
|
||||||
- 'app/helpers/format_helper.rb'
|
|
||||||
- 'app/helpers/paths_helper.rb'
|
|
||||||
- 'app/helpers/users_helper.rb'
|
|
||||||
|
|
||||||
# Offense count: 2
|
# Offense count: 2
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: EnforcedStyle, SupportedStyles, AllowInnerSlashes.
|
# Configuration parameters: EnforcedStyle, SupportedStyles, AllowInnerSlashes.
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ module ApplicationHelper
|
||||||
else
|
else
|
||||||
ts = all.join
|
ts = all.join
|
||||||
end
|
end
|
||||||
return ts
|
ts
|
||||||
end
|
end
|
||||||
|
|
||||||
def difficulty_levels(conference)
|
def difficulty_levels(conference)
|
||||||
|
|
@ -80,7 +80,7 @@ module ApplicationHelper
|
||||||
else
|
else
|
||||||
ts = all.join
|
ts = all.join
|
||||||
end
|
end
|
||||||
return ts
|
ts
|
||||||
end
|
end
|
||||||
|
|
||||||
def unread_notifications(user)
|
def unread_notifications(user)
|
||||||
|
|
|
||||||
|
|
@ -101,17 +101,17 @@ module FormatHelper
|
||||||
|
|
||||||
def icon_for_todo(bool)
|
def icon_for_todo(bool)
|
||||||
if bool
|
if bool
|
||||||
return 'fa fa-check'
|
'fa fa-check'
|
||||||
else
|
else
|
||||||
return 'fa fa-times'
|
'fa fa-times'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def class_for_todo(bool)
|
def class_for_todo(bool)
|
||||||
if bool
|
if bool
|
||||||
return 'todolist-ok'
|
'todolist-ok'
|
||||||
else
|
else
|
||||||
return 'todolist-missing'
|
'todolist-missing'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@ module PathsHelper
|
||||||
|
|
||||||
def active_nav_li(link)
|
def active_nav_li(link)
|
||||||
if current_page?(link)
|
if current_page?(link)
|
||||||
return 'active'
|
'active'
|
||||||
else
|
else
|
||||||
return ''
|
''
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ module UsersHelper
|
||||||
providers << provider if !ENV["OSEM_#{provider.upcase}_KEY"].blank? && !ENV["OSEM_#{provider.upcase}_SECRET"].blank?
|
providers << provider if !ENV["OSEM_#{provider.upcase}_KEY"].blank? && !ENV["OSEM_#{provider.upcase}_SECRET"].blank?
|
||||||
end
|
end
|
||||||
|
|
||||||
return providers.uniq
|
providers.uniq
|
||||||
end
|
end
|
||||||
|
|
||||||
# Receives a hash, generated from User model, function get_roles
|
# Receives a hash, generated from User model, function get_roles
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue