Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,15 @@ reviews:
- Verify GPU availability checks before tests
- Check for proper error handling and meaningful error messages

- path: "cpp/tests/**/*"
instructions: |
For GTest parameterized test parameter structs:
- Flag any `operator<<` overload or `PrintTo` function used to stringify test
parameters (i.e. feeds into a GTest test name) that emits `std::endl` or a
literal `"\n"`. GTest builds the parameterized test name from this stream
output, and a trailing newline breaks exact-match tooling such as
`ctest --tests-from-file`. Flag as HIGH priority.

knowledge_base:
opt_out: false
code_guidelines:
Expand Down
2 changes: 2 additions & 0 deletions cpp/REVIEW_GUIDELINES.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
### Test Quality
- Missing validation of numerical correctness
- **Using external datasets** (tests must not depend on external resources; use synthetic data or bundled datasets)
- **Trailing newline in GTest parameterized test names** (`operator<<` overloads or `PrintTo` functions used to stringify test parameters must not emit `std::endl` or `"\n"`; GTest uses the stream output to build the test name, and a trailing newline breaks exact-match tooling like `ctest --tests-from-file`)

## MEDIUM Issues (Comment Selectively)

Expand Down Expand Up @@ -304,6 +305,7 @@ cudaStreamCreate(&per_device_stream);
- [ ] Are all datasets synthetic or bundled (no external resource dependencies)?
- [ ] Is numerical correctness validated?
- [ ] Are edge cases tested (empty, single element, extreme values)?
- [ ] If an `operator<<`/`PrintTo` is used to name parameterized GTest cases, does it avoid `std::endl`/`"\n"` (a trailing newline in the generated name breaks `ctest --tests-from-file` exact matching)?

---

Expand Down
2 changes: 1 addition & 1 deletion cpp/tests/neighbors/all_neighbors.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ inline ::std::ostream& operator<<(::std::ostream& os, const AllNeighborsInputs&
<< ", metric=" << static_cast<int>(std::get<1>(p.build_algo_metric_recall))
<< ", clusters=" << std::get<0>(p.cluster_nearestcluster)
<< ", overlap_factor=" << std::get<1>(p.cluster_nearestcluster)
<< ", output_on_host=" << p.output_on_host << std::endl;
<< ", output_on_host=" << p.output_on_host;
return os;
}

Expand Down
Loading