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