style: allow passing taps as arguments.
This commit is contained in:
parent
515f7b5255
commit
e79f62b2ea
@ -1,10 +1,6 @@
|
|||||||
#: * `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
|
|||||||
[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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user