mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-05 08:07:05 +00:00
knip was producing garbage locally and was never wired into CI, so nobody trusted it. Two structural problems: it silently degrades when deps are missing (a partial worktree install flagged all 436 test files as unused), and its config had blind spots that surfaced as false positives. Fixes so a knip run means something: - Register every playwright config (serverRootPath + migration variants), not just the main one. serverRootPath.config.ts is invoked via --config in test_server_root_path.yml, which knip can't see; it was falsely flagged as an unused file - Treat src/components/ui/** as entry points. These are shadcn design-system primitives, intentionally part of the palette before every one is consumed; knip was flagging not-yet-used ones (e.g. select.tsx) as dead files and their sub-exports as unused. Marking the directory as the design-system surface is the correct fix, not deleting components someone is about to use - Declare @ant-design/icons as a direct dependency. It was imported in ~198 files but only resolved via antd hoisting, so every one showed up as an "unlisted dependency" - Add an explicit vitest plugin block so test-file classification no longer rides on auto-detection - Stage severities via rules: gate the now-clean categories (files, dependencies, unlisted, unresolved) as errors and keep exports/types/ duplicates as warnings, so CI enforces what's at zero today while the remaining findings ratchet down in follow-ups - Run npm run knip in the frontend-lint CI job, which installs with npm ci so it never sees a partial tree knip now exits 0 with the gated categories clean |
||
|---|---|---|
| .. | ||
| actions/detect-backend-changes | ||
| codeql | ||
| ISSUE_TEMPLATE | ||
| observatory | ||
| screenshots | ||
| scripts | ||
| workflows | ||
| dependabot.yaml | ||
| deploy-on-aws.png | ||
| deploy-on-gcp.png | ||
| deploy-to-aws.png | ||
| FUNDING.yml | ||
| pull_request_template.md | ||
| template.yaml | ||