brew style: --fix to auto-correct issues.
Closes Homebrew/homebrew#37670. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
6dc9506edc
commit
04508b0c4d
@ -8,8 +8,16 @@ module Homebrew
|
||||
|
||||
Homebrew.install_gem_setup_path! "rubocop"
|
||||
|
||||
system "rubocop", "--format", "simple", "--config",
|
||||
"#{HOMEBREW_LIBRARY}/.rubocop.yml", *target
|
||||
args = [
|
||||
"--format", "simple", "--config",
|
||||
"#{HOMEBREW_LIBRARY}/.rubocop.yml"
|
||||
]
|
||||
|
||||
args << "--auto-correct" if ARGV.homebrew_developer? && ARGV.flag?("--fix")
|
||||
|
||||
args += target
|
||||
|
||||
system "rubocop", *args
|
||||
Homebrew.failed = !$?.success?
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user