Skip to content

fix(linter): tighten Zig doc comment detection - #8

Closed
xen0n wants to merge 0 commit into
liyi-run:mainfrom
xen0n:feat/doc-comment-zig
Closed

xen0n wants to merge 0 commit into
liyi-run:mainfrom
xen0n:feat/doc-comment-zig

Conversation

@xen0n

@xen0n xen0n commented Apr 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • only treat the immediately preceding Zig comment as the doc comment for a declaration
  • avoid inheriting an earlier /// block across an intervening regular // comment
  • add focused Zig tests covering documented and non-documented functions and struct declarations

Root cause

  • the previous Zig detector walked backward across multiple comment siblings, so a declaration could incorrectly inherit an earlier /// doc block even when a regular // comment intervened

Testing

  • cargo test -q detect_zig_doc_comment_ -- --nocapture
  • cargo test -q tree_path::lang_zig::tests:: -- --nocapture

@xen0n
xen0n force-pushed the feat/doc-comment-zig branch from bd845ec to b0ae453 Compare April 23, 2026 08:31
@xen0n xen0n changed the title fix(tree_path): tighten Zig doc comment detection fix(linter): tighten Zig doc comment detection Apr 23, 2026
@xen0n xen0n closed this Jun 1, 2026
@xen0n
xen0n force-pushed the feat/doc-comment-zig branch from b0ae453 to 5e7a13c Compare June 1, 2026 03:28
@xen0n
xen0n deleted the feat/doc-comment-zig branch June 1, 2026 03:28
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