Open sannoxdev opened 3 years ago
Same as for https://community.platformio.org/t/code-inspection-not-returning-expected-result/21480/
Error: Found a breaking defect 'syntax error' in C:\Users\Max\.platformio\packages\toolchain-xtensa32@2.50200.97\xtensa-esp32-elf\include\c++\5.2.0\bits\random.h:69
Please note: check results might not be valid!
Try adding --skip-packages
And also the same for any ESP8266 project per community topic
Error: Found a breaking defect ‘syntax error’ in %userprofile%.platformio\packages\toolchain-xtensa\xtensa-lx106-elf\include\c++\4.8.2\bits\random.h:69
Please note: check results might not be valid!
Same issue here. Is there a way to go around this by adding some flags to platformio.ini or similar? :) I tried something like:
check_tool = cppcheck --skip-packages
in my platformio.ini, but that did not help.
Btw, I can confirm that running in a platformio terminal:
$ pio check --skip-packages
works fine, but it seems to only check src, not the lib and include? Would be great to be able to check the src, lib, and include (guess we do not want to test the whole core that is provided by the board package, but these are where the potential "bad quality" user code live?).
The fact it can be worked around has been fixed by adding a platformio.ini
instruction per https://github.com/platformio/platformio-docs/issues/217 --> https://docs.platformio.org/en/latest/projectconf/section_env_check.html#check-skip-packages.
The fact that code inspection fails has not been fixed yet.
I'm having similar issues with multiple Arduin-compatibel toolchains. I assume this issue will be resolved with #4571
Also seeing the error for a SADM21 board in PIO version 6.1.15. check_skip_packages = yes
in the platformio.ini
does allow me to inspect.
Configuration
Operating system: Ubuntu 20.04 5.4.0-73-generic #82-Ubuntu x86_64 x
PlatformIO Version (
platformio --version
): PlatformIO Core, version 5.1.1Description of problem
When Inspect (pio check -v) is run against a SAMD based project the cppcheck code analysis fails with the following error:
Running check with --skip-packages works (pio check -v --skip-packages):
Attached zip file has a minimal project that is able to reproduce the problem. It has two environments setup; one for an UNO and one for a SAMD (Adafruit Feather M0).
Uno env wil pass cppcheck / SAMD fails.
Steps to Reproduce
Actual Results
See above
Expected Results
Expect check using cppcheck to complete without failure
If problems with PlatformIO Build System:
The content of
platformio.ini
:Source file to reproduce issue:
Additional info
Test Project:
Test2.tar.gz