diff options
| author | Jack Nagel | 2013-04-06 22:11:26 -0500 |
|---|---|---|
| committer | Jack Nagel | 2013-04-06 22:12:21 -0500 |
| commit | 92424d5b66f4c936e344f35d7d4e35b4d732caa2 (patch) | |
| tree | d563e3750f3002ec4de317b08591355fce3fa58f /Library/Homebrew/cmd | |
| parent | 5af9e408a836ab5d1dd18923f38c75f91163f2dc (diff) | |
| download | homebrew-92424d5b66f4c936e344f35d7d4e35b4d732caa2.tar.bz2 | |
audit: clean up some regexps
Diffstat (limited to 'Library/Homebrew/cmd')
| -rw-r--r-- | Library/Homebrew/cmd/audit.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index 296e79cee..8b773345d 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -430,16 +430,17 @@ class FormulaAuditor problem "Use MacOS.version instead of MACOS_VERSION" end - if text =~ /(MacOS.((snow_)?leopard|leopard|(mountain_)?lion)\?)/ - problem "#{$1} is deprecated, use a comparison to MacOS.version instead" + cats = %w{leopard snow_leopard lion mountain_lion}.join("|") + if text =~ /MacOS\.(?:#{cats})\?/ + problem "\"#{$&}\" is deprecated, use a comparison to MacOS.version instead" end if text =~ /skip_clean\s+:all/ problem "`skip_clean :all` is deprecated; brew no longer strips symbols" end - if text =~ /depends_on (.*)\.new$/ - problem "`depends_on` can take requirement classes directly" + if text =~ /depends_on [A-Z][\w:]+\.new$/ + problem "`depends_on` can take requirement classes instead of instances" end end |
