Limit cppcheck scan to changed modules on CI#2346
Conversation
There was a problem hiding this comment.
Pull request overview
This PR speeds up CI cppcheck by scanning only the modules touched by a PR (based on git diff), while keeping a full scan for main to catch post-merge regressions.
Changes:
- Extend
scripts/cppcheck.shto optionally filtercompile_commands.jsonby a set of directories. - Update
quality-checks.ymlto run a full scan onmainand a scoped scan on non-mainrefs.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
scripts/cppcheck.sh |
Adds optional directory-based filtering of the compile database before running cppcheck; also changes enabled check categories. |
.github/workflows/quality-checks.yml |
Splits cppcheck job into full scan on main vs. scoped scan for other refs using git diff. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2346 +/- ##
==========================================
- Coverage 72.85% 72.82% -0.04%
==========================================
Files 632 632
Lines 30834 30832 -2
Branches 3319 3319
==========================================
- Hits 22464 22453 -11
- Misses 6474 6480 +6
- Partials 1896 1899 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
f23dc93 to
46267ed
Compare
|
Our modules are dependent on one another - so I guess we're on the same page here - running everything after merging on main, and a good-enough scan on the PR. |
A full
cppcheckrun takes about 20 Minutes on CI. However, few PRs touch all the components in CAF. So instead of doing a full scan each time, we look at the list of modified files and only select the relevant directories forcppcheck.When running the pipeline for
main, we still always do a full scan to catch regressions after merge commits early.Closes #2294.