Hi!
I am using platformio for a big project and i am checking it since a long time with cppcheck.
Since some days ago cppcheck is giving me wrong results (always a lot of errors of the unusedFunction kind).
>pio check -e heltec_wifi_lora_32_v1 -v --skip-packages
src\display.cpp:12: [low:style] The function 'setup_display' is never used. [unusedFunction]
src\display.cpp:35: [low:style] The function 'show_display' is never used. [unusedFunction]
src\display.cpp:30: [low:style] The function 'turn_off_display' is never used. [unusedFunction]
when I remove #include "configuration.h"
>pio check -e heltec_wifi_lora_32_v1 -v --skip-packages
No defects found
thanks for testing so much around!
do you know how i can use an earlier version of cppcheck to test this?
i think for the meantime i will use a define to not include the json-lib for cppcheck
Going through the entire 3 available versions of tool-cppcheck availlable at the bintray by doing a platform_packages = tool-cppcheck@version in the platformio.ini hasn’t made a difference (or wasn’t used properly )
The previous version does not report an failure. I’ve checked this by copying the 2.1.0 files into my folder C:\Users\<user>\.platformio\packages\tool-cppcheck directly, but not overwriting the package.json and .piopm file, and now it’s at
2/2 files checked 100% done
No defects found
so this really has also something to do with the cppcheck version 2.3.0 released 5 days ago or so.