Merge pull request #6982 from iMichka/nightly

rubocop: remove BINARY_URLS_WHITELIST and rust nightly
This commit is contained in:
Mike McQuaid 2020-02-01 13:44:50 +01:00 committed by GitHub
commit 2779603fad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,12 +24,6 @@ module RuboCop
rust
].freeze
# specific rust-nightly temporarily acceptable until a newer version is released.
# DO NOT RE-ADD A NEWER RUST-NIGHTLY IN FUTURE.
BINARY_URLS_WHITELIST = %w[
https://static.rust-lang.org/dist/2019-08-24/rust-nightly-x86_64-apple-darwin.tar.xz
].freeze
def audit_formula(_node, _class_node, _parent_class_node, body_node)
urls = find_every_func_call_by_name(body_node, :url)
mirrors = find_every_func_call_by_name(body_node, :mirror)
@ -232,7 +226,6 @@ module RuboCop
audit_urls(urls, /(darwin|macos|osx)/i) do |_, url|
next if url !~ /x86_64/i && url !~ /amd64/i
next if BINARY_FORMULA_URLS_WHITELIST.include?(@formula_name)
next if BINARY_URLS_WHITELIST.include?(url)
problem "#{url} looks like a binary package, not a source archive; " \
"homebrew/core is source-only."