diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/style.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/style.rb b/Library/Homebrew/cmd/style.rb new file mode 100644 index 000000000..132b9d2e3 --- /dev/null +++ b/Library/Homebrew/cmd/style.rb @@ -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 |
