From 188466d28e4a005eb32245c0fd61d7e2a1b937dd Mon Sep 17 00:00:00 2001 From: Issy Long Date: Thu, 9 Mar 2023 21:58:57 +0000 Subject: [PATCH] rubocop: Drop "e" from `Naming/MethodParameterName` allowlist --- Library/.rubocop.yml | 1 - Library/Homebrew/debrew.rb | 14 +++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Library/.rubocop.yml b/Library/.rubocop.yml index 9963ea9953..14b47d1b89 100644 --- a/Library/.rubocop.yml +++ b/Library/.rubocop.yml @@ -191,7 +191,6 @@ Naming/MethodParameterName: [ "a", "b", - "e", "f", "o", "pr", diff --git a/Library/Homebrew/debrew.rb b/Library/Homebrew/debrew.rb index 670446d3d2..6bf617c636 100644 --- a/Library/Homebrew/debrew.rb +++ b/Library/Homebrew/debrew.rb @@ -98,22 +98,22 @@ module Debrew end end - def self.debug(e) - raise(e) if !active? || !debugged_exceptions.add?(e) || !try_lock + def self.debug(exception) + raise(exception) if !active? || !debugged_exceptions.add?(exception) || !try_lock begin - puts e.backtrace.first.to_s - puts Formatter.error(e, label: e.class.name) + puts exception.backtrace.first.to_s + puts Formatter.error(exception, label: exception.class.name) loop do Menu.choose do |menu| menu.prompt = "Choose an action: " menu.choice(:raise) { raise(e) } - menu.choice(:ignore) { return :ignore } if e.is_a?(Ignorable::ExceptionMixin) - menu.choice(:backtrace) { puts e.backtrace } + menu.choice(:ignore) { return :ignore } if exception.is_a?(Ignorable::ExceptionMixin) + menu.choice(:backtrace) { puts exception.backtrace } - if e.is_a?(Ignorable::ExceptionMixin) + if exception.is_a?(Ignorable::ExceptionMixin) menu.choice(:irb) do puts "When you exit this IRB session, execution will continue." set_trace_func proc { |event, _, _, id, binding, klass|