Skip to content

fix(core): honor negated ignore patterns#401

Open
LiJzd wants to merge 1 commit into
zilliztech:masterfrom
LiJzd:codex/gitignore-negation-patterns
Open

fix(core): honor negated ignore patterns#401
LiJzd wants to merge 1 commit into
zilliztech:masterfrom
LiJzd:codex/gitignore-negation-patterns

Conversation

@LiJzd

@LiJzd LiJzd commented Jun 22, 2026

Copy link
Copy Markdown

Summary

  • support negated ignore patterns by applying ignore rules in order and letting the last matching rule win
  • apply the same behavior in initial indexing and file synchronization
  • add regression coverage for .gitignore patterns like wp-content/plugins/* followed by !wp-content/plugins/app

Closes #397

Validation

  • git diff --check
  • npx pnpm@10 install --frozen-lockfile
  • npx pnpm@10 --filter @zilliz/claude-context-core test -- context.ignore-patterns.test.ts --runInBand
  • npx pnpm@10 --filter @zilliz/claude-context-core typecheck
  • npx pnpm@10 --filter @zilliz/claude-context-core build

Notes

  • npx pnpm@10 --filter @zilliz/claude-context-core lint currently exits before linting because ESLint 9 cannot find an eslint.config.(js|mjs|cjs) file while the repo has .eslintrc.js.
  • Local Node is v25.2.1 while the repo declares Node >=20 and <24; the targeted tests, typecheck, and build still passed in this environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: .gitignore negation patterns (!pattern) not supported, causing tracked directories to be silently excluded from index

1 participant