---
name: clang-tidy
description: "Use when adopting Clang-Tidy to assess this standard: Analyze native code with its compiler flags"
---

# Apply Clang-Tidy

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

## Procedure

1. Inspect the repository configuration and identify the files or targets covered by Clang-Tidy.
2. 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.
3. Record the tool version, configuration, scope and findings. Explain any checks that could not run.
4. Use the same invocation after changes and compare the evidence against the baseline.

Refer to [the upstream documentation](https://clang.llvm.org/extra/clang-tidy/) for configuration and prerequisites.
