hpyproject / hpy

HPy: a better API for Python
https://hpyproject.org
MIT License
1.02k stars 52 forks source link

Fix and re-enable cppcheck #395

Closed fangerer closed 1 year ago

fangerer commented 1 year ago

Resolves #188 .

This fixes and re-enables the cppcheck job. I think the main reason why it broke before is that there was an update of the Ubuntu runner image (ubuntu-latest was updated to ubuntu-22.04) which also includes a newer cppcheck version.

Funnily, I first tried to reproduce the problem on Ubuntu 20.04 with cppcheck 1.90 and did fixes to make that run. Without changing HPy's source code, this did not pass on cppcheck 2.7 (which is available in Ubuntu 22.04). Long story short: the cppcheck job broke because of cppcheck.

I therefore pinned the versions to Ubuntu 22.04 and cppcheck 2.7-1. This should work for a while (a few years).

mattip commented 1 year ago

CI is green, let's give this a try. Thanks @fangerer