remove all whitespaces from your code
for i in `git ls-files *.py *.js *.css *.html`; do echo "$i"; sed -i '' -e 's/[[:space:]]*$//g' "$i"; done
... and bye bye blank spaces generated by some editors.
Written by Igor Leroy
Related protips
2 Responses
Am I missing something, isn't whitespace syntaxically important in python and CSS?
over 1 year ago
·
@barnettjw I use tabs. There's no room for a one-space error in the tabs (if you can see them). The problem IS that people use different editors, and the only common thing in the world is: tab==indent, as above. Some bloke comes in with the tab key set to the wrong number of spaces or does it manually and makes a mess. TABs and use a real editor. (This isn't just contrary to the python, it's about C/C++ and other whitespace-agnostic languages too).
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#