Use constants for RuboCop version.
This commit is contained in:
parent
93724c0645
commit
f48857d246
@ -23,12 +23,10 @@ module Hbc
|
|||||||
$CHILD_STATUS.success?
|
$CHILD_STATUS.success?
|
||||||
end
|
end
|
||||||
|
|
||||||
RUBOCOP_CASK_VERSION = "~> 0.10.6".freeze
|
|
||||||
|
|
||||||
def install_rubocop
|
def install_rubocop
|
||||||
Utils.capture_stderr do
|
Utils.capture_stderr do
|
||||||
begin
|
begin
|
||||||
Homebrew.install_gem_setup_path! "rubocop-cask", RUBOCOP_CASK_VERSION, "rubocop"
|
Homebrew.install_gem_setup_path! "rubocop-cask", HOMEBREW_RUBOCOP_CASK_VERSION, "rubocop"
|
||||||
rescue SystemExit
|
rescue SystemExit
|
||||||
raise CaskError, Tty.strip_ansi($stderr.string).chomp.sub(/\AError: /, "")
|
raise CaskError, Tty.strip_ansi($stderr.string).chomp.sub(/\AError: /, "")
|
||||||
end
|
end
|
||||||
|
|||||||
@ -47,7 +47,7 @@ module Homebrew
|
|||||||
|
|
||||||
def check_style_impl(files, output_type, options = {})
|
def check_style_impl(files, output_type, options = {})
|
||||||
fix = options[:fix]
|
fix = options[:fix]
|
||||||
Homebrew.install_gem_setup_path! "rubocop", "0.47.1"
|
Homebrew.install_gem_setup_path! "rubocop", HOMEBREW_RUBOCOP_VERSION
|
||||||
|
|
||||||
args = %w[
|
args = %w[
|
||||||
--force-exclusion
|
--force-exclusion
|
||||||
|
|||||||
@ -48,3 +48,7 @@ end
|
|||||||
|
|
||||||
# Load path used by standalone scripts to access the Homebrew code base
|
# Load path used by standalone scripts to access the Homebrew code base
|
||||||
HOMEBREW_LOAD_PATH = HOMEBREW_LIBRARY_PATH
|
HOMEBREW_LOAD_PATH = HOMEBREW_LIBRARY_PATH
|
||||||
|
|
||||||
|
# RuboCop version used for `brew style` and `brew cask style`
|
||||||
|
HOMEBREW_RUBOCOP_VERSION = "0.47.1".freeze
|
||||||
|
HOMEBREW_RUBOCOP_CASK_VERSION = "~> 0.10.6".freeze # has to be updated when RuboCop version changes
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user