Repository navigation
feat: support full git-ignore specification - #809
Merged
Merged
Conversation
- Added support for character class patterns in GitignoreFilter - Updated dependency versions in THIRD-PARTY-NOTICES.txt - Added new test cases to ensure full git-ignore specification is supported Refs: #123
There was a problem hiding this comment.
🟡 Changes recommended
Active moderate and critical findings remain in the notice inventory and GitignoreFilter parsing, including incorrect platform attribution and patterns that can mis-match or cause parser failure.
6 open issues
Honor escapes when scanning character classes · New Retain Windows artifact in notice inventory · New Retain Windows Skiko runtime notice · New Preserve caret as character-class negation · New Treat character classes as wildcards when anchoring · New Test exclusion of the filename with a trailing space · New
What changed in this PR
This pull request expands GitignoreFilter toward full Git-ignore specification support, including character classes, escaping, trailing spaces, ** patterns, negation handling, and related regression tests.
Changes:
- Extended Git-ignore parsing for character classes, escapes, trailing spaces, and
**segments. - Added ancestor-ignore handling and expanded
GitignoreFiltertest coverage. - Updated platform-specific third-party dependency notices.
| File | Review findings |
|---|---|
THIRD-PARTY-NOTICES.txt |
Moderate (4 votes): Retain the Windows native dependency entry alongside the new macOS ARM entry. Moderate (3 votes): Retain the Windows Skiko runtime entry alongside the new macOS ARM runtime entry. |
shared-jvm/src/test/kotlin/io/askimo/core/rag/filter/GitignoreFilterTest.kt |
Nit (2 votes): Add a positive assertion for a filename ending in an escaped trailing space before checking the no-space variant. |
shared-jvm/src/main/kotlin/io/askimo/core/rag/filter/GitignoreFilter.kt |
Critical (3 votes): Handle escaped brackets when locating class terminators and converting class contents. Moderate (4 votes): Preserve ^ as a class-negation marker after [. Moderate (3 votes): Treat character classes as wildcards for any-level matching. Moderate (1 vote): Detect adjacent slash-delimited **/ segments from source indices. Moderate (1 vote): Apply ignored-ancestor checks to every otherwise-unignored path, not only negation matches. |
Review effort: Lite
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
Related Issue(s)
Type of Change
What Changed & Why
How to Test
./gradlew testScreenshots / Recordings (if applicable)
Checklist
main./gradlew spotlessApplyand./gradlew detektlocally./gradlew testand all tests passgit commit -sAdditional Notes