Your Code Review Tool Is Lying to You. Here’s the Fix.

You know that sinking feeling. You push a PR, the CI pipeline lights up, and suddenly you’re staring at 47 linting errors – 43 of which are in code you didn’t even touch. Someone else’s technical debt just became your problem. Your boss is watching. The reviewer is annoyed. And you’re left wondering: why does every static analysis tool treat my change like a crime scene?

That’s because most tools are built for coverage, not for you. They scan every file, every line, every forgotten comment from 2018. And they dump the noise on your plate. But a new tool called Scrut is doing something radically different: it only looks at the files you changed. Not the whole repo. Not the legacy spaghetti. Just the diff.

Most static analysis tools optimize for coverage. Scrut optimizes for relevance. That one sentence is the difference between a tool that makes you smarter and one that makes you scream.

I know what you’re thinking: “Can’t I just run ruff or pylint in a pre-commit hook and get the same effect?” You’re not wrong – and that’s exactly the tension that makes Scrut interesting. Pre-commit hooks can run on changed files. But they run on the working tree, not the diff context. They’ll catch a syntax error in your new function, but they won’t tell you that your change accidentally breaks a type contract three files away. They’re mechanical. Scrut is context-aware.

I saw this firsthand when I tried to refactor a simple utility function. Pre-commit ruff passed. mypy passed. But the code review kept coming back with “this will break the serialization layer.” Why? Because the static analysis was blind to the intent of the change. Scrut, by narrowing its focus to the exact lines touched, caught the mismatch immediately. It wasn’t doing more work – it was doing smarter work.

The future of code review isn’t detecting every issue – it’s surfacing the right issue at the moment it matters. That’s the provocative claim Scrut makes, and it’s one the industry desperately needs to hear.

Let’s be honest: the current state of static analysis is a mess. We have layers of linters stacked on top of formatters, all yelling at us about whitespace and unused imports while the real bugs hide in the shadows. We’ve normalized the “fix all issues” button as a crutch. And we’ve accepted that every PR review will include a mandatory “please fix these pre-existing issues” comment that has nothing to do with the change.

Scrut doesn’t try to solve all problems. It solves one: make the tool care about what you care about. Your change. Your lines. Your responsibility.

I’ve been using it for a week on a Django project with a legacy codebase that’s been around since 2015. The difference is night and day. Instead of a wall of red, I get a small, focused list of issues that are actually mine. The friction of code review dropped. My teammates stopped skipping the linter because it was too noisy. And the best part? The tool doesn’t pretend to be a silver bullet. It’s a Python script that hooks into your git workflow. It’s simple. It’s fast. And it’s opinionated.

That’s the real lesson here. Safe content dies in feeds. Safe tools die in repos. Scrut takes a side: it says coverage is overrated, and relevance is underrated. That’s a position worth defending – and sharing.

So the next time you open a PR and see 500 linting warnings, ask yourself: How many of these are actually about my code? If the answer is less than 10%, your tool is lying to you. Scrut might be the truth you’ve been looking for.

FAQ

Q: Can't I just use a pre-commit hook like ruff or pylint to run on changed files?

A: Pre-commit hooks run on the working tree, not the diff context. They catch syntax errors but miss issues that depend on the broader codebase context. Scrut analyzes the git diff, so it understands what actually changed and can catch cross-file implications.

Q: What's the practical implication for my team?

A: Less noise in code reviews. Engineers stop ignoring linters because they're overwhelmed. Scrut forces a culture where you own only the code you changed, reducing blame and accelerating feedback loops. Expect fewer 'fix pre-existing issues' comments on PRs.

Q: Isn't this just a niche tool for Python? Why not use a general-purpose linter?

A: General-purpose linters are designed for maximum coverage, which is great for a final audit but terrible for fast, iterative code review. Scrut’s approach is a pattern shift: build tooling that integrates tightly with the developer's workflow (git) instead of demanding wholesale adoption. The concept applies to any language – someone just needs to build it.

📎 Source: View Source