Skip to content

fix(diff-filter): ignore Anchor .anchor/ generated directory#99

Open
weilixiong wants to merge 1 commit into
Ghbounty:mainfrom
weilixiong:main
Open

fix(diff-filter): ignore Anchor .anchor/ generated directory#99
weilixiong wants to merge 1 commit into
Ghbounty:mainfrom
weilixiong:main

Conversation

@weilixiong
Copy link
Copy Markdown

Summary

Adds .anchor/ to GENERATED_DIR_PREFIXES so that Anchor framework build artifacts (test ledger, IDL cache) are filtered from the diff shown to Sonnet.

Changes

  • packages/diff-filter/src/patterns.ts: Added .anchor/ to GENERATED_DIR_PREFIXES array
  • packages/diff-filter/tests/classify.test.ts: Added contracts/solana/.anchor/test-ledger/genesis.bin test case

Verification

# All 69 existing tests pass
cd packages/diff-filter && npx vitest run
#
# ✓ tests/parse.test.ts (8 tests)
# ✓ tests/filter.test.ts (9 tests)
# ✓ tests/classify.test.ts (52 tests)
# Test Files  3 passed (3)
# Tests  69 passed (69)

Closes #67

Adds .anchor/ to GENERATED_DIR_PREFIXES so that ledger artifacts
and IDL cache files generated by 'anchor build' / 'anchor test'
are filtered from the diff shown to Sonnet.

Closes Ghbounty#67
@weilixiong weilixiong requested a review from tomazzi14 as a code owner May 18, 2026 15:31
@vercel
Copy link
Copy Markdown

vercel Bot commented May 18, 2026

@weilixiong is attempting to deploy a commit to the weareghbounty-6269's projects Team on Vercel.

A member of the Team first needs to authorize it.

@weilixiong
Copy link
Copy Markdown
Author

Hi maintainers! Just a friendly ping on this PR — it adds .anchor/ to GENERATED_DIR_PREFIXES to prevent git diff from picking up generated directory changes.

All 69 existing tests pass (including the new test for .anchor/). Would appreciate a review when you get a chance. Thanks!

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.

diff-filter: ignore Anchor's .anchor/ generated directory

1 participant