[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 12/28] qapi: Consistently permit any case in downstream prefixes
From: |
Markus Armbruster |
Subject: |
[PATCH 12/28] qapi: Consistently permit any case in downstream prefixes |
Date: |
Tue, 23 Mar 2021 10:40:09 +0100 |
We require lowercase __RFQDN_ downstream prefixes only where we
require the prefixed name to be lowercase. Don't; permit any case in
__RFQDN_ prefixes anywhere.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
scripts/qapi/expr.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/qapi/expr.py b/scripts/qapi/expr.py
index a815060ee2..b5fb0be48b 100644
--- a/scripts/qapi/expr.py
+++ b/scripts/qapi/expr.py
@@ -51,7 +51,7 @@ def check_name_upper(name, info, source):
def check_name_lower(name, info, source,
permit_upper=False):
stem = check_name_str(name, info, source)
- if not permit_upper and name.lower() != name:
+ if not permit_upper and re.search(r'[A-Z]', stem):
raise QAPISemError(
info, "%s uses uppercase in name" % source)
# TODO reject '_' in stem
--
2.26.3
- Re: [PATCH 07/28] qapi: Fix to reject optional members with reserved names, (continued)
- [PATCH 26/28] qapi: Enforce struct member naming rules, Markus Armbruster, 2021/03/23
- [PATCH 15/28] tests/qapi-schema: Rename redefined-builtin to redefined-predefined, Markus Armbruster, 2021/03/23
- [PATCH 22/28] qapi: Prepare for rejecting underscore in command and member names, Markus Armbruster, 2021/03/23
- [PATCH 17/28] tests/qapi-schema: Rename pragma-*-crap to pragma-value-not-*, Markus Armbruster, 2021/03/23
- [PATCH 12/28] qapi: Consistently permit any case in downstream prefixes,
Markus Armbruster <=
- [PATCH 19/28] qapi: Rename pragma *-whitelist to *-exceptions, Markus Armbruster, 2021/03/23