supertux icon indicating copy to clipboard operation
supertux copied to clipboard

Check for all things with cppcheck

Open tobbi opened this issue 2 years ago • 6 comments

tobbi avatar Mar 17 '24 20:03 tobbi

I don't know how to add the src directory as an include base for the cppcheck thing.

tobbi avatar Mar 17 '24 21:03 tobbi

Well, this works, but...

tobbi avatar Mar 18 '24 10:03 tobbi

I don't know if we want all the reported errors in there.

tobbi avatar Mar 18 '24 10:03 tobbi

https://pastebin.com/2a3SHYE9

tobbi avatar Mar 18 '24 13:03 tobbi

I feel like this adds way too many warnings. Maybe we should cut down the number of things it checks?

tobbi avatar Mar 18 '24 20:03 tobbi

I don't know how to add the src directory as an include base for the cppcheck thing.

It is possible to run cmake with -DCMAKE_EXPORT_COMPILE_COMMANDS=1 and pass the compile commands with --project=compile_commands.json to cppcheck. I don't know if using cppcheck this way is still fast.

I feel like this adds way too many warnings. Maybe we should cut down the number of things it checks?

I think it is important that the cppcheck linting passes in the master branch and can only fail in a Pull Request, telling the developer that further changes are needed.

HybridDog avatar Apr 13 '24 09:04 HybridDog