Split out rspec-specific Rubocop config to fix warning

This commit is contained in:
Andrew Janke 2018-06-07 00:23:44 -04:00
parent e78158a4f1
commit 996825dd27
3 changed files with 8 additions and 5 deletions

View File

@ -0,0 +1,6 @@
inherit_from:
- .rubocop.yml
RSpec/ExpectActual:
Exclude:
- 'test/missing_formula_spec.rb'

View File

@ -88,7 +88,3 @@ Style/HashSyntax:
# so many of these in formulae but none in here
Style/TrailingBodyOnMethodDefinition:
Enabled: true
Rspec/ExpectActual:
Exclude:
- 'test/missing_formula_spec.rb'

View File

@ -112,7 +112,8 @@ module Homebrew
end
if files.nil?
args << "--config" << HOMEBREW_LIBRARY_PATH/".rubocop.yml"
config_file = ARGV.include?("--rspec") ? ".rubocop-rspec.yml" : ".rubocop.yml"
args << "--config" << HOMEBREW_LIBRARY_PATH/config_file
args << HOMEBREW_LIBRARY_PATH
else
args << "--config" << HOMEBREW_LIBRARY/".rubocop_audit.yml"