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 committed 2023-07-18 23:13:06 +01:00
1 parent 8fd50b8672
commit 4bf182f92a
1 file changed
+6
+6
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:' \