diff mbox series

[23/28] qapi: Enforce feature naming rules

Message ID 20210323094025.3569441-24-armbru@redhat.com
State New
Headers show
Series qapi: Enforce naming rules | expand

Commit Message

Markus Armbruster March 23, 2021, 9:40 a.m. UTC
Feature names should use '-', not '_'.  Enforce this.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 scripts/qapi/expr.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Eric Blake March 23, 2021, 3:16 p.m. UTC | #1
On 3/23/21 4:40 AM, Markus Armbruster wrote:
> Feature names should use '-', not '_'.  Enforce this.
> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  scripts/qapi/expr.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thankfully no offenders ;)

Reviewed-by: Eric Blake <eblake@redhat.com>

> 
> diff --git a/scripts/qapi/expr.py b/scripts/qapi/expr.py
> index ce37b426c9..01a994412d 100644
> --- a/scripts/qapi/expr.py
> +++ b/scripts/qapi/expr.py
> @@ -213,7 +213,7 @@ def check_features(features, info):
>          check_keys(f, info, source, ['name'], ['if'])
>          check_name_is_str(f['name'], info, source)
>          source = "%s '%s'" % (source, f['name'])
> -        check_name_lower(f['name'], info, source, permit_underscore=True)
> +        check_name_lower(f['name'], info, source)
>          check_if(f, info, source)
>  
>  
>
diff mbox series

Patch

diff --git a/scripts/qapi/expr.py b/scripts/qapi/expr.py
index ce37b426c9..01a994412d 100644
--- a/scripts/qapi/expr.py
+++ b/scripts/qapi/expr.py
@@ -213,7 +213,7 @@  def check_features(features, info):
         check_keys(f, info, source, ['name'], ['if'])
         check_name_is_str(f['name'], info, source)
         source = "%s '%s'" % (source, f['name'])
-        check_name_lower(f['name'], info, source, permit_underscore=True)
+        check_name_lower(f['name'], info, source)
         check_if(f, info, source)