mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-05 22:26:07 +00:00
Fix Style/RescueStandardError and Style/RegexpLiteral
This commit is contained in:
@@ -1281,22 +1281,6 @@ Style/NumericPredicate:
|
||||
- 'lib/spree/money_decorator.rb'
|
||||
- 'lib/tasks/sample_data.rake'
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle, AllowInnerSlashes.
|
||||
# SupportedStyles: slashes, percent_r, mixed
|
||||
Style/RegexpLiteral:
|
||||
Exclude:
|
||||
- 'lib/spree/core/controller_helpers/auth.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: implicit, explicit
|
||||
Style/RescueStandardError:
|
||||
Exclude:
|
||||
- 'lib/spree/core/delegate_belongs_to.rb'
|
||||
|
||||
# Offense count: 231
|
||||
Style/Send:
|
||||
Exclude:
|
||||
|
||||
@@ -43,7 +43,7 @@ module Spree
|
||||
end
|
||||
end
|
||||
|
||||
disallowed_urls.map!{ |url| url[/\/\w+$/] }
|
||||
disallowed_urls.map!{ |url| url[%r{/\w+$}] }
|
||||
return if disallowed_urls.include?(request.fullpath)
|
||||
|
||||
session['spree_user_return_to'] = request.fullpath.gsub('//', '/')
|
||||
|
||||
@@ -61,7 +61,7 @@ module DelegateBelongsTo
|
||||
methods.reject!{ |x| default_rejected_delegate_columns.include?(x.to_s) }
|
||||
end
|
||||
methods
|
||||
rescue
|
||||
rescue StandardError
|
||||
[]
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user