style: run Rubocop on formulae (new command)
This commit is contained in:
parent
1cd0a47067
commit
e0cacd3008
14
Library/Homebrew/cmd/style.rb
Normal file
14
Library/Homebrew/cmd/style.rb
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
module Homebrew
|
||||||
|
def style
|
||||||
|
target = if ARGV.named.empty?
|
||||||
|
[HOMEBREW_LIBRARY]
|
||||||
|
else
|
||||||
|
ARGV.formulae.map(&:path)
|
||||||
|
end
|
||||||
|
|
||||||
|
Homebrew.install_gem_setup_path! "rubocop"
|
||||||
|
|
||||||
|
system "rubocop", "--format", "simple", *target
|
||||||
|
Homebrew.failed = !$?.success?
|
||||||
|
end
|
||||||
|
end
|
||||||
Loading…
x
Reference in New Issue
Block a user