Skip to content

Commit b8433ca

Browse files
committed
ci(dx): 补两处台账 note 与死代码清理 —— 根条目会随 showcase 动,measureDebt 的 || 分支不可达
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01559M8FVm6W6vDLABL3jvdW
1 parent c639e0e commit b8433ca

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

‎scripts/check-type-check-coverage.mjs‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,11 @@ const DEBT = {
272272
+ 'drifts differently from a package: the root program is `scripts/` and the top-level configs '
273273
+ '(everything outside packages/apps/examples), so it grows whenever the repo gains a script -- '
274274
+ 'scripts/check-test-typecheck.mts alone accounts for 29 of the 80, and the analytics-reconcile '
275-
+ 'tree for 32. Almost all of it is one missing `types:["node"]`, not 80 defects.',
275+
+ 'tree for 32. Almost all of it is one missing `types:["node"]`, not 80 defects. One wrinkle to '
276+
+ 'know before reading this number as "the root scripts": `exclude` only drops files from the '
277+
+ 'initial walk, so example sources IMPORTED by a script are still pulled into the program -- 4 of '
278+
+ 'the 80 are reported in examples/app-showcase/src, and this entry therefore moves with the '
279+
+ 'showcase as well as with scripts/.',
276280
},
277281
};
278282

@@ -890,7 +894,9 @@ function tscErrorCount(project) {
890894
* the package up.
891895
*/
892896
function measureDebt(dir) {
893-
return tscErrorCount(posix.join(dir, 'tsconfig.json') || 'tsconfig.json');
897+
// `dir` is '' for the workspace root, and posix.join('', 'tsconfig.json')
898+
// is already 'tsconfig.json' -- no special case needed.
899+
return tscErrorCount(posix.join(dir, 'tsconfig.json'));
894900
}
895901

896902
/**

0 commit comments

Comments
 (0)