Matthew Wilcox wrote: > On Thu, Oct 25, 2007 at 05:04:38PM +0200, Boaz Harrosh wrote: >> I found that lint, even with the command line options recommended by > > Do you mean Lindent / indent? > Yes "indent". I found that there are better switches to indent than what's in Lindent. But both are crap as for instance it does not understand the linux style multi-line-comments and mess them up, or it tabafy's broken-out-lines. Which is not what we usually want. And lots of other stuff. astyle does a much better job just by being less aggressive. >> kernel, is to aggressive, and leaves lots of work to be fixed by hand. >> (e.g it will touch the comments) > > It's not perfect, but code beautification is an art, not a science ;-) > > A lot of ugly code can't be made beautiful by a simple parser like > indent because what it really needs is refactoring. But you can't > refactor until you've made it at least partially readable, so Lindent is > the first step. > I think I disagree 89% and agree 11%. - remove trailing spaces - Indent, - Convert "Indents" to tabs - split long lines to multi lines, indent up to the last indent level, than fill with spaces, right align. These can all be done by a machine, the Linux way. Than - Adjust broken out lines, like if and while statements to be more readable - Remove/add blank lines for readability or after end of locals. That can be adjusted by a person. But I think with a given code it can be made 89% acceptable by a machine and 11% adjusted by a man. That is before I start a single char of coding. Boaz - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html