# Verifying C++ changes

Files: `.cc`, `.cpp`, `.cxx`, `.hh`, `.hpp`, `.hxx`. Derived from 13 scanned source repositories and 148 review prompts on https://awesomereviewers.com. Page: https://awesomereviewers.com/verify/cpp/

How to use this: run every check under *Run on every change*. Then, for each section under *Add when the change touches* that describes your diff, run its checks too. Checks catch what a tool can find; then apply the listed review prompts for what tools miss (fetch each prompt's raw URL).

Usage is the share of scanned repositories in this language that run the tool. A missing tool means no scanned repository runs one the scanner recognises: fall back to the prompts.

## Run on every change

- **Formatting** — no tool detected in the sample. Catches: Layout drift that buries the real change in the diff.
- **Linting** — no tool detected in the sample. Catches: Bug-prone patterns, unused code and conventions the formatter does not cover.
- **Type checking** — The compiler type-checks on every build and test run; a failing build is this check failing.
- **Unit and integration tests** — no tool detected in the sample. Catches: Behaviour regressions on the paths the tests exercise.

Review prompts (26 in total, most discussed first):

- [no braces short ifs](https://awesomereviewers.com/raw/hyprland-no-braces-short-ifs.md) — hyprwm/Hyprland, Code Style
- [Consistency And Readability](https://awesomereviewers.com/raw/ncnn-consistency-and-readability.md) — Tencent/ncnn, Code Style
- [Code for readability](https://awesomereviewers.com/raw/opencv-code-for-readability.md) — opencv/opencv, Code Style
- [Use descriptive semantic names](https://awesomereviewers.com/raw/clickhouse-use-descriptive-semantic-names.md) — ClickHouse/ClickHouse, Naming Conventions
- [Use descriptive naming](https://awesomereviewers.com/raw/duckdb-use-descriptive-naming.md) — duckdb/duckdb, Naming Conventions
- [Avoid unnecessary auto](https://awesomereviewers.com/raw/llvm-project-avoid-unnecessary-auto.md) — llvm/llvm-project, Code Style
- [Eliminate code duplication](https://awesomereviewers.com/raw/duckdb-eliminate-code-duplication.md) — duckdb/duckdb, Code Style
- [Remove debugging artifacts](https://awesomereviewers.com/raw/deeplearning4j-remove-debugging-artifacts.md) — deeplearning4j/deeplearning4j, Code Style
- [Consistent Semantic Identifiers](https://awesomereviewers.com/raw/ncnn-consistent-semantic-identifiers.md) — Tencent/ncnn, Naming Conventions
- [Use descriptive identifiers](https://awesomereviewers.com/raw/terminal-use-descriptive-identifiers.md) — microsoft/terminal, Naming Conventions
- [Use descriptive names](https://awesomereviewers.com/raw/llvm-project-use-descriptive-names.md) — llvm/llvm-project, Naming Conventions
- [maintain naming consistency](https://awesomereviewers.com/raw/llama.cpp-maintain-naming-consistency.md) — ggml-org/llama.cpp, Naming Conventions

## Add when the change touches

### Authentication, input handling, secrets, permissions

- **Security scanning**: `codeql` (31% of repos). Runs via GitHub Action github/codeql-action/analyze. Docs: https://github.com/github/codeql
- **Secret scanning** — no tool detected in the sample. Catches: Credentials and tokens committed to the repository.
- **Dependency audit** — no tool detected in the sample. Catches: Known-vulnerable or disallowed dependencies and licenses.

Review prompts (6 in total, most discussed first):

- [validate user inputs](https://awesomereviewers.com/raw/clickhouse-validate-user-inputs.md) — ClickHouse/ClickHouse, Security
- [Preserve pointer authentication](https://awesomereviewers.com/raw/runtime-preserve-pointer-authentication.md) — dotnet/runtime, Security
- [secure sensitive data handling](https://awesomereviewers.com/raw/duckdb-secure-sensitive-data-handling.md) — duckdb/duckdb, Security
- [Verify cryptographic function behavior](https://awesomereviewers.com/raw/bun-verify-cryptographic-function-behavior.md) — oven-sh/bun, Security
- [Buffer bounds validation](https://awesomereviewers.com/raw/maplibre-native-buffer-bounds-validation.md) — maplibre/maplibre-native, Security
- [Validate by File Header](https://awesomereviewers.com/raw/ncnn-validate-by-file-header.md) — Tencent/ncnn, Security

### Public APIs, signatures, error paths, nullability

- **Type checking** — The compiler type-checks on every build and test run; a failing build is this check failing.
- **Unit and integration tests** — no tool detected in the sample. Catches: Behaviour regressions on the paths the tests exercise.
- **Property-based tests** — no tool detected in the sample. Catches: Edge-case inputs nobody wrote a test for; invariants over generated data.

Review prompts (36 in total, most discussed first):

- [Explicit error handling](https://awesomereviewers.com/raw/clickhouse-explicit-error-handling.md) — ClickHouse/ClickHouse, Error Handling
- [Assert before cast](https://awesomereviewers.com/raw/bun-assert-before-cast.md) — oven-sh/bun, Null Handling
- [prevent null dereferences](https://awesomereviewers.com/raw/hyprland-prevent-null-dereferences.md) — hyprwm/Hyprland, Null Handling
- [Graceful Error Propagation](https://awesomereviewers.com/raw/ncnn-graceful-error-propagation.md) — Tencent/ncnn, Error Handling
- [Clear API contracts](https://awesomereviewers.com/raw/opencv-clear-api-contracts.md) — opencv/opencv, API
- [Check exceptions consistently](https://awesomereviewers.com/raw/bun-check-exceptions-consistently.md) — oven-sh/bun, Error Handling
- [Use OpenCV error mechanisms](https://awesomereviewers.com/raw/opencv-use-opencv-error-mechanisms.md) — opencv/opencv, Error Handling
- [Prevent null vulnerabilities](https://awesomereviewers.com/raw/opencv-prevent-null-vulnerabilities.md) — opencv/opencv, Null Handling
- [Handle errors by severity](https://awesomereviewers.com/raw/maplibre-native-handle-errors-by-severity.md) — maplibre/maplibre-native, Error Handling
- [consistent null validation](https://awesomereviewers.com/raw/duckdb-consistent-null-validation.md) — duckdb/duckdb, Null Handling
- [Design thoughtful API interfaces](https://awesomereviewers.com/raw/llvm-project-design-thoughtful-api-interfaces.md) — llvm/llvm-project, API
- [Eliminate redundant null checks](https://awesomereviewers.com/raw/llvm-project-eliminate-redundant-null-checks.md) — llvm/llvm-project, Null Handling

### Service and framework code

- **Unit and integration tests** — no tool detected in the sample. Catches: Behaviour regressions on the paths the tests exercise.
- **Version and platform matrix**: `ci-matrix` (23% of repos). Command seen: `codeql-analyze (language: 3)`. Docs: https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/run-job-variations

### Algorithms, parsers, data transforms

- **Property-based tests** — no tool detected in the sample. Catches: Edge-case inputs nobody wrote a test for; invariants over generated data.
- **Fuzzing** — no tool detected in the sample. Catches: Crashes, panics and hangs on malformed input, especially in parsers and decoders.
- **Mutation testing** — no tool detected in the sample. Catches: Tests that keep passing whatever the code does.
- **Proofs and specifications** — no tool detected in the sample. Catches: Design-level bugs in protocols and algorithms, checked against a specification.

Review prompts (15 in total, most discussed first):

- [Spec-aligned Algorithm Correctness](https://awesomereviewers.com/raw/ncnn-spec-aligned-algorithm-correctness.md) — Tencent/ncnn, Algorithms
- [optimize algorithmic choices](https://awesomereviewers.com/raw/terminal-optimize-algorithmic-choices.md) — microsoft/terminal, Algorithms
- [Use optimized functions](https://awesomereviewers.com/raw/opencv-use-optimized-functions.md) — opencv/opencv, Algorithms
- [explicit control flow logic](https://awesomereviewers.com/raw/llama.cpp-explicit-control-flow-logic.md) — ggml-org/llama.cpp, Algorithms
- [optimize algorithmic complexity](https://awesomereviewers.com/raw/clickhouse-optimize-algorithmic-complexity.md) — ClickHouse/ClickHouse, Algorithms
- [optimize computational efficiency](https://awesomereviewers.com/raw/hyprland-optimize-computational-efficiency.md) — hyprwm/Hyprland, Algorithms
- [Abstract traversal patterns](https://awesomereviewers.com/raw/runtime-abstract-traversal-patterns.md) — dotnet/runtime, Algorithms
- [optimize computational complexity](https://awesomereviewers.com/raw/llvm-project-optimize-computational-complexity.md) — llvm/llvm-project, Algorithms
- [avoid redundant lookups](https://awesomereviewers.com/raw/duckdb-avoid-redundant-lookups.md) — duckdb/duckdb, Algorithms
- [Reuse existing algorithms](https://awesomereviewers.com/raw/pytorch-reuse-existing-algorithms.md) — pytorch/pytorch, Algorithms
- [Numerical precision considerations](https://awesomereviewers.com/raw/maplibre-native-numerical-precision-considerations.md) — maplibre/maplibre-native, Algorithms
- [avoid unnecessary allocations](https://awesomereviewers.com/raw/react-native-avoid-unnecessary-allocations.md) — facebook/react-native, Algorithms

### Threads, async code, locks, shared state

- **Concurrency model checking** — no tool detected in the sample. Catches: Races and orderings that fail only under specific interleavings.
- **Undefined-behaviour detection** — no tool detected in the sample. Catches: Memory-safety and aliasing violations in unsafe code.
- **Property-based tests** — no tool detected in the sample. Catches: Edge-case inputs nobody wrote a test for; invariants over generated data.

Review prompts (10 in total, most discussed first):

- [manage object lifetimes carefully](https://awesomereviewers.com/raw/terminal-manage-object-lifetimes-carefully.md) — microsoft/terminal, Concurrency
- [Protect shared state](https://awesomereviewers.com/raw/duckdb-protect-shared-state.md) — duckdb/duckdb, Concurrency
- [Enforce clear data ownership](https://awesomereviewers.com/raw/maplibre-native-enforce-clear-data-ownership.md) — maplibre/maplibre-native, Concurrency
- [Framework synchronization practices](https://awesomereviewers.com/raw/opencv-framework-synchronization-practices.md) — opencv/opencv, Concurrency
- [Evaluate synchronization necessity](https://awesomereviewers.com/raw/yoga-evaluate-synchronization-necessity.md) — facebook/yoga, Concurrency
- [Memory ordering matters](https://awesomereviewers.com/raw/runtime-memory-ordering-matters.md) — dotnet/runtime, Concurrency
- [consistent mutex protection](https://awesomereviewers.com/raw/clickhouse-consistent-mutex-protection.md) — ClickHouse/ClickHouse, Concurrency
- [protect shared data](https://awesomereviewers.com/raw/llvm-project-protect-shared-data.md) — llvm/llvm-project, Concurrency
- [weak pointer callback safety](https://awesomereviewers.com/raw/hyprland-weak-pointer-callback-safety.md) — hyprwm/Hyprland, Concurrency
- [Thread-safe state transitions](https://awesomereviewers.com/raw/bun-thread-safe-state-transitions.md) — oven-sh/bun, Concurrency

### Network calls, retries, timeouts, protocols

- **Unit and integration tests** — no tool detected in the sample. Catches: Behaviour regressions on the paths the tests exercise.
- **Fuzzing** — no tool detected in the sample. Catches: Crashes, panics and hangs on malformed input, especially in parsers and decoders.

Review prompts (4 in total, most discussed first):

- [Avoid duplicate HTTP headers](https://awesomereviewers.com/raw/clickhouse-avoid-duplicate-http-headers.md) — ClickHouse/ClickHouse, Networking
- [Platform-agnostic network APIs](https://awesomereviewers.com/raw/runtime-platform-agnostic-network-apis.md) — dotnet/runtime, Networking
- [Validate network inputs](https://awesomereviewers.com/raw/bun-validate-network-inputs.md) — oven-sh/bun, Networking
- [Protocol response formatting](https://awesomereviewers.com/raw/terminal-protocol-response-formatting.md) — microsoft/terminal, Networking

### UI components and pages

- **End-to-end browser tests** — no tool detected in the sample. Catches: User flows broken across components, routing and the network.
- **Linting** — no tool detected in the sample. Catches: Bug-prone patterns, unused code and conventions the formatter does not cover.

### Databases, migrations, caching

- **Unit and integration tests** — no tool detected in the sample. Catches: Behaviour regressions on the paths the tests exercise.
- **Version and platform matrix**: `ci-matrix` (23% of repos). Command seen: `codeql-analyze (language: 3)`. Docs: https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/run-job-variations

Review prompts (5 in total, most discussed first):

- [validate before executing operations](https://awesomereviewers.com/raw/clickhouse-validate-before-executing-operations.md) — ClickHouse/ClickHouse, Database
- [validate inputs comprehensively](https://awesomereviewers.com/raw/duckdb-validate-inputs-comprehensively.md) — duckdb/duckdb, Database
- [use default serialization methods](https://awesomereviewers.com/raw/duckdb-use-default-serialization-methods.md) — duckdb/duckdb, Migrations
- [Optimize database interactions](https://awesomereviewers.com/raw/bun-optimize-database-interactions.md) — oven-sh/bun, Database
- [avoid redundant cache lookups](https://awesomereviewers.com/raw/clickhouse-avoid-redundant-cache-lookups.md) — ClickHouse/ClickHouse, Caching

### Hot paths and performance

- No tool-based check applies; rely on the prompts.

Review prompts (15 in total, most discussed first):

- [Avoid unnecessary allocations](https://awesomereviewers.com/raw/clickhouse-avoid-unnecessary-allocations.md) — ClickHouse/ClickHouse, Performance Optimization
- [Cache expensive computations](https://awesomereviewers.com/raw/terminal-cache-expensive-computations.md) — microsoft/terminal, Performance Optimization
- [Unrolled SIMD Locality](https://awesomereviewers.com/raw/ncnn-unrolled-simd-locality.md) — Tencent/ncnn, Performance Optimization
- [avoid repeated expensive operations](https://awesomereviewers.com/raw/duckdb-avoid-repeated-expensive-operations.md) — duckdb/duckdb, Performance Optimization
- [avoid unnecessary allocations](https://awesomereviewers.com/raw/llvm-project-avoid-unnecessary-allocations.md) — llvm/llvm-project, Performance Optimization
- [avoid expensive hot paths](https://awesomereviewers.com/raw/hyprland-avoid-expensive-hot-paths.md) — hyprwm/Hyprland, Performance Optimization
- [Model actual hardware costs](https://awesomereviewers.com/raw/runtime-model-actual-hardware-costs.md) — dotnet/runtime, Performance Optimization
- [measure before optimizing](https://awesomereviewers.com/raw/llama.cpp-measure-before-optimizing.md) — ggml-org/llama.cpp, Performance Optimization
- [Optimize memory allocation patterns](https://awesomereviewers.com/raw/opencv-optimize-memory-allocation-patterns.md) — opencv/opencv, Performance Optimization
- [Optimize memory usage](https://awesomereviewers.com/raw/pytorch-optimize-memory-usage.md) — pytorch/pytorch, Performance Optimization
- [Preallocate collection capacity](https://awesomereviewers.com/raw/maplibre-native-preallocate-collection-capacity.md) — maplibre/maplibre-native, Performance Optimization
- [Cache repeated accesses](https://awesomereviewers.com/raw/bun-cache-repeated-accesses.md) — oven-sh/bun, Performance Optimization

### Model, prompt and LLM code

- **Unit and integration tests** — no tool detected in the sample. Catches: Behaviour regressions on the paths the tests exercise.

Review prompts (7 in total, most discussed first):

- [Optimize numerical precision](https://awesomereviewers.com/raw/pytorch-optimize-numerical-precision.md) — pytorch/pytorch, AI
- [use model metadata](https://awesomereviewers.com/raw/llama.cpp-use-model-metadata.md) — ggml-org/llama.cpp, AI
- [Inference Compatibility Rules](https://awesomereviewers.com/raw/ncnn-inference-compatibility-rules.md) — Tencent/ncnn, AI
- [Validate tensor dimensions](https://awesomereviewers.com/raw/opencv-validate-tensor-dimensions.md) — opencv/opencv, AI
- [Actionable error messages](https://awesomereviewers.com/raw/pytorch-actionable-error-messages.md) — pytorch/pytorch, Pytorch
- [AI dependency decoupling strategy](https://awesomereviewers.com/raw/ollama-ai-dependency-decoupling-strategy.md) — ollama/ollama, AI
- [Document AI implementation references](https://awesomereviewers.com/raw/deeplearning4j-document-ai-implementation-references.md) — deeplearning4j/deeplearning4j, AI

### Logging, metrics, tracing

- No tool-based check applies; rely on the prompts.

Review prompts (4 in total, most discussed first):

- [Use proper logging](https://awesomereviewers.com/raw/maplibre-native-use-proper-logging.md) — maplibre/maplibre-native, Logging
- [Guard expensive logging operations](https://awesomereviewers.com/raw/duckdb-guard-expensive-logging-operations.md) — duckdb/duckdb, Logging
- [Use appropriate logging levels](https://awesomereviewers.com/raw/deeplearning4j-use-appropriate-logging-levels.md) — deeplearning4j/deeplearning4j, Logging
- [Conditional observability instrumentation](https://awesomereviewers.com/raw/maplibre-native-conditional-observability-instrumentation.md) — maplibre/maplibre-native, Observability

### CI workflows and configuration files

- **CI workflow linting** — no tool detected in the sample. Catches: Broken GitHub Actions syntax, script injection, over-broad token permissions.
- **File hygiene**: `pre-commit-hooks` (15% of repos). Runs via pre-commit hook check-yaml. Autofixes. Docs: https://github.com/pre-commit/pre-commit-hooks

Review prompts (11 in total, most discussed first):

- [Capability-Guarded Configuration](https://awesomereviewers.com/raw/ncnn-capability-guarded-configuration.md) — Tencent/ncnn, Configurations
- [Dynamic configuration handling](https://awesomereviewers.com/raw/hyprland-dynamic-configuration-handling.md) — hyprwm/Hyprland, Configurations
- [Setting declaration practices](https://awesomereviewers.com/raw/clickhouse-setting-declaration-practices.md) — ClickHouse/ClickHouse, Configurations
- [Configuration completeness validation](https://awesomereviewers.com/raw/llvm-project-configuration-completeness-validation.md) — llvm/llvm-project, Configurations
- [prefer settings over pragmas](https://awesomereviewers.com/raw/duckdb-prefer-settings-over-pragmas.md) — duckdb/duckdb, Configurations
- [Structure configuration options](https://awesomereviewers.com/raw/runtime-structure-configuration-options.md) — dotnet/runtime, Configurations
- [Validate before configuration generation](https://awesomereviewers.com/raw/terminal-validate-before-configuration-generation.md) — microsoft/terminal, Configurations
- [Externalize config values](https://awesomereviewers.com/raw/maplibre-native-externalize-config-values.md) — maplibre/maplibre-native, Configurations
- [Use strongly typed configurations](https://awesomereviewers.com/raw/llama.cpp-use-strongly-typed-configurations.md) — ggml-org/llama.cpp, Configurations
- [platform-aware configuration messages](https://awesomereviewers.com/raw/react-native-platform-aware-configuration-messages.md) — facebook/react-native, Configurations
- [Safe configuration definitions](https://awesomereviewers.com/raw/yoga-safe-configuration-definitions.md) — facebook/yoga, Configurations

### Dependencies and lockfiles

- **Dependency audit** — no tool detected in the sample. Catches: Known-vulnerable or disallowed dependencies and licenses.
- **Lockfile consistency** — no tool detected in the sample. Catches: A lockfile that no longer matches its manifest.
- **Version and platform matrix**: `ci-matrix` (23% of repos). Command seen: `codeql-analyze (language: 3)`. Docs: https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/run-job-variations

### The tests themselves

- **Mutation testing** — no tool detected in the sample. Catches: Tests that keep passing whatever the code does.
- **Version and platform matrix**: `ci-matrix` (23% of repos). Command seen: `codeql-analyze (language: 3)`. Docs: https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/run-job-variations

Review prompts (5 in total, most discussed first):

- [comprehensive test coverage](https://awesomereviewers.com/raw/llvm-project-comprehensive-test-coverage.md) — llvm/llvm-project, Testing
- [Use proper assertions](https://awesomereviewers.com/raw/opencv-use-proper-assertions.md) — opencv/opencv, Testing
- [Intentional Test Coverage](https://awesomereviewers.com/raw/ncnn-intentional-test-coverage.md) — Tencent/ncnn, Testing
- [systematic test coverage](https://awesomereviewers.com/raw/llama.cpp-systematic-test-coverage.md) — ggml-org/llama.cpp, Testing
- [Use specific test assertions](https://awesomereviewers.com/raw/maplibre-native-use-specific-test-assertions.md) — maplibre/maplibre-native, Testing

### Documentation and comments

- **Docs build** — no tool detected in the sample. Catches: Broken cross-references, links and markup in documentation.
- **Spelling**: `codespell` (8% of repos). Docs: https://github.com/codespell-project/codespell

Review prompts (4 in total, most discussed first):

- [Provide contextual code documentation](https://awesomereviewers.com/raw/llvm-project-provide-contextual-code-documentation.md) — llvm/llvm-project, Documentation
- [Documentation precision standards](https://awesomereviewers.com/raw/clickhouse-documentation-precision-standards.md) — ClickHouse/ClickHouse, Documentation
- [Document implementation rationale](https://awesomereviewers.com/raw/terminal-document-implementation-rationale.md) — microsoft/terminal, Documentation
- [Document function contracts](https://awesomereviewers.com/raw/runtime-document-function-contracts.md) — dotnet/runtime, Documentation

## Source repositories

[microsoft/terminal](https://awesomereviewers.com/sources/microsoft-terminal/), [pytorch/pytorch](https://awesomereviewers.com/sources/pytorch-pytorch/), [ggml-org/llama.cpp](https://awesomereviewers.com/sources/ggml-org-llama.cpp/), [opencv/opencv](https://awesomereviewers.com/sources/opencv-opencv/), [oven-sh/bun](https://awesomereviewers.com/sources/oven-sh-bun/), [ClickHouse/ClickHouse](https://awesomereviewers.com/sources/clickhouse-clickhouse/), [llvm/llvm-project](https://awesomereviewers.com/sources/llvm-llvm-project/), [duckdb/duckdb](https://awesomereviewers.com/sources/duckdb-duckdb/), [hyprwm/Hyprland](https://awesomereviewers.com/sources/hyprwm-hyprland/), [Tencent/ncnn](https://awesomereviewers.com/sources/tencent-ncnn/), [facebook/yoga](https://awesomereviewers.com/sources/facebook-yoga/), [dotnet/runtime](https://awesomereviewers.com/sources/dotnet-runtime/), [maplibre/maplibre-native](https://awesomereviewers.com/sources/maplibre-maplibre-native/)
