Add rule to ensure that there is no semicolon at the end of the line where a VIR_DEFINE_* cleanup macro is invoked. Signed-off-by: Sukrit Bhatnagar <skrtbhtngr@xxxxxxxxx> --- cfg.mk | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cfg.mk b/cfg.mk index 7949fc8..d292005 100644 --- a/cfg.mk +++ b/cfg.mk @@ -1085,6 +1085,15 @@ sc_require_attribute_cleanup_one_per_line: halt='there must be only one variable declaration per line when using cleanup macro' \ $(_sc_search_regexp) +# Rule to ensure that there is no trailing semicolon at the line on +# which a cleanup funciton is defined using a VIR_DEFINE_* macro. +sc_require_attribute_cleanup_no_semicolon: + @prohibit='VIR_DEFINE_AUTOPTR_FUNC\(.+\)\s*;' \ + in_vc_files='\.[chx]$$' \ + halt='cleanup macro defining a function must not end with a semicolon' \ + $(_sc_search_regexp) + + # We don't use this feature of maint.mk. prev_version_file = /dev/null -- 1.8.3.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list