-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add Go language support and enhance metrics analysis #113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: André Silva <[email protected]>
… factory Signed-off-by: André Silva <[email protected]>
…zer factory Signed-off-by: André Silva <[email protected]>
…ests Signed-off-by: André Silva <[email protected]>
…nd Go Signed-off-by: André Silva <[email protected]>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #113 +/- ##
==========================================
+ Coverage 50.28% 59.17% +8.88%
==========================================
Files 5 6 +1
Lines 1392 1984 +592
Branches 82 143 +61
==========================================
+ Hits 700 1174 +474
- Misses 692 810 +118 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: André Silva <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces comprehensive Go language support to the code-complexity extension, enhancing its multi-language capabilities. The implementation follows the established patterns from the existing C# analyzer and includes extensive test coverage.
Key changes:
- Implements a complete Go cognitive complexity analyzer using tree-sitter-go
- Adds comprehensive test coverage with 18+ test suites covering control flow, logical operators, methods, closures, and edge cases
- Updates documentation and adds a detailed Go sample file demonstrating various complexity patterns
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/metricsAnalyzer/languages/goAnalyzer.ts |
New Go cognitive complexity analyzer implementing control flow analysis, logical operators, recover calls, closures, and jump statements with detailed documentation |
src/metricsAnalyzer/metricsAnalyzerFactory.ts |
Integrates Go analyzer into factory with proper line/column normalization from 0-based to 1-based indexing |
src/test/metricsAnalyzer/languages/goAnalyzer.test.ts |
Comprehensive unit tests (880+ lines) covering all Go language features including methods, goroutines, channels, and edge cases |
src/test/metricsAnalyzer/metricsAnalyzerFactory.test.ts |
Integration tests for Go language including line normalization validation and real-world code examples |
package.json |
Adds Go activation event, keywords, and tree-sitter-go dependency |
package-lock.json |
Locks tree-sitter-go version 0.21.2 with integrity hash |
samples/Test.go |
Comprehensive Go sample file (261 lines) demonstrating various complexity patterns with inline documentation |
README.md |
Updates feature list and adds supported languages table showing C# and Go support |
.github/copilot-instructions.md |
Updates internal documentation to reflect Go support and multi-language architecture |
Signed-off-by: André Silva <[email protected]>
…d test assertions for Go metrics analyzer Signed-off-by: André Silva <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 10 out of 11 changed files in this pull request and generated 9 comments.
|
@copilot open a new pull request to apply changes based on the comments in this thread |
…pes, update docs (#116) Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: askpt <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 10 out of 12 changed files in this pull request and generated 3 comments.
Fixes #33 Signed-off-by: André Silva <[email protected]>
|
@copilot open a new pull request to apply changes based on the comments in this thread |
…ctory (#118) Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: askpt <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 10 out of 12 changed files in this pull request and generated no new comments.
Introduce support for the Go programming language, including a cognitive complexity analyzer and associated tests. Update documentation to reflect multi-language capabilities, ensuring clarity for users. Clean up code for improved readability in Go metrics tests.
Closes #33