()
| 117 | |
| 118 | |
| 119 | def main() -> int: |
| 120 | parser = argparse.ArgumentParser(description="Validate the Codex Security report format.") |
| 121 | parser.add_argument("--report-md", required=True, help="Path to report.md") |
| 122 | args = parser.parse_args() |
| 123 | |
| 124 | report_path = Path(args.report_md) |
| 125 | text = report_path.read_text(encoding="utf-8") |
| 126 | |
| 127 | errors = validate_report(text) |
| 128 | if errors: |
| 129 | for error in errors: |
| 130 | print(error, file=sys.stderr) |
| 131 | return 1 |
| 132 | |
| 133 | print(f"validated report format: {report_path}") |
| 134 | return 0 |
| 135 | |
| 136 | |
| 137 | if __name__ == "__main__": |
no test coverage detected