diff options
| author | Jack Nagel | 2013-04-05 22:00:36 -0500 |
|---|---|---|
| committer | Jack Nagel | 2013-04-05 22:00:36 -0500 |
| commit | e0d6ee863f495a1d7f2ca6368d9e3a149ebcc272 (patch) | |
| tree | 99ca8c03969314b7e2d384f4f84ea6408138b057 | |
| parent | 62a0b3f18dc8c52cce89943c82d1a232552e2493 (diff) | |
| download | brew-e0d6ee863f495a1d7f2ca6368d9e3a149ebcc272.tar.bz2 | |
Make some groups non-capturing
| -rw-r--r-- | Library/Homebrew/cmd/audit.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index afe6167b6..62d1405e0 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -195,7 +195,7 @@ class FormulaAuditor urls = [(f.stable.url rescue nil), (f.devel.url rescue nil), (f.head.url rescue nil)].compact # Check GNU urls; doesn't apply to mirrors - urls.grep(%r[^(https?|ftp)://(?!alpha).+/gnu/]).each do |u| + urls.grep(%r[^(?:https?|ftp)://(?!alpha).+/gnu/]).each do |u| problem "\"ftpmirror.gnu.org\" is preferred for GNU software (url is #{u})." end @@ -230,7 +230,7 @@ class FormulaAuditor end # Check for git:// GitHub repo urls, https:// is preferred. - urls.grep(%r[^git://([^/])*github\.com/]).each do |u| + urls.grep(%r[^git://[^/]*github\.com/]).each do |u| problem "Use https:// URLs for accessing GitHub repositories (url is #{u})." end @@ -240,7 +240,7 @@ class FormulaAuditor end # Use new-style archive downloads - urls.select { |u| u =~ %r[https://.*/(tar|zip)ball/] and not u =~ %r[\.git$] }.each do |u| + urls.select { |u| u =~ %r[https://.*/(?:tar|zip)ball/] and not u =~ %r[\.git$] }.each do |u| problem "Use /archive/ URLs for GitHub tarballs (url is #{u})." end @@ -368,7 +368,7 @@ class FormulaAuditor end # No trailing whitespace, please - if text =~ /(\t|[ ])+$/ + if text =~ /[\t ]+$/ problem "Trailing whitespace was found" end |
