diff options
| author | Markus Reiter | 2016-09-27 18:48:06 +0200 |
|---|---|---|
| committer | Markus Reiter | 2016-09-29 22:58:41 +0200 |
| commit | 70fc82578795a3c99fb149615e2efbf4596ea4a4 (patch) | |
| tree | 69704929924dba4453701f89cfc581304ed1c444 /Library/Homebrew/cmd | |
| parent | d6246278859f76ee1142754412d44a80eb1da0c6 (diff) | |
| download | brew-70fc82578795a3c99fb149615e2efbf4596ea4a4.tar.bz2 | |
Use separate RuboCop configs for formulae and core code.
Diffstat (limited to 'Library/Homebrew/cmd')
| -rw-r--r-- | Library/Homebrew/cmd/style.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Library/Homebrew/cmd/style.rb b/Library/Homebrew/cmd/style.rb index db61116be..1a4b02277 100644 --- a/Library/Homebrew/cmd/style.rb +++ b/Library/Homebrew/cmd/style.rb @@ -19,7 +19,7 @@ require "utils/json" module Homebrew def style target = if ARGV.named.empty? - [HOMEBREW_LIBRARY_PATH] + nil elsif ARGV.named.any? { |file| File.exist? file } ARGV.named elsif ARGV.named.any? { |tap| tap.count("/") == 1 } @@ -49,10 +49,16 @@ module Homebrew args = %W[ --force-exclusion - --config #{HOMEBREW_LIBRARY}/.rubocop.yml ] args << "--auto-correct" if fix - args += files + + if files.nil? + args << "--config" << HOMEBREW_LIBRARY/".rubocop_core.yml" + args += [HOMEBREW_LIBRARY_PATH] + else + args << "--config" << HOMEBREW_LIBRARY/".rubocop_formula.yml" + args += files + end HOMEBREW_LIBRARY.cd do case output_type |
