Skip to content
Snippets Groups Projects
Commit e79f62b2 authored by Mike McQuaid's avatar Mike McQuaid
Browse files

style: allow passing taps as arguments.

parent 515f7b52
No related branches found
No related tags found
No related merge requests found
#: * `style` [`--fix`] [`--display-cop-names`] [<formulae>|<files>]: #: * `style` [`--fix`] [`--display-cop-names`] [<files>|<taps>|<formulae>]:
#: Check formulae or files for conformance to Homebrew style guidelines. #: Check formulae or files for conformance to Homebrew style guidelines.
#: #:
#: <formulae> is a list of formula names.
#:
#: <files> is a list of file names.
#:
#: <formulae> and <files> may not be combined. If both are omitted, style will run #: <formulae> and <files> may not be combined. If both are omitted, style will run
#: style checks on the whole Homebrew `Library`, including core code and all #: style checks on the whole Homebrew `Library`, including core code and all
#: formulae. #: formulae.
...@@ -26,6 +22,8 @@ module Homebrew ...@@ -26,6 +22,8 @@ module Homebrew
[HOMEBREW_LIBRARY] [HOMEBREW_LIBRARY]
elsif ARGV.named.any? { |file| File.exist? file } elsif ARGV.named.any? { |file| File.exist? file }
ARGV.named ARGV.named
elsif ARGV.named.any? { |tap| tap.count("/") == 1 }
ARGV.named.map { |tap| Tap.fetch(tap).path }
else else
ARGV.formulae.map(&:path) ARGV.formulae.map(&:path)
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment