All of lore.kernel.org
 help / color / mirror / Atom feed
* Should "cleanpatch" clean up stretches of space?
@ 2007-06-08 16:12 H. Peter Anvin
  2007-06-08 16:25 ` Jan Engelhardt
  0 siblings, 1 reply; 2+ messages in thread
From: H. Peter Anvin @ 2007-06-08 16:12 UTC (permalink / raw)
  To: Linux Kernel Mailing List

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Should "cleanpatch" clean up stretches of space?
  2007-06-08 16:12 Should "cleanpatch" clean up stretches of space? H. Peter Anvin
@ 2007-06-08 16:25 ` Jan Engelhardt
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Engelhardt @ 2007-06-08 16:25 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: Linux Kernel Mailing List


On Jun 8 2007 09:12, H. Peter Anvin wrote:
>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
-- 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-06-08 16:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-08 16:12 Should "cleanpatch" clean up stretches of space? H. Peter Anvin
2007-06-08 16:25 ` Jan Engelhardt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.