Skip to content

language-server: avoid noisy errors for expected git check-ignore exits#237

Merged
AhmmedSamier merged 1 commit intomasterfrom
codex/review-language-server-code-and-benchmarks
Feb 28, 2026
Merged

language-server: avoid noisy errors for expected git check-ignore exits#237
AhmmedSamier merged 1 commit intomasterfrom
codex/review-language-server-code-and-benchmarks

Conversation

@AhmmedSamier
Copy link
Owner

Motivation

  • git check-ignore can exit with code 1 to indicate "no matches", but the indexer treated any non-zero exit as an error which produced noisy console.error output during incremental/batch indexing and benchmarks.

Description

  • Suppress console.error for git check-ignore when the exit code is 1 while preserving error logs for other failures in WorkspaceIndexer.processGitCheckBatch (language-server/src/core/workspace-indexer.ts).
  • Add a small helper WorkspaceIndexer.getGitExitCode to reliably extract a git exit code from both structured error objects and error messages.
  • Continue to resolve all queued git-check promises as non-ignored so indexing proceeds deterministically when git check-ignore returns no matches.

Testing

  • Ran unit tests with cd language-server && bun test src/core/workspace-indexer.test.ts, and all tests passed (9 pass, 0 fail).
  • Executed the incremental benchmark with cd language-server && bun run benchmarks/incremental.bench.ts, which completed and showed expected timings while reducing noisy check-ignore error messages for exit code 1 (bench output recorded).
  • Verified the change only affects logging behavior around check-ignore handling and does not alter how checks resolve during indexing.

Codex Task

@AhmmedSamier AhmmedSamier merged commit 8ef491d into master Feb 28, 2026
1 check passed
@AhmmedSamier AhmmedSamier deleted the codex/review-language-server-code-and-benchmarks branch February 28, 2026 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant