From: nobu@... Date: 2018-07-30T01:23:19+00:00 Subject: [ruby-core:88180] [Ruby trunk Feature#14938] Provide API to get same result as ruby -wc Issue #14938 has been updated by nobu (Nobuyoshi Nakada). mtsmfm (Fumiaki Matsushima) wrote: > ~~~ruby > #=> /tmp/20180729-457-smihk6:1: warning: ambiguous first argument; put parentheses or a space even after `/' operator This warning dispatches `on_arg_ambiguous` method. > - How can I get the range of code instead of lineno and column only? No way right now. I think you can propose new methods for them. > ~~~ruby > #=> /tmp/20180729-461-1wcbfr4:1: syntax error, unexpected end-of-input It dispatches `on_parse_error` method. ---------------------------------------- Feature #14938: Provide API to get same result as ruby -wc https://bugs.ruby-lang.org/issues/14938#change-73200 * 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: