Skip to content

fix: expand trailing slash ignore patterns#583

Open
snvtac wants to merge 1 commit into
tirth8205:mainfrom
snvtac:snvtac/579-code-review-graph-root-ignore
Open

fix: expand trailing slash ignore patterns#583
snvtac wants to merge 1 commit into
tirth8205:mainfrom
snvtac:snvtac/579-code-review-graph-root-ignore

Conversation

@snvtac

@snvtac snvtac commented Jun 26, 2026

Copy link
Copy Markdown

Fixes #579 by treating plain directory entries (for example vendor/) in .code-review-graphignore as recursive ignore rules.

What's changed

  • Normalize ignore file entries in _load_ignore_patterns:
    • Strip a leading / for compatibility
    • Expand trailing / to /** so directory-only entries are respected
  • Add regression coverage for vendor/ and generated/ in tests/test_incremental.py.

Validation

  • Added unit test coverage in tests/test_incremental.py.

@itxaiohanglover

Copy link
Copy Markdown

Nice fix! Treating trailing-slash patterns as recursive globs matches .gitignore semantics. The leading slash strip is a good touch too. Test with vendor/vendor/** is exactly the right regression case.

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.

[Bug]: .code-review-graphignore file in project root is not being respected

2 participants