Closed ssilverman closed 1 year ago
I wasn't sure if this is the correct spot, or if this issue needs to be in platformio-vscode-ide.
Hi @ssilverman, indeed Cppcheck's internal parser is quite limited and can fail to evaluate tricky code in some custom embedded packages. That's why we have the check_skip_packages option for such cases.
What kind of issue is this?
Configuration
Operating system: macOS 13.4.1
PlatformIO Version (
platformio --version
): 6.1.9Building for a Teensy 4.1 and C++17. Added this line to platformio.ini:
Description of problem
cppcheck
doesn't seem to be able to handle__has_include()
properly. Is it possible it's just not working with angle-bracket includes?Steps to Reproduce
Actual Results
"failed to evaluate #if condition" errors that look like this:
Code at line 759:
When I comment that out, it fails in other places. For example, line 37 in ~/.platformio/packages/toolchain-gccarmnoneeabi-teensy/arm-none-eabi/include/c++/11.3.1/ext/atomicity.h:
Expected Results
No "failed to evaluate #if condition" errors.
If problems with PlatformIO Build System:
The content of
platformio.ini
:Source file to reproduce issue:: N/A
Additional info