Could you run `sed -i 's/\s\+$// *' in the code directories?  That'll get rid of any trailing whitespace.