Return an existing ``compile_commands.json`` for ``board_name``, or None.
(
project_root: Path, build_root: Path, board_name: str
)
| 81 | |
| 82 | |
| 83 | def _find_existing_compile_db( |
| 84 | project_root: Path, build_root: Path, board_name: str |
| 85 | ) -> Path | None: |
| 86 | """Return an existing ``compile_commands.json`` for ``board_name``, or None.""" |
| 87 | for cand in _candidate_fbuild_release_dirs(project_root, build_root, board_name): |
| 88 | cdb = cand / "compile_commands.json" |
| 89 | if cdb.exists(): |
| 90 | return cdb |
| 91 | return None |
| 92 | |
| 93 | |
| 94 | def ensure_compile_commands( |
no test coverage detected