extend zephyr.cfg
add some often used macros to zephyr.cfg
Reference: https://docs.zephyrproject.org/apidoc/latest/group__log__api.html
I think it would make sense to add some blurb on why (performance? bugs?) those lines have been added. "Often used" applies to many macros.
Unknown macros often lead to ... unknownMacro errors (no surprise there).
Is there a platform in our CI where a test file zephyr.cpp could be compiled?
hmm I am currently taking a closer look zephyr analysis also. If the approach is to include the zephyr headers. Maybe the future advice will be to include the zephyr headers... then no macros will be needed in the zephyr.cfg. However for the function configurations to work properly we will need to make some tweaks in Cppcheck..
These additions helped me to fix most of the hints displayed by cppcheck in our Zephyr project. I only had to provide two or three specific --suppress options.
Including the Zephyr source code in the check would be nice, too, but I guess there is quite some work to do until all hints in Zephyr itself will be fixed. Also if you are stuck with an older Zephyr version, an updated zephyr.cfg might be helpful.
but I guess there is quite some work to do until all hints in Zephyr itself will be fixed
yes but I feel I have made good progress in last week in the simplecpp repo. Nothing of that is used in Cppcheck repo yet though.
I would like to continue the discussion about how to configure zephyr properly. I will continue to make preprocessor/parser fixes so I hope it will work a lot better in 1-2 weeks. And then we can discuss how zephyr.cfg can be improved.
feel free to contact me at the support email.