Re: [PATCH v3 02/30] syntax-check: prohibit_virXXXFree: skip strings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 20, 2022 at 21:07:51 +0200, Victor Toso wrote:
> We should allow strings (not the functions) in the format of
> "virDomainFree" and friends.
> 
> This fixes an error in latter commit "scripts: apibuild: parse
> 'Since' for functions" as it uses this function names as keys
> in a dictionary.
> 
> Fixes:
>  |  ...
>  |  prohibit_virXXXFree
>  |  libvirt/scripts/apibuild.py:163:        'virDomainFree': '0.0.1',
>  |  make: Leaving directory '/home/toso/src/libvirt/build/build-aux'
>  |  stderr:
>  |  build-aux/syntax-check.mk: avoid using virXXXFree, use virObjectUnref instead
>  |  make: *** [libvirt/build-aux/syntax-check.mk:829: sc_prohibit_virXXXFree] Error 1
> 
> Signed-off-by: Victor Toso <victortoso@xxxxxxxxxx>
> ---

This patch should not be needed once we will not need to have an
override for 'virDomainFree'.

>  build-aux/syntax-check.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk
> index eb403f3d3f..07e0295995 100644
> --- a/build-aux/syntax-check.mk
> +++ b/build-aux/syntax-check.mk
> @@ -827,7 +827,7 @@ sc_prohibit_system_error_with_vir_err:
>  # docs, examples, tools, src/libvirt-*.c, and include/libvirt/libvirt-*.h
>  sc_prohibit_virXXXFree:
>  	@prohibit='\bvir(Domain|Network|NodeDevice|StorageVol|StoragePool|Stream|Secret|NWFilter|Interface|DomainSnapshot)Free\b' \
> -	exclude='sc_prohibit_virXXXFree' \
> +	exclude="sc_prohibit_virXXXFree|'vir.*?Free'" \

IMO a better solution would be to exclude python files from the check.




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux