brew audit: --strict warning for using $ in caveats
For multiple lines of commands to enter at a prompt, don't use $ as a prompt marker to make it easier to copy/paste.
This commit is contained in:
parent
11f3fca867
commit
e788de8cf8
@ -233,12 +233,23 @@ def audit_formula_instance f
|
|||||||
return problems
|
return problems
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def audit_formula_caveats f
|
||||||
|
problems = []
|
||||||
|
|
||||||
|
if f.caveats.to_s =~ /^\s*\$\s+/
|
||||||
|
problems << " * caveats should not use '$' prompts in multiline commands."
|
||||||
|
end if strict?
|
||||||
|
|
||||||
|
return problems
|
||||||
|
end
|
||||||
|
|
||||||
module Homebrew extend self
|
module Homebrew extend self
|
||||||
def audit
|
def audit
|
||||||
ff.each do |f|
|
ff.each do |f|
|
||||||
problems = []
|
problems = []
|
||||||
problems += audit_formula_instance f
|
problems += audit_formula_instance f
|
||||||
problems += audit_formula_urls f
|
problems += audit_formula_urls f
|
||||||
|
problems += audit_formula_caveats f
|
||||||
|
|
||||||
perms = File.stat(f.path).mode
|
perms = File.stat(f.path).mode
|
||||||
if perms.to_s(8) != "100644"
|
if perms.to_s(8) != "100644"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user