You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LongRecordName.transaction do
LongRecordName
.joins(:other_record)
# rubocop:disable Rails/SkipsModelValidations
.update_all(foo: 'bar')
end
Error:
[warn] foo.rb
Error: Cannot find expected end
#<Thread:0x0000000108fc4898 /Users/devon/.gem/ruby/3.1.2/gems/syntax_tree-3.3.0/lib/syntax_tree/cli.rb:382 run> terminated with exception (report_on_exception is true):
/Users/devon/.gem/ruby/3.1.2/gems/syntax_tree-3.3.0/lib/syntax_tree/cli.rb:426:in `highlight_error': undefined method `+' for nil:NilClass (NoMethodError)
maximum = [error.lineno + 3, lines.length].min
^
from /Users/devon/.gem/ruby/3.1.2/gems/syntax_tree-3.3.0/lib/syntax_tree/cli.rb:401:in `rescue in block (2 levels) in process_queue'
from /Users/devon/.gem/ruby/3.1.2/gems/syntax_tree-3.3.0/lib/syntax_tree/cli.rb:396:in `block (2 levels) in process_queue'
/Users/devon/.gem/ruby/3.1.2/gems/syntax_tree-3.3.0/lib/syntax_tree/parser.rb:210:in `find_token': Cannot find expected end (SyntaxTree::Parser::ParseError)
from /Users/devon/.gem/ruby/3.1.2/gems/syntax_tree-3.3.0/lib/syntax_tree/parser.rb:1198:in `on_do_block'
from /Users/devon/.gem/ruby/3.1.2/gems/syntax_tree-3.3.0/lib/syntax_tree.rb:46:in `parse'
from /Users/devon/.gem/ruby/3.1.2/gems/syntax_tree-3.3.0/lib/syntax_tree.rb:46:in `parse'
from /Users/devon/.gem/ruby/3.1.2/gems/syntax_tree-3.3.0/lib/syntax_tree.rb:53:in `format'
from /Users/devon/.gem/ruby/3.1.2/gems/syntax_tree-3.3.0/lib/syntax_tree/cli.rb:104:in `run'
from /Users/devon/.gem/ruby/3.1.2/gems/syntax_tree-3.3.0/lib/syntax_tree/cli.rb:397:in `block (2 levels) in process_queue'
/Users/devon/.gem/ruby/3.1.2/gems/syntax_tree-3.3.0/lib/syntax_tree/cli.rb:426:in `highlight_error': undefined method `+' for nil:NilClass (NoMethodError)
maximum = [error.lineno + 3, lines.length].min
^
from /Users/devon/.gem/ruby/3.1.2/gems/syntax_tree-3.3.0/lib/syntax_tree/cli.rb:401:in `rescue in block (2 levels) in process_queue'
from /Users/devon/.gem/ruby/3.1.2/gems/syntax_tree-3.3.0/lib/syntax_tree/cli.rb:396:in `block (2 levels) in process_queue'
/Users/devon/.gem/ruby/3.1.2/gems/syntax_tree-3.3.0/lib/syntax_tree/parser.rb:210:in `find_token': Cannot find expected end (SyntaxTree::Parser::ParseError)
from /Users/devon/.gem/ruby/3.1.2/gems/syntax_tree-3.3.0/lib/syntax_tree/parser.rb:1198:in `on_do_block'
from /Users/devon/.gem/ruby/3.1.2/gems/syntax_tree-3.3.0/lib/syntax_tree.rb:46:in `parse'
from /Users/devon/.gem/ruby/3.1.2/gems/syntax_tree-3.3.0/lib/syntax_tree.rb:46:in `parse'
from /Users/devon/.gem/ruby/3.1.2/gems/syntax_tree-3.3.0/lib/syntax_tree.rb:53:in `format'
from /Users/devon/.gem/ruby/3.1.2/gems/syntax_tree-3.3.0/lib/syntax_tree/cli.rb:104:in `run'
from /Users/devon/.gem/ruby/3.1.2/gems/syntax_tree-3.3.0/lib/syntax_tree/cli.rb:397:in `block (2 levels) in process_queue'
Expected
Shows syntax error, but no stack trace
The text was updated successfully, but these errors were encountered:
devonpmack
changed the title
Code causes syntax tree to crash
Code causes syntax tree thread to terminate
Aug 9, 2022
Running syntax tree on this code crashes it
Error:
Expected
Shows syntax error, but no stack trace
The text was updated successfully, but these errors were encountered: