diff options
| author | Mike McQuaid | 2017-05-14 15:09:07 +0100 |
|---|---|---|
| committer | GitHub | 2017-05-14 15:09:07 +0100 |
| commit | 75d230318ab97aa7df0f31f9a9a6a1c2ce2f23e3 (patch) | |
| tree | 38f5c240abc6cff3f9acff7b135825a170d1c9ac /Library | |
| parent | 80df74893ac5afccf17a6b0e89f891f7b6ab5379 (diff) | |
| parent | d5006ef01232cb2fc9829d3d07871d683f0202af (diff) | |
| download | brew-75d230318ab97aa7df0f31f9a9a6a1c2ce2f23e3.tar.bz2 | |
Merge pull request #2627 from MikeMcQuaid/audit-fix-option-detection
audit: fix dependency option detection.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/dev-cmd/audit.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index c134441b2..9b14dc89c 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -1052,8 +1052,12 @@ class FormulaAuditor problem "#{$2} modules should be vendored rather than use deprecated `depends_on \"#{$1}\" => :#{$2}#{$3}`" end - if line =~ /depends_on\s+['"](.+)['"]\s+=>\s+.*(?<!\?[( ])['"](.+)['"]/ - problem "Dependency #{$1} should not use option #{$2}" + if line =~ /depends_on\s+['"](.+)['"]\s+=>\s+(.*)/ + dep = $1 + $2.split(" ").map do |o| + next unless o =~ /^\[?['"](.*)['"]/ + problem "Dependency #{dep} should not use option #{$1}" + end end # Commented-out depends_on |
