Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion decode.go
Original file line number Diff line number Diff line change
Expand Up @@ -1892,7 +1892,7 @@ func (d *Decoder) parse(ctx context.Context, bytes []byte) (*ast.File, error) {
if err != nil {
return nil, err
}
if v != nil {
if v != nil || (doc.Body != nil && doc.Body.Type() == ast.NullType) {
Copy link

Copilot AI May 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider extracting the null-check logic into a helper function or clearly documenting the rationale inline to improve the readability and maintainability of the code.

Copilot uses AI. Check for mistakes.
normalizedFile.Docs = append(normalizedFile.Docs, doc)
cm := CommentMap{}
maps.Copy(cm, d.toCommentMap)
Expand Down
Loading