aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2017-04-21 13:06:29 +0100
committerMike McQuaid2017-04-21 18:24:10 +0100
commit3011cbac34334c37eba20cbf06fe7942522602f6 (patch)
treea86086b8a384649fd7e7d21340badc36dee94f48 /Library
parent6e1faf5b8837e228785dde0cfd8ca47336fb5494 (diff)
downloadbrew-3011cbac34334c37eba20cbf06fe7942522602f6.tar.bz2
audit: ensure dependencies don't use options.
Option dependencies are nasty as they cause unnecessary builds from source.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/dev-cmd/audit.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb
index 4871cc8b2..7b0b2b911 100644
--- a/Library/Homebrew/dev-cmd/audit.rb
+++ b/Library/Homebrew/dev-cmd/audit.rb
@@ -1028,11 +1028,15 @@ class FormulaAuditor
end
if line =~ /depends_on :tex/
- problem ":tex is deprecated."
+ problem ":tex is deprecated"
end
- if line =~ /depends_on\s+['"].+['"]\s+=>\s+:(lua|perl|python|ruby)(\d*)/
- problem "Formulae should vendor #{$1} modules rather than use `depends_on ... => :#{$1}#{$2}`."
+ if line =~ /depends_on\s+['"](.+)['"]\s+=>\s+:(lua|perl|python|ruby)(\d*)/
+ 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}"
end
# Commented-out depends_on