Skip to content

Run Cppcheck only when source files change #258

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 11, 2025
Merged

Run Cppcheck only when source files change #258

merged 2 commits into from
Mar 11, 2025

Conversation

jserv
Copy link
Contributor

@jserv jserv commented Mar 11, 2025

No description provided.

jserv added 2 commits March 11, 2025 23:13
In Git, staging changes serves as a critical step that prepares specific
modifications for the next commit. There were unintended detects for
staging changes in the pre-commit hook, which can be safely avoided.

Change-Id: I361d721dd0d3127327f74f3d7110b45b8acec5f9
Static analysis is essential for C/C++ projects, but running 'fmtscan'
can significantly slow down Cppcheck. The git pre-commit hook detects
staged files and run Cppcheck only if C/C++ files have been modified,
resulting in a noticeable reduction in analysis time.

Change-Id: I872c0b6fc9008cc2b3c96283e458b25cf506eb16
@jserv jserv changed the title Precise cppcheck Run Cppcheck only when source files change Mar 11, 2025
@jserv jserv merged commit d64ab4b into master Mar 11, 2025
4 checks passed
@jserv jserv deleted the precise-cppcheck branch March 11, 2025 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant