aboutsummaryrefslogtreecommitdiff
path: root/scripts/qapi
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/qapi')
-rw-r--r--scripts/qapi/expr.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/qapi/expr.py b/scripts/qapi/expr.py
index c065505b27..7bd15559de 100644
--- a/scripts/qapi/expr.py
+++ b/scripts/qapi/expr.py
@@ -61,7 +61,8 @@ def check_name_lower(name, info, source,
def check_name_camel(name, info, source):
stem = check_name_str(name, info, source)
- # TODO reject '[_-]' in stem, require CamelCase
+ if not re.match(r'[A-Z][A-Za-z0-9]*[a-z][A-Za-z0-9]*$', stem):
+ raise QAPISemError(info, "name of %s must use CamelCase" % source)
def check_defn_name_str(name, info, meta):