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

Function isMachineReadable

cmd/opencodereview/shared.go:291–293  ·  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 move [ocr] progress lines off stdout and suppress the trace summary, which is already carried inside the document.

(outputFormat string)

Source from the content-addressed store, hash-verified

289// json and sarif move [ocr] progress lines off stdout and suppress the trace
290// summary, which is already carried inside the document.
291func isMachineReadable(outputFormat string) bool {
292 return outputFormat == "json" || outputFormat == "sarif"
293}
294
295// newQuietHandle routes [ocr] progress lines away from stdout so they cannot
296// corrupt a structured output document. What it does depends on why stdout

Callers 4

newQuietHandleFunction · 0.85
emitRunResultFunction · 0.85
executeReviewContextFunction · 0.85
executeScanFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected