MCPcopy Create free account
hub / github.com/alibaba/open-code-review / isMachineReadable

Function isMachineReadable

cmd/opencodereview/shared.go:290–292  ·  view source on GitHub ↗

isMachineReadable reports whether the output format writes a structured document to stdout that must not be interleaved with progress text. Both json and sarif suppress [ocr] progress lines and trace summaries.

(outputFormat string)

Source from the content-addressed store, hash-verified

288// document to stdout that must not be interleaved with progress text.
289// Both json and sarif suppress [ocr] progress lines and trace summaries.
290func isMachineReadable(outputFormat string) bool {
291 return outputFormat == "json" || outputFormat == "sarif"
292}
293
294// newQuietHandle silences stdout for machine-readable formats (json, sarif)
295// or when audience=="agent"; otherwise the returned handle is a no-op

Callers 4

newQuietHandleFunction · 0.85
emitRunResultFunction · 0.85
executeReviewFunction · 0.85
executeScanFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected