CL

clang-tidy

C/C++ static analysis and linting

Details

Language / Topic
cC
Category
Linter / Formatter

Rules

balanced
- Run `clang-tidy` with `-checks=*,-llvm-*` for comprehensive static analysis — integrate into CI with `run-clang-tidy` for full-project scans.
- Use `clang-format` with a `.clang-format` file for consistent code style — run `clang-format -i` on all source files before committing.
- Enable AddressSanitizer (`-fsanitize=address`) and UndefinedBehaviorSanitizer (`-fsanitize=undefined`) in debug builds to catch memory and UB issues early.
- Run clang-tidy in CI for static analysis.
- Use clang-format with a project `.clang-format` file.
- Enable ASan and UBSan in debug builds.
- Configure `.clang-tidy` to enable modernize-* and bugprone-* checks.