Keep the newline character at the end of the lines whose trailing whitespace we
authorMisha Brukman <brukman+llvm@gmail.com>
Fri, 20 Feb 2009 22:30:46 +0000 (22:30 +0000)
committerMisha Brukman <brukman+llvm@gmail.com>
Fri, 20 Feb 2009 22:30:46 +0000 (22:30 +0000)
are deleting; otherwise, everything ends up on a single line.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65185 91177308-0d34-0410-b5e6-96231b3b80d8

utils/lint/remove_trailing_whitespace.sh

index de58dbab7fcf72b0746a141ca0004446a6df7f0b..6e0c9be0932b371e34325591094726e43524a404 100755 (executable)
@@ -3,4 +3,4 @@
 # Sample syntax:
 #   $0 *.cpp
 
-perl -pi -e "s/\s+\$//" $*
+perl -pi -e 's/\s+$/\n/' $*