diff options
| author | Mike McQuaid | 2015-01-02 13:36:26 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2015-01-04 11:05:34 +0000 |
| commit | 341700ddab601f4404109902b7e33b08cd0a7d14 (patch) | |
| tree | be6097209e3822fbf5a1feb3ffa6736f2f8cede1 /Library | |
| parent | 6aaf7f093edcf243fe8aca17726bef003c11f2bd (diff) | |
| download | homebrew-341700ddab601f4404109902b7e33b08cd0a7d14.tar.bz2 | |
style: run Rubocop on formulae (new command)
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 |
