Write the report to a JSON file.
(report, output_path)
| 216 | |
| 217 | |
| 218 | def write_json_report(report, output_path): |
| 219 | """Write the report to a JSON file.""" |
| 220 | os.makedirs(os.path.dirname(output_path) or '.', exist_ok=True) |
| 221 | with open(output_path, 'w') as f: |
| 222 | json.dump(report, f, indent=2, default=str) |
| 223 | print(f"Report saved to {output_path}") |
| 224 | |
| 225 | |
| 226 | def write_overall(report, output_dir): |