Skip to content

Conversation

@naoNao89
Copy link

hi, this my first pr which refactor. eliminates duplicate generate_comments checks from codegen. types now handle check themselves, centralized decision logic per type, cleaner code. FieldData::doc_comment() and EnumVariant::doc_comment() make it idiomatic.

Hope receive feedback

fixes #445

- Add doc_comment() method to FieldData that checks generate_comments flag
- Add doc_comment() method to EnumVariant that checks generate_comments flag
- Remove redundant generate_comments checks from field codegen
- Remove redundant generate_comments checks from enum variant codegen

This makes the code more idiomatic by having types that generate comments
handle the flag check themselves, eliminating duplication and centralizing
the decision logic.
@naoNao89 naoNao89 force-pushed the refactor/issue-445-comment-generation branch from b9b425b to 751920e Compare December 15, 2025 21:48
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.

Figure out a more idiomatic way to check if we should generate comments.

1 participant