checksrc: introduce 'banfunc' to ban specific functions

Use 'banfunc' and 'allowfunc' in .checksrc to specify which functions to
ban or allow to be used. This saves us from having to edit the script
going forward when we want to ban or allow specific functions.

This replaces a set of previous rules and all banned functions are now
checked with the BANNEDFUNC rule.

There is a set of default banned functions, shown by invoking
./checksrc.

Also, -a and -b options are added to specify allowed or banned functions
on the command line.

Closes #15835
This commit is contained in:
Daniel Stenberg 2024-12-27 09:21:56 +01:00
parent 66e5351e0a
commit c445b7426a
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
9 changed files with 92 additions and 80 deletions

View file

@ -1,4 +1,3 @@
disable TYPEDEFSTRUCT
disable SNPRINTF
disable BANNEDFUNC
disable SSCANF