cd to HOMEBREW_LIBRARY is not needed anymore for RuboCop.

This commit is contained in:
Markus Reiter 2016-09-28 22:47:14 +02:00
parent 5800f2f084
commit 18a9945ad8

View File

@ -56,15 +56,15 @@ module Homebrew
args << "--config" << HOMEBREW_LIBRARY_PATH/".rubocop.yml" args << "--config" << HOMEBREW_LIBRARY_PATH/".rubocop.yml"
args += [HOMEBREW_LIBRARY_PATH] args += [HOMEBREW_LIBRARY_PATH]
else else
args << "--config" << HOMEBREW_LIBRARY/"Taps/.rubocop.yml" args << "--config" << Tap::TAP_DIRECTORY/".rubocop.yml"
args << "--format" << "simple"
args += files args += files
end end
HOMEBREW_LIBRARY.cd do
case output_type case output_type
when :print when :print
args << "--display-cop-names" if ARGV.include? "--display-cop-names" args << "--display-cop-names" if ARGV.include? "--display-cop-names"
system "rubocop", "--format", "simple", *args system "rubocop", *args
!$?.success? !$?.success?
when :json when :json
json = Utils.popen_read_text("rubocop", "--format", "json", *args) json = Utils.popen_read_text("rubocop", "--format", "json", *args)
@ -77,7 +77,6 @@ module Homebrew
raise "Invalid output_type for check_style_impl: #{output_type}" raise "Invalid output_type for check_style_impl: #{output_type}"
end end
end end
end
class RubocopResults class RubocopResults
def initialize(json) def initialize(json)