chore: refactor knip CI to fail on issues and simplify comment format#2003
chore: refactor knip CI to fail on issues and simplify comment format#2003brandon-pereira wants to merge 3 commits intomainfrom
Conversation
- Remove main branch comparison (no more table/diff) - Only comment when issues are found; delete stale comments when clean - Refactored comment to a flat per-category breakdown of issues - Job fails via core.setFailed() when knip finds issues - Removed excluded categories (enumMembers, duplicates) from workflow - Added test fixtures (unused export + unused file) to verify workflow
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The knip JSON reporter nests unused files under issues[].files[] (not a top-level files array). This fixes the parsing so unused files are correctly reported in the PR comment.
E2E Test Results✅ All tests passed • 103 passed • 3 skipped • 980s
Tests ran across 4 shards in parallel. |
PR Review
|
Summary
Refactors the Knip CI workflow to be simpler and stricter:
mainor runs knip on it. The workflow only analyzes the PR branch.core.setFailed()is called when knip detects issues, so the check goes red.enumMembersandduplicatesare excluded inknip.json, so they were removed from the workflow.How to test locally or on Vercel
Unused filesandUnused exportssections with the test items.KNIP_TEST_UNUSED_EXPORTindefaults.tsandknipTestUnusedFile.ts) should be removed before merge.References