MCPcopy Create free account
hub / github.com/github/gh-aw / validateReportFileFlags

Function validateReportFileFlags

pkg/cli/logs_command.go:471–482  ·  view source on GitHub ↗

validateReportFileFlags returns an error if --report-file is combined with an incompatible flag. --report-file only takes effect for --format markdown output and is bypassed when --json is set.

(reportFile, format string, jsonOutput bool)

Source from the content-addressed store, hash-verified

469// incompatible flag. --report-file only takes effect for --format markdown output
470// and is bypassed when --json is set.
471func validateReportFileFlags(reportFile, format string, jsonOutput bool) error {
472 if reportFile == "" {
473 return nil
474 }
475 if format != "markdown" {
476 return errors.New("--report-file requires --format markdown")
477 }
478 if jsonOutput {
479 return errors.New("--report-file cannot be used with --json")
480 }
481 return nil
482}

Callers 1

NewLogsCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected