[PATCH v1 5/5] maintainer_utils: more array size verification.

Richard Earnshaw via Sourceware Forge <[email protected]>
Newsgroups gmane.comp.gcc.patches
Message-ID <bmm.hlit9bvuc0.gcc.gcc.rearnsha.222.1.5@forge-stage.sourceware.org>
From: Richard Earnshaw <[email protected]>

Thare 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(-)

diff --git a/contrib/maintainer_utils.py b/contrib/maintainer_utils.py
index 4cf1ca32a7c88..e94622a3a7a51 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',
@@ -128,11 +130,11 @@ maintainer_schema = {
                     },
                     'aliases': {
                         'type': 'array',
-                        'minLength': 1,
                         'items': {
                             'type': 'string',
                             'minLength': 1,
                         },
+                        'minItems': 1,
                     },
                     'inactive': {
                         'type': 'boolean',
-- 
2.54.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.