Should "cleanpatch" clean up stretches of space?
Hi all,
Right now I have "cleanspace" and "cleanpatch" clean up spaces before tabs, but it does not compress runs of spaces that aren't followed by a tab.
I could make it do that; I was being conservative when I wrote it and opted for it not to do so, but I wanted to hear if people think it should (and if so, what should a reasonable threshold be, in addition for obviously crossing a tab line? Two spaces? Three? Four? Eight?)
-hpa
Quoted 9 lines · H. Peter Anvin
Hi all,
Right now I have "cleanspace" and "cleanpatch" clean up spaces before tabs, but it does not compress runs of spaces that aren't followed by a tab.
I could make it do that; I was being conservative when I wrote it and opted for it not to do so, but I wanted to hear if people think it should (and if so, what should a reasonable threshold be, in addition for obviously crossing a tab line? Two spaces? Three? Four? Eight?)
Exactly. Linus (see CodingStyle) thinks non-8-tabs are heretic movements, but well, let those people have their fun.
People should not be forced (by means of checker scripts that are officially endorsed) to compress / {8}/ into a \t. In fact, people should not even assume a tab is 8 when writing code. Instead,
\t while (foo) {
\t \t bar = some_function_with_lots_of_args(par1, par2, par3,
\t \t \x20+ par4, par5, par6);
\t }
\t should be used for "leading indent" only. Too bad almost noone cares.
Jan