-
Notifications
You must be signed in to change notification settings - Fork 10
refactor: create core package with foundation types #372
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
This PR creates the foundational type system for the callgraph refactoring by extracting pure data structures with zero internal dependencies into a new core package. Changes: - Created core/ package with foundation types - Moved CallGraph, CallSite, Location, Argument types - Moved Statement, DefUseChain, TaintSummary types - Moved FrameworkDefinition and StdlibRegistry types - Added type aliases in original files for backward compatibility - Moved and updated test files to core/ package - All tests passing (callgraph: 87.3%, core: 74.1% coverage) Related: PR #1 of callgraph refactoring stack Spec: https://github.com/shivasurya/cpf_plans/pr-details/refactor/pr-01-foundation-types.md 🤖 Generated with Claude Code Co-Authored-By: Claude <[email protected]>
SafeDep Report SummaryNo dependency changes detected. Nothing to scan. This report is generated by SafeDep Github App |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #372 +/- ##
==========================================
+ Coverage 79.81% 80.07% +0.26%
==========================================
Files 64 69 +5
Lines 6802 6836 +34
==========================================
+ Hits 5429 5474 +45
+ Misses 1147 1139 -8
+ Partials 226 223 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Added missing tests for: - BuildDefUseChains function with various scenarios - ComputeStats method with edge cases - All StdlibRegistry methods (GetModule, HasModule, GetFunction, etc.) Coverage improved from 74.1% to 100.0% 🤖 Generated with Claude Code Co-Authored-By: Claude <[email protected]>
✅ Coverage ImprovementUpdated the PR to address the coverage concerns: Before
After
Changes
Test ResultsThe patch coverage should now be significantly improved! |
Add t.Helper() calls to test helper functions and simplify lambda expression to comply with golangci-lint requirements (thelper and unlambda rules). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
e6fc182 to
7a38aa9
Compare
Merge activity
|

Overview
This PR creates the foundational type system for the callgraph refactoring by extracting pure data structures with zero internal dependencies into a new
corepackage. These types form the contract that all other packages will depend on.Status: ✅ Ready for review
Estimated Effort: 2-3 days
Risk Level: ⬜ Low (pure types, no logic changes)
Changes
New Core Package Structure
Type Aliases for Backward Compatibility
All original files updated with type aliases and deprecation notices:
types.go- Aliased CallGraph, CallSite, Location, etc.statement.go- Aliased Statement, DefUseChain, DefUseStatstaint_summary.go- Aliased TaintInfo, TaintSummaryframeworks.go- Aliased FrameworkDefinitionattribute_registry.go- Aliased ClassAttribute, ClassAttributesstdlib_registry.go- Aliased all stdlib typestype_inference.go- Aliased TypeInfoTest Results
✅ Build:
gradle buildGo- SUCCESSFUL✅ Tests:
gradle testGo- ALL PASSING✅ Lint:
gradle lintGo- 0 ISSUES✅ Coverage: callgraph 87.3%, core 74.1%
Key Features
Related
Checklist
gradle testGo)gradle lintGo)🤖 Generated with Claude Code
Co-Authored-By: Claude [email protected]