Skip to content

docs(pages): update CLI reference and i18n for --format sarif #869

Description

@lizhengfeng101

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:170docs.reviewFlag4Desc: "Output format: text or json"
  • pages/src/i18n/en.ts:226docs.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

  • All four locale CLI reference docs mention sarif in --format description
  • --preview row notes that sarif is not supported
  • i18n strings updated for all locales
  • At least one GitHub Actions SARIF upload example in the docs
  • make pages-build passes (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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions