Problem
limits/limits.go has no test file. AdaptiveDepth is a hub file (imported by 3 packages) and its threshold logic determines tree depth for all repos.
Suggested fix
Add a table-driven test in limits/limits_test.go covering:
- Unknown file count (<=0) → depth 2
- Small repo (e.g. 100 files) → depth 4
- Medium repo (e.g. 3000 files) → depth 3
- Large repo (e.g. 6000 files) → depth 2
- Boundary values at 2000 and 5000
Quick win for confidence in a high-impact function.
Problem
limits/limits.gohas no test file.AdaptiveDepthis a hub file (imported by 3 packages) and its threshold logic determines tree depth for all repos.Suggested fix
Add a table-driven test in
limits/limits_test.gocovering:Quick win for confidence in a high-impact function.