Clang tidy integration workflow
Skill kjuhwa/skills-hub/skills/devops/clang-tidy-integration-workflow
Automated static analysis pipeline using clang-tidy with project-specific checks and suppression strategies for large multi-file C++ codebases.From its SKILL.md
npx -y skills add kjuhwa/skills-hub --skill clang-tidy-integration-workflowAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.7 KB, 294 tokens by cl100k_base, as published. Nobody here has run it
Clang-tidy Integration for C++ Code Quality
When to use
Any non-trivial C++ project that wants deterministic linting enforcement across CI and local dev, with inline suppression that doesn't rot.
Procedure
- Configure the build with
-DCMAKE_EXPORT_COMPILE_COMMANDS=ONso clang-tidy can resolve includes/flags per translation unit. - Either run clang-tidy on the whole tree in CI, or only on changed lines in pre-commit via a
clang-format-diff.py-style wrapper that readsgit diff -U0. - Suppress individual checks inline with
// NOLINTNEXTLINE(<check-name>): <one-line justification>. Require the justification in code review — bareNOLINTrots. - Pair with a checked-in
.clang-formatso format and semantic checks share the same style source of truth. - Treat new warnings as errors in CI; whitelist existing ones by directory during adoption, burn down over time.
Notes
- Use
-header-filter='^<project>/'to avoid third-party header noise. .clang-tidyat repo root can set baseline checks; per-directory overrides live in nested.clang-tidyfiles.
Evidence
doc/developer-notes.md(section "Running clang-tidy")src/.clang-formatcontrib/devtools/clang-format-diff.py
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.