lib/fasterer/file_traverser.rb in fasterer-0.1.7 vs lib/fasterer/file_traverser.rb in fasterer-0.1.8
- old
+ new
@@ -52,11 +52,11 @@
attr_reader :parse_error_paths
def scan_file(path)
analyzer = Analyzer.new(path)
analyzer.scan
- rescue RubyParser::SyntaxError, Racc::ParseError
+ rescue RubyParser::SyntaxError, Racc::ParseError, Timeout::Error
parse_error_paths.push(path)
else
output(analyzer) if offenses_grouped_by_type(analyzer).any?
end
@@ -83,11 +83,11 @@
analyzer.errors.group_by(&:name).delete_if {|offense_name, _| ignored_speedups.include?(offense_name) }
end
def output_parse_errors
puts 'Fasterer was unable to process some files because the'
- puts 'internal parser is not able to read some characters.'
- puts 'Unprocessable files were:'
+ puts 'internal parser is not able to read some characters or'
+ puts 'has timeouted. Unprocessable files were:'
puts '-----------------------------------------------------'
puts parse_error_paths
puts
end
end