test(corpus): name the flag that exists - #51
Conversation
The count assertion's comment justified itself by what `--check` and `--json` consumers read. There is no `--check` in either implementation and there never has been: the flag set is `--help`, `--files-from`, `--write`, `--json`, `--fail-on-change`, `--ignore-file` and `--exclude`. The option this means is `--fail-on-change`, which reports without rewriting and has existed since the first commit. A reader taking the comment at face value goes looking for an option neither binary accepts, in a file whose whole subject is what the two must agree about. The Python counterpart makes the same argument without naming a flag, so either wording is consistent with it; naming the real one is the more useful of the two here, because the point is which consumers the counts reach. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
PR Summary by QodoCorrect flag name in corpus test comment
AI Description
High-Level Assessment
Files changed (1)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can add REVIEW.md to your repo root and Qodo follows it on every PR |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #51 +/- ##
=======================================
Coverage 87.40% 87.40%
=======================================
Files 3 3
Lines 691 691
=======================================
Hits 604 604
Misses 87 87 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟢 Approval recommended
The change is a verified documentation-only correction that improves accuracy without affecting behavior or test logic.
Pull request overview
This PR corrects a misleading Rust corpus test comment by naming the actual CLI flag (--fail-on-change) that corresponds to “reporting without rewriting,” aligning the test documentation with the real, cross-implementation CLI contract.
Changes:
- Replace a nonexistent flag reference (
--check) with the existing--fail-on-changeintests/corpus.rstest commentary.
File summaries
| File | Description |
|---|---|
| tests/corpus.rs | Updates an explanatory comment to reference the correct CLI flag consumed by reporting paths. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
What changes, and why
tests/corpus.rs:150justified splitting the count assertion from the output assertion by naming what "--checkand--jsonconsumers actually read."There is no
--check, in either implementation, and there never has been:The option the comment means is
--fail-on-change, which reports without rewriting and has existed since the first commit. A reader taking the comment at face value goes looking for an option neither binary accepts — in the file whose whole subject is what the two implementations must agree about.The Python counterpart at
tests/test_corpus.py:86makes the same argument without naming a flag at all ("a single combined assertion would let the first failure hide the second"), so either wording is consistent with it. Naming the real flag is the more useful of the two here, because the point being made is which consumers the reported counts reach.Corpus
The corpus is the specification, and both implementations answer to it. Tick what applies.
corpus/pins the new behavior. The case was written first and failed first.One comment in a test file.
Checks
make checkpasses, ormake testdoes and this touches no Rust.This touches Rust, so
make rust-lint(clippy at-D warnings) andmake rust-test— 104 unit tests and the 4 corpus harness tests, all passing.