aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2011-11-29 19:37:39 -0600
committerJack Nagel2011-11-29 19:40:14 -0600
commit7f7391243a55a6d674f6f2d4c62c5f4390468be3 (patch)
treed90b4a56683476d54baad22f7d23648730c56ff8 /Library
parentd0b904a6e4e90fda499cdd8cbe1064c293ad3d04 (diff)
downloadbrew-7f7391243a55a6d674f6f2d4c62c5f4390468be3.tar.bz2
audit: check for build-time dependencies
This can be made more robust in the future when we stop throwing away the ':build' type flag in Formula#depends_on. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/Homebrew/cmd/audit.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index ede2ad3a3..761d3f643 100755
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -29,6 +29,11 @@ def audit_formula_text name, text
problems << " * Check indentation of 'depends_on'."
end
+ # cmake, pkg-config, and scons are build-time deps
+ if text =~ /depends_on ['"](cmake|pkg-config|scons)['"]$/
+ problems << " * #{$1} dependency should be \"depends_on '#{$1}' => :build\""
+ end
+
# FileUtils is included in Formula
if text =~ /FileUtils\.(\w+)/
problems << " * Don't need 'FileUtils.' before #{$1}."