GS/BS
← Standards directory
Code quality

Cppcheck.

Catch undefined behavior in native code

Analyze the project with matching platform definitions and include paths. Investigate out-of-bounds accesses and uninitialized variables against the actual build configuration.

C / C++

Community rubric · v1

The evidence

Evidence coverage5 / 8
5 supported · 3 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

    Cppcheck documents analysis for undefined behavior in C and C++ and explains the importance of configuring the platform and preprocessing inputs.

    Cited source ↗
  • Measurement

    Verified

    The manual shows how to analyze files or an imported project and interpret diagnostics with file locations, severity and an error identifier.

    Cited source ↗
  • Conformance

    Verified

    The uninitialized-variable tests assert expected diagnostics for sample C and C++ programs, including cases that must remain warning-free.

    Cited source ↗
  • CI enforcement

    Unknown

    No reviewed evidence is recorded for this dimension.

    Can a change trigger a useful check? Contribute evidence ↗

  • Getting started

    Verified

    The manual describes obtaining Cppcheck and walks through a small C source file. Running the tool produces a reported out-of-bounds access at the indicated line.

    Cited source ↗
  • Real-world adoption

    Unknown

    No reviewed evidence is recorded for this dimension.

    Has another team put it to work? Contribute evidence ↗

  • Agent guidance

    Verified

    Reproduce the sample array-bounds diagnostic on the single C file. Compare its declared length with the flagged index, fix the access, and rerun with the same platform and preprocessor choices before accepting a clean result.

    Cited source ↗
  • 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 Cppcheck in this repository to meet this standard: Catch undefined behavior in native code. Analyze the project with matching platform definitions and include paths. Investigate out-of-bounds accesses and uninitialized variables against the actual build configuration. 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

Cppcheck documentation ↗