(format string)
| 110 | } |
| 111 | |
| 112 | func validateOutputFormat(format string) (string, error) { |
| 113 | normalized := strings.ToLower(strings.TrimSpace(format)) |
| 114 | switch normalized { |
| 115 | case "text", "json", "sarif": |
| 116 | return normalized, nil |
| 117 | default: |
| 118 | return "", fmt.Errorf("invalid --format value %q: must be 'text', 'json', or 'sarif'", format) |
| 119 | } |
| 120 | } |
| 121 | |
| 122 | func normalizeDiffTarget(from, to, commit string) string { |
| 123 | if from != "" && to == "" && commit == "" { |
no outgoing calls
no test coverage detected