Safely autocorrect Style/RedundantLineContinuation

Inspecting 1530 files
.................................................................................................................................................................................C................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................C.......................................................................................................................

Offenses:

app/helpers/shop_helper.rb:48:43: C: [Corrected] Layout/TrailingWhitespace: Trailing whitespace detected.
    no_open_order_cycles?(order_cycles) &&
                                          ^
app/helpers/shop_helper.rb:48:44: C: [Corrected] Style/RedundantLineContinuation: Redundant line continuation.
    no_open_order_cycles?(order_cycles) && \ ...
                                           ^
spec/system/admin/configuration/content_spec.rb:35:64: C: [Corrected] Layout/TrailingWhitespace: Trailing whitespace detected.
    expect(page).to have_selector :link, "markdown link", href:
                                                               ^
spec/system/admin/configuration/content_spec.rb:35:65: C: [Corrected] Style/RedundantLineContinuation: Redundant line continuation.
    expect(page).to have_selector :link, "markdown link", href: \ ...
                                                                ^

1530 files inspected, 4 offenses detected, 4 offenses corrected
This commit is contained in:
David Cook
2024-01-10 09:29:37 +11:00
parent fbbaf51522
commit 18c2b2512b
3 changed files with 2 additions and 9 deletions

View File

@@ -944,13 +944,6 @@ Style/RedundantInterpolation:
- 'lib/tasks/karma.rake'
- 'spec/base_spec_helper.rb'
# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
Style/RedundantLineContinuation:
Exclude:
- 'app/helpers/shop_helper.rb'
- 'spec/system/admin/configuration/content_spec.rb'
# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Style/RedundantParentheses:

View File

@@ -45,7 +45,7 @@ module ShopHelper
end
def shopfront_closed_message?(order_cycles)
no_open_order_cycles?(order_cycles) && \
no_open_order_cycles?(order_cycles) &&
current_distributor.preferred_shopfront_closed_message.present?
end

View File

@@ -32,7 +32,7 @@ describe "
# And markdown is rendered
# expect(page).to have_link "markdown link" and the correct href
expect(page).to have_selector :link, "markdown link", href: \
expect(page).to have_selector :link, "markdown link", href:
"/:/?#@!$&'()*+,;=0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
end