Skip to content

Fix diff filtering for uppercase extensions and recursive patterns - #178

Merged
andrew merged 1 commit into
git-pkgs:mainfrom
a3ylf:fix/diff-pattern-matching
Sep 15, 2026
Merged

andrew merged 1 commit into
git-pkgs:mainfrom
a3ylf:fix/diff-pattern-matching

Conversation

@a3ylf

@a3ylf a3ylf commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

brief diff drops R, R Markdown, and mkmf detections when changed files have uppercase extensions or match a recursive pattern across multiple directories. Normalize pattern extensions to match the changed-extension lookup, and reuse the existing recursive path matcher.

Adds regression coverage for nested .R and .Rmd files, zero/deep ** matches, and ordinary wildcard matches and misses. Both new tests fail before the fix and pass afterward.

Fixes #176.

Validation: go build ./..., go test -race ./..., and golangci-lint 2.13.2 (0 issues).

Prepared with AI assistance.

@abhinavgautam01 abhinavgautam01 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed the implementation and regression coverage. Both fixes address #176 correctly, including deeply nested paths and zero-directory ** matches. I verified that the new tests fail before the fix and pass afterward...

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.

🟢 Approval recommended

The filtering fixes and regression coverage are complete with no unresolved blocking issues.

Pull request overview

Fixes brief diff filtering for uppercase extensions and recursive glob patterns.

Changes:

  • Normalizes detection pattern extensions.
  • Reuses recursive path matching.
  • Adds regression tests for nested and wildcard paths.
File summaries
File Description
detect/filter.go Corrects extension and recursive-pattern matching.
detect/filter_test.go Adds regression coverage for updated filtering.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@andrew
andrew merged commit 4bebcf6 into git-pkgs:main Sep 15, 2026
5 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.

brief diff drops detections for uppercase extensions and recursive glob patterns

4 participants