From 3570cb6e77ca247a40c1487f3eabf3f767896a64 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Sun, 13 Oct 2019 10:14:43 +0100 Subject: [PATCH] Auto-fix Style/NegatedUnless offenses --- Library/Homebrew/rubocops/urls.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/rubocops/urls.rb b/Library/Homebrew/rubocops/urls.rb index 4d2ae1974c..30fd6ff06b 100644 --- a/Library/Homebrew/rubocops/urls.rb +++ b/Library/Homebrew/rubocops/urls.rb @@ -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