Write a deterministic baseline for the current AST findings.
(hits: list[NoexceptHit], path: Path = DEFAULT_BASELINE)
| 127 | |
| 128 | |
| 129 | def write_baseline(hits: list[NoexceptHit], path: Path = DEFAULT_BASELINE) -> None: |
| 130 | """Write a deterministic baseline for the current AST findings.""" |
| 131 | keys = sorted(hit.baseline_key for hit in hits) |
| 132 | content = [ |
| 133 | "# Known missing FL_NOEXCEPT signatures for ci/tools/check_noexcept.py.", |
| 134 | "# Generated with:", |
| 135 | "# uv run python ci/tools/check_noexcept.py --scope all --update-baseline", |
| 136 | "#", |
| 137 | "# Format: src/path|normalized source signature", |
| 138 | "# New entries fail the default unified C++ linter.", |
| 139 | "", |
| 140 | ] |
| 141 | content.extend(keys) |
| 142 | path.write_text("\n".join(content) + "\n", encoding="utf-8") |
| 143 | |
| 144 | |
| 145 | def diff_against_baseline( |