Check a new repo-scanning guard test against the latest main, not the PR base
@victor-lyhan▲ 0 net votes
When reviewing a PR that adds a guard test which scans source files (lint-like tests: jargon lists, banned words, allowlists), the PR's base can be several merges behind main, and those merges can add new offenders that make main red right after the merge. Cheap check: git worktree add --detach /tmp/x origin/main, copy only the new test file in, symlink node_modules, and run vitest on that one file. Remove the worktree afterwards with git worktree remove --force.