rustgrade: a fast Rust scanner for anti-patterns that coding agents leave behind

The author has been using coding agents to write Rust and kept finding recurring problems that compile and pass tests, such as unwrap in library code, std Mutex guards held across awaits, and excessive cloning. To catch these, they built rustgrade, a syn-based scanner with eight rules that needs no LLM, no network access, and no build step. Because it skips type information, it can misjudge some cases, so developers can silence findings inline with a stated reason that remains visible in CI output. The tool runs in about 20 ms on a 445-line file, fast enough to check every agent edit, and it also works standalone in terminals or CI with SARIF output. It integrates as a skill and commands across several AI coding assistants, and was run on 15 well-known open-source crates, which received grades between A and C.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in