alibaba/open-code-review
Secure, fast, efficient, battle-tested at Alibaba's scale. Hybrid architecture code review tool: deterministic pipelines + LLM Agent, precise line-level comments, built-in multi-language ruleset (NPE, thread-safety, XSS, SQL injection), OpenAI & Anthropic compatible.
The score is jscpd's own --health model: markup, data and text left out, tests kept. The numbers below are the trending scan's.
Most complex files
- cmd/opencodereview/provider_tui.go705 cx
- scripts/github-actions/post-review-comments.js694 cx
- scripts/github-actions/post-review-comments.test.js645 cx
- cmd/opencodereview/provider_tui_test.go524 cx
- internal/llm/resolver_test.go502 cx
- cmd/opencodereview/config_cmd_test.go446 cx
- internal/config/rules/system_rules_test.go419 cx
- cmd/opencodereview/provider_tui_funcs_test.go418 cx
- examples/gitlab_ci/post_review.py398 cx
- internal/llm/client_test.go357 cx
Dead code 3.87% unused · 16 findings
- plugins/open-code-review/opencode/open-code-review.tsunused-file
- internal/viewer/static/session.jsunused-file
- internal/viewer/static/pager.jsunused-file
- extensions/frontend/src/webview/configStore.tsunused-file
- extensions/frontend/src/webview/ConfigPanelApp.tsxunused-file
- extensions/frontend/src/webview/bridge.idea.tsunused-file
- internal/viewer/static/a11y.jsunused-file
- internal/viewer/static/repos.jsunused-file
- extensions/vscode/src/extension/extension.ts:activateunused-export
- extensions/frontend/src/webview/bridge.vsc.tsunused-file
The code number leaves out tests, fixtures, docs, examples, data files, styles, translations and vendored code, and 3 generated files: extensions/frontend/src/shared/providers.generated.ts, extensions/idea/src/main/kotlin/com/alibaba/opencodereview/idea/services/ProviderNames.generated.kt, internal/llm/gen/kotlin.go.
Largest clones in the code
- 10 lines in 2 placestsx157 tokenspages/src/components/QuickStartSection.tsx:113–122pages/src/components/QuickStartSection.tsx:142–151
113 <CodeBlock label={t('quickstart.step1Label2')} code="ocr version" onCopy={handleCopy} /> 114 </div> 115</div> 116 117{/* Step 2 */} 118<div style={{ display: 'flex', flexDirection: 'column', background: 'rgba(255,255,255,0.04)', border: '1px solid rgba(255,255,255,0.16)', borderRadius: 8, padd… 119 <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 16 }}> 120 <div style={{ display: 'flex', alignItems: 'center', gap: 12 }}> 121 <div style={{ width: 32, height: 32, display: 'flex', justifyContent: 'center', alignItems: 'center', background: 'rgba(255,255,255,0.04)', borderRadius:… 122 <span style={{ color: 'rgba(255,255,255,0.6)', fontSize: 13, fontWeight: 500 }}>02</span>142 <CodeBlock label={t('quickstart.step2Label3')} code="ocr llm test" onCopy={handleCopy} /> 143 </div> 144</div> 145 146{/* Step 3 */} 147<div style={{ display: 'flex', flexDirection: 'column', background: 'rgba(255,255,255,0.04)', border: '1px solid rgba(255,255,255,0.16)', borderRadius: 8, padd… 148 <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 16 }}> 149 <div style={{ display: 'flex', alignItems: 'center', gap: 12 }}> 150 <div style={{ width: 32, height: 32, display: 'flex', justifyContent: 'center', alignItems: 'center', background: 'rgba(255,255,255,0.04)', borderRadius:… 151 <span style={{ color: 'rgba(255,255,255,0.6)', fontSize: 13, fontWeight: 500 }}>03</span> - 6 lines in 2 placestsx139 tokens
97{/* Step 1 */} 98<div style={{ display: 'flex', flexDirection: 'column', background: 'rgba(255,255,255,0.04)', border: '1px solid rgba(255,255,255,0.16)', borderRadius: 8, padd… 99 <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 16 }}> 100 <div style={{ display: 'flex', alignItems: 'center', gap: 12 }}> 101 <div style={{ width: 32, height: 32, display: 'flex', justifyContent: 'center', alignItems: 'center', background: 'rgba(255,255,255,0.04)', borderRadius:… 102 <span style={{ color: 'rgba(255,255,255,0.6)', fontSize: 13, fontWeight: 500 }}>01</span>117{/* Step 2 */} 118<div style={{ display: 'flex', flexDirection: 'column', background: 'rgba(255,255,255,0.04)', border: '1px solid rgba(255,255,255,0.16)', borderRadius: 8, padd… 119 <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 16 }}> 120 <div style={{ display: 'flex', alignItems: 'center', gap: 12 }}> 121 <div style={{ width: 32, height: 32, display: 'flex', justifyContent: 'center', alignItems: 'center', background: 'rgba(255,255,255,0.04)', borderRadius:… 122 <span style={{ color: 'rgba(255,255,255,0.6)', fontSize: 13, fontWeight: 500 }}>02</span> - 18 lines in 2 placestsx134 tokens
409 background: idx === searchSelectedIdx ? 'rgba(255,255,255,0.08)' : 'transparent', 410 border: 'none', 411 cursor: 'pointer', 412 textAlign: 'left', 413 outline: 'none', 414 transition: 'background 0.1s', 415 }} 416 onMouseEnter={() => setSearchSelectedIdx(idx)} 417> 418 <div style={{ color: '#ffffff', fontSize: 14, fontWeight: 500, fontFamily, marginBottom: 4 }}>First 10 of 18 lines.
7 more
- 35 lines in 2 placestsx132 tokens
- 23 lines in 2 placesgo129 tokens
- 7 lines in 2 placestsx128 tokens
- 13 lines in 2 placesgo127 tokens
- 21 lines in 2 placesgo125 tokens
- 12 lines in 2 placestsx122 tokens
- 11 lines in 3 placesgo60 tokens
Largest clones over all files, tests and data included
- 232 lines in 2 placesmarkdowndocs and examples2,450 tokensplugins/open-code-review/skills/open-code-review/SKILL.md:30–261skills/open-code-review/SKILL.md:25–256
30A skill for invoking [open-code-review](https://github.com/alibaba/open-code-review) (`ocr`) — an open-source AI code review CLI that reads Git diffs and gener… 31 32## Workflow 33 34### Step 1: Gather Business Context 35 36Analyze the review target (commits, branch, or changes) to extract concise business context. Pass this context via `--background` to improve review quality. 37 38### Step 2: Run Code Review 39First 10 of 232 lines.
- 527 lines in 5 placesyamldocs and examples511 tokenspages/src/content/docs/en/integrations/ci.md:2–528pages/src/content/docs/ja/integrations/ci.md:2–429pages/src/content/docs/ko/integrations/ci.md:2–499pages/src/content/docs/ru/integrations/ci.md:2–525pages/src/content/docs/zh/integrations/ci.md:2–472
2title: CI/CD 3sidebar: 4 order: 4 5--- 6 7Run OCR on every Pull Request or Merge Request. The upstream repo 8ships two ready-made pipelines you copy and configure — one for 9GitHub Actions, one for GitLab CI. Both are thin wrappers around the 10core command documented in the [CLI Reference](../cli-reference/#json). 112title: CI/CD 3sidebar: 4 order: 4 5--- 6 7すべての Pull Request または Merge Request で OCR を実行します。上流リポジトリは、コピーして設定するだけのすぐ使える 2 つのパイプラインを提供しています——1 つは GitHub Actions、もう 1 つは GitLab CI です。どちらも 8[CLI リファレンス](../cli-reference/#json)に記載されている中核コマンドの薄いラッパーです。 9 10## CI/CD 統合の仕組み 11First 10 of 527 lines, the second copy on the right.
- 23 lines in 4 placesmarkdowndocs and examples609 tokenspages/src/content/docs/en/configuration.md:48–70pages/src/content/docs/ja/configuration.md:46–68pages/src/content/docs/ko/configuration.md:44–66pages/src/content/docs/ru/configuration.md:51–73
48| `bedrock` | anthropic-bedrock | derived from `aws_region` | — (AWS credential chain) | 49| `openai` | openai | `https://api.openai.com/v1` | `OPENAI_API_KEY` | 50| `openai-responses` | openai-responses | `https://api.openai.com/v1` | `OPENAI_RESPONSES_API_KEY` | 51| `openrouter` | openai | `https://openrouter.ai/api/v1` | `OPENROUTER_API_KEY` | 52| `gemini` | openai | `https://generativelanguage.googleapis.com/v1beta/openai` | `GEMINI_API_KEY` | 53| `dashscope` | openai | `https://dashscope.aliyuncs.com/compatible-mode/v1` | `DASHSCOPE_API_KEY` | 54| `dashscope-tokenplan` | openai | `https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1` | `DASHSCOPE_TOKENPLAN_KEY` | 55| `volcengine` | openai | `https://ark.cn-beijing.volces.com/api/v3` | `ARK_API_KEY` | 56| `deepseek` | openai | `https://api.deepseek.com` | `DEEPSEEK_API_KEY` | 57| `tencent-tokenhub` | openai | `https://tokenhub.tencentmaas.com/v1` | `TENCENT_TOKENHUB_API_KEY` |First 10 of 23 lines.
- 178 lines in 2 placesmarkdowndocs and examples1,814 tokens
- 181 lines in 2 placesmarkdowndocs and examples1,716 tokens
By format, code only
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| go | 126 | 36,259 | 60 | 627 | 1.73% |
| tsx | 44 | 5,729 | 25 | 285 | 4.97% |
| typescript | 35 | 5,030 | 5 | 45 | 0.89% |
| javascript | 18 | 6,103 | 2 | 20 | 0.33% |
| kotlin | 31 | 5,603 | 2 | 16 | 0.29% |
| bash | 17 | 1,798 | 2 | 31 | 1.72% |
| perl | 1 | 168 | 0 | 0 | 0% |
| powershell | 1 | 158 | 0 | 0 | 0% |
By format, all files
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| go | 358 | 113,075 | 899 | 9,148 | 8.09% |
| markdown | 190 | 36,359 | 84 | 1,953 | 5.37% |
| javascript | 26 | 17,104 | 82 | 927 | 5.42% |
| bash | 107 | 3,623 | 77 | 1,058 | 29.2% |
| text | 51 | 1,224 | 36 | 778 | 63.56% |
| tsx | 51 | 6,295 | 27 | 321 | 5.1% |
| yaml | 45 | 4,109 | 20 | 563 | 13.7% |
| python | 13 | 5,849 | 13 | 135 | 2.31% |
| json | 49 | 2,141 | 12 | 581 | 27.14% |
| typescript | 57 | 8,705 | 11 | 114 | 1.31% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| Oct 10, 2026 | #3 | 45,439 (+326) | 1,025 | 213,351 | 1,280 | 7.39% | 1.68% | D 50.1 | 35fc3e2 |
| Sep 19, 2026 | #3 | 36,861 (+2,704) | 984 | 202,192 | 1,193 | 7.24% | 1.68% | D 50.7 | 85cecfe |
| Sep 18, 2026 | #1 | 35,378 (+3,286) | 914 | 193,904 | 1,184 | 7.41% | 1.94% | — | 78c0765 |
| Sep 17, 2026 | #1 | 32,553 (+3,231) | 910 | 190,101 | 1,154 | 7.37% | 1.91% | — | 8316e0d |
| Sep 16, 2026 | #1 | 29,206 (+2,756) | 908 | 189,107 | 1,148 | 7.37% | 1.91% | — | a694be5 |
| Sep 15, 2026 | #2 | 26,278 (+1,571) | 901 | 187,417 | 1,139 | 7.48% | 1.92% | — | e0bab8e |
| Sep 14, 2026 | #11 | 23,782 (+443) | 900 | 186,666 | 1,135 | 7.47% | 1.91% | — | 78a6978 |
Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.