rufo
rufo copied to clipboard
The Ruby Formatter
I'm updating the rufo CI config to support the latest Ruby patch versions.
A simple `.html.erb` file l am testing with: ```erb ``` With this `.rufo` file in the project folder: ```ruby quote_style :single ``` **Expected behaviour** Line 2 (``) should remain unedited....
Hi all, I am no longer using Ruby for my daily work so I won't have time to actively maintain this gem any longer. Is there anyone that would like...
Before: ```ruby return if flash[:notice].is_a?(Array) || ( flash[:notice].present? && ( flash[:notice][/foo/] || flash[:notice][/bar/] ) ) ``` After: ```ruby return if flash[:notice].is_a?(Array) || (flash[:notice].present? && (flash[:notice][/foo/] || flash[:notice][/bar/])) ``` (I replaced...
Seems to be an error with formatting endless method definitions in ruby as outlined here: https://rubyreferences.github.io/rubychanges/3.0.html#endless-method-definition Example code: ```ruby class MyAwesomeClass def my_awesome_method = 123 end ``` ``` /Users/steve_mcrufo/.gem/ruby/3.0.2/gems/rufo-0.13.0/lib/rufo/formatter.rb:2035:in `visit_def_from_name':...
```rb mymethod "somearg" do |arg| puts "ABC" end.abc do |arg| puts "DEF" end ``` It crushes rufo with this traceback: ``` You've found a bug! It happened while trying to...
I'm using Rbenv. In VSC I installed https://github.com/jnbt/vscode-rufo Running `which rufo` on the terminal produces `/Users/borjagvo/.rbenv/shims/rufo` I changed `VSC Settings > Extensions > Rufo > Path to invoke Rufo` to...
Rufo ships with a rake task https://github.com/ruby-formatter/rufo/blob/master/rakelib/rufo.rake which calls `Rufo::Command.run(args)`. Unfortunately, this method calls `Kernel.exit` at the very end which causes the Rake task to exit. This does not allow...
Thanks for your work on rufo—it's great! I've noticed one behaviour that I find a bit surprising: when chaining method calls with blocks, indentation is removed. For example, take the...
Adding couple pattern matching tests to https://github.com/ruby-formatter/rufo/issues/246 for reviewal (see issue for more info)