You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cora dead-code # List unreachable functions
cora dead-code --json # JSON output
cora dead-code --include-tests # Include test functions
cora dead-code --min-lines 5 # Filter functions shorter than 5 lines
cora dead-code --kind function # Filter by symbol kind
Implementation
Add DeadCode subcommand to src/commands/mod.rs
Create src/commands/dead_code.rs
Query: SELECT s.name, s.kind, s.file, s.line FROM symbols s LEFT JOIN call_graph cg ON cg.callee = s.name WHERE cg.id IS NULL AND s.kind IN (function, method)
SELECTs.name, s.kind, s.file, s.line, s.signatureFROM symbols s
LEFT JOIN call_graph cg ONcg.callee=s.nameANDcg.project_id=s.project_idWHEREcg.id IS NULLANDs.kindIN (function, method, procedure)
ANDs.name NOT IN (main, new, drop, default, fmt, clone, from)
ORDER BYs.file, s.line
Acceptance
cora dead-code runs without error on cora-code repo
Activity