Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions knip-baseline.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"count": 78,
"comment": "Dead-code ratchet baseline for issue #282 (cairn MVG gate #6). This is the knip issue count at the time the gate was introduced — pre-existing unused exports/types that are out of scope to remove in the gate PR. The ratchet (scripts/check-deadcode-ratchet.mjs) fails the build only if the count rises above this number. When dead code is removed and the count drops, lower this value in the same PR to lock in the gain. Per-category false positives belong in knip.json, not here."
"count": 85,
"comment": "Dead-code ratchet baseline for issue #282 (cairn MVG gate #6). The ratchet (scripts/check-deadcode-ratchet.mjs) reads only `count` and fails the build only if the current knip issue count rises above it; when dead code is removed and the count drops, lower this value in the same PR to lock in the gain. Suppress false positives in knip.json — via ignore/ignoreDependencies, or by declaring the workspace so its entry points are reachable — never absorb them into this baseline. The remaining 85 are pre-existing unused exports and types, tracked in #682."
Comment thread
isadeks marked this conversation as resolved.
}
6 changes: 5 additions & 1 deletion knip.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@
"docs": {
"entry": ["astro.config.mjs", "src/content.config.ts", "src/components/**/*.astro"],
"project": ["src/**/*.{astro,ts,tsx}"],
"ignoreDependencies": ["@astrojs/check", "remark-gfm", "@pagefind/default-ui", "jest"]
"ignoreDependencies": ["@astrojs/check", "markdown-link-check", "remark-gfm", "@pagefind/default-ui", "jest"]
Comment thread
isadeks marked this conversation as resolved.
},
"integrations/jira-forge-app": {
"entry": ["src/index.js!", "test/**/*.test.js"],
Comment thread
isadeks marked this conversation as resolved.
"project": ["src/**/*.js!", "test/**/*.js"]
Comment thread
isadeks marked this conversation as resolved.
}
}
}
1 change: 0 additions & 1 deletion package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions scripts/check-deadcode-ratchet.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,13 @@ const baselinePath = join(repoRoot, 'knip-baseline.json');
// array-of-arrays (one inner array per duplicate group), so its `.length`
// counts groups, which is the unit we ratchet on.
//
// This is the complete set of countable keys for the installed knip (6.20.0,
// pinned exactly). There is no `nsExports`/`nsTypes`/`classMembers` in this
// schema — namespace/enum members surface as `namespaceMembers`/`enumMembers`.
// This is the complete set of countable keys for the installed knip (6.23.0,
Comment thread
isadeks marked this conversation as resolved.
Comment thread
isadeks marked this conversation as resolved.
// pinned exactly). `nsExports`/`nsTypes` also exist in this schema but are
// default-excluded by knip, so they never appear in our JSON; add them here if
// that ever changes — otherwise the reporter would emit findings COUNTED_KEYS
// silently drops, an under-count in the one direction this gate exists to
// catch. There is no `classMembers` — namespace/enum members surface as
// `namespaceMembers`/`enumMembers`.
// If knip is bumped, re-derive this list from its JSON (the countIssues guard
// below will fail loud if the top-level shape changes).
const COUNTED_KEYS = [
Expand Down
Loading