audit (strict): check for use of spaces in system.
This commit is contained in:
parent
3e3a4cad50
commit
c82e48b904
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user