Skip to content

feat: Add support for JS callgraph processing#44

Merged
abhisek merged 7 commits intomainfrom
feat/add-callgraph-javascript
Oct 5, 2025
Merged

feat: Add support for JS callgraph processing#44
abhisek merged 7 commits intomainfrom
feat/add-callgraph-javascript

Conversation

@abhisek
Copy link
Member

@abhisek abhisek commented Oct 5, 2025

  • feat: Add support for Javascript callgraph
  • fix: Handle arrow and module funcs in JS

@abhisek abhisek requested review from a team and Copilot October 5, 2025 11:35
@safedep
Copy link

safedep bot commented Oct 5, 2025

SafeDep Report Summary

Green Malicious Packages Badge Green Vulnerable Packages Badge Green Risky License Badge

Package Details
Package Malware Vulnerability Risky License Report

This report is generated by SafeDep Github App.

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 JavaScript callgraph processing support to the existing callgraph plugin. It extends the system to handle JavaScript-specific constructs while reusing the common processing infrastructure.

Key changes:

  • Adds JavaScript language support with specialized processors for JS-specific node types
  • Refactors Go-specific processors to be language-agnostic wrappers that route to appropriate language handlers
  • Implements module-level call tracking for JavaScript through enhanced expression statement processing

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
plugin/callgraph/plugin.go Adds JavaScript to supported languages list
plugin/callgraph/processors.go Main implementation adding JS processors and refactoring language-specific routing
plugin/callgraph/plugin_test.go Comprehensive test case for JavaScript callgraph functionality
plugin/callgraph/fixtures/testJavascript.js Test fixture demonstrating various JavaScript constructs
.tool-versions Updates Go version from 1.24.3 to 1.25.1

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codecov-commenter
Copy link

codecov-commenter commented Oct 5, 2025

Codecov Report

❌ Patch coverage is 66.94561% with 158 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.18%. Comparing base (6ce4992) to head (55bf15c).

Files with missing lines Patch % Lines
plugin/callgraph/processors.go 70.61% 84 Missing and 25 partials ⚠️
plugin/callgraph/callgraph.go 31.25% 25 Missing and 8 partials ⚠️
plugin/callgraph/assignment.go 85.36% 5 Missing and 1 partial ⚠️
plugin/callgraph/signatures.go 33.33% 4 Missing and 2 partials ⚠️
plugin/callgraph/plugin.go 55.55% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #44      +/-   ##
==========================================
+ Coverage   57.40%   60.18%   +2.77%     
==========================================
  Files          47       47              
  Lines        4843     5289     +446     
==========================================
+ Hits         2780     3183     +403     
- Misses       1824     1827       +3     
- Partials      239      279      +40     

☔ 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.

@abhisek abhisek requested a review from Copilot October 5, 2025 17:32
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

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@abhisek abhisek merged commit d5457fc into main Oct 5, 2025
6 checks passed
@abhisek abhisek deleted the feat/add-callgraph-javascript branch October 5, 2025 19:12
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.

4 participants