From b37c3e9cb252a7f83db2b58e3cf2e020523d1d51 Mon Sep 17 00:00:00 2001 From: Alexander Bayandin Date: Sun, 15 Mar 2020 10:51:09 +0000 Subject: [PATCH] rubocops/patches: suggest url with full_index=1 --- Library/Homebrew/rubocops/patches.rb | 2 +- Library/Homebrew/test/rubocops/patches_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/rubocops/patches.rb b/Library/Homebrew/rubocops/patches.rb index 9095bf38c1..c2171b4d63 100644 --- a/Library/Homebrew/rubocops/patches.rb +++ b/Library/Homebrew/rubocops/patches.rb @@ -57,7 +57,7 @@ module RuboCop if match_obj = regex_match_group(patch, gh_patch_diff_pattern) problem <<~EOS use GitHub pull request URLs: - https://github.com/#{match_obj[1]}/#{match_obj[2]}/pull/#{match_obj[3]}.patch + https://github.com/#{match_obj[1]}/#{match_obj[2]}/pull/#{match_obj[3]}.patch?full_index=1 Rather than patch-diff: #{patch_url} EOS diff --git a/Library/Homebrew/test/rubocops/patches_spec.rb b/Library/Homebrew/test/rubocops/patches_spec.rb index 77c72638c9..d2ed6ce03a 100644 --- a/Library/Homebrew/test/rubocops/patches_spec.rb +++ b/Library/Homebrew/test/rubocops/patches_spec.rb @@ -94,7 +94,7 @@ describe RuboCop::Cop::FormulaAudit::Patches do [{ message: <<~EOS, use GitHub pull request URLs: - https://github.com/foo/foo-bar/pull/100.patch + https://github.com/foo/foo-bar/pull/100.patch?full_index=1 Rather than patch-diff: https://patch-diff.githubusercontent.com/raw/foo/foo-bar/pull/100.patch EOS @@ -231,7 +231,7 @@ describe RuboCop::Cop::FormulaAudit::Patches do [{ message: <<~EOS, use GitHub pull request URLs: - https://github.com/foo/foo-bar/pull/100.patch + https://github.com/foo/foo-bar/pull/100.patch?full_index=1 Rather than patch-diff: https://patch-diff.githubusercontent.com/raw/foo/foo-bar/pull/100.patch EOS