Skip to content
Snippets Groups Projects
Commit e788de8c authored by Adam Vandenberg's avatar Adam Vandenberg
Browse files

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.
parent 11f3fca8
No related branches found
No related tags found
No related merge requests found
......@@ -233,12 +233,23 @@ def audit_formula_instance f
return problems
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
def audit
ff.each do |f|
problems = []
problems += audit_formula_instance f
problems += audit_formula_urls f
problems += audit_formula_caveats f
perms = File.stat(f.path).mode
if perms.to_s(8) != "100644"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment