Last Updated: February 25, 2016
·
880
· bunnymatic

dump trailing whitespace across a project

After adding Cane to an old crufty project, I found (among other issues) hundreds of reports of 'Line contains trailing whitespace'. After a quick perl onliner, those were all gone.

find . -name '*.rb' -print0 | xargs -0 perl -pi -e 's/[^\S\r\n]+$//'

1 Response
Add your response

looks like this could be merged with https://coderwall.com/p/_ppnlg for good time fun

over 1 year ago ·