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
- scripts/github-actions/post-review-comments.js717 cx
- cmd/opencodereview/provider_tui.go708 cx
- scripts/github-actions/post-review-comments.test.js683 cx
- cmd/opencodereview/provider_tui_test.go524 cx
- internal/llm/resolver_test.go515 cx
- cmd/opencodereview/config_cmd_test.go495 cx
- internal/config/rules/system_rules_test.go445 cx
- cmd/opencodereview/provider_tui_funcs_test.go418 cx
- examples/gitlab_ci/post_review.py398 cx
- internal/llm/client_test.go368 cx
Dead code 3.57% 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> - 9 lines in 3 placesgo74 tokens
32func (p *CodeSearchProvider) Execute(ctx context.Context, args map[string]any) (string, error) { 33 return p.Access.execute(ctx, args, p.FileReader, func(reader *FileReader) (string, error) { 34 selected := *p 35 selected.FileReader = reader 36 return selected.execute(ctx, args) 37 }) 38} 39 40func (p *CodeSearchProvider) execute(ctx context.Context, args map[string]any) (string, error) {33func (p *FileFindProvider) Execute(ctx context.Context, args map[string]any) (string, error) { 34 return p.Access.execute(ctx, args, p.FileReader, func(reader *FileReader) (string, error) { 35 selected := *p 36 selected.FileReader = reader 37 return selected.execute(ctx, args) 38 }) 39} 40 41func (p *FileFindProvider) execute(ctx context.Context, args map[string]any) (string, error) { - 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>
7 more
- 18 lines in 2 placestsx134 tokens
- 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
Largest clones over all files, tests and data included
- 760 lines in 3 placesjsontests1,945 tokensinternal/reviewtask/testdata/equivalence/review_async.json:208–967internal/reviewtask/testdata/equivalence/review_normal.json:208–967internal/reviewtask/testdata/equivalence/scan_normal.json:208–967
208 "arguments": "{\"comments\":[{\"path\":\"sample.go\",\"content\":\"issue\",\"existing_code\":\"package main\"},{\"path\":\"sample.go\",\"content\":\"se… 209 } 210 } 211 ] 212}, 213{ 214 "role": "tool", 215 "content": "Successfully commented.", 216 "tool_call_id": "call_comment" 217}First 10 of 760 lines.
- 1286 lines in 2 placesjsontests3,342 tokensinternal/reviewtask/testdata/equivalence/review_invalid.json:60–1345internal/reviewtask/testdata/equivalence/scan_invalid.json:60–1345
60"main_task": [ 61 { 62 "Type": "main_task", 63 "RequestNo": 1, 64 "RequestMessages": [ 65 { 66 "role": "system", 67 "content": "Review the supplied code." 68 }, 69 {First 10 of 1286 lines.
- 232 lines in 2 placesmarkdowndocs and examples2,575 tokensplugins/open-code-review/skills/open-code-review/SKILL.md:29–260skills/open-code-review/SKILL.md:24–255
29## Workflow 30 31### Step 1: Gather Business Context 32 33Analyze the review target (commits, branch, or changes) to extract concise business context. Pass this context via `--background` to improve review quality. 34 35### Step 2: Run Code Review 36 37**Do not pre-check whether `ocr` is installed** — skip probes like `command -v ocr` or `ocr --version`. Assume the CLI is available and run the review directly… 38First 10 of 232 lines.
- 919 lines in 2 placesjsontests2,384 tokens
- 895 lines in 2 placesjsontests2,315 tokens
By format, code only
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| go | 190 | 45,597 | 57 | 575 | 1.26% |
| tsx | 45 | 5,836 | 26 | 291 | 4.99% |
| typescript | 35 | 5,087 | 4 | 37 | 0.73% |
| javascript | 19 | 6,672 | 2 | 20 | 0.3% |
| kotlin | 31 | 5,621 | 2 | 16 | 0.28% |
| bash | 8 | 1,104 | 2 | 31 | 2.81% |
| powershell | 1 | 158 | 0 | 0 | 0% |
By format, all files
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| go | 534 | 144,874 | 1,064 | 10,790 | 7.45% |
| json | 75 | 20,727 | 126 | 19,300 | 93.12% |
| bash | 110 | 3,168 | 89 | 1,202 | 37.94% |
| javascript | 29 | 19,429 | 85 | 969 | 4.99% |
| markdown | 219 | 41,585 | 82 | 1,775 | 4.27% |
| text | 52 | 1,378 | 36 | 777 | 56.39% |
| tsx | 54 | 6,561 | 28 | 327 | 4.98% |
| yaml | 47 | 4,422 | 23 | 618 | 13.98% |
| python | 15 | 6,139 | 13 | 135 | 2.2% |
| typescript | 58 | 9,036 | 11 | 113 | 1.25% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| Nov 18, 2026 | #2 | 53,883 (+763) | 1,280 | 273,131 | 1,576 | 13.25% | 1.38% | D 50.9 | 319c342 |
| Nov 17, 2026 | #10 | 53,104 (+951) | 1,276 | 271,491 | 1,563 | 13.29% | 1.4% | D 51 | 0f5a284 |
| Nov 16, 2026 | #6 | 52,323 (+691) | 1,273 | 270,556 | 1,549 | 13.29% | 1.39% | D 51.1 | 7e5ce06 |
| Nov 15, 2026 | #5 | 51,527 (+893) | 1,273 | 270,556 | 1,549 | 13.29% | 1.39% | D 51.1 | 7e5ce06 |
| Nov 14, 2026 | #1 | 50,786 (+215) | 1,267 | 268,740 | 1,538 | 13.34% | 1.38% | D 51.1 | abd6416 |
| 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.