Repository navigation
chore: ignore Knip export findings for test-only consumers - #202
Open
DevJoaoLopes wants to merge 1 commit into
Open
DevJoaoLopes wants to merge 1 commit into
DevJoaoLopes wants to merge 1 commit into
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ignoreIssuesentries toknip.json: issue typeexportsonly, for the 10 files whose remaining production findings are exports imported only by regression tests.docs/knip.md: file, exports, consuming test, and when to remove it.Refs #147. Follows #196 and #197.
This is the production-mode exports stage only. No source or test files change. Each of these exports is used by its own module and exported so a test can call it directly; default mode already counts the test imports, production mode does not. Deleting or un-exporting them would drop regression coverage, which #147 rules out.
Entries
src/browser/security.tsisPublicAddresstests/security.test.tssrc/client/SpaceLibrary.tsxpageExcerpttests/library.test.tssrc/client/editor/markdown.tsmarkdownManagertests/markdown.test.tssrc/client/theme.tsresolveThemetests/dark-theme.test.tssrc/server/connection-store.tsINTERRUPTED_ACTION_THRESHOLD_MStests/connections.test.tssrc/server/connections.tsexposedTools,normalizeResulttests/connections.test.tssrc/server/headless.tscurrentTurnTexttests/headless.test.tssrc/server/parallel.tssourcesFromResulttests/parallel.test.tssrc/server/research.tsrequestedUrlstests/research.test.tssrc/server/slack-channel.tsslackIdentity,slackHandlerstests/slack-channel.test.tsTrade-off:
ignoreIssuesapplies in both modes, so a new unused export in one of these 10 files would not be reported.docs/knip.mdsays so and asks reviewers to check new exports there by hand. No other issue types, files or directories are ignored, and the entries add no configuration hints in default mode. Knip 6.41.0 does not emit configuration hints in production mode.Knip
With #196, #197 and this PR, both
npm run knip -- --treat-config-hints-as-errorsandnpm run knip:production -- --treat-config-hints-as-errorsreport nothing and exit 0, checked in a fresh checkout. No configuration hints in default mode. Knip 6.41.0 does not emit configuration hints in production mode. Blocking CI is left for the final stage.Verification
Verified the exact commit in a fresh disposable checkout, without
.env,distornode_modules, on Node 24.22.1 / npm 11.21.1:npm cinpm run knip -- --no-exit-codeandnpm run knip:production -- --no-exit-codebefore buildnpm run knip -- --treat-config-hints-as-errors: exit 0npm run knip:production -- --treat-config-hints-as-errors: exit 0npm run check-formatnpm run lintnpm run typechecknpm test: 355 tests across 56 filesnpm run buildNot covered: no live application run was required for this configuration-and-docs change.