diff options
Diffstat (limited to 'Library/Homebrew/rubocops/patches_cop.rb')
| -rw-r--r-- | Library/Homebrew/rubocops/patches_cop.rb | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/Library/Homebrew/rubocops/patches_cop.rb b/Library/Homebrew/rubocops/patches_cop.rb index fb14d8acc..b27283382 100644 --- a/Library/Homebrew/rubocops/patches_cop.rb +++ b/Library/Homebrew/rubocops/patches_cop.rb @@ -31,7 +31,10 @@ module RuboCop %r{gist\.githubusercontent\.com/.+/raw}]) if regex_match_group(patch, gh_patch_patterns) unless patch_url =~ /[a-fA-F0-9]{40}/ - problem "GitHub/Gist patches should specify a revision:\n#{patch_url}" + problem <<-EOS.undent.chomp + GitHub/Gist patches should specify a revision: + #{patch_url} + EOS end end @@ -46,15 +49,24 @@ module RuboCop end if regex_match_group(patch, %r{macports/trunk}) - problem "MacPorts patches should specify a revision instead of trunk:\n#{patch_url}" + problem <<-EOS.undent.chomp + MacPorts patches should specify a revision instead of trunk: + #{patch_url} + EOS end if regex_match_group(patch, %r{^http://trac\.macports\.org}) - problem "Patches from MacPorts Trac should be https://, not http:\n#{patch_url}" + problem <<-EOS.undent.chomp + Patches from MacPorts Trac should be https://, not http: + #{patch_url} + EOS end return unless regex_match_group(patch, %r{^http://bugs\.debian\.org}) - problem "Patches from Debian should be https://, not http:\n#{patch_url}" + problem <<-EOS.undent.chomp + Patches from Debian should be https://, not http: + #{patch_url} + EOS end end end |
