Merge pull request #13060 from RandomDSdevel/revert-13044-taps-rubocop-config

Revert "Enable .rubocop.yml in taps"
This commit is contained in:
Mike McQuaid 2022-03-29 08:26:33 +01:00 committed by GitHub
commit 253c43d25a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -126,15 +126,10 @@ module Homebrew
end end
files&.map!(&:expand_path) files&.map!(&:expand_path)
config, = files.flat_map do |f|
tap = f.to_s[%r{.+/homebrew-[^/]+}]
Pathname.glob("#{tap}/.rubocop.yml")
end
if files.blank? || files == [HOMEBREW_REPOSITORY] if files.blank? || files == [HOMEBREW_REPOSITORY]
files = [HOMEBREW_LIBRARY_PATH] files = [HOMEBREW_LIBRARY_PATH]
elsif files.none? { |f| f.to_s.start_with? HOMEBREW_LIBRARY_PATH } elsif files.none? { |f| f.to_s.start_with? HOMEBREW_LIBRARY_PATH }
config ||= if files.any? { |f| (f/"spec").exist? } config = if files.any? { |f| (f/"spec").exist? }
HOMEBREW_LIBRARY/".rubocop_rspec.yml" HOMEBREW_LIBRARY/".rubocop_rspec.yml"
else else
HOMEBREW_LIBRARY/".rubocop.yml" HOMEBREW_LIBRARY/".rubocop.yml"