Add .gitignore support for file processing - #13
Merged
Conversation
Introduces automatic .gitignore support using the pathspec library. By default, files and directories matching .gitignore patterns are excluded from processing, with an option (--no-gitignore) to disable this behavior. Updates CLI, configuration, documentation, and adds tests to verify correct handling of .gitignore patterns.
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.
This pull request adds automatic support for
.gitignorefiles to the project, ensuring that files and directories ignored by Git are also excluded from processing by default. Users can override this behavior with a new command-line option. The implementation includes updates to the CLI, core logic, documentation, and tests..gitignore support and configuration:
.gitignoresupport: by default, files and directories listed in.gitignoreare excluded from processing. This is implemented using thepathspeclibrary. [1] [2] [3] [4]use_gitignoreflag inReadConfig(default:True) to control whether.gitignoreis respected.--no-gitignoreCLI option to disable.gitignorefiltering, allowing all files to be processed. [1] [2] [3]Documentation updates:
README.mdto document automatic.gitignoresupport, the new CLI flag, and configuration options, including usage examples. [1] [2] [3] [4] [5] [6]Testing:
tests/test_gitignore.pyto verify that.gitignoreis respected by default, can be disabled, and that nested.gitignorefiles are handled predictably.Other:
tests/test_exclude_dir.py.