docs(cli-reference): document ocr scan flags - #770
Conversation
|
✅ OpenCodeReview: Review skipped: no items were selected. |
lizhengfeng101
left a comment
There was a problem hiding this comment.
Thanks for adding the ocr scan section — the flag documentation is accurate and the examples are helpful.
A couple of minor suggestions:
-
ja/ru localization: The cli-reference docs exist in four languages (en, zh, ja, ru). This PR covers en and zh — could you add the equivalent section to ja and ru as well for consistency? (Or open a follow-up issue if you'd prefer.)
-
Chinese typography (zh): The line
LLM 评审--适合审计陌生代码库uses--which may be confused with a CLI flag. Consider replacing with an em-dash——or spacing it out. -
English dash style (en, minor):
sent to the LLM - useful for auditing— a spaced em-dash (—) or unspaced em-dash (—) would be more conventional.
Otherwise LGTM — the flags match the source in shared_flags.go and the ocr scan -h pointer at the end is a nice touch.
60125fe to
ecf8853
Compare
|
Thanks for the review! All three suggestions addressed:
|
wu21-web
left a comment
There was a problem hiding this comment.
Thanks. The documentation is clear, just one issue here:
Co-authored-by: Tao Xin <wu2196674@icloud.com>
Description
Adds a dedicated
## ocr scansection to the CLI reference (en + zh),documenting the three most commonly used scan flags:
--path,--exclude,and
--preview.Previously
ocr scanonly had a single row in the command summary table —no flag reference and no usage examples. Users had no documented way to
scope a scan to specific paths, exclude generated files, or preview the
scan range without calling the LLM.
The section includes:
--pathis given).--path,--exclude,and
--preview.ocr scan -hfor the full flag list, so the three documented flagsaren't mistaken for the complete set.
Both
enandzhare updated in sync. No source code or README changes.Type of Change
How Has This Been Tested?
make testpasses locallyDocumentation only — no code changes. Verified every flag, default, and
behavior against the source:
cmd/opencodereview/shared_flags.go(
registerScanFlags)--previewoutput (file list, reviewable/excluded counts, total lines,exclusion reasons):
internal/scan/preview.gointernal/config/template/scan_template.jsonChecklist
go fmt,go vet) — N/A, docs onlyRelated Issues
None