audit (strict): check for use of spaces in system.

This commit is contained in:
Mike McQuaid 2014-12-27 14:01:31 +00:00
parent 3e3a4cad50
commit c82e48b904

View File

@ -542,6 +542,14 @@ class FormulaAuditor
method = $2 method = $2
problem "Use the `#{method}` Ruby method instead of `system #{system}`" problem "Use the `#{method}` Ruby method instead of `system #{system}`"
end end
if @strict
if line =~ /system (["'][^"' ]*\s[^"' ]*["'])/
bad_system = $1
good_system = bad_system.gsub(" ", "\", \"")
problem "Use `system #{good_system}` instead of `system #{bad_system}` "
end
end
end end
def audit_conditional_dep(dep, condition, line) def audit_conditional_dep(dep, condition, line)