How to customize rules,such as:
It is recommended to define constants using macros or const.
The pointer variable dynamically allocated must be judged whether it is NULL before being used for the first time
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
How to customize rules,such as:
It is recommended to define constants using macros or const.
The pointer variable dynamically allocated must be judged whether it is NULL before being used for the first time
in short I would suggest that you write an addon for that. That you execute with the
--addon
cppcheck option. For some example code you can look here:https://github.com/danmar/cppcheck/blob/main/addons/misc.py