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

I built a tool that roasts your code with regex — no AI involved

#Adamya Singh Shengar 2026年08月04日 11:44 10 次阅读 来源:Dev.to

The problem In 2026, devs spend 11.4 hours a week reviewing AI-generated code — more time than they spend writing it. We're burning cycles fixing bugs our own AI tools wrote. I started calling this "AI debt": the maintainability tax that piles up when nobody's actually reading the code the assistant just spat out. I wanted a fast, brutal way to see how much debt was hiding in a file before I even opened a PR. What I built Roast My Code — paste a code snippet, get an AI Debt Score (0–100) and get roasted for your sins. 118 regex patterns across 8 languages (JS/TS, Python, Go, Rust, Java, PHP, C++) Scores broken into Readability, Structure, Error Handling, Safety, and Style Code metrics: nesting depth, duplication %, comment ratio, avg line length Three brutal one-liner roasts + concrete fixes for each issue found The twist: zero AI. No API calls, no LLM, no backend. Everything runs client-side with regex pattern matching. Your code never leaves your browser. Why regex, not AI Honestly — irony. A tool built to call out AI slop shouldn't itself be another wrapper around GPT. Regex is also just... faster. No API latency, no cost, no rate limits, no "please wait while I analyze your code" spinner. You paste, you get roasted in under a second. It's not going to catch everything a proper linter or an LLM code reviewer would. That's not the point — it's a gut-check, not a static analysis suite. A taste of the roasts javascript var API_KEY = "sk_live_51H8xJ2kL9mNpQrStUvWxYz..."; if (a == 1) { if (b == 2) { if (c == 3) { x = eval(a + b + c); } } } 🔒 is that a hardcoded credential? in 2026? we need to talk. your teammate rewrote this on a Sunday. FIX: Move it to an environment variable or secret store, then rotate the credential. 🎆 eval(). we don't need to say more. you know what you did. this is the part reviewers skim past. FIX: Replace eval with a lookup table, JSON.parse, or an explicit parser. Try it 🔗 Live app 💻 Source on GitHub — MIT licensed, PRs welcome Paste your wor

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