isMachineReadable reports whether the output format writes a structured document to stdout that must not be interleaved with progress text. json and sarif move [ocr] progress lines off stdout and suppress the trace summary, which is already carried inside the document. html joins them for the second
(outputFormat string)
| 365 | // source. It is not a value validateOutputFormat accepts, so it reaches this |
| 366 | // function only from `session export`. |
| 367 | func isMachineReadable(outputFormat string) bool { |
| 368 | switch strings.ToLower(strings.TrimSpace(outputFormat)) { |
| 369 | case "json", "sarif", "html": |
| 370 | return true |
| 371 | default: |
| 372 | return false |
| 373 | } |
| 374 | } |
| 375 | |
| 376 | // newQuietHandle routes [ocr] progress lines away from stdout so they cannot |
| 377 | // corrupt a structured output document. What it does depends on why stdout |
no outgoing calls
no test coverage detected