LWN.net Logo

Eight character tabs

Eight character tabs

Posted Oct 31, 2012 1:05 UTC (Wed) by bronson (subscriber, #4806)
In reply to: Eight character tabs by nix
Parent article: Thoughts on the ext4 panic

... and then somehow unreindent before you commit your code? Otherwise, unless you enforce company-wide indent settings (good luck!), most of your changes will be whitespace churn.

I'm at the point where I'm ready to declare that, on a real world codebase with multiple teammembers, nothing at all works. Nobody likes the whitespace gestapo.


(Log in to post comments)

Eight character tabs

Posted Oct 31, 2012 8:52 UTC (Wed) by man_ls (subscriber, #15091) [Link]

You can try telling git to ignore whitespace.

My point of view is a bit different: tabs are good, therefore avoid everything that doesn't work with tabs. Lining things up is evil, hard wrap-up limits are evil, and so on. Yes, it requires a lot of discipline, but then so does software development in general.

Eight character tabs

Posted Oct 31, 2012 13:17 UTC (Wed) by nix (subscriber, #2304) [Link]

Yeah, automated reindentation before commit only works if you have something pre-commit that reindents again. I've worked on projects with such rules, and it does work (certainly better than what we had before, with people with all sorts of tab widths and odious 'optimizing' editors that translated spaces to tabs of whatever width the user had set throughout the entire file on every save). Better yet is to adapt to whatever the coding standard of the project is and just eat your whining most of the time. (Says the guy who whined about part of the kernel's coding standards just a few posts up. Hypocrisy is *good* for you!)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds