public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Ricardo Ungerer <ungerer.ricardo@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Ricardo Ungerer <ungerer.ricardo@gmail.com>
Subject: [PATCH 2/3] yocto-check-layer: Fix README email check
Date: Tue, 20 Jan 2026 19:47:21 +0000	[thread overview]
Message-ID: <20260120194722.142355-3-ungerer.ricardo@gmail.com> (raw)
In-Reply-To: <20260120194722.142355-1-ungerer.ricardo@gmail.com>

So far the test_readme have been use of re.match to find an email
address in the README file. This only matches if the email address
is at the start of the file. This commit changes this to re.search to
find email addresses anywhere in the README file.

Signed-off-by: Ricardo Ungerer <ungerer.ricardo@gmail.com>
---
 scripts/lib/checklayer/cases/common.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/lib/checklayer/cases/common.py b/scripts/lib/checklayer/cases/common.py
index 0114481434..9ea7592ba6 100644
--- a/scripts/lib/checklayer/cases/common.py
+++ b/scripts/lib/checklayer/cases/common.py
@@ -39,7 +39,7 @@ class CommonCheckLayer(OECheckLayerTestCase):
         self.assertIn('patch', data.lower(), msg="No patching information found in README.")
         # Check that there is an email address in the README
         email_regex = re.compile(r"[^@]+@[^@]+")
-        self.assertTrue(email_regex.match(data), msg="No email address found in README.")
+        self.assertTrue(email_regex.search(data), msg="No email address found in README.")
 
     def find_file_by_name(self, globs):
         """
-- 
2.43.0



  parent reply	other threads:[~2026-01-20 19:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-20 19:47 [PATCH 0/3] Improve yocto-check-layer test_readme method Ricardo Ungerer
2026-01-20 19:47 ` [PATCH 1/3] yocto-check-layer: Add messages in test_readme assertions Ricardo Ungerer
2026-01-20 19:47 ` Ricardo Ungerer [this message]
2026-01-20 19:47 ` [PATCH 3/3] yocto-check-layer: Add docstring to test_readme method Ricardo Ungerer
2026-01-20 20:00   ` Patchtest results for " patchtest
2026-01-21  9:25 ` [OE-core] [PATCH 0/3] Improve yocto-check-layer " Quentin Schulz

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=20260120194722.142355-3-ungerer.ricardo@gmail.com \
    --to=ungerer.ricardo@gmail.com \
    --cc=openembedded-core@lists.openembedded.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