Newer
Older
def self.help
"checks Cask style using RuboCop"
end
cache_env = { "XDG_CACHE_HOME" => "#{HOMEBREW_CACHE}/style" }
system(cache_env, "rubocop", *rubocop_args, "--", *cask_paths)
raise CaskError, "style check failed" unless $CHILD_STATUS.success?
true
Homebrew.install_gem_setup_path! "rubocop-cask", HOMEBREW_RUBOCOP_CASK_VERSION, "rubocop"
raise CaskError, Tty.strip_ansi($stderr.string).chomp.sub(/\AError: /, "")
Hbc.all_tapped_cask_dirs
elsif args.any? { |file| File.exist?(file) }
args
def rubocop_args
fix? ? autocorrect_args : default_args
end
[
"--require", "rubocop-cask",
"--force-default-config",
"--force-exclusion",
"--format", "simple"
def autocorrect_args
default_args + ["--auto-correct"]
end
end