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)
| 315 | // json and sarif move [ocr] progress lines off stdout and suppress the trace |
| 316 | // summary, which is already carried inside the document. |
| 317 | func isMachineReadable(outputFormat string) bool { |
| 318 | switch strings.ToLower(strings.TrimSpace(outputFormat)) { |
| 319 | case "json", "sarif": |
| 320 | return true |
| 321 | default: |
| 322 | return false |
| 323 | } |
| 324 | } |
| 325 | |
| 326 | // newQuietHandle routes [ocr] progress lines away from stdout so they cannot |
| 327 | // corrupt a structured output document. What it does depends on why stdout |
no outgoing calls
no test coverage detected