# Clang-Tidy

Analyze native code with its compiler flags

Use the project's compilation database so diagnostics match the actual build. Check bug-prone patterns and modernization rules on maintained translation units.

Category: Code quality
Languages: C, C++

## Standard evidence

Rubric v1 · 3/8 verified · 5 unknown · 0 contrary · reviewed 2026-11-28

- **Definition** (verified) — The sizeof-expression check describes suspicious operand forms, including taking the size of a pointer where the programmer may intend the pointed-to object. Reviewed 2026-11-28. [Source](https://clang.llvm.org/extra/clang-tidy/checks/bugprone/sizeof-expression.html)
- **Measurement** (verified) — clang-tidy accepts a compilation database and selected checks, then emits source diagnostics for translation units compiled with those project options. Reviewed 2026-11-28. [Source](https://clang.llvm.org/extra/clang-tidy/)
- **Conformance** (unknown) — No reviewed evidence is recorded for this dimension.
- **CI enforcement** (unknown) — No reviewed evidence is recorded for this dimension.
- **Getting started** (unknown) — No reviewed evidence is recorded for this dimension.
- **Real-world adoption** (verified) — Chromium runs a selected clang-tidy ruleset on uploaded Gerrit changes. Its maintainer guide explains how to export the build's compilation database and reproduce the analysis in a checkout. Reviewed 2026-11-28. [Source](https://chromium.googlesource.com/chromium/src/+/main/docs/clang_tidy.md)
- **Agent guidance** (unknown) — No reviewed evidence is recorded for this dimension.
- **Agent portability** (unknown) — No reviewed evidence is recorded for this dimension.

## Adoption

Use Clang-Tidy in this repository to meet this standard: Analyze native code with its compiler flags. Use the project's compilation database so diagnostics match the actual build. Check bug-prone patterns and modernization rules on maintained translation units. Inspect the repository configuration, record the baseline and exact reproduction steps, then add the smallest repeatable check that detects a regression.

Seikika package: no verified installation is listed.

## References

- [Tool documentation](https://clang.llvm.org/extra/clang-tidy/)
- [Agent skill](/skills/clang-tidy/SKILL.md)
