Skip to content

Commit

Permalink
Merge pull request #16 from flavorjones/flavorjones-nokogiri-huge-par…
Browse files Browse the repository at this point in the history
…se-option

feat: use Nokogiri's HUGE parse option
  • Loading branch information
peterzhu2118 authored May 17, 2023
2 parents 1fdd1fb + 3eea257 commit 31e715d
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| # rubocop:disable Style/SymbolProc
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 31e715d

Please sign in to comment.