diff options
| author | Mike McQuaid | 2016-10-01 21:20:18 +0100 |
|---|---|---|
| committer | GitHub | 2016-10-01 21:20:18 +0100 |
| commit | fa14c262454c2678ca9c8a1caa2f0080833ac67a (patch) | |
| tree | b58d6d7b308bfc2fa57f2ea544c6e4da6fcdf95b /Library/Homebrew/dev-cmd | |
| parent | 19e633f1900ea910c2a9db85dc7c7bea0825676d (diff) | |
| parent | 84c29fcf1ff29df31ab98b03ed4cedf9222ce161 (diff) | |
| download | brew-fa14c262454c2678ca9c8a1caa2f0080833ac67a.tar.bz2 | |
Merge pull request #1169 from reitermarkus/rubocop-separate-configs
Use separate RuboCop configs for formulae and core code.
Diffstat (limited to 'Library/Homebrew/dev-cmd')
| -rw-r--r-- | Library/Homebrew/dev-cmd/bottle.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Library/Homebrew/dev-cmd/bottle.rb b/Library/Homebrew/dev-cmd/bottle.rb index b2aa3b2c5..83e40f25d 100644 --- a/Library/Homebrew/dev-cmd/bottle.rb +++ b/Library/Homebrew/dev-cmd/bottle.rb @@ -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 |
