Description
PR #820 added --format sarif as a third output format for ocr review and ocr scan, but documentation and i18n strings still only mention text and json. Users who discover the feature via --help have no corresponding documentation or GitHub Actions example to guide integration with GitHub Code Scanning.
Scope
CLI reference docs (all locales)
pages/src/content/docs/en/cli-reference.md — lines 92, 94, 319
pages/src/content/docs/zh/cli-reference.md — lines 89, 91, 304
pages/src/content/docs/ja/cli-reference.md — equivalent lines
pages/src/content/docs/ru/cli-reference.md — equivalent lines
Update --format description from "text or json" to "text, json, or sarif" and note that --preview does not honor --format sarif.
i18n strings
pages/src/i18n/en.ts:170 — docs.reviewFlag4Desc: "Output format: text or json"
pages/src/i18n/en.ts:226 — docs.scanFlag9Desc: "Output format: text or json"
- Other locale files if they carry the same keys
GitHub Actions usage example
Add a section (or expand the existing CI example) showing how to pipe SARIF output to github/codeql-action/upload-sarif@v3:
- name: Run OCR review
run: ocr review --from ${{ github.event.pull_request.base.sha }} --to ${{ github.sha }} --format sarif > results.sarif
- uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif
action.yml (optional, separate PR may be better)
action.yml:279 currently hard-codes --format json. Consider exposing a format input or adding a dedicated SARIF upload step. This may warrant its own PR if it changes the action's interface.
Acceptance Criteria
Context
Follow-up from #820 (feat: add SARIF output format). The author noted in the PR description that docs would be handled separately. Reviewer @lizhengfeng101 flagged the specific locations in the second review round.
Description
PR #820 added
--format sarifas a third output format forocr reviewandocr scan, but documentation and i18n strings still only mentiontextandjson. Users who discover the feature via--helphave no corresponding documentation or GitHub Actions example to guide integration with GitHub Code Scanning.Scope
CLI reference docs (all locales)
pages/src/content/docs/en/cli-reference.md— lines 92, 94, 319pages/src/content/docs/zh/cli-reference.md— lines 89, 91, 304pages/src/content/docs/ja/cli-reference.md— equivalent linespages/src/content/docs/ru/cli-reference.md— equivalent linesUpdate
--formatdescription from "text or json" to "text, json, or sarif" and note that--previewdoes not honor--format sarif.i18n strings
pages/src/i18n/en.ts:170—docs.reviewFlag4Desc: "Output format: text or json"pages/src/i18n/en.ts:226—docs.scanFlag9Desc: "Output format: text or json"GitHub Actions usage example
Add a section (or expand the existing CI example) showing how to pipe SARIF output to
github/codeql-action/upload-sarif@v3:action.yml (optional, separate PR may be better)
action.yml:279currently hard-codes--format json. Consider exposing aformatinput or adding a dedicated SARIF upload step. This may warrant its own PR if it changes the action's interface.Acceptance Criteria
sarifin--formatdescription--previewrow notes that sarif is not supportedmake pages-buildpasses (or equivalent docs build)Context
Follow-up from #820 (feat: add SARIF output format). The author noted in the PR description that docs would be handled separately. Reviewer @lizhengfeng101 flagged the specific locations in the second review round.