diff options
| author | Joe Perches <[email protected]> | 2010-03-05 13:43:00 -0800 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2010-03-06 11:26:33 -0800 |
| commit | 03372dbbe618bfcd02f9c8cdbfe78e97e3aad43b (patch) | |
| tree | 8b848249ec5d45154fb05c43aa0c7bd34f13d09e /tools/perf/scripts/python/syscall-counts.py | |
| parent | cea83886dde49fd7524e9f4a246dd5dff4ad236a (diff) | |
scripts/get_maintainer.pl: add --file-emails, find embedded email addresses
Add an imperfect option to search a source file for email addresses.
New option: --file-emails or --fe
email addresses in files are freeform text and are nearly impossible to
parse. Still, might as well try to do a somewhat acceptable job of
finding them. This code should find all addresses that are in the form
[email protected]
The code assumes that up to 3 alphabetic words along with dashes, commas,
and periods that preceed the email address are a name.
If 3 words are found for the name, and one of the first two words are a
single letter and period, or just a single letter then the 3 words are use
as name otherwise the last 2 words are used.
Some variants that are shown correctly:
John Smith <[email protected]>
Random J. Developer <[email protected]>
Random J. Developer ([email protected])
J. Random Developer [email protected]
Variants that are shown nominally correctly:
Written by First Last ([email protected])
is shown as:
First Last <[email protected]>
Variants that are shown incorrectly:
Some Really Long Name <[email protected]>
MontaVista Software, Inc. <[email protected]>
are returned as:
Long Name <[email protected]>
"Software, Inc" <[email protected]>
--roles and --rolestats show "(in file)" for matches.
For instance:
Without -file-emails:
$ ./scripts/get_maintainer.pl -f -nogit -roles net/core/netpoll.c
David S. Miller <[email protected]> (maintainer:NETWORKING [GENERAL])
[email protected] (open list)
With -fe:
$ ./scripts/get_maintainer.pl -f -fe -nogit -roles net/core/netpoll.c
David S. Miller <[email protected]> (maintainer:NETWORKING [GENERAL])
Matt Mackall <[email protected]> (in file)
Ingo Molnar <[email protected]> (in file)
[email protected] (open list)
[email protected] (open list:NETWORKING [GENERAL])
The number of email addresses in the file in not limited. Neither is the
number of returned email addresses.
Signed-off-by: Joe Perches <[email protected]>
Cc: Matt Mackall <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions