Repository navigation
fix(tools): reject non-file compilation inventories - #25972
oneandonlydean merged 1 commit into
Conversation
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
The change rejects non-regular compilation database inputs before reading them, and the inspected implementation and regression test support the stated behavior.
What I ran
Reviewed head 89cc19c8226da38dee3eb9c70199cf806bcced3f and the prepared diff. No tests or other commands were run.
Results
| Check | Result | Note |
|---|---|---|
| Diff and changed code | passed | Both changed files read |
| Tests | not run | Author reports five tests and conventions check passed |
Findings
Blocking
None.
Non-blocking
None.
Sources
The regular-file check precedes reading the database, and the added named-pipe test verifies read_text is not reached: implementation, regression test.
Not verified
Tests and conventions check reported in the PR description were not run independently. No base merge check was performed. Read tools/compile_database_inventory.py, tools/tests/test_compile_database_inventory.py, and the relevant tools/check_compile.py parser function. No files were excluded by the prepared manifest.
To get this to a good state
Nothing is required.
What
Check that the compilation database is a regular file before reading it. Passing a named pipe or another special file now produces a diagnostic instead of waiting on it.
Tested
Linux with Python unittest. Ran all five compilation database inventory tests, including a named-pipe regression that verifies the reader never opens it. The project conventions check passed.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)