Make .blarignore additive to .gitignore for automatic exclusion#7
Merged
Make .blarignore additive to .gitignore for automatic exclusion#7
Conversation
- Add pathspec dependency for proper gitignore pattern parsing - Create GitignoreManager class to handle .gitignore file parsing - Modify ProjectFilesIterator to support gitignore integration - Update GraphBuilder API to expose gitignore configuration - Add comprehensive test suite for gitignore functionality - Update documentation with gitignore feature details This change ensures that files ignored by git (like node_modules, .env, build artifacts) are automatically excluded from Blarify's graph analysis. The .blarignore file now adds additional exclusions on top of .gitignore patterns, reducing duplication and maintenance burden. Fixes #6
9 tasks
rysweet
pushed a commit
that referenced
this pull request
Aug 3, 2025
fix: add parent parameter and node_repr_for_identifier property to No…
rysweet
added a commit
that referenced
this pull request
Aug 3, 2025
Make .blarignore additive to .gitignore for automatic exclusion
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
This PR implements automatic
.gitignoresupport in Blarify, making.blarignoreadditive to.gitignorepatterns. This ensures that files ignored by git (likenode_modules,.env, build artifacts) are automatically excluded from the graph analysis.Changes
pathspecdependency for proper gitignore pattern parsingGitignoreManagerclass to handle .gitignore file parsing and cachingProjectFilesIteratorto support gitignore integrationGraphBuilderAPI to expose gitignore configuration optionsBenefits
How it works
.gitignorefiles in the project are automatically found and parsed.blarignoreadds additional exclusions on top of.gitignoreuse_gitignore=False*Note: Complex negation patterns (e.g.,
\!build/keep/) are not fully supported yet and will be addressed in a follow-up PR.Testing
.gitignoreare excluded.blarignorepatterns work additively.gitignorefiles are respectedExample Usage
Fixes #6