aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/cmd/style.rb12
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