mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 02:51:16 +00:00
maint: avoid doubled name in syntax check failures
Based on the similar gnulib commit 96ad9077. The use of $(_sc_search_regexp) already injects $(ME) into any output messages, so a failure of these rules would look like this, pre-patch: maint.mk: maint.mk: use virStrToLong_*, not strtol variants * cfg.mk (sc_prohibit_strncmp, sc_prohibit_strtol) (sc_libvirt_unmarked_diagnostics): Drop redundant $(ME).
This commit is contained in:
parent
44342a0efe
commit
60efb60018
8
cfg.mk
8
cfg.mk
@ -353,18 +353,18 @@ snp_ = strncmp *\(.+\)
|
|||||||
sc_prohibit_strncmp:
|
sc_prohibit_strncmp:
|
||||||
@prohibit='! *strncmp *\(|\<$(snp_) *[!=]=|[!=]= *$(snp_)' \
|
@prohibit='! *strncmp *\(|\<$(snp_) *[!=]=|[!=]= *$(snp_)' \
|
||||||
exclude=':# *define STR(N?EQLEN|PREFIX)\(' \
|
exclude=':# *define STR(N?EQLEN|PREFIX)\(' \
|
||||||
halt='$(ME): use STREQLEN or STRPREFIX instead of str''ncmp' \
|
halt='use STREQLEN or STRPREFIX instead of str''ncmp' \
|
||||||
$(_sc_search_regexp)
|
$(_sc_search_regexp)
|
||||||
|
|
||||||
# strtol and friends are too easy to misuse
|
# strtol and friends are too easy to misuse
|
||||||
sc_prohibit_strtol:
|
sc_prohibit_strtol:
|
||||||
@prohibit='\bstrto(u?ll?|[ui]max) *\(' \
|
@prohibit='\bstrto(u?ll?|[ui]max) *\(' \
|
||||||
exclude='exempt from syntax-check' \
|
exclude='exempt from syntax-check' \
|
||||||
halt='$(ME): use virStrToLong_*, not strtol variants' \
|
halt='use virStrToLong_*, not strtol variants' \
|
||||||
$(_sc_search_regexp)
|
$(_sc_search_regexp)
|
||||||
@prohibit='\bstrto[df] *\(' \
|
@prohibit='\bstrto[df] *\(' \
|
||||||
exclude='exempt from syntax-check' \
|
exclude='exempt from syntax-check' \
|
||||||
halt='$(ME): use virStrToDouble, not strtod variants' \
|
halt='use virStrToDouble, not strtod variants' \
|
||||||
$(_sc_search_regexp)
|
$(_sc_search_regexp)
|
||||||
|
|
||||||
# Use virAsprintf rather than as'printf since *strp is undefined on error.
|
# Use virAsprintf rather than as'printf since *strp is undefined on error.
|
||||||
@ -550,7 +550,7 @@ func_re := ($(func_or))
|
|||||||
sc_libvirt_unmarked_diagnostics:
|
sc_libvirt_unmarked_diagnostics:
|
||||||
@prohibit='\<$(func_re) *\([^"]*"[^"]*[a-z]{3}' \
|
@prohibit='\<$(func_re) *\([^"]*"[^"]*[a-z]{3}' \
|
||||||
exclude='_\(' \
|
exclude='_\(' \
|
||||||
halt='$(ME): found unmarked diagnostic(s)' \
|
halt='found unmarked diagnostic(s)' \
|
||||||
$(_sc_search_regexp)
|
$(_sc_search_regexp)
|
||||||
@{ grep -nE '\<$(func_re) *\(.*;$$' $$($(VC_LIST_EXCEPT)); \
|
@{ grep -nE '\<$(func_re) *\(.*;$$' $$($(VC_LIST_EXCEPT)); \
|
||||||
grep -A1 -nE '\<$(func_re) *\(.*,$$' $$($(VC_LIST_EXCEPT)); } \
|
grep -A1 -nE '\<$(func_re) *\(.*,$$' $$($(VC_LIST_EXCEPT)); } \
|
||||||
|
Loading…
Reference in New Issue
Block a user