Skip to content

feat: report clang diagnostics and fail on errors - #66

Open
henryiii wants to merge 1 commit into
masterfrom
feat-clang-diagnostics
Open

feat: report clang diagnostics and fail on errors#66
henryiii wants to merge 1 commit into
masterfrom
feat-clang-diagnostics

Conversation

@henryiii

@henryiii henryiii commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

🤖 AI text below 🤖

Addresses finding 9 in #59.

Clang diagnostics were never reported. A header with a missing include parsed "successfully" with an incomplete AST, which silently gave missing or empty docstrings.

After the parse, _extract_file now prints all diagnostics to stderr and raises if any diagnostic has severity Error or higher. The exception propagates through the ThreadPoolExecutor as in #60, so the process exits nonzero and no output file is written. libclang no longer prints the diagnostics itself, to prevent duplicates.

Added a CLI test with a header that includes a missing file.

A header that fails to include a file used to parse "successfully" with
an incomplete AST, producing missing or empty docstrings. Diagnostics are
now printed to stderr, and an error diagnostic aborts the run so no
output file is written.

Assisted-by: ClaudeCode:claude-fable-5
@henryiii
henryiii marked this pull request as draft August 6, 2026 18:18
@henryiii henryiii closed this Aug 7, 2026
@henryiii henryiii reopened this Aug 7, 2026
@henryiii
henryiii marked this pull request as ready for review August 7, 2026 03:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant