|
|
|
|
|
by m463
2209 days ago
|
|
I liked this comment elsewhere in the thread: "Tab depth use in the kernel is more or less $ git grep -Poh '^\t+(if|do|while|for|switch)\b' | \
sed -r 's/\w+//g' | \
awk '{print length($0);}' | \
sort | uniq -c | sort -rn
903993 1
339059 2
89334 3
18216 4
3282 5
605 6
148 7
36 8
4 9
1 10
http://lkml.iu.edu/hypermail/linux/kernel/2005.3/06570.htmlI like seeing these "back of the napkin" sorts of code snippets revealed... this is the sort of thing that happens frequently but isn't ever shared because of its throwaway/ephemeral nature. And also, yeah, low tab depth is way more relevant than line length as far as clean code. |
|