Repository navigation
fix(git-diff): drop the dead eslint.rc config pattern and test every entry - #106
Conversation
…entry /^eslint\.rc/ matched no file ESLint reads; the legacy .eslintrc* files are already covered by /^\.eslint/. A table test now pairs each CONFIG_PATTERNS entry with one real file name, so the next dead pattern is caught too. Fixes DiffCI#100 Signed-off-by: sarankumar1325 <[email protected]>
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 022b2e4319
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "yarn.lock", | ||
| "pnpm-lock.yaml", | ||
| "bun.lockb", | ||
| "npm-lock.json", |
There was a problem hiding this comment.
Use an npm-supported name for this fixture
npm-lock.json is not a filename npm reads; this repository recognizes package-lock.json and npm-shrinkwrap.json as npm lockfiles (src/repo/lockfiles.ts:10). This fixture therefore makes /^(npm|pnpm|yarn)-lock\./ pass using a fabricated npm filename, so the new guard against dead config-pattern entries still blesses the unsupported npm-lock arm. Remove or rework that arm, or validate it with an actually supported filename.
Useful? React with 👍 / 👎.
/^(npm|pnpm|yarn)-lock\./ matched no lockfile npm or Yarn writes, and pnpm-lock.yaml already has its own entry. The table test used a made-up npm-lock.json to keep it alive; it now checks that name matches nothing. Signed-off-by: sarankumar1325 <[email protected]>
Signed-off-by: adityankale190895 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: adityankale190895 <[email protected]>
Fixes #100
CONFIG_PATTERNSinsrc/git/git-diff.tscontained/^eslint\.rc/, which matches a file name ESLint never reads. The legacy config files are.eslintrc,.eslintrc.jsonand so on, and the next entry,/^\.eslint/, already covers them. This PR removes the dead entry. It also removes/^(npm|pnpm|yarn)-lock\./, which was dead in the same way: npm and Yarn write nonpm-lock.*oryarn-lock.*file, andpnpm-lock.yamlalready has its own entry. Fallback behaviour for real files does not change.To make it testable,
CONFIG_PATTERNSis now exported, with a comment saying the export is for tests.Tests
New file
tests/repo/config-patterns.test.ts:next.config.mjs,.eslintrc.json,Dockerfile.dev,uv.lock), and checks that every entry matches its example.CONFIG_PATTERNS. That way, a new entry without an example fails, and so does an entry that stops matching anything.eslint.rc,npm-lock.jsonoryarn-lock.yaml. These checks fail without the removals.npm testgives 846 passed.npm run typecheckis clean.