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>
This commit is contained in:
parent
d0b904a6e4
commit
7f7391243a
@ -29,6 +29,11 @@ def audit_formula_text name, text
|
|||||||
problems << " * Check indentation of 'depends_on'."
|
problems << " * Check indentation of 'depends_on'."
|
||||||
end
|
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
|
# FileUtils is included in Formula
|
||||||
if text =~ /FileUtils\.(\w+)/
|
if text =~ /FileUtils\.(\w+)/
|
||||||
problems << " * Don't need 'FileUtils.' before #{$1}."
|
problems << " * Don't need 'FileUtils.' before #{$1}."
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user