Skip to content

Add .gitignore support for file processing - #13

Merged
pablotoledo merged 1 commit into
mainfrom
feat/gitignore
Nov 25, 2025
Merged

Add .gitignore support for file processing#13
pablotoledo merged 1 commit into
mainfrom
feat/gitignore

Conversation

@pablotoledo

Copy link
Copy Markdown
Owner

This pull request adds automatic support for .gitignore files 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:

  • Added automatic .gitignore support: by default, files and directories listed in .gitignore are excluded from processing. This is implemented using the pathspec library. [1] [2] [3] [4]
  • Introduced a use_gitignore flag in ReadConfig (default: True) to control whether .gitignore is respected.
  • Added a --no-gitignore CLI option to disable .gitignore filtering, allowing all files to be processed. [1] [2] [3]

Documentation updates:

  • Updated README.md to document automatic .gitignore support, the new CLI flag, and configuration options, including usage examples. [1] [2] [3] [4] [5] [6]

Testing:

  • Added tests/test_gitignore.py to verify that .gitignore is respected by default, can be disabled, and that nested .gitignore files are handled predictably.

Other:

  • Minor import cleanup in tests/test_exclude_dir.py.

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.
@pablotoledo
pablotoledo merged commit 47e2650 into main Nov 25, 2025
3 checks passed
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.

1 participant