diff --git a/Library/Homebrew/cask/lib/hbc/cli/style.rb b/Library/Homebrew/cask/lib/hbc/cli/style.rb index c6a08671f5c83fc759be2adad795c922efb432b8..068f89d74cdc11169796bde1a7cf58585c326e37 100644 --- a/Library/Homebrew/cask/lib/hbc/cli/style.rb +++ b/Library/Homebrew/cask/lib/hbc/cli/style.rb @@ -54,17 +54,17 @@ module Hbc end def default_args - ["--format", "simple", "--force-exclusion", "--config", rubocop_config] + [ + "--require", "rubocop-cask", + "--format", "simple", + "--force-exclusion" + ] end def autocorrect_args default_args + ["--auto-correct"] end - def rubocop_config - Hbc.default_tap.cask_dir.join(".rubocop.yml") - end - def fix? args.any? { |arg| arg =~ %r{--(fix|(auto-?)?correct)} } end diff --git a/Library/Homebrew/cask/spec/cask/cli/style_spec.rb b/Library/Homebrew/cask/spec/cask/cli/style_spec.rb index 74ff1081487263ae1aa31e1be5e19edc53095384..dbd6970d52017adfd7a700218247df5bb2919a73 100644 --- a/Library/Homebrew/cask/spec/cask/cli/style_spec.rb +++ b/Library/Homebrew/cask/spec/cask/cli/style_spec.rb @@ -175,12 +175,8 @@ describe Hbc::CLI::Style do describe "#default_args" do subject { cli.default_args } - let(:rubocop_config) { ".rubocop.yml" } - before do - allow(cli).to receive(:rubocop_config).and_return(rubocop_config) - end - it { is_expected.to include("--format", "simple", "--force-exclusion", "--config", rubocop_config) } + it { is_expected.to include("--require", "rubocop-cask", "--format", "simple", "--force-exclusion") } end describe "#autocorrect_args" do