-
-
Notifications
You must be signed in to change notification settings - Fork 367
Open
Labels
Description
To improve code quality, performance, and avoid bugs, we could run cppcheck: http://cppcheck.net/ and check for improvements (similar to clang-tidy).
I've tested it out on the repo with the following options:
cppcheck --enable=all --inconclusive --force --inline-suppr --library=qt --project=build/compile_commands.json --suppress="*:3rdParty*" --suppress="*:build/*" -i 3rdParty/ -i build --suppress=missingIncludeSystem --suppress=missingInclude --quiet -j$(nproc) --disable=unusedFunction --check-level=exhaustive 2>&1 | tee cppcheck.txtSome of the suppressions are because we don't care about 3rdParty code, and because some false positives are popping up (missing includes when they aren't actually missing).
Here's the output: cppcheck.txt
Cppcheck can be integrated into PRs with GitHub actions so that when a user submits a PR, a cppcheck bot will 'review' the PR and leave comments to improve the code. We should also run it periodically to check for improvements.
guihkx and nuttyartist