Auto-fix Style/NegatedUnless offenses

This commit is contained in:
Issy Long 2019-10-13 10:14:43 +01:00
parent 37fee928b5
commit 3570cb6e77
No known key found for this signature in database
GPG Key ID: 8247C390DADC67D4

View File

@ -195,7 +195,7 @@ module RuboCop
# Use new-style archive downloads
archive_gh_pattern = %r{https://.*github.*/(?:tar|zip)ball/}
audit_urls(urls, archive_gh_pattern) do |_, url|
next unless !/\.git$/.match?(url)
next if /\.git$/.match?(url)
problem "Use /archive/ URLs for GitHub tarballs (url is #{url})."
end
@ -203,7 +203,7 @@ module RuboCop
# Don't use GitHub .zip files
zip_gh_pattern = %r{https://.*github.*/(archive|releases)/.*\.zip$}
audit_urls(urls, zip_gh_pattern) do |_, url|
next unless !%r{releases/download}.match?(url)
next if %r{releases/download}.match?(url)
problem "Use GitHub tarballs rather than zipballs (url is #{url})."
end