Repository navigation
Replace the knip check with fallow: 7x to 20x faster #31706
BartWaardenburg
started this conversation in
Ideas
Replies: 1 comment
|
sure send pr! |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi T3 team. I use T3 Code every day and I love it. I do not want to be that person with a shameless plug for their own tool, so I will keep this short and let the numbers talk.
I maintain fallow, a static analyzer for JS and TS written in Rust, and I think your CI can benefit from it. I ran it next to knip 6.34.0 on
main(8b44f42), with the same config.fallow migrateconvertedknip.jsoncand kept the workspace scopes and the production entries.Wall-clock time on the full repository, on an Apple M5:
--productionThe knip numbers include
scripts/knip-schemas.ts. Without that preprocessor, knip reports 762 unused exports instead of 15. Fallow does the same Effect Schema filtering itself with one config key,"effect": { "schemaExportsAsTypes": true }. So the preprocessor and its TypeScript program build are not needed.Findings, compared with knip:
@effect/language-service,expo-system-uiandxcode. Fallow does not report thegi:andresource:URLs of the GNOME extension or the Metro aliases of the@t3tools/mobile-*modules.@clerk/sharedin theoverridesofpnpm-workspace.yaml. Fallow reports none..cjsfiles that the desktop build creates. Fallow reports one real one:workspace-tabs-state.test.tsmocks../pull-requests/PullRequestFilterMenuContext, and that module no longer exists.gnome-extensions,hyprctlandtailscale. Fallow does not report system tools such asffmpeg,pgrepandssh-keygen.My proposal: replace
knip:checkin CI with fallow. A baseline file holds the current findings, so the job fails only when a PR adds a new one:Create the baseline once with
npx [email protected] dead-code --save-baseline fallow-baselines/dead-code.json.Other large projects already run it, for example:
pnpm check:fallowI can open a PR with the migrated config and the CI change. Or I can answer questions here first. Tell me which you prefer.
Fallow also finds duplicate code, complexity hotspots and import cycles (42 in this repository), if you want more than dead code later.
All reactions