From 7c14853add713f930942e167a13b82823b7e06d1 Mon Sep 17 00:00:00 2001 From: Neal Chambers Date: Thu, 9 Nov 2023 09:42:14 +0900 Subject: [PATCH] Safely autocorrect Style/RedundantDoubleSplatHashBraces Inspecting 1509 files .....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................C............... Offenses: spec/system/support/cuprite_setup.rb:13:5: C: [Corrected] Style/RedundantDoubleSplatHashBraces: Remove the redundant double splat and braces, use keyword arguments directly. **{ ... ^^^ spec/system/support/cuprite_setup.rb:14:7: C: [Corrected] Layout/HashAlignment: Align the keys of a hash literal if they span more than one line. browser_options:, ^^^^^^^^^^^^^^^^ spec/system/support/cuprite_setup.rb:15:7: C: [Corrected] Layout/HashAlignment: Align the keys of a hash literal if they span more than one line. process_timeout: 60, ^^^^^^^^^^^^^^^^^^^ spec/system/support/cuprite_setup.rb:16:7: C: [Corrected] Layout/HashAlignment: Align the keys of a hash literal if they span more than one line. timeout: 60, ^^^^^^^^^^^ spec/system/support/cuprite_setup.rb:17:7: C: [Corrected] Layout/CommentIndentation: Incorrect indentation detected (column 6 instead of 4). # Don't load scripts from external sources, like google maps or stripe ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ spec/system/support/cuprite_setup.rb:18:7: C: [Corrected] Layout/HashAlignment: Align the keys of a hash literal if they span more than one line. url_whitelist: ["http://localhost", "http://0.0.0.0", "http://127.0.0.1"], ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ spec/system/support/cuprite_setup.rb:19:7: C: [Corrected] Layout/HashAlignment: Align the keys of a hash literal if they span more than one line. inspector: true, ^^^^^^^^^^^^^^^ spec/system/support/cuprite_setup.rb:20:7: C: [Corrected] Layout/HashAlignment: Align the keys of a hash literal if they span more than one line. headless:, ^^^^^^^^^ spec/system/support/cuprite_setup.rb:21:7: C: [Corrected] Layout/HashAlignment: Align the keys of a hash literal if they span more than one line. js_errors: true ^^^^^^^^^^^^^^^ 1509 files inspected, 9 offenses detected, 9 offenses corrected --- .rubocop_todo.yml | 6 ------ spec/system/support/cuprite_setup.rb | 20 +++++++++----------- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 65caf81752..44eff7c575 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -923,12 +923,6 @@ Style/RedundantArgument: - 'engines/dfc_provider/app/services/authorization_control.rb' - 'spec/support/query_counter.rb' -# Offense count: 1 -# This cop supports safe autocorrection (--autocorrect). -Style/RedundantDoubleSplatHashBraces: - Exclude: - - 'spec/system/support/cuprite_setup.rb' - # Offense count: 1 # This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: AllowComments. diff --git a/spec/system/support/cuprite_setup.rb b/spec/system/support/cuprite_setup.rb index d3d5cd06c1..9d89e05634 100644 --- a/spec/system/support/cuprite_setup.rb +++ b/spec/system/support/cuprite_setup.rb @@ -10,17 +10,15 @@ browser_options["no-sandbox"] = nil if ENV['CI'] Capybara.register_driver(:cuprite_ofn) do |app| Capybara::Cuprite::Driver.new( app, - **{ - window_size: [1280, 800], - browser_options:, - process_timeout: 60, - timeout: 60, - # Don't load scripts from external sources, like google maps or stripe - url_whitelist: ["http://localhost", "http://0.0.0.0", "http://127.0.0.1"], - inspector: true, - headless:, - js_errors: true, - } + window_size: [1280, 800], + browser_options:, + process_timeout: 60, + timeout: 60, + # Don't load scripts from external sources, like google maps or stripe + url_whitelist: ["http://localhost", "http://0.0.0.0", "http://127.0.0.1"], + inspector: true, + headless:, + js_errors: true ) end