-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Overview
Build a GitHub Action that uses Supermodel's call graph API to find unreachable functions (dead code) in a codebase.
Core Features
- Create zip archive of repository (respecting .gitignore)
- Call Supermodel
/v1/graphs/callendpoint to get call graph - Analyze graph to find functions with zero incoming calls
- Filter out false positives:
- Entry points (main, exported functions)
- Test files
- User-specified ignore patterns
- Post findings as PR comment (with file links)
- Set action outputs (
dead-code-count,dead-code-json) - Optional: fail action if dead code found
Stretch Goals
- Auto-generate cleanup PR removing dead code
- Track dead code trends over time
- Integrate with GitHub code scanning (SARIF output)
Technical Notes
- Use
@supermodel/typescript-sdkfor API calls - Use
@actions/coreand@actions/githubfor action scaffolding - Build with
@vercel/nccfor single-file distribution
Reference
Metadata
Metadata
Assignees
Labels
No labels