rubocops/patches: reduce required revision length.

This commit is contained in:
Mike McQuaid 2020-04-13 14:36:07 +01:00
parent ea77fce409
commit 632813d969
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -44,7 +44,7 @@ module RuboCop
%r{gist\.github\.com/.+/raw}, %r{gist\.github\.com/.+/raw},
%r{gist\.githubusercontent\.com/.+/raw}]) %r{gist\.githubusercontent\.com/.+/raw}])
if regex_match_group(patch, gh_patch_patterns) if regex_match_group(patch, gh_patch_patterns)
unless patch_url.match?(/[a-fA-F0-9]{40}/) unless patch_url.match?(%r{/[a-fA-F0-9]{6,40}/})
problem <<~EOS.chomp problem <<~EOS.chomp
GitHub/Gist patches should specify a revision: GitHub/Gist patches should specify a revision:
#{patch_url} #{patch_url}