GS/BS
← Standards directory
Code quality

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.

C / C++

Community rubric · v1

The evidence

Evidence coverage3 / 8
3 supported · 5 unresolved

One point for each verified check. Unknown means we still need evidence. Contrary evidence records an observed result that goes against the criterion.

Latest evidence review ·

  • 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.

    Cited source ↗
  • Measurement

    Verified

    clang-tidy accepts a compilation database and selected checks, then emits source diagnostics for translation units compiled with those project options.

    Cited source ↗
  • Conformance

    Unknown

    No reviewed evidence is recorded for this dimension.

    What would demonstrate a violation? Contribute evidence ↗

  • CI enforcement

    Unknown

    No reviewed evidence is recorded for this dimension.

    Can a change trigger a useful check? Contribute evidence ↗

  • Getting started

    Unknown

    No reviewed evidence is recorded for this dimension.

    Can a newcomer complete a first run? Contribute evidence ↗

  • 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.

    Cited source ↗
  • Agent guidance

    Unknown

    No reviewed evidence is recorded for this dimension.

    Can an agent act on a specific finding? Contribute evidence ↗

  • Agent portability

    Unknown

    No reviewed evidence is recorded for this dimension.

    Does the practice work in two agent harnesses? Contribute evidence ↗

Use this standard

Agent prompt

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.
Read the agent skill ↗

Primary source

Clang-Tidy documentation ↗