supertux
supertux copied to clipboard
Cppcheck github action, and style and bugfixes
I've used Cppcheck to find and fix some bugs and bad code style, and then added a github action to run the checks automatically. I haven't tested if the github action works.
The bugs:
AddonPreviewMenu::rebuild_menuaccessed the addon description string out of bounds.TextObject::wrap_textstripped all newlines, even double ones, becauseprev_cwas not changed.RainParticleSystem::set_amountusedamountinstead ofreal_amountin the minimum calculation, which was probably not intended. I don't know how this affects the rain.
Related issue: #1552
In the future when code is more clean, additional linters could be added, e.g. TscanCode and Clang-Tidy. SuperTux apparently already has a .clang-tidy configuration file but no github action workflow for it.
I think the new workflow works now and the 5 failing checks are not related to this PR and fail on other PRs, too.
Thank you for reviewing this. Can I merge it now?
I'm not sure if I should decide about this but I think that you can
CONTRIBUTING.md and the wiki don't mention conditions for merging (at least I cannot see them), so I assume that I'm allowed to merge.