From e79f62b2ead91decb3a255167d6a87020a0ad7ab Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sun, 18 Sep 2016 14:28:03 +0100 Subject: [PATCH] style: allow passing taps as arguments. --- Library/Homebrew/cmd/style.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Library/Homebrew/cmd/style.rb b/Library/Homebrew/cmd/style.rb index 9540e853d2..11c7e67739 100644 --- a/Library/Homebrew/cmd/style.rb +++ b/Library/Homebrew/cmd/style.rb @@ -1,10 +1,6 @@ -#: * `style` [`--fix`] [`--display-cop-names`] [|]: +#: * `style` [`--fix`] [`--display-cop-names`] [||]: #: Check formulae or files for conformance to Homebrew style guidelines. #: -#: is a list of formula names. -#: -#: is a list of file names. -#: #: and may not be combined. If both are omitted, style will run #: style checks on the whole Homebrew `Library`, including core code and all #: formulae. @@ -26,6 +22,8 @@ module Homebrew [HOMEBREW_LIBRARY] elsif ARGV.named.any? { |file| File.exist? file } ARGV.named + elsif ARGV.named.any? { |tap| tap.count("/") == 1 } + ARGV.named.map { |tap| Tap.fetch(tap).path } else ARGV.formulae.map(&:path) end