[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 6 Jun 2007 11:05:07 +0200
From: "Jesper Juhl" <jesper.juhl@...il.com>
To: "Andy Whitcroft" <apw@...dowen.org>
Cc: "Andrew Morton" <akpm@...l.org>,
"Randy Dunlap" <rdunlap@...otime.net>,
"Joel Schopp" <jschopp@...tin.ibm.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] update checkpatch.pl to version 0.03
On 04/06/07, Andy Whitcroft <apw@...dowen.org> wrote:
>
> This version brings a host of changes to cure false positives and
> bugs detected on patches submitted to lkml and -mm. It also brings
> a number of new tests in response to reviews, of particular note:
>
I have a few ideas for additional checks you could add to that script:
- Source files should be 7bit ASCII and Documentation/Kbuild
files/etc should be UTF-8, test that the patch honors that and doesn't
put something else in (cleanups that remove 8bit ASCII etc from a
source file is OK though).
- Check that nothing in the patch touches any file from Documentation/dontdiff
- Check for an excessive number of blank lines - some people have a
nasty tendency to put 3 or more blank lines between functions or
between comments and next source line etc.
- Check that all newlines added by the patch are "\n", not "\r",
"\r\n" or "\n\r".
- Check that, if the patch adds a new file, the new file ends with a newline.
- Warn about usage of the "register" keyword.
- Maybe warn about usage of float/double in source files?
- 'return' is not a function, so warn about patches that think it is
and use 'return(expr);' (this one is tricky since 'return (expr);' can
be OK in some cases.
That's all I can come up with at the moment. If more ideas pop up I'll
let you know.
Good work with that script btw.
--
Jesper Juhl <jesper.juhl@...il.com>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists