Skip to content

feat/add function resolver support - #40

Merged
abhisek merged 10 commits into
mainfrom
feat/add-function-resolver-support
Aug 6, 2025
Merged

feat/add function resolver support#40
abhisek merged 10 commits into
mainfrom
feat/add-function-resolver-support

Conversation

@abhisek

Copy link
Copy Markdown
Member
  • feat: Add support for function resolvers
  • feat: Add support for function resolvers

@abhisek
abhisek requested review from a team and CopilotAugust 6, 2025 12:35
@codecov-commenter

codecov-commenter commented Aug 6, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 62.02805% with 352 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.88%. Comparing base (2d32b8d) to head (cd63a55).

Files with missing linesPatch %Lines
lang/javascript_resolvers.go64.52%83 Missing and 22 partials ⚠️
core/ast/function_decl.go0.00%75 Missing ⚠️
lang/java_resolvers.go69.08%50 Missing and 14 partials ⚠️
lang/go_resolvers.go68.94%39 Missing and 20 partials ⚠️
lang/python_resolvers.go79.13%20 Missing and 9 partials ⚠️
core/ast/node.go0.00%20 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@## main #40 +/- ##
==========================================
+ Coverage 56.84% 57.88% +1.04% 
==========================================
Files 46 47 +1 Lines 3661 4578 +917 ==========================================
+ Hits 2081 2650 +569 - Misses 1421 1705 +284 - Partials 159 223 +64 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This comment was marked as outdated.

Comment threadcore/ast/function_decl.go
@abhisek
abhisek requested a review from CopilotAugust 6, 2025 14:58

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

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 adds comprehensive function resolver support to the codebase, enabling the parsing and extraction of function declarations from multiple programming languages including Python, JavaScript, Java, and Go. The implementation introduces a unified FunctionDeclarationNode AST representation and language-specific resolvers that leverage Tree-Sitter queries to extract function metadata.

Key changes:

  • Adds ResolveFunctions method to the LanguageResolvers interface
  • Implements function resolvers for Python, JavaScript, Java, and Go languages
  • Creates comprehensive test fixtures and test cases for each language
  • Introduces enhanced AST node structure with position tracking capabilities

Reviewed Changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.

Show a summary per file
FileDescription
core/language.goAdds ResolveFunctions method to LanguageResolvers interface
core/ast/function_decl.goComprehensive FunctionDeclarationNode implementation with metadata support
core/ast/node.goAdds node position tracking utilities
lang/python_resolvers.goPython-specific function resolver implementation with Tree-Sitter queries
lang/javascript_resolvers.goJavaScript function resolver supporting various function types
lang/java_resolvers.goJava function resolver with access modifier and annotation support
lang/go_resolvers.goGo function resolver with method and receiver type extraction
Test filesComprehensive test suites for all language resolvers
Fixture filesTest data for Python, JavaScript, Java, and Go function parsing
docs/grammar.mdDocumentation linking to Tree-Sitter grammar references
Comments suppressed due to low confidence (3)

lang/go_resolvers_test.go:94

  • The variable name 'l' is ambiguous and not used. Consider removing this line or renaming the variable to be more descriptive like 'goLanguage' to match the pattern used elsewhere in the test.
 l, err := lang.NewGoLanguage()

Comment threadlang/go_resolvers.go Outdated
@abhisek
abhisek merged commit 91cb669 into mainAug 6, 2025
5 checks passed
@abhisek
abhisek deleted the feat/add-function-resolver-support branch August 6, 2025 16:25
Sign up for freeto 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.

5 participants

@abhisek@codecov-commenter@KunalSin9h@Sahilb315