Re: [RFC PATCH 1/10] vfs: Lindentified namespace.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 17 September 2005 13:34:57 +0100, Al Viro wrote:
> On Sat, Sep 17, 2005 at 02:18:48PM +0200, J?rn Engel wrote:
> > 
> > It is an approximation.  In my personal experience, the "-l80"
> > parameter is doing a lot of harm.  It causes things like
> > 
> > 	if (...)
> > 		for (...)
> > 			while (...)
> > 				if (...)
> > 					for (...)
> > 						while (...)
> > 							some_function(argument,
> > 									very_long_argument,
> > 									another_argument,
> > 									0,
> > 									1,
> > 									NULL
> > 									);
> 
> ... show up as unreadable crap they are.  I fail to see a problem...
> Fix them and run Lindent again, that's it.

Without -l80, this crap takes up fewer lines.  Such things usually
occur in 500+ line functions, not counting Lindent expansion.  Getting
a fair amount of those lines on the screen helps when fixing things
up.

But that's just my personal approach.  As long as the results are
sane, it doesn't really matter.

> Lindent behaviour wrt labels is far more annoying, ditto for the mess it
> often makes out of prototypes (demonstrated in the patch in question).
> 
> IME the best way to use Lindent is to do vi -c 's/[[:space:]]*$//|x' foo.c
> first, then run Lindent, then walk through prototypes and fix them,
> diff with pre-Lindent version and see if it looks sane...

You're lucky.  I've had to deal with code where the diff with
pre-Lindent version was completely pointless.  Original was so broken,
there was no room for regressions.

Jörn

-- 
"Error protection by error detection and correction."
-- from a university class
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux