From 0cd616bc66169a7068df92bb6a6a75e1b74fd2a6 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Wed, 8 Mar 2023 00:14:10 +0000 Subject: [PATCH] rubocop: Drop "r" from `Naming/MethodParameterName` allowlist - This stands for "resource" in our case, so use the long name. --- Library/.rubocop.yml | 1 - Library/Homebrew/cmd/fetch.rb | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Library/.rubocop.yml b/Library/.rubocop.yml index ad7c5f873b..3f98946d2d 100644 --- a/Library/.rubocop.yml +++ b/Library/.rubocop.yml @@ -201,7 +201,6 @@ Naming/MethodParameterName: "o", "p", "pr", - "r", ] # Both styles are used depending on context, diff --git a/Library/Homebrew/cmd/fetch.rb b/Library/Homebrew/cmd/fetch.rb index 24234c7150..9c00468be7 100644 --- a/Library/Homebrew/cmd/fetch.rb +++ b/Library/Homebrew/cmd/fetch.rb @@ -130,12 +130,12 @@ module Homebrew end end - def self.fetch_resource(r, args:) - puts "Resource: #{r.name}" - fetch_fetchable r, args: args + def self.fetch_resource(resource, args:) + puts "Resource: #{resource.name}" + fetch_fetchable resource, args: args rescue ChecksumMismatchError => e - retry if retry_fetch?(r, args: args) - opoo "Resource #{r.name} reports different sha256: #{e.expected}" + retry if retry_fetch?(resource, args: args) + opoo "Resource #{resource.name} reports different sha256: #{e.expected}" end def self.fetch_formula(f, args:)