brew style --fix
This commit is contained in:
		
							parent
							
								
									a2cd969ddc
								
							
						
					
					
						commit
						d43555dd75
					
				@ -26,7 +26,7 @@ module Cask
 | 
			
		||||
      return to_enum unless block
 | 
			
		||||
 | 
			
		||||
      Tap.flat_map(&:cask_files).each do |f|
 | 
			
		||||
        block.call CaskLoader::FromTapPathLoader.new(f).load(config: nil)
 | 
			
		||||
        yield CaskLoader::FromTapPathLoader.new(f).load(config: nil)
 | 
			
		||||
      rescue CaskUnreadableError => e
 | 
			
		||||
        opoo e.message
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
@ -1674,9 +1674,9 @@ class Formula
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  # @private
 | 
			
		||||
  def self.each(&block)
 | 
			
		||||
  def self.each(&_block)
 | 
			
		||||
    files.each do |file|
 | 
			
		||||
      block.call Formulary.factory(file)
 | 
			
		||||
      yield Formulary.factory(file)
 | 
			
		||||
    rescue FormulaUnavailableError, FormulaUnreadableError => e
 | 
			
		||||
      # Don't let one broken formula break commands. But do complain.
 | 
			
		||||
      onoe "Failed to import: #{file}"
 | 
			
		||||
 | 
			
		||||
@ -50,7 +50,7 @@ module Homebrew
 | 
			
		||||
          yaml = YAML.safe_load(content)
 | 
			
		||||
          return [] if yaml.blank?
 | 
			
		||||
 | 
			
		||||
          return Strategy.handle_block_return(block.call(yaml)) if block
 | 
			
		||||
          return Strategy.handle_block_return(yield(yaml)) if block
 | 
			
		||||
 | 
			
		||||
          version = yaml["version"]
 | 
			
		||||
          version.present? ? [version] : []
 | 
			
		||||
 | 
			
		||||
@ -68,7 +68,7 @@ module Homebrew
 | 
			
		||||
          ).returns(T::Array[String])
 | 
			
		||||
        }
 | 
			
		||||
        def self.versions_from_items(items, &block)
 | 
			
		||||
          return Strategy.handle_block_return(block.call(items)) if block
 | 
			
		||||
          return Strategy.handle_block_return(yield(items)) if block
 | 
			
		||||
 | 
			
		||||
          items.map do |_key, item|
 | 
			
		||||
            item.bundle_version.nice_version
 | 
			
		||||
 | 
			
		||||
@ -93,7 +93,7 @@ module Homebrew
 | 
			
		||||
          ).returns(T::Array[String])
 | 
			
		||||
        }
 | 
			
		||||
        def self.versions_from_tags(tags, regex = nil, &block)
 | 
			
		||||
          return Strategy.handle_block_return(block.call(tags, regex || DEFAULT_REGEX)) if block
 | 
			
		||||
          return Strategy.handle_block_return(yield(tags, regex || DEFAULT_REGEX)) if block
 | 
			
		||||
 | 
			
		||||
          tags_only_debian = tags.all? { |tag| tag.start_with?("debian/") }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -53,7 +53,7 @@ module Homebrew
 | 
			
		||||
          ).returns(T::Array[String])
 | 
			
		||||
        }
 | 
			
		||||
        def self.versions_from_headers(headers, regex = nil, &block)
 | 
			
		||||
          return Strategy.handle_block_return(block.call(headers, regex)) if block
 | 
			
		||||
          return Strategy.handle_block_return(yield(headers, regex)) if block
 | 
			
		||||
 | 
			
		||||
          DEFAULT_HEADERS_TO_CHECK.map do |header_name|
 | 
			
		||||
            header_value = headers[header_name]
 | 
			
		||||
 | 
			
		||||
@ -57,7 +57,7 @@ module Homebrew
 | 
			
		||||
          ).returns(T::Array[String])
 | 
			
		||||
        }
 | 
			
		||||
        def self.versions_from_content(content, regex, &block)
 | 
			
		||||
          return Strategy.handle_block_return(block.call(content, regex)) if block
 | 
			
		||||
          return Strategy.handle_block_return(yield(content, regex)) if block
 | 
			
		||||
          return [] if regex.blank?
 | 
			
		||||
 | 
			
		||||
          content.scan(regex).map do |match|
 | 
			
		||||
 | 
			
		||||
@ -157,7 +157,7 @@ module Homebrew
 | 
			
		||||
          item = item_from_content(content)
 | 
			
		||||
          return [] if item.blank?
 | 
			
		||||
 | 
			
		||||
          return Strategy.handle_block_return(block.call(item)) if block
 | 
			
		||||
          return Strategy.handle_block_return(yield(item)) if block
 | 
			
		||||
 | 
			
		||||
          version = item.bundle_version&.nice_version
 | 
			
		||||
          version.present? ? [version] : []
 | 
			
		||||
 | 
			
		||||
@ -659,7 +659,7 @@ class Tap
 | 
			
		||||
 | 
			
		||||
    TAP_DIRECTORY.subdirs.each do |user|
 | 
			
		||||
      user.subdirs.each do |repo|
 | 
			
		||||
        block.call fetch(user.basename.to_s, repo.basename.to_s)
 | 
			
		||||
        yield fetch(user.basename.to_s, repo.basename.to_s)
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user