Skip to content

Commit

Permalink
feat: use Nokogiri's HUGE parse option
Browse files Browse the repository at this point in the history
because some of these files get really big.
  • Loading branch information
flavorjones committed Apr 28, 2023
1 parent 4a30619 commit 79b0b6a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/ruby_memcheck/test_task_reporter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ def parse_valgrind_output(xml_files)
@errors = []

xml_files.each do |file|
Nokogiri::XML::Reader(File.open(file)).each do |node|
reader = Nokogiri::XML::Reader(File.open(file)) do |config|
config.huge
end
reader.each do |node|
next unless node.name == "error" && node.node_type == Nokogiri::XML::Reader::TYPE_ELEMENT

error_xml = Nokogiri::XML::Document.parse(node.outer_xml).root
Expand Down

0 comments on commit 79b0b6a

Please sign in to comment.