Static Analysis
Guide for running and triaging clang-tidy, cppcheck, and scan-build on C/C++ code with CI integration.
- CCM score
- 62 of 100
- skills.sh installs
- 1.4K
- GitHub stars
- 303
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers generating
compile_commands.json, running clang-tidy, cppcheck, and scan-build, and choosing check categories - Includes a category decision tree mapping goals to
bugprone-*,modernize-*,cert-*, and related check groups - Provides
.clang-tidyconfiguration, NOLINT-style false-positive suppression, and cppcheck suppression flags - Designed for teams triaging noisy builds or adding static analysis to CI pipelines
Install
$ npx -y skills add mohitmishra786/low-level-dev-skills --skill static-analysis -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Static Analysis
Purpose
Guide agents through selecting, running, and triaging static analysis tools for C/C++ — clang-tidy, cppcheck, and scan-build — including suppression strategies and CI integration.
Triggers
- "How do I run clang-tidy on my project?"
- "What clang-tidy checks should I enable?"
- "cppcheck is reporting false positives — how do I suppress them?"
- "How do I set up scan-build for deeper analysis?"
- "My build is noisy with static analysis warnings"
- "How do I generate compile_commands.json for clang-tidy?"
Workflow
1. Generate compile_commands.json
clang-tidy requires a compilation database:
# CMake (preferred)
cmake -S . -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
ln -s build/compile_commands.json .
# Bear (for Make-based projects)
bear -- make
# compiledb (alternative for Make)
pip install compiledb
compiledb make
2. Run clang-tidy
# Single file
clang-tidy src/foo.c -- -std=c11 -I include/
# Whole project via compile_commands.json
run-clang-tidy -p build/ -j$(nproc)
# With specific checks enabled
clang-tidy -checks='bugprone-*,modernize-*,performance-*' src/foo.cpp
Details
- Repository
- github.com/mohitmishra786/low-level-dev-skills
- Categories
- Code Review & Quality, Security
- First seen
- Jun 3, 2026
More from mohitmishra786/low-level-dev-skills
All 54Similar to Static Analysis
More Code Review & Qualityclangmohitmishra786/low-level-dev-skills904 installsClang/LLVM compiler guidance for C/C++ covering diagnostics, optimization remarks, sanitizers, and static analysis.
golang-lintsamber/cc-skills-golang43.3K installsConfiguration and workflow guidance for golangci-lint, covering linter selection, nolint suppression rules, and output interpretation.
sanitizersmohitmishra786/low-level-dev-skills1K installsCompiler runtime sanitizers that detect memory errors, undefined behaviour, data races, and leaks in C/C++ with GCC or Clang.
shellcheck-configurationwshobson/agents12.5K installsSetup and triage guide for ShellCheck static analysis, covering shell script linting, suppressions, and portability.
dart-run-static-analysisdart-lang/skills21.9K installsRuns Dart static analysis and auto-applies mechanical lint fixes, with strict-mode configuration guidance.