mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 12:59:02 +02:00
yocto-check-layer: disregard checks if referencing another README file
It is permissible to have a layer's README reference another README. If this is the case, avoid other checks. Do this by checking for the word README (case insensitive) in the README file. This might be too permissive, but follows the pattern of looking for exact words (like "patch" or "maintainer") in READMEs. (From OE-Core rev: 443c73d638519d6a7ea44d1c0e80d76306687ddc) Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
aec629185e
commit
17d1c837a4
|
@ -26,7 +26,12 @@ class CommonCheckLayer(OECheckLayerTestCase):
|
|||
data = f.read()
|
||||
self.assertTrue(data,
|
||||
msg="Layer contains a README file but it is empty.")
|
||||
self.assertIn('maintainer',data)
|
||||
|
||||
# If a layer's README references another README, then the checks below are not valid
|
||||
if re.search('README', data, re.IGNORECASE):
|
||||
return
|
||||
|
||||
self.assertIn('maintainer', data)
|
||||
self.assertIn('patch',data)
|
||||
# Check that there is an email address in the README
|
||||
email_regex = re.compile(r"[^@]+@[^@]+")
|
||||
|
|
Loading…
Reference in New Issue
Block a user