All of lore.kernel.org
 help / color / mirror / Atom feed
From: Janne Grunau <j@jannau.net>
To: Joe Perches <joe@perches.com>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] get_maintainer: Extend matched name characters in maintainers_in_file()
Date: Fri, 16 Sep 2022 10:47:12 +0200	[thread overview]
Message-ID: <20220916084712.84411-1-j@jannau.net> (raw)

Extend the regexp matching name characters to cover Unicode blocks Latin
Extended-A and Extended-B.
Fixes 'scripts/get_maintainer.pl -f' for
'Documentation/devicetree/bindings/clock/apple,nco.yaml'.

Signed-off-by: Janne Grunau <j@jannau.net>

---
This still excludes Greek and Cyrilic characters which should be
expected in names as well. I tried to use '\p{L}' to match all Unicode
letters but couldn't get it to work. Feel free understand this as bug
report with an incomplete fix.

best regards,
Janne

---
 scripts/get_maintainer.pl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index ab123b498fd9..7c06f06dcbfa 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -442,7 +442,7 @@ sub maintainers_in_file {
 	my $text = do { local($/) ; <$f> };
 	close($f);
 
-	my @poss_addr = $text =~ m$[A-Za-zÀ-ÿ\"\' \,\.\+-]*\s*[\,]*\s*[\(\<\{]{0,1}[A-Za-z0-9_\.\+-]+\@[A-Za-z0-9\.-]+\.[A-Za-z0-9]+[\)\>\}]{0,1}$g;
+	my @poss_addr = $text =~ m$[A-Za-zÀ-ɏ\"\' \,\.\+-]*\s*[\,]*\s*[\(\<\{]{0,1}[A-Za-z0-9_\.\+-]+\@[A-Za-z0-9\.-]+\.[A-Za-z0-9]+[\)\>\}]{0,1}$g;
 	push(@file_emails, clean_file_emails(@poss_addr));
     }
 }
@@ -2460,7 +2460,7 @@ sub clean_file_emails {
 	    $name = "";
 	}
 
-	my @nw = split(/[^A-Za-zÀ-ÿ\'\,\.\+-]/, $name);
+	my @nw = split(/[^A-Za-zÀ-ɏ\'\,\.\+-]/, $name);
 	if (@nw > 2) {
 	    my $first = $nw[@nw - 3];
 	    my $middle = $nw[@nw - 2];
-- 
2.35.1


             reply	other threads:[~2022-09-16  8:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-16  8:47 Janne Grunau [this message]
2022-09-16 15:51 ` [PATCH] get_maintainer: Extend matched name characters in maintainers_in_file() Martin Povišer
2022-09-17 14:11 ` Joe Perches
2022-09-18 17:03   ` Joe Perches
2022-09-18 20:32     ` Janne Grunau
2022-09-18 21:40       ` Joe Perches

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=20220916084712.84411-1-j@jannau.net \
    --to=j@jannau.net \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.