Kill Trailing Whitespace With Code-cleaner!
I just released code-cleaner gem which is useful for removing trailing whitespace and adding missing \n. It has advanced whitelisting & blacklisting rules, so it’s clever enough to ignore your non-ruby files as well as your vendored dependencies. It can also add missing encoding declaration for Ruby 1.9 if you specify --encoding=[my-enc] and much more.
It’s distributed with hooks:whitespace:install task for Rake, Thor and Nake which will install Git pre-commit hook for cleaning files which you are going to commit, so it’s ideal for ensuring proper code quality in projects with more contributors.
Post a comment