From: Joe Perches <joe@perches.com>
To: anish singh <anish198519851985@gmail.com>
Cc: Randy Dunlap <rdunlap@xenotime.net>,
davej@redhat.com, rostedt@goodmis.org, apw@shadowen.org,
akpm@linux-foundation.org, vapier@gentoo.org,
linux-kernel@vger.kernel.org, man.k1983@gmail.com
Subject: Re: [patch v3] checkpatch: Signature format verification
Date: Mon, 23 May 2011 11:09:26 -0700 [thread overview]
Message-ID: <1306174166.8687.49.camel@Joe-Laptop> (raw)
In-Reply-To: <BANLkTikqezyJMy1_i-woTVM9bvVL750iew@mail.gmail.com>
On Mon, 2011-05-23 at 23:07 +0530, anish singh wrote:
> On Mon, May 23, 2011 at 10:48 PM, Joe Perches <joe@perches.com> wrote:
> On Mon, 2011-05-23 at 22:36 +0530, anish singh wrote:
> > > if ($1 !~ /[\sa-zA-Z\"]*\s<.*>/i) {
> > > WARN("Space required b/w Full Name & Mail-id:\n" .
> > > $herecurr);
> > > Quote has been taken care too now.
> > If you're going to try to validate email addresses,
> > please do it reasonably correctly or not at all.
> > At a minimum you need to add digits, single quote,
> > period, and comma.
> I think there is a confusion.Let me state it once again.
> This patch is used to check space between "signs" & name/ name &
> mail-id.
I'm not confused.
You are only checking names with this form (without quotes)
"First Last <fl@domain.tld>", now quoted as well.
Names can have many forms.
8 bit chars, commas, quotes, apostrophes, all sorts of things.
for instance:
$ git log v2.6.36.. | grep -P "by:.*" | \
grep -vP "by:[\sa-zA-Z\"]*\s<.*>" | \
sort | uniq -c | sort -rn | head -20
3421 Signed-off-by: David S. Miller <davem@davemloft.net>
3137 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2232 Signed-off-by: John W. Linville <linville@tuxdriver.com>
386 Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
292 Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
257 Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
223 Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
193 Signed-off-by: J. Bruce Fields <bfields@redhat.com>
167 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
166 Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
159 Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
126 Signed-off-by: Jean-François Moine <moinejf@free.fr>
121 Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
107 Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
106 Acked-by: David S. Miller <davem@davemloft.net>
103 Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
76 Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
69 Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
66 Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
63 Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
I still think what I suggested after your first patch
attempt is simple and appropriate.
our $Valid_Signatures "(?:Signed-off-by:|Reviewed-by:|Acked-by:)"
...
if ($line =~ /^(\s*)($ValidSignatures)(\s*)(.*)$/i) {
my $space_before = $1;
my $sign_off = $2;
my $space_after = $3;
my $email = $4;
if (defined $space_before && $space_before ne "") {
warning (no space before...)
}
if ($sign_off !~ /$Valid_Signature/) {
warning (signature case...)
}
if (!defined $space_after || $space_after ne " ") {
warning (need only one space after colon...)
}
if (!validate_email($4)) {
warning (bad email...)
next prev parent reply other threads:[~2011-05-23 18:09 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-21 19:38 PATCH] patch to generate warning when signed-of line in patch in not proper anish
2011-05-21 19:52 ` Joe Perches
2011-05-22 10:18 ` [patch v2] checkpatch: Signature format verification anish
2011-05-22 14:16 ` Joe Perches
[not found] ` <BANLkTimMPvn87E0EEqT4vhox4_8nQ4pMug@mail.gmail.com>
2011-05-23 4:14 ` Joe Perches
2011-05-23 16:22 ` Steven Rostedt
2011-05-23 16:30 ` Joe Perches
2011-05-23 15:21 ` [patch v3] " anish
2011-05-23 16:11 ` Joe Perches
[not found] ` <BANLkTi=9nzMbxU0=P+pOaHcebqhL=bd2HQ@mail.gmail.com>
2011-05-23 16:36 ` Joe Perches
2011-05-23 16:39 ` Randy Dunlap
2011-05-23 16:42 ` Joe Perches
[not found] ` <BANLkTik8coVxt=Z92NQBNH_=4yRhTtexzA@mail.gmail.com>
2011-05-23 17:07 ` Randy Dunlap
2011-05-23 17:18 ` Joe Perches
[not found] ` <BANLkTikqezyJMy1_i-woTVM9bvVL750iew@mail.gmail.com>
2011-05-23 18:09 ` Joe Perches [this message]
2011-05-23 22:51 ` Mike Frysinger
2011-05-24 1:24 ` Valdis.Kletnieks
2011-05-24 1:31 ` Mike Frysinger
2011-05-24 4:44 ` Randy Dunlap
2011-05-27 18:01 ` [patch v4] " anish
2011-05-27 18:16 ` Steven Rostedt
2011-05-27 18:18 ` Randy Dunlap
2011-05-27 18:45 ` Joe Perches
2011-05-27 18:58 ` Joe Perches
2011-05-27 19:22 ` Steven Rostedt
2011-05-27 19:33 ` Joe Perches
2011-05-27 18:29 ` Joe Perches
[not found] ` <BANLkTikfh_ABGomn-Lm9Ugc7MzeRodwiEQ@mail.gmail.com>
2011-05-27 19:08 ` Joe Perches
[not found] ` <BANLkTi=JK+XS2D0exj=unjpjGCsnVncCzQ@mail.gmail.com>
2011-05-27 19:33 ` Joe Perches
[not found] ` <BANLkTi=dsYi3ViZdpGdagxzhzDRuRVL_+A@mail.gmail.com>
2011-05-27 20:18 ` Steven Rostedt
2011-05-27 20:37 ` Joe Perches
[not found] ` <BANLkTi=VuLpdAf3Qo3mo_nQ03yHazeHf+g@mail.gmail.com>
2011-05-28 1:42 ` Joe Perches
2011-05-27 22:14 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1306174166.8687.49.camel@Joe-Laptop \
--to=joe@perches.com \
--cc=akpm@linux-foundation.org \
--cc=anish198519851985@gmail.com \
--cc=apw@shadowen.org \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=man.k1983@gmail.com \
--cc=rdunlap@xenotime.net \
--cc=rostedt@goodmis.org \
--cc=vapier@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox