From b8aa619f2f9154a7b443a3312aafaf0e22ea61ac Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Wed, 15 Mar 2023 18:21:41 -0700 Subject: [PATCH] brew style --fix --- Library/Homebrew/download_strategy.rb | 8 ++++---- Library/Homebrew/style.rb | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 427eacefbe..0186a3aca8 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -1070,10 +1070,10 @@ class GitHubGitDownloadStrategy < GitDownloadStrategy super match_data = %r{^https?://github\.com/(?[^/]+)/(?[^/]+)\.git$}.match(@url) - if match_data - @user = match_data[:user] - @repo = match_data[:repo] - end + return unless match_data + + @user = match_data[:user] + @repo = match_data[:repo] end def commit_outdated?(commit) diff --git a/Library/Homebrew/style.rb b/Library/Homebrew/style.rb index 4fc8319d4a..5ee84f893c 100644 --- a/Library/Homebrew/style.rb +++ b/Library/Homebrew/style.rb @@ -35,11 +35,11 @@ module Homebrew end def self.check_style_impl(files, output_type, - fix: false, - except_cops: nil, only_cops: nil, - display_cop_names: false, - reset_cache: false, - debug: false, verbose: false) + fix: false, + except_cops: nil, only_cops: nil, + display_cop_names: false, + reset_cache: false, + debug: false, verbose: false) raise ArgumentError, "Invalid output type: #{output_type.inspect}" if [:print, :json].exclude?(output_type) shell_files, ruby_files = @@ -79,8 +79,8 @@ module Homebrew RUBOCOP = (HOMEBREW_LIBRARY_PATH/"utils/rubocop.rb").freeze def self.run_rubocop(files, output_type, - fix: false, except_cops: nil, only_cops: nil, display_cop_names: false, reset_cache: false, - debug: false, verbose: false) + fix: false, except_cops: nil, only_cops: nil, display_cop_names: false, reset_cache: false, + debug: false, verbose: false) Homebrew.install_bundler_gems! require "warnings"