maint: add a syntax check to prevent use of NULL

* cfg.mk (sc_prohibit_NULL): Direct to use nullptr instead.
This commit is contained in:
Pádraig Brady 2023-07-18 23:08:42 +01:00
parent 8fd50b8672
commit 4bf182f92a

6
cfg.mk
View File

@ -509,6 +509,12 @@ sc_prohibit_exit_write_error:
halt='Use write_error() instead' \
$(_sc_search_regexp)
sc_prohibit_NULL:
@prohibit='$(begword)NULL$(endword)' \
in_vc_files='\.[ch]$$' \
halt='use nullptr instead' \
$(_sc_search_regexp)
# Don't use "indent-tabs-mode: nil" anymore. No longer needed.
sc_prohibit_emacs__indent_tabs_mode__setting:
@prohibit='^( *[*#] *)?indent-tabs-mode:' \