阿里巴巴开源 AI 代码审查工具 OpenCodeReview
原标题:Alibaba Open Sources OpenCodeReview for AI-Assisted Code Review
AI 摘要
阿里巴巴开源了 AI 代码审查 CLI 工具 OpenCodeReview,采用 Apache-2.0 许可,将文件选择、打包和规则匹配等环节交给确定性流水线,仅用 LLM 代理做动态代码分析,支持空指针、线程安全、XSS、SQL 注入等检查。该工具已在阿里内部数万开发者中使用两年,兼容 OpenAI 和 Anthropic 模型,可审查 Git diff、分支或整个文件。阿里内部基准称其在 200 个 PR 上精度和 F1 高于 Claude Code 且 token 消耗约为九分之一,但社区独立测试显示精度约 12%、最佳配置召回率仅 20%,引发对召回上限的讨论。
正文节选
Alibaba recently open-sourced OpenCodeReview, an AI-powered code review CLI that combines deterministic pipelines for file selection, bundling, and rule matching with an LLM agent for dynamic code analysis. It supports built-in checks for issues such as null-pointer exceptions, thread safety, XSS, and SQL injection. Open-sourced under an Apache-2.0 license, OpenCodeReview is a Go-based CLI that avoids using AI for decisions that can be handled deterministically, such as selecting files, choosing