Search code examples
ruby-on-railsrubypretty-print

Ruby Source code Auto-Formatter


What is the best option? I found:

but they both seem slightly outdated. Special support for Rails (Knowing which files to format automagically and some other cool things) would be a plus, and a git hook script.


Solution

  • There is RuboCop:

    gem install rubocop
    rubocop -a
    

    It will also fix all the common mistakes.