mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
maint: enforce previous if-else {} cleanups
Done as a separate commit in case earlier cleanups are backported independently. * cfg.mk (sc_require_space_before_label): New rule. Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
d194d6e7e6
commit
143cfa8ee8
7
cfg.mk
7
cfg.mk
@ -910,6 +910,13 @@ sc_require_space_before_label:
|
||||
halt="Top-level labels should be indented by one space" \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Doesn't catch all cases of mismatched braces across if-else, but it helps
|
||||
sc_require_if_else_matching_braces:
|
||||
@prohibit='( else( if .*\))? {|} else( if .*\))?$$)' \
|
||||
in_vc_files='\.[chx]$$' \
|
||||
halt="if one side of if-else uses {}, both sides must use it" \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
sc_curly_braces_style:
|
||||
@files=$$($(VC_LIST_EXCEPT) | grep '\.[ch]$$'); \
|
||||
$(GREP) -nHP \
|
||||
|
Loading…
x
Reference in New Issue
Block a user