style: run Rubocop on formulae (new command)

This commit is contained in:
Mike McQuaid 2015-01-02 13:36:26 +00:00
parent 1cd0a47067
commit e0cacd3008

View 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