ruby-formatter/rufo

How to format all Ruby files in all subdirectories?

ndbroadbent opened this issue · 3 comments

This was missing from the README and the output of rufo --help. Is there a way to format all Ruby files in a project? I tried rufo **/*.rb but that only formatted files in the first level of subdirectories.

I got it to work with a find command: find . -type f -name "*.rb" -print0 | xargs -n250 -0 rufo

But would be great if rufo supported this.

rufo . does this just fine:

$ rufo .                                                                                                                                              ~/w/bidder
Format: ./app/forms/bidder_changed.rb
Format: ./app/forms/update_lead_request.rb
Format: ./app/forms/new_lead_request.rb
Format: ./app/forms/chain_changed.rb
Format: ./app/forms/search_active_bidders.rb
Format: ./app/mailers/data_update_mailer.rb
Format: ./app/mailers/report_mailer.rb
Format: ./app/mailers/taco_update_mailer.rb
...

Oh thanks! I'll send a PR to update the README