mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-31 21:37:16 +00:00
Safely autocorrect Layout/ArrayAlignment
Inspecting 1478 files
..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................C......................CC.........................................C.................................
Offenses:
spec/system/admin/customers_spec.rb:40:13: C: [Corrected] Layout/ArrayAlignment: Align the elements of an array literal if they span more than one line.
managed_distributor2.name], without_options: [unmanaged_distributor.name]
^^^^^^^^^^^^^^^^^^^^^^^^^
spec/system/admin/customers_spec.rb:40:101: C: Layout/LineLength: Line is too long. [126/100]
managed_distributor2.name], without_options: [unmanaged_distributor.name]
^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/system/admin/order_spec.rb:742:1: C: [Corrected] Layout/ArrayAlignment: Align the elements of an array literal if they span more than one line.
different_shipping_method_for_distributor1]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/system/admin/orders_spec.rb:48:33: C: [Corrected] Layout/ArrayAlignment: Align the elements of an array literal if they span more than one line.
distributor3, distributor4],
^^^^^^^^^^^^
spec/system/consumer/shopping/cart_spec.rb:21:37: C: [Corrected] Layout/ArrayAlignment: Align the elements of an array literal if they span more than one line.
product_with_fee.variants.first])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1478 files inspected, 5 offenses detected, 4 offenses corrected
This commit is contained in:
@@ -16,17 +16,6 @@ Gemspec/RequiredRubyVersion:
|
||||
- 'engines/order_management/order_management.gemspec'
|
||||
- 'engines/web/web.gemspec'
|
||||
|
||||
# Offense count: 4
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
||||
# SupportedStyles: with_first_element, with_fixed_indentation
|
||||
Layout/ArrayAlignment:
|
||||
Exclude:
|
||||
- 'spec/system/admin/customers_spec.rb'
|
||||
- 'spec/system/admin/order_spec.rb'
|
||||
- 'spec/system/admin/orders_spec.rb'
|
||||
- 'spec/system/consumer/shopping/cart_spec.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: EnforcedStyleAlignWith.
|
||||
@@ -87,7 +76,7 @@ Layout/FirstHashElementIndentation:
|
||||
Exclude:
|
||||
- 'spec/services/products_renderer_spec.rb'
|
||||
|
||||
# Offense count: 13
|
||||
# Offense count: 9
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
|
||||
# SupportedHashRocketStyles: key, separator, table
|
||||
@@ -96,13 +85,11 @@ Layout/FirstHashElementIndentation:
|
||||
Layout/HashAlignment:
|
||||
Exclude:
|
||||
- 'app/controllers/spree/users_controller.rb'
|
||||
- 'spec/migrations/migrate_customer_names_spec.rb'
|
||||
- 'spec/models/enterprise_spec.rb'
|
||||
- 'spec/system/admin/customers_spec.rb'
|
||||
- 'spec/system/admin/order_spec.rb'
|
||||
- 'spec/system/admin/orders_spec.rb'
|
||||
- 'spec/system/admin/tag_rules_spec.rb'
|
||||
- 'spec/system/consumer/shopping/cart_spec.rb'
|
||||
|
||||
# Offense count: 4
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
@@ -137,7 +124,7 @@ Layout/LineContinuationSpacing:
|
||||
- 'spec/system/admin/enterprise_fees_spec.rb'
|
||||
- 'spec/system/admin/order_spec.rb'
|
||||
|
||||
# Offense count: 77
|
||||
# Offense count: 91
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
|
||||
# URISchemes: http, https
|
||||
@@ -151,6 +138,7 @@ Layout/LineLength:
|
||||
- 'spec/controllers/api/v0/order_cycles_controller_spec.rb'
|
||||
- 'spec/controllers/spree/admin/orders_controller_spec.rb'
|
||||
- 'spec/lib/reports/customers_report_spec.rb'
|
||||
- 'spec/migrations/migrate_customer_names_spec.rb'
|
||||
- 'spec/models/enterprise_spec.rb'
|
||||
- 'spec/models/order_cycle_spec.rb'
|
||||
- 'spec/models/product_importer_spec.rb'
|
||||
@@ -160,11 +148,15 @@ Layout/LineLength:
|
||||
- 'spec/models/spree/product_spec.rb'
|
||||
- 'spec/models/spree/variant_spec.rb'
|
||||
- 'spec/requests/api/orders_spec.rb'
|
||||
- 'spec/services/products_renderer_spec.rb'
|
||||
- 'spec/support/request/web_helper.rb'
|
||||
- 'spec/system/admin/adjustments_spec.rb'
|
||||
- 'spec/system/admin/bulk_order_management_spec.rb'
|
||||
- 'spec/system/admin/order_cycles/simple_spec.rb'
|
||||
- 'spec/system/admin/order_spec.rb'
|
||||
- 'spec/system/admin/product_import_spec.rb'
|
||||
- 'spec/system/consumer/shopping/cart_spec.rb'
|
||||
- 'spec/system/consumer/shopping/products_spec.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
|
||||
@@ -37,7 +37,7 @@ code: nil, created_manually: true)
|
||||
# Prompts for a hub for a list of my managed enterprises
|
||||
expect(page)
|
||||
.to have_select2 "shop_id", with_options: [managed_distributor1.name,
|
||||
managed_distributor2.name], without_options: [unmanaged_distributor.name]
|
||||
managed_distributor2.name], without_options: [unmanaged_distributor.name]
|
||||
|
||||
select2_select managed_distributor2.name, from: "shop_id"
|
||||
|
||||
|
||||
@@ -739,7 +739,7 @@ distributors: [distributor1])
|
||||
"in an existing order " do
|
||||
before do
|
||||
distributor1.shipping_methods = [shipping_method_for_distributor1,
|
||||
different_shipping_method_for_distributor1]
|
||||
different_shipping_method_for_distributor1]
|
||||
order.shipments.each(&:refresh_rates)
|
||||
order.shipment.adjustments.first.open
|
||||
order.select_shipping_method(different_shipping_method_for_distributor1)
|
||||
|
||||
@@ -45,7 +45,7 @@ describe '
|
||||
distributors: [distributor4, distributor5]) }
|
||||
let(:order_cycle) do
|
||||
create(:simple_order_cycle, name: 'One', distributors: [distributor, distributor2,
|
||||
distributor3, distributor4],
|
||||
distributor3, distributor4],
|
||||
variants: [product.variants.first])
|
||||
end
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ describe "full-page cart" do
|
||||
create(:simple_order_cycle, suppliers: [supplier], distributors: [distributor],
|
||||
coordinator: create(:distributor_enterprise),
|
||||
variants: [product_with_tax.variants.first,
|
||||
product_with_fee.variants.first])
|
||||
product_with_fee.variants.first])
|
||||
}
|
||||
let(:enterprise_fee) {
|
||||
create(:enterprise_fee, amount: 11.00, tax_category: product_with_tax.tax_category)
|
||||
|
||||
Reference in New Issue
Block a user