From 18c2b2512b9d551dff5485ba097fa322bbfecc9f Mon Sep 17 00:00:00 2001 From: David Cook Date: Wed, 10 Jan 2024 09:29:37 +1100 Subject: [PATCH] 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 --- .rubocop_todo.yml | 7 ------- app/helpers/shop_helper.rb | 2 +- spec/system/admin/configuration/content_spec.rb | 2 +- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index d0292c2fd8..41b61f2e27 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -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: diff --git a/app/helpers/shop_helper.rb b/app/helpers/shop_helper.rb index 3b649b8af2..78886edb35 100644 --- a/app/helpers/shop_helper.rb +++ b/app/helpers/shop_helper.rb @@ -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 diff --git a/spec/system/admin/configuration/content_spec.rb b/spec/system/admin/configuration/content_spec.rb index aaf4d4ec2e..a74bd03421 100644 --- a/spec/system/admin/configuration/content_spec.rb +++ b/spec/system/admin/configuration/content_spec.rb @@ -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