Re: [patch v4] checkpatch: Signature format verification

From: Joe Perches
Date: Fri May 27 2011 - 14:29:57 EST


On Fri, 2011-05-27 at 23:31 +0530, anish wrote:
> From: anish kumar <anish198519851985@xxxxxxxxx>
[]
> v4 Suggested by Joe Perches(joe@xxxxxxxxxxx) that names can
> have many forms.8 bit chars,commas,quotes,apostrphes,all sort
> of things.This is now taken care of.

NAK. No it's not.

> Signed-off-by: anish kumar <anish198519851985@xxxxxxxxx>
[]
> + if ($line =~ /^\s*$sign(.*)/i) {
> + if ($1 !~ /^\s+([a-zA-Z\s\"\.\-\'\,]*.*)/i) {
> + WARN("Space required after $sign\n" .
> + $herecurr);

8 bit chars, digits?

> + }
> + if ($1 !~ /([\sa-zA-Z\"\.\-\'\,]*)\s<.*>/i) {
> + WARN("Space required b/w Full Name & Mail-id:\n" .
> + $herecurr);

For the 3rd time, please use this form:

if ($line =~ /^(\s*)($ValidSignatures)(\s*)(.*)$/i) {

and if you really want email format validation,
use a separate function.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/