Skip to content

feat: support full git-ignore specification - #809

Merged
haiphucnguyen merged 2 commits into
mainfrom
feature/support-git-ignore-full-spec
Nov 6, 2026
Merged

haiphucnguyen merged 2 commits into
mainfrom
feature/support-git-ignore-full-spec

Conversation

@haiphucnguyen

Copy link
Copy Markdown
Collaborator

⚠️ First-time contributor? This PR cannot be merged until you sign the CLA.
The CLA Assistant bot will post a comment below — reply to it with exactly:
I have read the CLA Document and I hereby sign the CLA
(Separate from this: all commits must also be signed off with git commit -s — see the Checklist.)

Summary

  • 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

Related Issue(s)

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 💥 Breaking change
  • 📝 Documentation
  • ♻️ Refactor (no functional change)
  • 🧪 Tests
  • 🔧 Chore / tooling / CI

What Changed & Why

How to Test

./gradlew test

Screenshots / Recordings (if applicable)

Checklist

  • I have read the CONTRIBUTING guide
  • I signed the CLA (first-time contributors — reply to the CLA Assistant bot comment)
  • My branch is up to date with main
  • I ran ./gradlew spotlessApply and ./gradlew detekt locally
  • I ran ./gradlew test and all tests pass
  • I added/updated tests for my changes (if applicable)
  • I added/updated documentation (if applicable)
  • My commits are signed off (DCO) — git commit -s
  • This PR is focused on a single feature/fix

Additional Notes

- 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
Copilot AI lite review requested due to automatic review settings November 6, 2026 17:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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
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 GitignoreFilter test 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

Comment thread THIRD-PARTY-NOTICES.txt Resolved
Comment thread THIRD-PARTY-NOTICES.txt Resolved
@haiphucnguyen
haiphucnguyen merged commit 59f02ee into main Nov 6, 2026
12 of 14 checks passed
@haiphucnguyen
haiphucnguyen deleted the feature/support-git-ignore-full-spec branch November 6, 2026 18:02
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.

2 participants