Feat: Add .gitnexusignore support for custom path exclusions#86
Closed
ajmeese7 wants to merge 4 commits into
Closed
Feat: Add .gitnexusignore support for custom path exclusions#86ajmeese7 wants to merge 4 commits into
.gitnexusignore support for custom path exclusions#86ajmeese7 wants to merge 4 commits into
Conversation
Users can now place a .gitnexusignore file at the repo root to exclude paths from indexing using standard gitignore syntax. This is useful for vendored bundles, generated files, or other paths not covered by the built-in defaults. Adds the `ignore` npm package for gitignore-spec pattern matching.
The variable was declared twice at module scope (line 19 and line 679), causing TypeScript and esbuild to fail compilation.
|
@ajmeese7 is attempting to deploy a commit to the NexusCore Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
|
Hey @ajmeese7! I opened PR #301 which includes |
Author
|
Guess it was implemented by someone else. |
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.
Problem
GitNexus has no way to exclude custom paths from indexing. All filtering is hardcoded in
ignore-service.ts. Projects containing vendored bundles, generated files, or other artifacts not covered by the built-in defaults end up polluting the knowledge graph with noise — minified symbols, junk call chains, and misleading community detection.For example, a project with a vendored QuestDB frontend bundle (
qdb.43f98.js) gets minified class names likeXr,Je,Ynindexed as real symbols, consuming process slots and degrading search relevance.Solution
Users can now place a
.gitnexusignorefile at the repo root using standard gitignore syntax:On the next
gitnexus analyze, matched paths are excluded from indexing. If no.gitnexusignorefile exists, behavior is identical to before.Implementation
ignorenpm package (24KB, zero deps) for full gitignore-spec pattern matchingloadCustomIgnore(repoPath)inignore-service.tsreads the file and returns a predicate, ornullif absentwalkRepositoryPaths()infilesystem-walker.tsaccepts an optional custom filter applied alongside the existing hardcoded defaultsrunPipelineFromRepo()inpipeline.tsloads the ignore file at pipeline start and passes it to the walker.gitnexusignoreis additiveAdditional fix
Fixes a pre-existing build error: duplicate
let ftsLoadeddeclaration inkuzu-adapter.ts(lines 19 and 679) that caused bothtscandtsx/esbuildto fail.Testing
Tested on a real 1,730-file monorepo (Go/Python/Rust/TypeScript). With a
.gitnexusignoreexcluding one vendored bundle directory:The large edge reduction (-1,135) reflects removal of noisy relationships from minified code. The cluster count increased because community detection found more coherent groupings without the noise.
Verified via Cypher query that zero files from the ignored path remain in the index.