Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions packages/diff-filter/src/patterns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ export const GENERATED_DIR_PREFIXES = [
".ruff_cache/",
".venv/",
"venv/",
// Anchor framework (Solana). Sibling to Cargo's `target/` which is
// already covered above, but `.anchor/` holds the test-ledger
// genesis, IDL caches, and program-test snapshots that change on
// every `anchor build` / `anchor test` run. We use Anchor in this
// very repo at `contracts/solana/`, so PRs touching escrow
// instructions previously leaked these regen artifacts into the
// diff Sonnet scored.
".anchor/",
];

export const GENERATED_FILE_SUFFIXES = [
Expand Down
6 changes: 6 additions & 0 deletions packages/diff-filter/tests/classify.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ describe("classifyPath — generated dirs", () => {
"app/.next/static/chunks/webpack.js",
"coverage/lcov-report/index.html",
"__pycache__/module.cpython-311.pyc",
// Anchor framework — `.anchor/` holds regenerated ledger state and
// IDL caches. Both top-level and nested (under the actual workspace
// path used in this repo) must be filtered.
".anchor/test-ledger/genesis.bin",
"contracts/solana/.anchor/test-ledger/rocksdb/CURRENT",
"contracts/solana/.anchor/program-logs/escrow.log",
])("marks %s as generated_dir", (path) => {
const r = classifyPath(path);
expect(r.ignore).toBe(true);
Expand Down
Loading