Closed Ian-Blockmans closed 3 years ago
Hi, I had the same issue in one of my own project with pio where I want static checks, so I might take a look to search for the underlying cause. Did you find info on how to mitigate this or on what is causing it ?
Thanks in advance,
(the problem seems to be in cppcheck's land)
Hi @Ian-Blockmans ! I tried to reproduce the problem using your example, but it work just fine on my Win10. Anyway, I've just updated CppCheck to the latest v2.5 where this issue might be solved internally. It'd be great if you could update your PlatformIO installation to the latest from the development branch via the pio upgrade --dev
command in your IDE terminal and try to run analysis again.
Hi @boscs, any chance you could put together a minimal example to reproduce the issue?
Hi @valeros, My (short) investigation has led me to believe that cppcheck is somehow mis-generating its 'dump' file that is passed to the add-ons. A var in the varlist part of the xml is created, but no associated token or variable is generated. This creates a key error when the add-on looks up the var. I'll send you a sample project where you will be able to find an occurrence of this phenomenon in the main.cpp.dump file. I haven't had the time to search more but maybe next week ;)
What kind of issue is this?
You can erase any parts of this template not applicable to your Issue.
Configuration
Operating system: Windows 10
PlatformIO Version (
platformio --version
): PlatformIO Core, version 5.1.1Description of problem
I am trying to use the cppcheck misra addon. If I run
pio check -v --flags "cppcheck: --addon=misra.json"
I get a python error
Steps to Reproduce
pio check -v --flags "cppcheck: --addon=misra.json"
Actual Results
Expected Results
The violations to the misra rules