-
Notifications
You must be signed in to change notification settings - Fork 0
Move ignore into the gitignore module #108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
UnstoppableMango
commented
Jan 5, 2026
- Remove ignore deps
- New ignore module
- Rename to gitignore
- Gitignore module and filter refactoring
- Tweaks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the ignore functionality by extracting gitignore-specific logic into a new dedicated gitignore module, while simplifying the ignore module and enhancing the filter module with more flexible APIs. The changes also include dependency updates and build configuration adjustments.
Key Changes:
- Created a new
gitignoremodule with gitignore-specific functions (moved fromignoremodule) - Simplified the
ignoremodule to a minimal generic interface with a singleNewFsfunction - Refactored the
filtermodule to support both Filter (error-returning) and Predicate (boolean) patterns - Removed the
github.com/sabhiram/go-gitignoredependency from the root module (now only ingitignore) - Updated various dependencies including golang.org/x tooling
Reviewed changes
Copilot reviewed 21 out of 26 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| gitignore/fs.go | New module containing gitignore-specific filesystem filtering functions |
| gitignore/fs_test.go | Test suite for the new gitignore module |
| gitignore/go.mod | Go module definition for the gitignore submodule |
| ignore/fs.go | Simplified to a minimal generic ignore interface |
| ignore/fs_test.go | Restructured tests with nested contexts for better organization |
| filter/fs.go | Enhanced with Filter and Predicate types, added FromFilter and FromPredicate constructors |
| filter/file.go | Updated to use the new Filter type instead of Predicate |
| filter/fs_test.go | Restructured tests with nested contexts for better organization |
| go.mod | Removed gitignore dependency (moved to gitignore submodule) |
| Makefile | Updated to include gitignore module in build targets |
| flake.nix | Added gitignore module to Nix flake inputs |
| gomod2nix.toml, go.sum | Dependency updates and removals |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #108 +/- ##
==========================================
- Coverage 62.69% 62.38% -0.31%
==========================================
Files 22 22
Lines 571 561 -10
==========================================
- Hits 358 350 -8
+ Misses 186 185 -1
+ Partials 27 26 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|