MCPcopy Index your code
hub / github.com/github/awesome-copilot / print_report

Function print_report

skills/code-tour/scripts/validate_tour.py:271–305  ·  view source on GitHub ↗
(tour_path: str, result: dict)

Source from the content-addressed store, hash-verified

269
270
271def print_report(tour_path: str, result: dict) -> None:
272 title = f"{BOLD}{tour_path}{RESET}"
273 print(f"\n{title}")
274 print("─" * 60)
275
276 stats = result.get("stats", {})
277 if stats:
278 parts = [
279 f"{stats.get('total_steps', 0)} steps",
280 f"{stats.get('file_steps', 0)} file",
281 f"{stats.get('directory_steps', 0)} dir",
282 f"{stats.get('content_steps', 0)} content",
283 f"{stats.get('uri_steps', 0)} uri",
284 ]
285 print(f"{DIM} {' · '.join(parts)}{RESET}")
286
287 errors = result.get("errors", [])
288 warnings = result.get("warnings", [])
289 info = result.get("info", [])
290
291 for e in errors:
292 print(f" {RED}✗ {e}{RESET}")
293 for w in warnings:
294 print(f" {YELLOW}⚠ {w}{RESET}")
295 for i in info:
296 print(f" {DIM}ℹ {i}{RESET}")
297
298 if result["passed"] and not warnings:
299 print(f" {GREEN}✓ All checks passed{RESET}")
300 elif result["passed"]:
301 print(f" {GREEN}✓ Passed{RESET} {YELLOW}(with warnings){RESET}")
302 else:
303 print(f" {RED}✗ Failed — {len(errors)} error(s){RESET}")
304
305 print()
306
307
308def main():

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected