[v2,6/6] maintainer_utils: more array size verification.

Message ID bmm.hlw1gcuuvc.gcc.gcc.rearnsha.222.2.6@forge-stage.sourceware.org
State New
Headers
Series maintainer_utils.py: general cleanups |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_simplebootstrap_build--master-arm-bootstrap success Build passed
linaro-tcwg-bot/tcwg_simplebootstrap_build--master-aarch64-bootstrap success Build passed

Commit Message

Richard Earnshaw via Sourceware Forge Sept. 1, 2026, 2:36 p.m. UTC
  From: Richard Earnshaw <rearnsha@arm.com>

There always needs to be one email address associated with a user and
the inactive_emails and aliases entries should be omitted if empty,
so set the minimum size of all three to 1.

contrib/ChangeLog:

	* maintainer_utils.py (maintainer_schema): Set the minimum array
	size to 1 for email, inactive_email and aliases.
---
 contrib/maintainer_utils.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
  

Patch

diff --git a/contrib/maintainer_utils.py b/contrib/maintainer_utils.py
index 462d7d44e71e6..554beff09ff7d 100755
--- a/contrib/maintainer_utils.py
+++ b/contrib/maintainer_utils.py
@@ -59,6 +59,7 @@  maintainer_schema = {
                             'type': 'string',
                             'format': 'email',
                         },
+                        'minItems': 1,
                     },
                     'inactive_email': {
                         'type': 'array',
@@ -66,6 +67,7 @@  maintainer_schema = {
                             'type': 'string',
                             'format': 'email',
                         },
+                        'minItems': 1,
                     },
                     'DCO': {
                         'type': 'array',
@@ -136,11 +138,11 @@  maintainer_schema = {
                     },
                     'aliases': {
                         'type': 'array',
-                        'minLength': 1,
                         'items': {
                             'type': 'string',
                             'minLength': 1,
                         },
+                        'minItems': 1,
                     },
                     'inactive': {
                         'type': 'boolean',