feat(golang): Go type definitions parsing (PR-04)#523
Merged
Conversation
SafeDep Report SummaryNo dependency changes detected. Nothing to scan. This report is generated by SafeDep Github App |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #523 +/- ##
==========================================
+ Coverage 82.93% 82.97% +0.04%
==========================================
Files 125 126 +1
Lines 14540 14623 +83
==========================================
+ Hits 12059 12134 +75
- Misses 2027 2034 +7
- Partials 454 455 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This was referenced Feb 15, 2026
Owner
Author
This was referenced Feb 15, 2026
Owner
Author
Merge activity
|
Add TypeInfo extraction from Go type_declaration AST nodes, handling struct definitions with fields, interface definitions with methods, type aliases, and grouped declarations. Dispatcher creates CodeGraph nodes with correct types and SourceLocation byte ranges. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Verify that generic Go types (type Set[T comparable] struct{}) are
parsed correctly: name extracted, type params ignored, struct/interface/
alias kind detected. Covers single param, multiple params, generic
interface, generic slice alias, and unexported generic struct.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
f03617d to
e87e9c4
Compare
Code Pathfinder Security ScanNo security issues detected.
Powered by Code Pathfinder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Summary
TypeInfostruct andParseTypeDeclarationingraph/golang/types.goto extract type information from Gotype_declarationAST nodesExtractStructFields), interface definitions (with methods viaExtractInterfaceMethods), type aliases/named types, and grouped declarations (type ( A int; B string ))parseGoTypeDeclarationinparser_golang.gothat convertsTypeInfointograph.Nodewith correct types (struct_definition,interface,type_alias) andSourceLocationbyte rangestype_declarationstub inparser.goTest plan
go build ./...compiles without errorsgo vet ./...cleango test ./graph/...) — no regressionstypes_test.go: struct with fields, embedded types, empty struct, unexported struct, struct with tags, interfaces with methods, interfaces with embedded, unexported interface, named type, function type alias, slice type, true alias (=), unexported alias, grouped declarations, grouped mixed typesParseTypeDeclaration100% coverage,parseTypeAlias100% coverageparseTypeSpec87.5% coverage (remaining gap is defensive nil guard unreachable via tree-sitter)🤖 Generated with Claude Code