Safely autocorrect Layout/BlockAlignment

Inspecting 1478 files
...................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................C..................................................................................................................................................................................

Offenses:

spec/services/products_renderer_spec.rb:28:7: C: [Corrected] Layout/BlockAlignment: } at 28, 6 is not aligned with let!(:product_cherries) { at 25, 4.
      }
      ^

1478 files inspected, 1 offense detected, 1 offense corrected
This commit is contained in:
David Cook
2023-07-20 13:52:44 +10:00
parent 5a3a4a041f
commit 7cbe1d94ad
2 changed files with 3 additions and 10 deletions

View File

@@ -16,14 +16,6 @@ Gemspec/RequiredRubyVersion:
- 'engines/order_management/order_management.gemspec'
- 'engines/web/web.gemspec'
# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyleAlignWith.
# SupportedStylesAlignWith: either, start_of_block, start_of_line
Layout/BlockAlignment:
Exclude:
- 'spec/services/products_renderer_spec.rb'
# Offense count: 4
# This cop supports safe autocorrection (--autocorrect).
Layout/BlockEndNewline:
@@ -124,7 +116,7 @@ Layout/LineContinuationSpacing:
- 'spec/system/admin/enterprise_fees_spec.rb'
- 'spec/system/admin/order_spec.rb'
# Offense count: 91
# Offense count: 92
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
# URISchemes: http, https
@@ -152,6 +144,7 @@ Layout/LineLength:
- 'spec/support/request/web_helper.rb'
- 'spec/system/admin/adjustments_spec.rb'
- 'spec/system/admin/bulk_order_management_spec.rb'
- 'spec/system/admin/customers_spec.rb'
- 'spec/system/admin/order_cycles/simple_spec.rb'
- 'spec/system/admin/order_spec.rb'
- 'spec/system/admin/product_import_spec.rb'

View File

@@ -25,7 +25,7 @@ describe ProductsRenderer do
let!(:product_cherries) {
create(:product, name: "cherries", primary_taxon_id: fruits.id,
supplier_id: fruits_supplier.id)
}
}
let!(:product_doughnuts) {
create(:product, name: "doughnuts", primary_taxon_id: cakes.id,
supplier_id: cakes_supplier.id)