diff mbox series

[2/3] yocto-check-layer: Fix README email check

Message ID 20260120194722.142355-3-ungerer.ricardo@gmail.com
State New
Headers show
Series Improve yocto-check-layer test_readme method | expand

Commit Message

Ricardo Ungerer Jan. 20, 2026, 7:47 p.m. UTC
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 mbox series

Patch

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):
         """