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)
| 352 | // json and sarif move [ocr] progress lines off stdout and suppress the trace |
| 353 | // summary, which is already carried inside the document. |
| 354 | func isMachineReadable(outputFormat string) bool { |
| 355 | switch strings.ToLower(strings.TrimSpace(outputFormat)) { |
| 356 | case "json", "sarif": |
| 357 | return true |
| 358 | default: |
| 359 | return false |
| 360 | } |
| 361 | } |
| 362 | |
| 363 | // newQuietHandle routes [ocr] progress lines away from stdout so they cannot |
| 364 | // corrupt a structured output document. What it does depends on why stdout |
no outgoing calls
no test coverage detected