Issue #14938 has been updated by mtsmfm (Fumiaki Matsushima).


> This warning dispatches on_arg_ambiguous method.

> It dispatches on_parse_error method.

How can I find all list of events for warning and compile error?
When should I use compile_error?
https://docs.ruby-lang.org/en/2.5.0/Ripper.html#method-i-compile_error

> I think you can propose new methods for them.

You meant adding new methods to Ripper, right?
If Ripper can have `first_lineno`, `last_lineno`, `first_ column` and `last_ column`, it's enough for me for now.

----------------------------------------
Feature #14938: Provide API to get same result as ruby -wc
https://bugs.ruby-lang.org/issues/14938#change-73342

* Author: mtsmfm (Fumiaki Matsushima)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
----------------------------------------
I'm the author of an implementation of Ruby Language Server.
Currently, it uses `RubyVM::InstructionSequence.compile` to get the result of `ruby -wc` and parses message and location by regexp.

https://github.com/mtsmfm/language_server-ruby/blob/v0.11.0/lib/language_server/linter/ruby_wc.rb#L30

Do you have any plan to provide API?



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>