Fix Lint/NestedMethodDefinition in dev-cmd/bottle.rb`.
This commit is contained in:
parent
70fc825787
commit
5b2ae6885b
@ -34,11 +34,6 @@ Lint/Loop:
|
||||
Exclude:
|
||||
- 'Homebrew/patch.rb'
|
||||
|
||||
# Offense count: 1
|
||||
Lint/NestedMethodDefinition:
|
||||
Exclude:
|
||||
- 'Homebrew/dev-cmd/bottle.rb'
|
||||
|
||||
# Offense count: 28
|
||||
Lint/RescueException:
|
||||
Exclude:
|
||||
|
||||
@ -44,9 +44,9 @@ module Homebrew
|
||||
def keg_contain?(string, keg, ignores)
|
||||
@put_string_exists_header, @put_filenames = nil
|
||||
|
||||
def print_filename(string, filename)
|
||||
print_filename = lambda do |str, filename|
|
||||
unless @put_string_exists_header
|
||||
opoo "String '#{string}' still exists in these files:"
|
||||
opoo "String '#{str}' still exists in these files:"
|
||||
@put_string_exists_header = true
|
||||
end
|
||||
|
||||
@ -68,7 +68,7 @@ module Homebrew
|
||||
result ||= !linked_libraries.empty?
|
||||
|
||||
if ARGV.verbose?
|
||||
print_filename(string, file) unless linked_libraries.empty?
|
||||
print_filename.call(string, file) unless linked_libraries.empty?
|
||||
linked_libraries.each do |lib|
|
||||
puts " #{Tty.gray}-->#{Tty.reset} links to #{lib}"
|
||||
end
|
||||
@ -91,7 +91,7 @@ module Homebrew
|
||||
end
|
||||
|
||||
next unless ARGV.verbose? && !text_matches.empty?
|
||||
print_filename string, file
|
||||
print_filename.call(string, file)
|
||||
text_matches.first(MAXIMUM_STRING_MATCHES).each do |match, offset|
|
||||
puts " #{Tty.gray}-->#{Tty.reset} match '#{match}' at offset #{Tty.em}0x#{offset}#{Tty.reset}"
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user