Method: Codeqa::Checkers::CheckErbHtml#check
- Defined in:
- lib/codeqa/checkers/check_erb_html.rb
#check ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/codeqa/checkers/check_erb_html.rb', line 18 def check result = nil with_existing_file(html) do |filename| Open3.popen3("tidy -q -e -xml '#{filename}'") do |_in_stream, _out_stream, err_stream| = err_stream.read result = if =~ /(Error:|missing trailing quote|end of file while parsing attributes)/m end # IO.popen end # Tempfile return unless result errors.add(:source, html) errors.add(nil, result) end |