
Static Analysis
This walks you through the full cycle of static analysis for C/C++ projects: generating compile_commands.json, running clang-tidy with the right check categories, configuring .clang-tidy files, suppressing false positives with NOLINT, and integrating cppcheck or scan-build into CI. It's opinionated about which checks catch real bugs versus style noise, and includes a decision tree for picking between bugprone, modernize, performance, and security categories. The workflow is solid if you're triaging a noisy build or hardening a codebase before release. Most useful when you know static analysis matters but need the practical commands and suppression strategies to make it bearable.
- skills.sh installs
- 1.2K
- GitHub stars
- 279
- last updated
- Aug 21, 2026
Install
$ npx -y skills add mohitmishra786/low-level-dev-skills --skill static-analysis --agent claude-codeInstalls into .claude/skills of the current project.
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
Sponsors
Details
- Repository
- github.com/mohitmishra786/low-level-dev-skills
- Categories
- Security, DevOps & CI/CD, Code Review & Quality
- First seen
- Jun 3, 2026