[v2,2/6] maintainer_utils: Fix errors in schema.

Message ID bmm.hlw1gcuuvc.gcc.gcc.rearnsha.222.2.2@forge-stage.sourceware.org
State Committed
Commit 752d1f0cd94d276b3399f634a47b602343583c96
Headers
Series maintainer_utils.py: general cleanups |

Commit Message

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

Unfortuately some errors crept into the the schema for the maintainers
YAML data which meant that some intended checks were being ignored.
Specifically:
  - Arrays with a minimum size need to use minItems
  - Strings with a minimum length need to use minLength

I both cases, case is important (the validator ignores unrecognized tokens).
and "minlength" was being used for both strings and arrays.

contrib/ChangeLog:

	* maintainer_utils.py (maintainer_schema): Fix size validation
	checks.
---
 contrib/maintainer_utils.py | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)
  

Patch

diff --git a/contrib/maintainer_utils.py b/contrib/maintainer_utils.py
index d3af121d075c9..51a78ab72eec7 100755
--- a/contrib/maintainer_utils.py
+++ b/contrib/maintainer_utils.py
@@ -47,11 +47,11 @@  maintainer_schema = {
                 'properties': {
                     'sn': {
                         'type': 'string',
-                        'minlength': 1,
+                        'minLength': 1,
                     },
                     'cn': {
                         'type': 'string',
-                        'minlength': 1,
+                        'minLength': 1,
                     },
                     'email': {
                         'type': 'array',
@@ -111,23 +111,23 @@  maintainer_schema = {
                                 },
                             ],
                         },
-                        'minlength': 1,
+                        'minItems': 1,
                     },
                     'account': {
                         'type': 'string',
-                        'minlength': 1,
+                        'minLength': 1,
                         'pattern': '[a-zA-Z][a-zA-Z0-9]*',
                     },
                     'forgeid': {
                         'type': 'string',
-                        'minlength': 1,
+                        'minLength': 1,
                     },
                     'aliases': {
                         'type': 'array',
-                        'minlength': 1,
+                        'minLength': 1,
                         'items': {
                             'type': 'string',
-                            'minlength': 1,
+                            'minLength': 1,
                         },
                     },
                     'inactive': {
@@ -145,28 +145,28 @@  maintainer_schema = {
                 'properties': {
                     'name': {
                         'type': 'string',
-                        'minlength': 1,
+                        'minLength': 1,
                     },
                     'class': {
                         'type': 'string',
-                        'minlength': 1,
+                        'minLength': 1,
                     },
                     'labels': {
                         'type': 'array',
                         # Disabled until we populate the labels
-                        # 'minlength': 1,
+                        # 'minItems': 1,
                         'items': {
                             'type': 'string',
-                            'minlength': 3,
+                            'minLength': 3,
                             'pattern': label_pattern,
                         },
                     },
                     'teams': {
                         'type': 'array',
-                        'minlength': 1,
+                        'minItems': 1,
                         'items': {
                             'type': 'string',
-                            'minlength': 3,
+                            'minLength': 3,
                         },
                     },
                 },