[ruby-core:88312] [Ruby trunk Feature#14938] Provide API to get same result as ruby -wc

From: mtsmfm@...
Date: 2018-08-06 18:27:23 UTC
List: ruby-core #88312
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:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next