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
The cap is applied after the decorator filter, so excluded rows are silently backfilled by the next ones in path order. The returned count is 50 either way.
Measured on a 2,861-file Android codebase (3,683 files indexed, 15,859 Function nodes):
A filter that genuinely removes 6,086 false positives — @Test, Hilt @Provides/@Binds, Room @TypeConverter — presents as doing nothing. And the 50 you do see are whichever functions sort first by path, so they cluster in one or two files rather than sampling the codebase.
Three independent improvements:
Return the total alongside the page — {"potentially_unused_functions": [...], "total": 7141}. The count is the most useful number and is currently unobtainable.
Make the limit a parameter with 50 as the default, rather than hard-coded. Note Fixes #1542: Parameterize relationship query limits, add truncation flags & CLI support #1594 has since landed TOOL_RESULT_LIMITS plumbing with truncated/result_limit flags for the relationship queries — find_dead_code should use the same mechanism (find_dead_code already has a built-in default of 50 in utils/tool_limits.py).
Order so it samples rather than clusters, or at minimum document that the result is a path-ordered prefix.
This was invisible until the is_dependency bug (#1595, report 7) was fixed, because the tool returned [] unconditionally.
Split out of #1595 (report 9 of 9) — filed by @rrodriguesNutrium, credit to them.
code_finder.py:895-896:The cap is applied after the decorator filter, so excluded rows are silently backfilled by the next ones in path order. The returned count is 50 either way.
Measured on a 2,861-file Android codebase (3,683 files indexed, 15,859
Functionnodes):A filter that genuinely removes 6,086 false positives —
@Test, Hilt@Provides/@Binds, Room@TypeConverter— presents as doing nothing. And the 50 you do see are whichever functions sort first by path, so they cluster in one or two files rather than sampling the codebase.Three independent improvements:
{"potentially_unused_functions": [...], "total": 7141}. The count is the most useful number and is currently unobtainable.TOOL_RESULT_LIMITSplumbing withtruncated/result_limitflags for the relationship queries —find_dead_codeshould use the same mechanism (find_dead_codealready has a built-in default of 50 inutils/tool_limits.py).This was invisible until the
is_dependencybug (#1595, report 7) was fixed, because the tool returned[]unconditionally.