MCPcopy Create free account
hub / github.com/cli/cli / printProblems

Function printProblems

script/ghmock/report.go:150–162  ·  view source on GitHub ↗

printProblems lists what the schema checks found, request by request.

(w io.Writer, requests []loggedRequest)

Source from the content-addressed store, hash-verified

148
149// printProblems lists what the schema checks found, request by request.
150func printProblems(w io.Writer, requests []loggedRequest) {
151 header := false
152 for _, e := range requests {
153 for _, group := range problemGroups(e) {
154 if !header {
155 fmt.Fprintln(w, "--- schema problems")
156 header = true
157 }
158 fmt.Fprintf(w, "%d. %s: %s\n", e.Seq, displayName(e), group.label)
159 fmt.Fprint(w, indentProblems(group.problems, " ", maxShownProblems))
160 }
161 }
162}
163
164// problemGroup is one kind of schema problem found for a request.
165type problemGroup struct {

Callers 1

printResultFunction · 0.85

Calls 3

problemGroupsFunction · 0.85
indentProblemsFunction · 0.85
displayNameFunction · 0.70

Tested by

no test coverage detected