Skip to content

feat/add function resolver support#40

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

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

Conversation

@abhisek
Copy link
Member

@abhisek abhisek commented Aug 6, 2025

  • feat: Add support for function resolvers
  • feat: Add support for function resolvers

@abhisek abhisek requested review from a team and Copilot August 6, 2025 12:35
@codecov-commenter
Copy link

codecov-commenter commented Aug 6, 2025

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 lines Patch % Lines
lang/javascript_resolvers.go 64.52% 83 Missing and 22 partials ⚠️
core/ast/function_decl.go 0.00% 75 Missing ⚠️
lang/java_resolvers.go 69.08% 50 Missing and 14 partials ⚠️
lang/go_resolvers.go 68.94% 39 Missing and 20 partials ⚠️
lang/python_resolvers.go 79.13% 20 Missing and 9 partials ⚠️
core/ast/node.go 0.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.

@abhisek abhisek requested a review from Copilot August 6, 2025 14:58
Copy link
Contributor

Copilot AI left a 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 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
File Description
core/language.go Adds ResolveFunctions method to LanguageResolvers interface
core/ast/function_decl.go Comprehensive FunctionDeclarationNode implementation with metadata support
core/ast/node.go Adds node position tracking utilities
lang/python_resolvers.go Python-specific function resolver implementation with Tree-Sitter queries
lang/javascript_resolvers.go JavaScript function resolver supporting various function types
lang/java_resolvers.go Java function resolver with access modifier and annotation support
lang/go_resolvers.go Go function resolver with method and receiver type extraction
Test files Comprehensive test suites for all language resolvers
Fixture files Test data for Python, JavaScript, Java, and Go function parsing
docs/grammar.md Documentation 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()

@abhisek abhisek merged commit 91cb669 into main Aug 6, 2025
5 checks passed
@abhisek abhisek deleted the feat/add-function-resolver-support branch August 6, 2025 16:25
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.

5 participants