mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-30 06:31:16 +00:00
Safely autocorrect Layout/MultilineBlockLayout
Inspecting 1479 files
....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................C..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Offenses:
engines/order_management/app/services/order_management/subscriptions/validator.rb:101:9: C: [Corrected] Layout/IndentationWidth: Use 2 (not 12) spaces for indentation.
sli.quantity > 0 && !sli.marked_for_destruction?
^^^^^^^^^^^^
engines/order_management/app/services/order_management/subscriptions/validator.rb:101:11: C: [Corrected] Layout/MultilineBlockLayout: Block argument expression is not on the same line as the block start.
|sli| sli.quantity > 0 && !sli.marked_for_destruction?
^^^^^
1479 files inspected, 2 offenses detected, 2 offenses corrected
This commit is contained in:
committed by
Maikel Linke
parent
ffda639629
commit
a97e208881
@@ -34,12 +34,6 @@ Layout/LineLength:
|
||||
- 'spec/system/consumer/shopping/cart_spec.rb'
|
||||
- 'spec/system/consumer/shopping/products_spec.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
Layout/MultilineBlockLayout:
|
||||
Exclude:
|
||||
- 'engines/order_management/app/services/order_management/subscriptions/validator.rb'
|
||||
|
||||
# Offense count: 6
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
|
||||
@@ -97,8 +97,8 @@ module OrderManagement
|
||||
end
|
||||
|
||||
def subscription_line_items_present?
|
||||
return if subscription_line_items.any? {
|
||||
|sli| sli.quantity > 0 && !sli.marked_for_destruction?
|
||||
return if subscription_line_items.any? { |sli|
|
||||
sli.quantity > 0 && !sli.marked_for_destruction?
|
||||
}
|
||||
|
||||
errors.add(:subscription_line_items, :at_least_one_product)
|
||||
|
||||
Reference in New Issue
Block a user