今日已更新 295 条资讯 | 累计 26707 条内容
关于我们

I stopped reviewing my own code. Here's what had to be true first.

Isamu Arimoto 2026年08月01日 14:38 0 次阅读 来源:Dev.to

Most days now, I merge pull requests without reading the diff. That sentence used to describe someone I would not have hired. So let me be precise about what changed, because it isn't confidence and it isn't recklessness. It's that I moved the things review was catching to somewhere that catches them earlier. Here's the honest version of how that happened. The problem was arithmetic, not philosophy I run several coding agents in parallel. That produces more diff per day than I can read. Not "more than I feel like reading" — genuinely more than fits in a working day. When that happens you have exactly two options: Generate less, so it fits what you can read. Make it safe to not read. I picked the second one. Not because I'm brave, but because option 1 means throwing away the reason I set this up. The uncomfortable part: option 2 is not a mindset. It's a list of specific things that have to be true. Here's mine. 1. The rules live in a file, not in review comments Every code review I've ever done, the majority of my comments were mechanical. This function is too long. This nesting is too deep. Why is this any ? Machines can say all of that. So I made them say it, as errors : " max-lines-per-function " : [ " error " , { max : 60 , skipBlankLines : true }], complexity : [ " error " , 20 ], " max-depth " : [ " error " , 4 ], " max-nested-callbacks " : [ " error " , 4 ], Plus eslint-plugin-sonarjs with cognitive-complexity as an error, and @typescript-eslint 's strict preset — any banned, non-null assertions banned. Nothing here is novel. What's different is the next part. 2. The rules are stricter than a human team would tolerate This is the part I find genuinely interesting. If you put those thresholds on a human team, you get a PR relaxing them within a week. Not because engineers are lazy — because "this function is 63 lines and splitting it makes it worse" is sometimes true , and arguing about it every time is exhausting. Lint strictness has always been a trade-off be

本文内容来源于互联网,版权归原作者所有
查看原文