Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
SyntaxSuggest::CodeFrontier#holds_all_syntax_errors?
holds_all_syntax_errors?(block_array = @queue, can_cache: true)
lib/syntax_suggest/code_frontier.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/lib/syntax_suggest/code_frontier.rb, line 89
def holds_all_syntax_errors?(block_array = @queue, can_cache: true)
return false if can_cache && can_skip_check?
without_lines = block_array.to_a.flat_map do |block|
block.lines
end
SyntaxSuggest.valid_without?(
without_lines: without_lines,
code_lines: @code_lines
)
end
Returns true if the document is valid with all lines removed. By default it checks all blocks in present in the frontier array, but can be used for arbitrary arrays of codeblocks as well