Merge pull request #4301 from apjanke/fix-rspec-rubocop-warning

Fix "unrecognized cop" warning in `brew style`
This commit is contained in:
Mike McQuaid 2018-06-07 09:45:06 +01:00 committed by GitHub
commit 6a700cbfb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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"