mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-06 02:51:34 +00:00
Safely autocorrect Layout/MultilineMethodCallBraceLayout
Inspecting 1479 files
...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................C.....C.....................................................................
Offenses:
spec/system/admin/orders_spec.rb:485:80: C: [Corrected] Layout/MultilineMethodCallBraceLayout: Closing method call brace must be on the line after the last argument when opening brace is on a separate line from the first argument.
"#listing_orders tbody tr td:first-child input[type=checkbox]")
^
spec/system/admin/orders_spec.rb:486:1: C: [Corrected] Layout/ClosingParenthesisIndentation: Indent ) to column 15 (not 0)
)).to be_checked
^
spec/system/admin/orders_spec.rb:486:15: C: [Corrected] Layout/MultilineMethodCallBraceLayout: Closing method call brace must be on the same line as the last argument when opening brace is on the same line as the first argument.
).to be_checked
^
spec/system/admin/orders_spec.rb:493:80: C: [Corrected] Layout/MultilineMethodCallBraceLayout: Closing method call brace must be on the line after the last argument when opening brace is on a separate line from the first argument.
"#listing_orders tbody tr td:first-child input[type=checkbox]")
^
spec/system/admin/orders_spec.rb:494:1: C: [Corrected] Layout/ClosingParenthesisIndentation: Indent ) to column 15 (not 0)
)).to_not be_checked
^
spec/system/admin/orders_spec.rb:494:15: C: [Corrected] Layout/MultilineMethodCallBraceLayout: Closing method call brace must be on the same line as the last argument when opening brace is on the same line as the first argument.
).to_not be_checked
^
spec/system/admin/products_spec.rb:346:54: C: [Corrected] Layout/MultilineMethodCallBraceLayout: Closing method call brace must be on the line after the last argument when opening brace is on a separate line from the first argument.
product.id, filter)))
^
spec/system/admin/products_spec.rb:347:1: C: [Corrected] Layout/ClosingParenthesisIndentation: Indent ) to column 33 (not 0)
)))
^
spec/system/admin/products_spec.rb:352:54: C: [Corrected] Layout/MultilineMethodCallBraceLayout: Closing method call brace must be on the line after the last argument when opening brace is on a separate line from the first argument.
product.id, filter)))
^
spec/system/admin/products_spec.rb:354:1: C: [Corrected] Layout/ClosingParenthesisIndentation: Indent ) to column 33 (not 0)
)))
^
1479 files inspected, 10 offenses detected, 10 offenses corrected
This commit is contained in:
committed by
Maikel Linke
parent
a97e208881
commit
164385ad13
@@ -34,15 +34,6 @@ Layout/LineLength:
|
||||
- 'spec/system/consumer/shopping/cart_spec.rb'
|
||||
- 'spec/system/consumer/shopping/products_spec.rb'
|
||||
|
||||
# Offense count: 6
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: symmetrical, new_line, same_line
|
||||
Layout/MultilineMethodCallBraceLayout:
|
||||
Exclude:
|
||||
- 'spec/system/admin/orders_spec.rb'
|
||||
- 'spec/system/admin/products_spec.rb'
|
||||
|
||||
# Offense count: 6
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
||||
|
||||
@@ -482,16 +482,16 @@ describe '
|
||||
# select all orders
|
||||
page.find("#listing_orders thead th:first-child input[type=checkbox]").click
|
||||
expect(page.find(
|
||||
"#listing_orders tbody tr td:first-child input[type=checkbox]")
|
||||
).to be_checked
|
||||
"#listing_orders tbody tr td:first-child input[type=checkbox]"
|
||||
)).to be_checked
|
||||
# enables print invoices button
|
||||
page.find("span.icon-reorder", text: "ACTIONS").click
|
||||
expect(page).to have_content "Print Invoices"
|
||||
# unselect all orders
|
||||
page.find("#listing_orders thead th:first-child input[type=checkbox]").trigger("click")
|
||||
expect(page.find(
|
||||
"#listing_orders tbody tr td:first-child input[type=checkbox]")
|
||||
).to_not be_checked
|
||||
"#listing_orders tbody tr td:first-child input[type=checkbox]"
|
||||
)).to_not be_checked
|
||||
# disables print invoices button
|
||||
page.find("span.icon-reorder", text: "ACTIONS").click
|
||||
expect(page).to_not have_content "Print Invoices"
|
||||
|
||||
@@ -343,13 +343,15 @@ describe '
|
||||
|
||||
expected_product_properties_url =
|
||||
Regexp.new(Regexp.escape(spree.admin_product_product_properties_path(
|
||||
product.id, filter)))
|
||||
product.id, filter
|
||||
)))
|
||||
expect(page).to have_link('Product Properties',
|
||||
href: expected_product_properties_url)
|
||||
|
||||
expected_product_group_buy_option_url =
|
||||
Regexp.new(Regexp.escape(spree.group_buy_options_admin_product_path(
|
||||
product.id, filter)))
|
||||
product.id, filter
|
||||
)))
|
||||
expect(page).to have_link('Group Buy Options',
|
||||
href: expected_product_group_buy_option_url)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user