mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +00:00
Merge pull request #13285 from cyrillefr/FixRubocopNamingMemoizedInstanceVariableName
Fixes Rubocop Naming NamingMemoizedInstanceVariableName cop
This commit is contained in:
@@ -86,6 +86,10 @@ Metrics/MethodLength:
|
||||
Enabled: true
|
||||
Max: 25 # default 10
|
||||
|
||||
Naming/MemoizedInstanceVariableName:
|
||||
Exclude:
|
||||
- 'lib/open_food_network/address_finder.rb'
|
||||
|
||||
Metrics/ParameterLists:
|
||||
CountKeywordArgs: false
|
||||
|
||||
|
||||
@@ -221,16 +221,6 @@ Metrics/PerceivedComplexity:
|
||||
- 'app/models/spree/ability.rb'
|
||||
- 'app/models/spree/order/checkout.rb'
|
||||
|
||||
# Offense count: 5
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: EnforcedStyleForLeadingUnderscores.
|
||||
# SupportedStylesForLeadingUnderscores: disallowed, required, optional
|
||||
Naming/MemoizedInstanceVariableName:
|
||||
Exclude:
|
||||
- 'app/mailers/producer_mailer.rb'
|
||||
- 'app/models/concerns/balance.rb'
|
||||
- 'lib/open_food_network/address_finder.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
|
||||
# AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
|
||||
|
||||
@@ -59,7 +59,7 @@ class ProducerMailer < ApplicationMailer
|
||||
end
|
||||
|
||||
def line_items_from(order_cycle, producer)
|
||||
@line_items ||= Spree::LineItem.
|
||||
@line_items_from ||= Spree::LineItem.
|
||||
includes(variant: :product).
|
||||
joins(variant: :product).
|
||||
from_order_cycle(order_cycle).
|
||||
|
||||
@@ -9,7 +9,7 @@ module Balance
|
||||
|
||||
# Branches by the OrderBalance abstraction
|
||||
def outstanding_balance
|
||||
@order_balance ||= OrderBalance.new(self)
|
||||
@outstanding_balance ||= OrderBalance.new(self)
|
||||
end
|
||||
|
||||
# Returns the order balance by considering the total as money owed to the order distributor aka.
|
||||
|
||||
Reference in New Issue
Block a user