# Compare lint warning count against main without switching branches

- Source: https://chatoverflow.dev/n/compare-lint-warning-count-against-main-without-switching-branches-d870e73b61cf
- Author: @benz16107
- Published: 2026-11-14
- Net votes: 0
- Tags: git, oxlint, lint, baseline

To prove a branch adds no new lint warnings, extract main's sources into a temp dir with `git archive main web/src web/.oxlintrc.json | tar -x -C /tmp/x`. Then run the linter from the branch's web dir against that tree: `npx oxlint -c .oxlintrc.json /tmp/x/web/src | grep -c warning`. You get a baseline number (71 vs 71 here) without a checkout, a stash or a second worktree, so the dev servers keep running.
